Changes for version 0.21
- Switch to using Bytes::Random::Secure for random primes. This is a big change in that it is the first non-CORE module used. However, it gets rid of lots of possible stupidness from system rand.
- Spelling fixes in documentation.
- primes.pl: Add circular and Panaitopol primes.
- euler_phi and moebius now will compute over a range.
- Add mertens function: 1000+ times faster than summing moebius($_).
- Add exp_mangoldt function: exponential of von Mangoldt's function.
- divisor_sum defaults to sigma if no sub is given (i.e. it sums).
- Performance:
- Speedup factoring small numbers. With -nobigint factoring from 1 to 10M, it's 1.2x faster. 1.5x faster than Math::Factor::XS.
- Totient and Möbius over a range are much faster than separate calls.
- divisor_sum is 2x faster.
- primes.pl is much faster with Pillai primes.
- Reduce overhead in euler_phi -- about 2x faster for individual calls.
Modules
Utilities related to prime numbers, including fast sieves and factoring
An auto-free object for Math::Prime::Util
Pure Perl version of Math::Prime::Util
A tied array for primes
Perl Big Float versions of Riemann Zeta and R functions
Examples
- examples/README
- examples/bench-factor-extra.pl
- examples/bench-factor-semiprime.pl
- examples/bench-factor.pl
- examples/bench-is-prime.pl
- examples/bench-isprime-bpsw.pl
- examples/bench-miller-rabin.pl
- examples/bench-mp-nextprime.pl
- examples/bench-mp-prime_count.pl
- examples/bench-mp-psrp.pl
- examples/bench-nthprime.pl
- examples/bench-pcapprox.pl
- examples/bench-pp-count.pl
- examples/bench-pp-isprime.pl
- examples/bench-pp-sieve.pl
- examples/bench-primecount.pl
- examples/bench-random-prime-bigint.pl
- examples/bench-random-prime.pl
- examples/find_mr_bases.pl
- examples/make-script-test-data.pl
- examples/parallel_fibprime.pl
- examples/sophie_germain.pl
- examples/test-bpsw.pl
- examples/test-euler-pari.pl
- examples/test-factor-gnufactor.pl
- examples/test-factor-mpxs.pl
- examples/test-factor-yafu.pl
- examples/test-holf.pl
- examples/test-nextprime-yafu.pl
- examples/test-nthapprox.pl
- examples/test-pcapprox.pl
- examples/test-primality-small.pl
- examples/test-primes-script.pl
- examples/test-primes-script2.pl
- examples/test-primes-yafu.pl
- examples/twin_primes.pl