Home | History | Annotate | Download | only in src

Lines Matching refs:kappa

54 // Input: * buffer containing the digits of too_high / 10^kappa
58 // * rest = (too_high - buffer * 10^kappa).f() * unit
59 // * ten_kappa = 10^kappa * unit
175 // The rounding might shift the whole buffer in which case the kappa is
176 // adjusted. For example "99", kappa = 3 might become "10", kappa = 4.
189 int* kappa) {
196 // 10^kappa == 40 then there is no way to tell which way to round.
198 // Even if unit is just half the size of 10^kappa we are already completely
202 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
206 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
217 // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
218 // the power (the kappa) is increased.
221 (*kappa) += 1;
359 // such that LOW < buffer * 10^kappa < HIGH, where LOW and HIGH are the
388 int* kappa) {
411 // kappa instead.
413 // such that: too_low < buffer * 10^kappa < too_high
425 *kappa = divisor_exponent + 1;
427 // Loop invariant: buffer = too_high / 10^kappa (integer division)
428 // The invariant holds for the first iteration: kappa has been initialized
431 while (*kappa > 0) {
436 (*kappa)--;
437 // Note that kappa now equals the exponent of the divisor and that the
441 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
471 (*kappa)--;
502 // * kappa is such that
503 // w = buffer * 10^kappa + eps with |eps| < 10^kappa / 2.
513 int* kappa) {
521 // fractional digits. We don't emit any decimal separator, but adapt kappa
523 // increase kappa by 1.
533 *kappa = divisor_exponent + 1;
536 // Loop invariant: buffer = w / 10^kappa (integer division)
537 // The invariant holds for the first iteration: kappa has been initialized
540 while (*kappa > 0) {
546 (*kappa)--;
547 // Note that kappa now equals the exponent of the divisor and that the
558 kappa);
579 (*kappa)--;
583 kappa);
650 int kappa;
652 buffer, length, &kappa);
653 *decimal_exponent = -mk + kappa;
696 // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
699 int kappa;
701 buffer, length, &kappa);
702 *decimal_exponent = -mk + kappa;