Skip to content
primal puts raw power into prime numbers.
Rust Shell
Branch: master
Clone or download
bors and huonw Merge #27
27: Add codecov.yml to ignore the generators subdirectory. r=cuviper a=huonw

These generators are "tested" via their generated code and its tests,
and don't/won't get run as part of the testsuite.

Co-authored-by: Huon Wilson <wilson.huon@gmail.com>
Latest commit 1b2d907 Jan 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches benches: move to criterion. Dec 6, 2018
ci Add codecov.yml to ignore the generators subdirectory. Jan 4, 2019
examples Clean up warnings and dependencies Aug 3, 2017
generators estimate: add tighter estimates from http://arxiv.org/abs/1002.0442 Jan 4, 2019
primal-bit all: deny warnings to catch more problems earlier. Dec 17, 2018
primal-check all: deny warnings to catch more problems earlier. Dec 17, 2018
primal-estimate estimate: escape "1998." -> "1998\." to stop making a <ol>. Jan 4, 2019
primal-sieve all: deny warnings to catch more problems earlier. Dec 17, 2018
primal-slowsieve all: deny warnings to catch more problems earlier. Dec 17, 2018
src
.gitignore Ignore junk directory. Jun 6, 2015
.travis.yml ci: switch from coveralls to codecov. Dec 11, 2018
Cargo.toml rename wheel-generator to generators in preparation for adding more. Dec 22, 2018
LICENSE-APACHE Initial commit. Aug 16, 2014
LICENSE-MIT Initial commit. Aug 16, 2014
README.md ci: switch from coveralls to codecov. Dec 11, 2018
bors.toml bors: add appropriate configuration for it. Dec 11, 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

You can’t perform that action at this time.