Skip to main content

is_prime

Function is_prime 

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

Deterministic primality for every u64: Miller-Rabin with the first twelve prime bases, whose smallest common strong pseudoprime is 318 665 857 834 031 151 167 461 ≈ 3.2 · 10²³ (Sorenson and Webster, 2015), far above u64::MAX ≈ 1.8 · 10¹⁹, after trial division by small primes.