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:
parent
e415b17c01
commit
ecc3e2db24
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue