Expand description
Primality testing and factor verification using Malachite.
Provides deterministic and probabilistic primality testing for native
unsigned integers and arbitrary-precision Natural numbers.
Constants§
- MILLER_
RABIN_ BASES - Deterministic prime testing bases for Miller-Rabin testing up to $2^{64}$.
- SMALL_
PRIMES - First 25 small prime numbers used for rapid trial division pre-filtering.
Functions§
- is_
prime_ natural - Checks if an arbitrary-precision
Naturalnumber is prime using trial division followed by Miller-Rabin probabilistic primality testing. - is_
prime_ u64 - Checks if a 64-bit integer is prime using Malachite’s BPSW algorithm.