Changes for version 0.52 - 2015-08-09
- ADDED
- is_square_free(n) Check for repeated factors
- FUNCTIONALITY AND PERFORMANCE
- print_primes with 2 args was sending to wrong fileno.
- Double speed of sum_primes.
- Rewrote some internal sieve-walking code, speeds up next_prime, forprimes, print_primes, and more.
- Small speedup for forcomposites / foroddcomposites.
- Small speedup for is_prime with composite 32+ bit inputs.
- is_frobenius_khashin_pseudoprime now uses Montgomery math for speed.
- PrimeArray now treats skipping forward by relatively small amounts as forward iteration. This makes it much more efficient for many cases, but does open up some pathological cases.
- PrimeArray now allows exporting @primes (and a few others), which saves some typing.
- PrimeArray now works for indices up to 2^32-1, after which it silently rolls over. Previously it worked to 2^31-1 then croaked.
- PrimeIterator now uses small segments instead of always next_prime. A little more memory, but 2-4x faster.
- factor, divisor, fordivisors and some others should better keep bigint types (e.g. Math::GMPz input yields Math::GMPz output).
- Faster GCD on some platforms.
- Peter Dettman supplied a patch for Shawe-Taylor prime generation to make it deterministically match reference implementations. Thanks!
- Misc
- Check for old MPFR now using C library version, not module version.
- prime_count_{lower,upper} now uses MPFR to give full precision.
- Montgomery math and uint128_t enabled on Darwin/clang.
Modules
Utilities related to prime numbers, including fast sieves and factoring
Elliptic curve operations for affine points
Elliptic curve operations for projective points
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/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