Lines Matching refs:mantbits
17 mantbits uint
68 neg := bits>>(flt.expbits+flt.mantbits) != 0
69 exp := int(bits>>flt.mantbits) & (1<<flt.expbits - 1)
70 mant := bits & (uint64(1)<<flt.mantbits - 1)
92 mant |= uint64(1) << flt.mantbits
144 f := extFloat{mant, exp - int(flt.mantbits), neg}
158 d.Shift(exp - int(flt.mantbits))
244 // at most 2^(exp-mantbits).
246 // So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits),
247 // or equivalently log2(10)*(dp-nd) > exp-mantbits.
248 // It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32).
250 if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) {
255 // d = mant << (exp - mantbits)
256 // Next highest floating point number is mant+1 << exp-mantbits.
257 // Our upper bound is halfway between, mant*2+1 << exp-mantbits-1.
260 upper.Shift(exp - int(flt.mantbits) - 1)
262 // d = mant << (exp - mantbits)
263 // Next lowest floating point number is mant-1 << exp-mantbits,
265 // in which case the next lowest is mant*2-1 << exp-mantbits-1.
266 // Either way, call it mantlo << explo-mantbits.
267 // Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1.
270 if mant > 1<<flt.mantbits || exp == minexp {
279 lower.Shift(explo - int(flt.mantbits) - 1)
432 exp -= int(flt.mantbits)