Lines Matching refs:DiyFp
342 // w is a floating-point number (DiyFp), consisting of a significand and an
383 static bool DigitGen(DiyFp low,
384 DiyFp w,
385 DiyFp high,
404 DiyFp too_low = DiyFp(low.f() - unit, low.e());
405 DiyFp too_high = DiyFp(high.f() + unit, high.e());
408 DiyFp unsafe_interval = DiyFp::Minus(too_high, too_low);
416 DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
423 BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
441 // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
446 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(),
473 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit,
482 // w is a floating-point number (DiyFp), consisting of a significand and an
509 static bool DigitGenCounted(DiyFp w,
524 DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
531 BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
602 DiyFp w = Double(v).AsNormalizedDiyFp();
607 DiyFp boundary_minus, boundary_plus;
610 DiyFp ten_mk; // Cached power of ten: 10^-k
613 kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
615 kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
621 DiyFp::kSignificandSize) &&
623 DiyFp::kSignificandSize));
624 // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
627 // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
633 DiyFp scaled_w = DiyFp::Times(w, ten_mk);
635 boundary_plus.e() + ten_mk.e() + DiyFp::kSignificandSize);
641 DiyFp scaled_boundary_minus = DiyFp::Times(boundary_minus, ten_mk);
642 DiyFp scaled_boundary_plus = DiyFp::Times(boundary_plus, ten_mk);
668 DiyFp w = Double(v).AsNormalizedDiyFp();
669 DiyFp ten_mk; // Cached power of ten: 10^-k
672 kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
674 kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
680 DiyFp::kSignificandSize) &&
682 DiyFp::kSignificandSize));
683 // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
686 // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
692 DiyFp scaled_w = DiyFp::Times(w, ten_mk);