Home | History | Annotate | Download | only in src

Lines Matching refs:rest

37 //        * rest = (too_high - buffer * 10^kappa).f() * unit
47 uint64_t rest,
69 // . . . . rest
120 // Conceptually rest ~= too_high - buffer
123 ASSERT(rest <= unsafe_interval);
124 while (rest < small_distance && // Negated condition 1
125 unsafe_interval - rest >= ten_kappa && // Negated condition 2
126 (rest + ten_kappa < small_distance || // buffer{-1} > w_high
127 small_distance - rest >= rest + ten_kappa - small_distance)) {
129 rest += ten_kappa;
135 if (rest < big_distance &&
136 unsafe_interval - rest >= ten_kappa &&
137 (rest + ten_kappa < big_distance ||
138 big_distance - rest > rest + ten_kappa - big_distance)) {
146 // Conceptually we have: rest ~= too_high - buffer
147 return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
157 // If 2*rest > ten_kappa then the buffer needs to be round up.
158 // rest can have an error of +/- 1 unit. This function accounts for the
162 // Precondition: rest < ten_kappa.
165 uint64_t rest,
169 ASSERT(rest < ten_kappa);
171 // will work correctly with any uint64 values of rest < ten_kappa and unit.
174 // a unit of 50 means that the real number lies within rest +/- 50. If
181 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
182 if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
185 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
186 if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
418 uint64_t rest =
420 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
422 if (rest < unsafe_interval.f()) {
426 unsafe_interval.f(), rest,
533 uint64_t rest =
535 return RoundWeedCounted(buffer, *length, rest,