diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 18:00:10 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-08-29 12:22:10 +0200 |
commit | 0007fc9bdd1d9efcd52d07837f2cd085b5a8f58b (patch) | |
tree | b3c86dbee5b95c24a8413be634ae11318ceb2f8e /stdlib/strtof_l.c | |
parent | f1cc4c8654b6bc431273286d3562942c50975caf (diff) | |
download | glibc-0007fc9bdd1d9efcd52d07837f2cd085b5a8f58b.zip glibc-0007fc9bdd1d9efcd52d07837f2cd085b5a8f58b.tar.gz glibc-0007fc9bdd1d9efcd52d07837f2cd085b5a8f58b.tar.bz2 |
[BZ #15522] strtod ("nan(N)") returning a sNaN in some cases
Diffstat (limited to 'stdlib/strtof_l.c')
-rw-r--r-- | stdlib/strtof_l.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/stdlib/strtof_l.c b/stdlib/strtof_l.c index 6fb44bd..c4c1c1f 100644 --- a/stdlib/strtof_l.c +++ b/stdlib/strtof_l.c @@ -37,10 +37,9 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **, #define SET_MANTISSA(flt, mant) \ do { union ieee754_float u; \ u.f = (flt); \ - if ((mant & 0x7fffff) == 0) \ - mant = 0x400000; \ - u.ieee.mantissa = (mant) & 0x7fffff; \ - (flt) = u.f; \ + u.ieee_nan.mantissa = (mant); \ + if (u.ieee.mantissa != 0) \ + (flt) = u.f; \ } while (0) #include "strtod_l.c" |