Skip to content

Prime number functions implemented in rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

visualjeff/primapalooza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primapalooza

Name says it all. Handy prime number functions implemented in Rust.

Add primapalooza dependency to your project Cargo.toml file:

[dependencies]
primapalooza = "0.3.4"

Add primapalooza to your project's source code:

extern crate primapalooza;

use primapalooza::is_prime;
use primapalooza:generate_primes;

Methods signatures:

fn is_prime(usize) -> bool
fn is_prime_why_not(usize) -> bool
fn perfect_number(usize) -> bool
fn get_next_prime_number(usize) -> usize
fn get_twin_primes(usize) -> (usize, usize)
fn prime_factorization(usize) -> Vec<usize>
fn greatest_common_factor(usize, usize) -> usize
fn least_common_multiple(usize, usize) -> usize
fn number_of_primes(usize, usize) -> usize
fn number_of_factors(usize) -> usize
fn mersenne_prime(usize) -> usize
fn get_nth_prime(usize) -> usize
fn generate_primes(usize) -> Vec<usize>
fn is_lucky_number(usize) -> bool
fn is_triangular_number(usize) -> bool

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Prime number functions implemented in rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Languages