Home | History | Annotate | Download | only in src

Lines Matching refs:fractionals

224 // The given fractionals number represents a fixed-point number with binary
228 // 0 <= fractionals * 2^exponent < 1
235 static void FillFractionals(uint64_t fractionals, int exponent,
239 // 'fractionals' is a fixed-point number, with binary point at bit
240 // (-exponent). Inside the function the non-converted remainder of fractionals
244 ASSERT(fractionals >> 56 == 0);
247 if (fractionals == 0) break;
249 // location. This way the fractionals variable will not overflow.
250 // Invariant at the beginning of the loop: fractionals < 2^point.
251 // Initially we have: point <= 64 and fractionals < 2^56
254 // Therefore three iterations of this loop will not overflow fractionals
256 // time point will satisfy point <= 61 and therefore fractionals < 2^point
257 // and any further multiplication of fractionals by 5 will not overflow.
258 fractionals *= 5;
260 int digit = static_cast<int>(fractionals >> point);
263 fractionals -= static_cast<uint64_t>(digit) << point;
266 if (((fractionals >> (point - 1)) & 1) == 1) {
271 UInt128 fractionals128 = UInt128(fractionals, 0);
376 uint64_t fractionals = significand - (integrals << -exponent);
383 FillFractionals(fractionals, exponent, fractional_count,