1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

factor::miller_rabin::test: Minor readability improvement

This commit is contained in:
nicoo 2020-07-17 12:53:28 +02:00
parent e415b17c01
commit ecc3e2db24

View file

@ -73,8 +73,7 @@ pub(crate) fn test<A: Arithmetic + Basis>(m: A) -> Result {
let y = m.mul(x, x);
if y == one {
return Composite(gcd(m.to_u64(x) - 1, m.modulus()));
}
if y == minus_one {
} else if y == minus_one {
// This basis element is not a witness of `n` being composite.
// Keep looking.
continue 'witness;