You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 2022-05-31 @recmo wrote in c1a0c34 “Merge pull request #97 from recmo/isqrt”:
A dedicated function avoiding full-sized shift.
#[allow(clippy::cast_sign_loss)]// fract >= 0.let bits = (fract.exp2()*EXP2_63)asu64;// Note: If `fract` is zero this will result in `u64::MAX`.if shift >= 63{// OPT: A dedicated function avoiding full-sized shift.Some(Self::try_from(bits).ok()?.checked_shl(shift - 63)?)}else{let shift = 63 - shift;// Divide `bits` by `2^shift`, rounding to nearest.let bits = (bits >> shift) + ((bits >> (shift - 1))&1);
On 2022-05-31 @recmo wrote in
c1a0c34
“Merge pull request #97 from recmo/isqrt”:A dedicated function avoiding full-sized shift.
From
src/pow.rs:129
The text was updated successfully, but these errors were encountered: