uint icon indicating copy to clipboard operation
uint copied to clipboard

`algorithms/div/reciprocal`: This is checking the carry flag

Open github-actions[bot] opened this issue 2 years ago • 0 comments

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);
        }

From src/algorithms/div/reciprocal.rs:127

github-actions[bot] avatar Oct 24 '22 06:10 github-actions[bot]