• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/WTF-7600.1.24/wtf/dtoa/

Lines Matching defs:unit

57     //        * distance_too_high_w == (too_high - w).f() * unit
58 // * unsafe_interval == (too_high - too_low).f() * unit
59 // * rest = (too_high - buffer * 10^kappa).f() * unit
60 // * ten_kappa = 10^kappa * unit
61 // * unit = the common multiplier
71 uint64_t unit) {
72 uint64_t small_distance = distance_too_high_w - unit;
73 uint64_t big_distance = distance_too_high_w + unit;
78 // The real w (* unit) must lie somewhere inside the interval
85 // ^v 1 unit ^ ^ ^ ^
87 // ^v 1 unit . . . .
95 // ^v 1 unit . . . .
97 // ^v 1 unit v . . .
105 // ^v 1 unit .
107 // ^v 1 unit v
115 // and v (the input number). They are guaranteed to be precise up to one unit.
116 // In fact the error is guaranteed to be strictly less than one unit.
169 return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
180 // rest can have an error of +/- 1 unit. This function accounts for the
189 uint64_t unit,
193 // will work correctly with any uint64 values of rest < ten_kappa and unit.
195 // If the unit is too big, then we don't know which way to round. For example
196 // a unit of 50 means that the real number lies within rest +/- 50. If
198 if (unit >= ten_kappa) return false;
199 // Even if unit is just half the size of 10^kappa we are already completely
202 if (ten_kappa - unit <= unit) return false;
203 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
204 if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
207 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
208 if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
363 // * low, w and high are correct up to 1 ulp (unit in the last place). That
364 // is, their error must be less than a unit of their last digits.
405 // low, w and high are imprecise, but by less than one ulp (unit in the last
416 uint64_t unit = 1;
417 DiyFp too_low = DiyFp(low.f() - unit, low.e());
418 DiyFp too_high = DiyFp(high.f() + unit, high.e());
461 static_cast<uint64_t>(divisor) << -one.e(), unit);
469 // data (like the interval or 'unit'), too.
477 unit *= 10;
486 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit,
487 unsafe_interval.f(), fractionals, one.f(), unit);
503 // * w is correct up to 1 ulp (unit in the last place). That
504 // is, its error must be strictly less than a unit of its last digit.
530 // w is assumed to have an error less than 1 unit. Whenever w is scaled we
577 // data (the 'unit'), too.
643 // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.
702 // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.