Expand description
Check some primality-related properties of numbers.
This crate is designed to be used via primal.
Functionsยง
- as_
perfect_ power - Returns integers
(y, k)such thatx = y^kwithkmaximised (other than forx = 0, 1, in which casey = x,k = 1). - as_
prime_ power - Return
Some((p, k))ifx = p^kfor some primepandk >= 1(that is, including whenxis itself a prime). - miller_
rabin - Test if
nis prime, using the deterministic version of the Miller-Rabin test.