#prime #numbers #number-theory

prim

Simple crate to find prime numbers

4 releases

0.1.5 Oct 21, 2021
0.1.4 Oct 19, 2021

#1824 in Math

MIT license

4KB
59 lines

prim

Overview

Simple crate to find prime numbers. Source code can be found on Github.

Example

extern crate prim;

fn main() {
    println!("{}", prim::check_prime(5)); //true
    println!("{:?}", prim::check_area(1, 10)); //[2, 3, 5, 7]
    println!("{:?}", prim::sieve_of_eratosthenes(10)); //[2, 3, 5, 7]
}

License

This project is licensed under the MIT license.

Dependencies

~160KB