Lines Matching full:mantissa
58 // mantissa: The mantissa of the input. The top bit (which is not encoded for
65 // mantissa has the value 'pow(2, exponent)'.
72 uint64_t mantissa,
81 // encodable as a float, but rounding based on the low-order mantissa bits
95 // mantissa = 0bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
126 // adjusted = frac - (halfbit(mantissa) & ~onebit(frac)); / |
128 // mantissa = (mantissa >> shift) + halfbit(adjusted);
136 if (mantissa == 0) {
154 mantissa = 0;
160 mantissa = (UINT64_C(1) << exponent_offset) - 1;
164 (mantissa << mantissa_offset));
167 // Calculate the shift required to move the top mantissa bit to the proper
169 const int highest_significant_bit = 63 - CountLeadingZeros(mantissa);
190 VIXL_ASSERT(mantissa != 0);
191 // For FPRoundOdd, if the mantissa is too small to represent and
200 // Clear the topmost mantissa bit, since this is not encoded in IEEE-754
202 mantissa &= ~(UINT64_C(1) << highest_significant_bit);
207 // We have to shift the mantissa to the right. Some precision is lost, so
209 uint64_t onebit_mantissa = (mantissa >> (shift)) & 1;
210 uint64_t halfbit_mantissa = (mantissa >> (shift - 1)) & 1;
212 uint64_t adjusted = mantissa - adjustment;
217 ((mantissa >> shift) << mantissa_offset));
219 // A very large mantissa can overflow during rounding. If this happens,
220 // the exponent should be incremented and the mantissa set to 1.0
231 // bottom bit of the resulting mantissa) must be set.
232 uint64_t fractional_bits = mantissa & ((UINT64_C(1) << shift) - 1);
234 mantissa |= UINT64_C(1) << shift;
239 ((mantissa >> shift) << mantissa_offset));
242 // We have to shift the mantissa to the left (or not at all). The input
243 // mantissa is exactly representable in the output mantissa, so apply no
247 ((mantissa << -shift) << mantissa_offset));