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/strtopxL.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'contrib/gdtoa/strtopxL.c') diff --git a/contrib/gdtoa/strtopxL.c b/contrib/gdtoa/strtopxL.c index 95fd3d5..68c83d2 100644 --- a/contrib/gdtoa/strtopxL.c +++ b/contrib/gdtoa/strtopxL.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" @@ -60,11 +54,7 @@ strtopxL(s, sp, V) CONST char *s; char **sp; void *V; strtopxL(CONST char *s, char **sp, void *V) #endif { -#ifdef Sudden_Underflow - static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 1 }; -#else - static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; -#endif + static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI }; ULong bits[2]; Long exp; int k; @@ -91,8 +81,9 @@ strtopxL(CONST char *s, char **sp, void *V) break; case STRTOG_NaN: - L[_0] = 0x7fff << 16; - L[_1] = L[_2] = (ULong)-1; + L[0] = ld_QNAN0; + L[1] = ld_QNAN1; + L[2] = ld_QNAN2; } if (k & STRTOG_Neg) L[_0] |= 0x80000000L; -- cgit v1.1