]> sourceware.org Git - newlib-cygwin.git/commit
Fix strtod ("nan") and strtold ("nan") returns wrong negative NaN
authorMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 16 Aug 2018 00:18:50 +0000 (09:18 +0900)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 16 Aug 2018 11:17:44 +0000 (13:17 +0200)
commit6c212a8b7873703c4f98c6b68579b234918be83a
tree7e0cd5a26100af8a21664affe941dd0d75e952c8
parent8f1259a6ef03edfa0f8e8b28fcaa13410b4e6b10
Fix strtod ("nan") and strtold ("nan") returns wrong negative NaN

The definition of qNaN for x86_64 and i386 was wrong.
strto{d|ld} ("nan") returned wrong negative NaN
instead of correct positive NaN
since it used the wrong definition.

On the other hand, strtof ("nan") returns correct positive NaN
since it uses nanf ("") instead of the wrong definition.

This commit makes strto{d|ld} ("nan") uses {nan|nanl} ("")
like strtof ("nan") using.
So strto{d|ld} ("nan") returns positive NaN.
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/strtorx.c
This page took 0.028476 seconds and 5 git commands to generate.