uint
uint copied to clipboard
`algorithms/gcd/gcd_old`: Rewrite using to_u64 -> Option
On 2022-06-06 @recmo wrote in 4c74c09
“Merge pull request #110 from recmo/gcd”:
Rewrite using to_u64 -> Option
// We shadow s for readability.
#[allow(clippy::shadow_unrelated)]
fn lehmer_double(mut r0: U256, mut r1: U256) -> Matrix {
debug_assert!(r0 >= r1);
if r0.leading_zeros() >= 192 {
// OPT: Rewrite using to_u64 -> Option
debug_assert!(r1.leading_zeros() >= 192);
debug_assert!(r0.limb(0) >= r1.limb(0));
return lehmer_small(r0.limb(0), r1.limb(0));
}
let s = r0.leading_zeros();