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/strtorQ.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/strtorQ.c')
-rw-r--r-- | contrib/gdtoa/strtorQ.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/gdtoa/strtorQ.c b/contrib/gdtoa/strtorQ.c index 63a7b6a..a9a07da 100644 --- a/contrib/gdtoa/strtorQ.c +++ b/contrib/gdtoa/strtorQ.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" @@ -89,8 +83,10 @@ ULtoQ(ULong *L, ULong *bits, Long exp, int k) break; case STRTOG_NaN: - L[_0] = 0x7fffffff; - L[_1] = L[_2] = L[_3] = (ULong)-1; + L[0] = ld_QNAN0; + L[1] = ld_QNAN1; + L[2] = ld_QNAN2; + L[3] = ld_QNAN3; } if (k & STRTOG_Neg) L[_0] |= 0x80000000L; |