primecount 0.1.1

Rust wrapper for https://github.com/kimwalisch/primecount.
Documentation

primecount-rs

primecount-rs is a library that provides APIs for counting the primes below an integer x ≤ 1031 using highly optimized implementations of the combinatorial prime counting algorithms.

It is a rust wrapper around an awesome kimwalisch/primecount library.

API

use primecount;

fn main() {
    println!("Primes below 1000 = {}", primecount::pi(1000));
    println!("Numbers below 1000 that are not divisible by any of the first 100 primes (a.k.a. Legendre-sum) = {}", primecount::phi(1000, 100));
    println!("10th prime = {}", primecount::nth_prime(10));
}

Contribute

Update primecount dependency

git submodule update --init --recursive