Changes for version 0.72 - 2018-11-08
- ADDED
- nth_semiprime(n) the nth semiprime
- nth_semiprime_approx(n) fast approximate nth semiprime
- semiprime_count_approx(n) fast approximate semiprime count
- semi_primes as primes but for semiprimes
- forsetproduct {...} \@a,\@b,... Cartesian product of list refs
- FIXES
- Some platforms are extremely slow for is_pillai. Speed up tests.
- Ensure random_factored_integer factor list is sorted min->max.
- forcomposites didn't check lastfor on every callback.
- Sun's compilers, in a valid interpretation of the code, generated divide by zero code for pillai testing.
- FUNCTIONALITY AND PERFORMANCE
- chebyshev_theta and chebyshev_psi redone and uses a table. Large inputs are significantly faster.
- Convert some FP functions to use quadmath if possible. Without quadmath there should be no change. With quadmath functions like LogarithmicIntegral and LambertW will be slower but more accurate.
- semiprime_count for non-trivial inputs uses a segmented sieve and precalculates primes for larger values so can run 2-3x faster.
- forsemiprimes uses a sieve so large ranges are much faster.
- ranged moebius more efficient for small intervals.
- Thanks to GRAY for his module Set::Product which has clean and clever XS code, which I used to improve my code.
- forfactored uses multicall. Up to 2x faster.
- forperm, forcomb, forderange uses multicall. 2-3x faster.
- Frobenius-Khashin algorithm changed from 2013 version to 2016/2018.
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