Crates.io | primal |
lib.rs | primal |
version | 0.3.3 |
source | src |
created_at | 2015-05-16 13:11:08.912809 |
updated_at | 2024-06-07 22:59:03.689575 |
description | `primal` puts raw power into prime numbers. This crates includes: optimised prime sieves, checking for primality, enumerating primes, factorising numbers, and state-of-the-art estimation of upper and lower bounds for π(n) (the number of primes below n) and p_k (the k-th prime). |
homepage | https://github.com/huonw/primal |
repository | https://github.com/huonw/primal |
max_upload_size | |
id | 2119 |
size | 108,843 |
primal
puts raw power into prime numbers.
This crates includes
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).