Revision history for Perl extension Math::Prime::Util::GMP

0.13  6 August 2013

    [API Changes]
      - Primality proofs now use a text certificate.  This is nicer for
        external interaction, but is a change from previous behavior.  You
        will need to use Math::Prime::Util 0.30 or newer.

    [Functions Added]
      - lucas_sequence
      - is_almost_extra_strong_lucas_pseudoprime
      - is_frobenius_underwood_pseudoprime
      - pplus1_factor

    [Enhancements]
    - is_prob_prime now uses the extra-strong Lucas test instead of the
      strong Lucas test.  This gives better performance.  is_prime and
      is_provable_prime also incorporate the change.

    - Added more trial division to is_prob_prime for big (100+ digit)
      numbers.  This is a significant speedup for next_prime in many cases.
      Pari/gp 2.6.0  nextprime(10^4000)    19 minutes
      MPU:GMP 0.12   next_prime(10**4000)  15 minutes
      MPU:GMP 0.13   next_prime(10**4000)   8 minutes

    - ECPP now tries partial n-1 and n+1 proofs (BLS theorem 3 / 15) at each
      step, and adds a couple additional quick factoring tests.  This mainly
      helps lower the time variability with large inputs.

    - Updated ECPP polynomials.  Should give better performance with larger
      inputs.

    [Scripts and Programs Added]
      - convert-primo-cert.pl    convert a Primo certificate to MPU format.
      - verify-cert.pl           Verify a Primo or MPU certificate.
      - vcert.c                  Verify a Primo or MPU certificate.

0.12  12 June 2013

    - add standard and extra strong Lucas probable prime tests.

    - Rearrange C code to allow standalone build of ECPP.

    - Speedups for ECPP.

0.11  20 May 2013

    - is_prob_prime is faster at finding composites.

    - rewrote Lucas inner loop for ~20% speedup.

    - The previous two changes make is_prob_prime a bit faster, which means
      a small speedup to almost all functions.

    - Lower is_prime proving effort.  Proves ~30% of 128-bit primes instead
      of 50%, but runs about 4x faster.

    - Change ECPP to factor all strategy with backtracking.  Not much
      difference below 200 digits, but a big help after that.  Certificates
      are identical.

0.10   7 May 2013

    - ECPP -- a much faster primality prover.  BLS75 n-1 works well to about
      40 digits, then slows down rapidly.  This ECPP implementation is good
      to 300-500 digits.  Timing for 10**100+267:
          AKS: ~1 year.    BLS75 n-1: 1.5-5 minutes.    ECPP: 0.1 seconds.

    - is_prime does an additional 4 random-base M-R tests.

    - is_provable_prime will try a quick n-1 then do ECPP.

    - is_nminus1_prime added to give access to that specific method, in
      case someone has reason to insist on that proof type.

    - Change polynomial multiplication to use binary segmentation.  Huge
      speed improvement for AKS primality proving (20-100x faster).  AKS
      is now faster in GMP than MPU's C code.  It's still not nearly as fast
      as other methods: proving 100000000003 takes 65 seconds, while this
      would take a couple milliseconds at most for an n-1 proof.  The one year
      estimate in the first paragraph is with the _new_ code.

    - Compile-time support to BLS75 theorem 7, which reduces the amount of
      n-1 we need to factor.  Not enabling because it just doesn't help
      enough, and ECPP is a better place to spend development effort.

    - Lots of new internal functions to support ECPP, which could be used
      for future projects.

0.09  21 April 2013

    - Add primality certificate generation.

0.08   5 April 2013

    - Switch to a projective ECM with a stage 2.  Much better results, but
      note that it doesn't build up to B1 like the old version.  This has
      a big impact on factoring and primality proving.

    - Add a QS based on William Hart's SIMPQS (a simple QS that is a
      predecessor to what went into FLINT).  Not the fastest by a long shot
      (yafu and msieve take that prize), but it's quite small and works pretty
      well.  Eventually this will get replaced with a home-built QS.  Meanwhile
      some improvements from version 2.0 that remain are (1) no partial
      relations, (2) uses too much memory, and (3) uses GE instead of
      jasonp's block Lanczos.

    - The new ECM and QS make factoring much faster, especially for 30+
      digit inputs.  Factoring should give reasonable times out to 70+
      digits now.  Time is competitive with Math::Pari now, and often faster
      (noting that Math::Pari uses a fairly old version of Pari).

    - Factoring mix redone given the big changes in ECM and QS.

    - Primality proofs adjusted to better use p-1 and ECM.  The quick proof
      in is_prime has a higher success rate for all input sizes and is a
      little faster for small numbers.  is_provable_prime is 10-50x faster.

0.07  19 March 2013

    - Tiny speedup when passing in bigints.

    - Some speedups in pbrent, pbrent usage, and small prime iterator.
      Factoring small (< ~30 digit) numbers is faster.

    - Handle large and small M-R bases just like MPU does -- mod with n,
      then return 1 if base <= 1 or base >= n-1.

0.06  17 December 2012

    - Fix 1-byte memory overrun (thanks to CPAN Testers, Solaris, Valgrind).

    - Add factoring of small numbers.  Helps a little when the input gets
      reduced enough to fit into a UV.

0.05  15 December 2012

    - Add AKS primality test.  Super slow, but nice to have around.

    - ECM is faster.

    - Add a small prime iterator, which means _much_ less memory and faster
      operation for big smoothness factors in pminus1 and ecm factoring.

0.04  11 November 2012

    - Add simple prime_count function.  It uses next_prime so is terribly slow
      for big ranges.  However it's a lot faster than the PP code when given
      a large base and small range e.g. (10**96, 10**96 + 2**18).

    - Add primorial, pn_primorial, and consecutive_integer_lcm functions.

    - Factoring:
         Add a perfect power test.
         Add a simple ECM factoring method.
         Speed up SQUFOF a bit.
         Complete p-1 rewrite.  Much faster and finds more factors.
         Adjust general factor() mix.

    - Add Pocklington-Lehmer and BLS primality tests.  is_prime() uses the
      BLS test with a quick factoring attempt for numbers less than 2^200,
      though the chances of success drop off as the size increases.
      The point is not to cull mismarked probable primes (we use BPSW so this
      is highly unlikely for these small sizes), but to quickly mark more
      numbers as definitely prime.  Remember to use is_prob_prime if you do
      not care about this distinction and want the result slightly faster.

    - add is_provable_prime function that calls BLS with much more aggressive
      factoring.

0.03  16 July 2012
    - XS callable: _lcm_of_consecutive_integers(B)
      which is a better alternative for B! for many factoring algorithms.
    - Fix some minor compile issues.

0.02  15 July 2012
    - Factoring tests assumed 64-bit.  Rewrite.

0.01  15 July 2012
    - Initial release