Lines Matching defs:kappa

32 // Input: * buffer containing the digits of too_high / 10^kappa
36 // * rest = (too_high - buffer * 10^kappa).f() * unit
37 // * ten_kappa = 10^kappa * unit
147 // The rounding might shift the whole buffer in which case the kappa is
148 // adjusted. For example "99", kappa = 3 might become "10", kappa = 4.
157 uint64_t ten_kappa, uint64_t unit, int* kappa) {
164 // 10^kappa == 40 then there is no way to tell which way to round.
166 // Even if unit is just half the size of 10^kappa we are already completely
170 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
174 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
185 // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
186 // the power (the kappa) is increased.
189 (*kappa) += 1;
333 // such that LOW < buffer * 10^kappa < HIGH, where LOW and HIGH are the
358 int* length, int* kappa) {
381 // kappa instead.
383 // such that: too_low < buffer * 10^kappa < too_high
395 *kappa = divisor_exponent + 1;
397 // Loop invariant: buffer = too_high / 10^kappa (integer division)
398 // The invariant holds for the first iteration: kappa has been initialized
401 while (*kappa > 0) {
406 (*kappa)--;
407 // Note that kappa now equals the exponent of the divisor and that the
411 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
441 (*kappa)--;
470 // * kappa is such that
471 // w = buffer * 10^kappa + eps with |eps| < 10^kappa / 2.
478 int* length, int* kappa) {
486 // fractional digits. We don't emit any decimal separator, but adapt kappa
488 // increase kappa by 1.
498 *kappa = divisor_exponent + 1;
501 // Loop invariant: buffer = w / 10^kappa (integer division)
502 // The invariant holds for the first iteration: kappa has been initialized
505 while (*kappa > 0) {
511 (*kappa)--;
512 // Note that kappa now equals the exponent of the divisor and that the
523 kappa);
544 (*kappa)--;
548 kappa);
611 int kappa;
613 buffer, length, &kappa);
614 *decimal_exponent = -mk + kappa;
652 // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
655 int kappa;
657 DigitGenCounted(scaled_w, requested_digits, buffer, length, &kappa);
658 *decimal_exponent = -mk + kappa;