Miller–Rabin primality test: Difference between revisions
Content added Content deleted
m (→{{header|Rust}}: Added "rand" dependency to header comment.) |
m (→{{header|Rust}}: Removed duplicate line of code.) |
||
Line 4,423: | Line 4,423: | ||
// https://inventwithpython.com/hacking/chapter23.html |
// https://inventwithpython.com/hacking/chapter23.html |
||
let mut s: BigInt = Zero::zero(); |
let mut s: BigInt = Zero::zero(); |
||
let one: BigInt = One::one(); |
|||
let n_minus_one: BigInt = n.clone() - &one; |
let n_minus_one: BigInt = n.clone() - &one; |
||
let mut d = n_minus_one.clone(); |
let mut d = n_minus_one.clone(); |