mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
# minimize diff in the crutch.
This commit is contained in:
parent
fe0bce5eb7
commit
5a378ed87f
@ -378,22 +378,20 @@ inline FASTFLOAT_CONSTEXPR20 adjusted_mantissa negative_digit_comp(
|
|||||||
bigint &real_digits = bigmant;
|
bigint &real_digits = bigmant;
|
||||||
am_pow_t const &real_exp = exponent;
|
am_pow_t const &real_exp = exponent;
|
||||||
|
|
||||||
|
// get the value of `b`, rounded down, and get a bigint representation of
|
||||||
|
// b+h
|
||||||
|
adjusted_mantissa am_b = am;
|
||||||
|
// gcc7 bug: use a lambda to remove the noexcept qualifier bug with
|
||||||
|
// -Wnoexcept-type.
|
||||||
|
round<T>(am_b, [](adjusted_mantissa &a, am_pow_t shift) {
|
||||||
|
round_down(a, shift);
|
||||||
|
});
|
||||||
T b;
|
T b;
|
||||||
{
|
to_float(
|
||||||
// get the value of `b`, rounded down, and get a bigint representation of
|
|
||||||
// b+h
|
|
||||||
adjusted_mantissa am_b = am;
|
|
||||||
// gcc7 bug: use a lambda to remove the noexcept qualifier bug with
|
|
||||||
// -Wnoexcept-type.
|
|
||||||
round<T>(am_b, [](adjusted_mantissa &a, am_pow_t shift) {
|
|
||||||
round_down(a, shift);
|
|
||||||
});
|
|
||||||
to_float(
|
|
||||||
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
||||||
false,
|
false,
|
||||||
#endif
|
#endif
|
||||||
am_b, b);
|
am_b, b);
|
||||||
}
|
|
||||||
adjusted_mantissa theor = to_extended_halfway(b);
|
adjusted_mantissa theor = to_extended_halfway(b);
|
||||||
bigint theor_digits(theor.mantissa);
|
bigint theor_digits(theor.mantissa);
|
||||||
am_pow_t theor_exp = theor.power2;
|
am_pow_t theor_exp = theor.power2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user