Lines Matching refs:shift
27 // Calculate our shift in significant digits.
30 // Check for a denormal float, if after the shift the exponent is negative.
39 // This might round-down to 0, but shift will be at **max** 65,
41 let shift = -fp.exp + 1;
42 debug_assert!(shift <= 65);
43 cb(fp, shift.min(64));
52 // Check if we carried, and if so, shift the bit to the hidden bit.
77 pub fn round_nearest_tie_even<Cb>(fp: &mut ExtendedFloat, shift: i32, cb: Cb)
83 debug_assert!(shift <= 64);
91 let mask = lower_n_mask(shift as u64);
92 let halfway = lower_n_halfway(shift as u64);
97 // Bit shift so the leading bit is in the hidden bit.
107 fp.mant = match shift == 64 {
109 false => fp.mant >> shift,
111 fp.exp += shift;
124 pub fn round_down(fp: &mut ExtendedFloat, shift: i32) {
125 // Might have a shift greater than 64 if we have an error.
126 fp.mant = match shift == 64 {
128 false => fp.mant >> shift,
130 fp.exp += shift;