pub const fn is_prime(n: u64) -> boolExpand description
Returns whether n is prime.
Does trial division with a small wheel up to log2(n) and then uses a
deterministic Miller-Rabin primality test.
If the fast_test feature is enabled this function calls the machine_prime::is_prime function with the lucas feature instead.
ยงExample
Basic usage:
const CHECK: bool = is_prime(18_446_744_073_709_551_557);
assert!(CHECK);