Expand description

Check some primality-related properties of numbers.

This crate is designed to be used via primal.


Returns integers (y, k) such that x = y^k with k maximised (other than for x = 0, 1, in which case y = x, k = 1).

Return Some((p, k)) if x = p^k for some prime p and k >= 1 (that is, including when x is itself a prime).

Test if n is prime, using the deterministic version of the Miller-Rabin test.