Changes for version 0.24 - 2014-09-22

  • ADDED
    • sieve_primes(low,high[,k]) sieve for primes, partial or BPSW
    • is_frobenius_pseudoprime(n,[a,b]) Frobenius quadratic primality test
    • is_perrin_pseudoprime(n) Perrin primality test
    • factorial(n) n!
    • bernfrac returns (num,den) of Bernoulli number
    • Pi([digits]) Pi with requested number of digits
  • OTHER
    • next_prime will use a partial sieve for 120+ bit inputs. For large inputs this is a 15-30% speedup. For 2469*2617#/93030-12182 I get:
      • 392.2s OpenPFGW 3.7.7
      • 220.6s Pari/GP 2.6.2
      • 128.4s GMP 5.0.2 mpz_nextprime
      • 57.6s old MPU
      • 45.5s new MPU
    • New version of Frobenius-Underwood test to match the 2014 draft paper. This is just a code refresh and has no other effect.
    • BLS75 with effort 1 toned down. This makes is_prime with 65- to 200-bit inputs faster, though a bit less likely to return with the value 2 rather than 1. It's a couple percent fewer, but 10-60% faster.

Modules

Utilities related to prime numbers and factoring, using GMP