Home | History | Annotate | Download | only in src

Lines Matching refs:rest

58 //        * rest = (too_high - buffer * 10^kappa).f() * unit
68 uint64_t rest,
90 // . . . . rest
141 // Conceptually rest ~= too_high - buffer
144 ASSERT(rest <= unsafe_interval);
145 while (rest < small_distance && // Negated condition 1
146 unsafe_interval - rest >= ten_kappa && // Negated condition 2
147 (rest + ten_kappa < small_distance || // buffer{-1} > w_high
148 small_distance - rest >= rest + ten_kappa - small_distance)) {
150 rest += ten_kappa;
156 if (rest < big_distance &&
157 unsafe_interval - rest >= ten_kappa &&
158 (rest + ten_kappa < big_distance ||
159 big_distance - rest > rest + ten_kappa - big_distance)) {
167 // Conceptually we have: rest ~= too_high - buffer
168 return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
178 // If 2*rest > ten_kappa then the buffer needs to be round up.
179 // rest can have an error of +/- 1 unit. This function accounts for the
183 // Precondition: rest < ten_kappa.
186 uint64_t rest,
190 ASSERT(rest < ten_kappa);
192 // will work correctly with any uint64 values of rest < ten_kappa and unit.
195 // a unit of 50 means that the real number lies within rest +/- 50. If
202 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
203 if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
206 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
207 if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
439 uint64_t rest =
441 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
443 if (rest < unsafe_interval.f()) {
447 unsafe_interval.f(), rest,
554 uint64_t rest =
556 return RoundWeedCounted(buffer, *length, rest,