primal puts raw power into prime numbers.
Clone or download
bors[bot] and huonw Merge #22
22: Use Codecov instead of coveralls r=cuviper a=huonw



Co-authored-by: Huon Wilson <wilson.huon@gmail.com>
Latest commit e7fbe98 Dec 17, 2018

README.md

primal

Build Status codecov crates.io

primal puts raw power into prime numbers.

This crates includes

  • optimised prime sieves
  • checking for primality
  • enumerating primes
  • factorising numbers
  • estimating upper and lower bounds for π(n) (the number of primes below n) and pk (the kth prime)

This uses a state-of-the-art cache-friendly Sieve of Eratosthenes to enumerate the primes up to some fixed bound (in a memory efficient manner), and then allows this cached information to be used for things like enumerating and counting primes.

primal takes around 2.8 seconds and less than 3MB of RAM to count the exact number of primes below 1010 (455052511) on the author's laptop (i7-3517U).

Documentation