strtold: Fix Infinity value.
Infinity returned from strtold is recognized as NaN by GCC builtin functions. The reason is that ULtox is missing to set a bit. * libc/stdlib/strtorx.c (ULtox): Set high bit in second word to create valid Infinity value. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
18b47e05d3
commit
3e446e9723
@ -88,7 +88,8 @@ ULtox(__UShort *L, __ULong *bits, Long exp, int k)
|
|||||||
|
|
||||||
case STRTOG_Infinite:
|
case STRTOG_Infinite:
|
||||||
L[_0] = 0x7fff;
|
L[_0] = 0x7fff;
|
||||||
L[_1] = L[_2] = L[_3] = L[_4] = 0;
|
L[_1] = 0x8000;
|
||||||
|
L[_2] = L[_3] = L[_4] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRTOG_NaN:
|
case STRTOG_NaN:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user