Crate primality_test
source ·Expand description
Provide a method to determine whether an unsigned integer is a prime number through the IsPrime
Trait.
In the current implementation, this crate uses the Miller-Rabin primality test.
The Miller-Rabin primality test is known to have witnesses that can conclusively determine unsigned integers of at most 64 bits.
In this crate, the following information is used to select the witnesses.
Structs§
- Generate a table of prime numbers by linear sieving.
Traits§
Functions§
- Determine if
p
is prime or not.