Home | History | Annotate | Download | only in src

Lines Matching refs:kappa

56 // Input: * buffer containing the digits of too_high / 10^kappa
60 // * rest = (too_high - buffer * 10^kappa).f() * unit
61 // * ten_kappa = 10^kappa * unit
177 // The rounding might shift the whole buffer in which case the kappa is
178 // adjusted. For example "99", kappa = 3 might become "10", kappa = 4.
191 int* kappa) {
198 // 10^kappa == 40 then there is no way to tell which way to round.
200 // Even if unit is just half the size of 10^kappa we are already completely
204 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
208 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
219 // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
220 // the power (the kappa) is increased.
223 (*kappa) += 1;
361 // such that LOW < buffer * 10^kappa < HIGH, where LOW and HIGH are the
390 kappa) {
413 // kappa instead.
415 // such that: too_low < buffer * 10^kappa < too_high
427 *kappa = divisor_exponent + 1;
429 // Loop invariant: buffer = too_high / 10^kappa (integer division)
430 // The invariant holds for the first iteration: kappa has been initialized
433 while (*kappa > 0) {
438 (*kappa)--;
439 // Note that kappa now equals the exponent of the divisor and that the
443 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
473 (*kappa)--;
504 // * kappa is such that
505 // w = buffer * 10^kappa + eps with |eps| < 10^kappa / 2.
515 int* kappa) {
523 // fractional digits. We don't emit any decimal separator, but adapt kappa
525 // increase kappa by 1.
535 *kappa = divisor_exponent + 1;
538 // Loop invariant: buffer = w / 10^kappa (integer division)
539 // The invariant holds for the first iteration: kappa has been initialized
542 while (*kappa > 0) {
548 (*kappa)--;
549 // Note that kappa now equals the exponent of the divisor and that the
560 kappa);
581 (*kappa)--;
585 kappa);
652 int kappa;
654 buffer, length, &kappa);
655 *decimal_exponent = -mk + kappa;
698 // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
701 int kappa;
703 buffer, length, &kappa);
704 *decimal_exponent = -mk + kappa;