Fix dragonbox integration

This commit is contained in:
Victor Zverovich
2020-09-28 18:10:46 -07:00
parent 3ae88147e2
commit 90ef46df0b
2 changed files with 6 additions and 0 deletions

View File

@@ -2307,6 +2307,10 @@ FMT_SAFEBUFFERS decimal_fp<T> to_decimal(T x) FMT_NOEXCEPT {
goto small_divisor_case_label;
}
}
if (ret_value.significand == 0) {
ret_value.exponent = 0;
return ret_value;
}
ret_value.exponent = minus_k + float_info<T>::kappa + 1;
// We may need to remove trailing zeros