Skip to main content

is_prime

Function is_prime 

Source
pub fn is_prime(n: u64) -> bool
Expand description

Returns true when n is prime.

0 and 1 are not prime. 2 and 3 are prime. Even values greater than 2 are not prime.