Changes for version 0.71 - 2018-08-28
- ADDED
- forfactored { ... } a,b loop n=a..b setting $_=n, @_=factor(n)
- forsquarefree { ... } a,b as forfactored, but only square-free n
- forsemiprimes { ... } a,b as forcomposites, but only semiprimes
- random_factored_integer(n) random [1..n] w/ array ref of factors
- semiprime_count([lo],hi) counts semiprimes in range
- FIXES
- Monolithic sieves beyond 30*2^32 (~ 1.2 * 10^11) overflowed.
- is_semiprime was wrong for five small values since 0.69. Fixed.
- FUNCTIONALITY AND PERFORMANCE
- is_primitive_root much faster (doesn't need to calulate totient, and faster rejection when n has no primitive root).
- znprimroot and znorder use Montgomery, 1.2x to 2x faster.
- slightly faster sieve_range for native size inputs (use factor_one).
- bin/primes.pl faster for palindromic primes and works for 10^17
- OTHER
- Added ability to use -DBENCH_SEG for benchmarking sieves using prime_count and ntheory::_segment_pi without table optimizations.
- Reorg of main factor loop. Should be identical from external view.
- Internal change to is_semiprime and is_catalan_pseudoprime.
Modules
Utilities related to prime numbers, including fast sieves and factoring
Pure Perl ChaCha20 CSPRNG
Elliptic curve operations for affine points
Elliptic curve operations for projective points
Get a good random seed
An auto-free object for Math::Prime::Util
Pure Perl version of Math::Prime::Util
PP front end for Math::Prime::Util
Primality proofs and certificates
A tied array for primes
An object iterator for primes
Generate random primes
Perl Big Float versions of Riemann Zeta and R functions
Number theory utilities
Examples
- examples/README
- examples/abundant.pl
- examples/csrand-gmp.pl
- examples/csrand.pl
- examples/fibprime-mce.pl
- examples/fibprime-serial.pl
- examples/fibprime-threads.pl
- examples/find_mr_bases.pl
- examples/inverse_totient.pl
- examples/ktuplet-threads.pl
- examples/ktuplet.pl
- examples/numseqs.pl
- examples/porter.pl
- examples/project_euler_010.pl
- examples/project_euler_021.pl
- examples/project_euler_037.pl
- examples/project_euler_047.pl
- examples/project_euler_049.pl
- examples/project_euler_069.pl
- examples/project_euler_070.pl
- examples/project_euler_072.pl
- examples/project_euler_095.pl
- examples/project_euler_131.pl
- examples/project_euler_142.pl
- examples/project_euler_193.pl
- examples/project_euler_211.pl
- examples/project_euler_214.pl
- examples/project_euler_342.pl
- examples/project_euler_357.pl
- examples/sophie_germain.pl
- examples/twin_primes.pl
- examples/verify-cert.pl
- examples/verify-gmp-ecpp-cert.pl
- examples/verify-primegaps.pl
- examples/verify-sage-ecpp-cert.pl