Changes for version 0.41 - 2014-05-18
- ADDED
- valuation(n,k) how many times does k divide n?
- invmod(a,n) inverse of a modulo n
- forpart { ... } n[,{...}] loop over partitions (Pari 2.6.x)
- vecsum(...) sum list of integers
- binomial(n,k) binomial coefficient
- FUNCTIONALITY AND PERFORMANCE
- Big speedup for primality testing in range ~2^25 to 2^64, which also affects functions like next_prime, prev_prime, etc. This is due to two changes in the Montgomery math section -- an improvement to mont_prod64 and using a new modular inverse from W. Izykowski based on Arazi (1994).
- factoring small inputs (n < 20M) is ~10% faster, which speeds up some misc functions (e.g. euler_phi, divisor_sum) for small inputs.
- Small improvement to twin_prime_count_approx and nth_twin_prime_approx.
- Better AKS testing in xt/primality-aks.pl.
- Loosen requirements of lucas_sequence. More useful for general seqs. Add tests for some common sequences.
- forcomposites handles beg and end near ~0.
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
Provides
in lib/Math/Prime/Util/PPFE.pm
Examples
- examples/README
- examples/abundant.pl
- examples/csrand.pl
- examples/find_mr_bases.pl
- examples/inverse_totient.pl
- examples/numseqs.pl
- examples/parallel_fibprime.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-sage-ecpp-cert.pl