### 5 releases

0.2.3 | Jun 8, 2015 |
---|---|

0.2.2 | Jun 8, 2015 |

0.2.1 | Jun 7, 2015 |

0.2.0 | Jun 6, 2015 |

0.1.14 | May 16, 2015 |

#**58** in Math

**2,491** downloads per month

Used in **17** crates (13 directly)

**MIT/Apache**

500KB

7.5K
SLoC

# primal

puts raw power into prime numbers.`primal`

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*p*(the_{k}*k*th 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.

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

#### Dependencies

~300KB