mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-01-01 03:12:18 +08:00
Merge pull request #156 from fastfloat/dlemire/fix_issue_154
Fixing issue 154.
This commit is contained in:
commit
be962361c6
@ -156,8 +156,8 @@ from_chars_result from_chars_advanced(const char *first, const char *last,
|
||||
// We do not have that fegetround() == FE_TONEAREST.
|
||||
// Next is a modified Clinger's fast path, inspired by Jakub Jelínek's proposal
|
||||
if (pns.exponent >= 0 && pns.mantissa <=binary_format<T>::max_mantissa_fast_path(pns.exponent)) {
|
||||
#if (defined(_WIN32) && defined(__clang__))
|
||||
// ClangCL may map 0 to -0.0 when fegetround() == FE_DOWNWARD
|
||||
#if defined(__clang__)
|
||||
// Clang may map 0 to -0.0 when fegetround() == FE_DOWNWARD
|
||||
if(pns.mantissa == 0) {
|
||||
value = 0;
|
||||
return answer;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user