++ed by:

7 PAUSE users
2 non-PAUSE users.

Dana Jacobsen

Changes for version 0.23

  • Replace XS Zeta for x > 5 with series from Cephes. It is 1 eps more accurate for a small fraction of inputs. More importantly, it is much faster in range 5 < x < 10. This only affects non-integer inputs.
  • PP Zeta code replaced (for no-MPFR, non-bignums) with new series. The new code is much more accurate for small values, and *much* faster.
  • Add consecutive_integer_lcm function, just like MPU::GMP's (though we define ci_lcm(0) = 0, which should get propogated).
  • Implement binary search on RiemannR for XS nth_prime when n > 2e11. Runs ~2x faster for 1e12, 3x faster for 1e13. Thanks to Programming Praxis for the idea and motivation.
  • Add the first and second Chebyshev functions (theta and psi).
  • put isqrt(n) in util.h, use it everywhere. put icbrt(n) in lehmer.h, use it there.
  • Start on Lagarias-Miller-Odlyzko prime count.
  • A new data structure for the phi(x,a) function used by all the fast prime count routines. Quite a bit faster and most importantly, uses half the memory of the old structure.
  • Performance:
    • Divisor sum with no sub is ~10x faster.
    • Speed up PP version of exp_mangoldt, create XS version.
    • Zeta much faster as mentioned above.
    • faster nth_prime as mentioned above.
    • AKS about 10% faster.
    • Unroll a little more in sieve inner loop. A couple percent faster.
    • Faster prime_count and nth_prime due to new phi(x,a) (about 1.25x).