diff options
author | das <das@FreeBSD.org> | 2007-01-03 04:58:54 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2007-01-03 04:58:54 +0000 |
commit | 5bc737f35262327ca86ef96a7cbc6680c8eeb2ea (patch) | |
tree | 5f657cd7247cc76d6a32a0ea1f51ec09f8b25661 /contrib/gdtoa/strtopf.c | |
parent | 2b54587e529691da13ad420858ce167f84023ce5 (diff) | |
download | FreeBSD-src-5bc737f35262327ca86ef96a7cbc6680c8eeb2ea.zip FreeBSD-src-5bc737f35262327ca86ef96a7cbc6680c8eeb2ea.tar.gz |
Import of the latest gdtoa sources, which include fixes for minor
problems relating to NaNs and rounding.
Diffstat (limited to 'contrib/gdtoa/strtopf.c')
-rw-r--r-- | contrib/gdtoa/strtopf.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/contrib/gdtoa/strtopf.c b/contrib/gdtoa/strtopf.c index c49fc96..cc7c970 100644 --- a/contrib/gdtoa/strtopf.c +++ b/contrib/gdtoa/strtopf.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 @@ strtopf(s, sp, f) CONST char *s; char **sp; float *f; strtopf(CONST char *s, char **sp, float *f) #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], *L; Long exp; int k; @@ -75,7 +65,7 @@ strtopf(CONST char *s, char **sp, float *f) break; case STRTOG_NaN: - L[0] = 0x7fffffff; + L[0] = f_QNAN; } if (k & STRTOG_Neg) L[0] |= 0x80000000L; |