Lines Matching refs:kappa
33 // Input: * buffer containing the digits of too_high / 10^kappa
37 // * rest = (too_high - buffer * 10^kappa).f() * unit
38 // * ten_kappa = 10^kappa * unit
154 // The rounding might shift the whole buffer in which case the kappa is
155 // adjusted. For example "99", kappa = 3 might become "10", kappa = 4.
168 int* kappa) {
175 // 10^kappa == 40 then there is no way to tell which way to round.
177 // Even if unit is just half the size of 10^kappa we are already completely
181 // If 2 * (rest + unit) <= 10^kappa we can safely round down.
185 // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
196 // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
197 // the power (the kappa) is increased.
200 (*kappa) += 1;
338 // such that LOW < buffer * 10^kappa < HIGH, where LOW and HIGH are the
367 int* kappa) {
390 // kappa instead.
392 kappa < too_high
404 *kappa = divisor_exponent + 1;
406 // Loop invariant: buffer = too_high / 10^kappa (integer division)
407 // The invariant holds for the first iteration: kappa has been initialized
410 while (*kappa > 0) {
415 (*kappa)--;
416 // Note that kappa now equals the exponent of the divisor and that the
420 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
450 (*kappa)--;
481 // * kappa is such that
482 // w = buffer * 10^kappa + eps with |eps| < 10^kappa / 2.
492 int* kappa) {
500 // fractional digits. We don't emit any decimal separator, but adapt kappa
502 // increase kappa by 1.
512 *kappa = divisor_exponent + 1;
515 // Loop invariant: buffer = w / 10^kappa (integer division)
516 // The invariant holds for the first iteration: kappa has been initialized
519 while (*kappa > 0) {
525 (*kappa)--;
526 // Note that kappa now equals the exponent of the divisor and that the
537 kappa);
558 (*kappa)--;
562 kappa);
629 int kappa;
631 buffer, length, &kappa);
632 *decimal_exponent = -mk + kappa;
675 // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
678 int kappa;
680 buffer, length, &kappa);
681 *decimal_exponent = -mk + kappa;