uint
uint copied to clipboard
`algorithms/div/reciprocal`: This is checking the carry flag
On 2022-10-24 @recmo wrote in fb3aa20
“Merge pull request #172 from recmo/div2”:
This is checking the carry flag
let t = u128::from(v) * u128::from(d0);
let t1 = (t >> 64) as u64;
let t0 = t as u64;
let p = p.wrapping_add(t1);
// OPT: This is checking the carry flag
if p < t1 {
v = v.wrapping_sub(1);
if (u128::from(p) << 64) | u128::from(t0) >= d {
v = v.wrapping_sub(1);
}