Changes for version 0.05
- Speed up mulmod: asm for GCC + x86_64, native 64-bit for 32-bit Perl is uint64_t is available, and range tests for others. This speeds up some of the factoring as well as Miller-Rabin, which in turn speeds up is_prime. is_prime is used quite commonly, so this is good.
- nth_prime routines should now all croak on overflow in the same way.
- Segmented prime_count, things like this are reasonably efficient: say prime_count( 10**16, 10**16 + 2**20 )
- Add Ei(x), li(x), and R(x) functions.
- prime_count_approx uses R(x), making it vastly more accurate.
- Let user override rand for random_prime.
- Add many more tests with the help of Devel::Cover.
Modules
Utilities related to prime numbers, including fast sieves and factoring
Provides
in lib/Math/Prime/Util.pm
Examples
- examples/bench-factor-extra.pl
- examples/bench-factor-semiprime.pl
- examples/bench-factor.pl
- examples/bench-is-prime.pl
- examples/bench-miller-rabin.pl
- examples/bench-nthprime.pl
- examples/bench-pcapprox.pl
- examples/bench-primecount.pl
- examples/bench-random-prime.pl
- examples/test-factoring.pl
- examples/test-holf.pl
- examples/test-nthapprox.pl
- examples/test-pcapprox.pl