primes

Crates.ioprimes
lib.rsprimes
version0.4.0
sourcesrc
created_at2014-11-20 21:38:42.996951
updated_at2024-06-07 13:23:18.82309
descriptionA package for calculating primes using the Sieve of Eratosthenes, and using that to check if a number is prime and calculating factors. Includes an iterator over all primes.
homepagehttps://github.com/wackywendell/primes/tree/master
repositoryhttps://github.com/wackywendell/primes/tree/master
max_upload_size
id161
size22,639
Wendell Smith (wackywendell)

documentation

https://wackywendell.github.io/primes/

README

primes

Build Status Build Status

A prime generator for Rust.

This package is available on crates.io as primes.

This package provides an iterator over all primes, generating them lazily as it goes.

The simplest usage is simply to create an Iterator:

use primes::PrimeSet;

let mut pset = PrimeSet::new();

for (ix, n) in pset.iter().enumerate().take(10) {
    println!("Prime {}: {}", ix, n);
}

For more examples, see the full documentation!

Commit count: 0

cargo fmt