From 5bc737f35262327ca86ef96a7cbc6680c8eeb2ea Mon Sep 17 00:00:00 2001 From: das Date: Wed, 3 Jan 2007 04:58:54 +0000 Subject: Import of the latest gdtoa sources, which include fixes for minor problems relating to NaNs and rounding. --- contrib/gdtoa/strtof.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'contrib/gdtoa/strtof.c') diff --git a/contrib/gdtoa/strtof.c b/contrib/gdtoa/strtof.c index bb283ae..21bc6c1 100644 --- a/contrib/gdtoa/strtof.c +++ b/contrib/gdtoa/strtof.c @@ -26,14 +26,8 @@ THIS SOFTWARE. ****************************************************************/ -/* Please send bug reports to - David M. Gay - Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-0636 - U.S.A. - dmg@bell-labs.com - */ +/* Please send bug reports to David M. Gay (dmg at acm dot org, + * with " at " changed at "@" and " dot " changed to "."). */ #include "gdtoaimp.h" @@ -44,11 +38,7 @@ strtof(s, sp) CONST char *s; char **sp; strtof(CONST char *s, char **sp) #endif { -#ifdef Sudden_Underflow - static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 1 }; -#else - static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 0 }; -#endif + static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI }; ULong bits[1]; Long exp; int k; @@ -75,7 +65,7 @@ strtof(CONST char *s, char **sp) break; case STRTOG_NaN: - u.L[0] = 0x7fffffff; + u.L[0] = f_QNAN; } if (k & STRTOG_Neg) u.L[0] |= 0x80000000L; -- cgit v1.1