primenumbe-rs

Crates.ioprimenumbe-rs
lib.rsprimenumbe-rs
version0.1.2
sourcesrc
created_at2022-03-02 14:27:02.689654
updated_at2023-04-23 10:59:05.158078
descriptionGenerate the nth prime number
homepage
repositoryhttps://github.com/Hawk453/primenumbe-rs
max_upload_size
id542308
size4,924
Saksham Madan (Hawk453)

documentation

README

primenumbe-rs

Generate the nth prime number.
primenumbe-rs algorithm is inspired by the the optimized version of the Sieve of Eratosthenes. Note: limit of n index stands at [1, 1_000_000).

Example

use primenumbe_rs::Primenumber;

fn main(){
    let n: u64 = 100;
    let result = Primenumber::nthprime(n);
    println!("The {n}th prime is {result}");
}
Commit count: 17

cargo fmt