diff options
author | das <das@FreeBSD.org> | 2007-12-16 23:31:55 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2007-12-16 23:31:55 +0000 |
commit | 218b1f5292b7a8d9fd2050961232f96c860645b0 (patch) | |
tree | 2da2e0068c9485c3241476f588851c96f14d8b3b /contrib/gdtoa/strtorQ.c | |
parent | 8cf2d070a8052f74c73cb0b3d2b09bc755e9ce6e (diff) | |
download | FreeBSD-src-218b1f5292b7a8d9fd2050961232f96c860645b0.zip FreeBSD-src-218b1f5292b7a8d9fd2050961232f96c860645b0.tar.gz |
Fix previous commit: We should only mask the top bit in the STRTOG_NaNBits
case, not the STRTOG_Normal case.
Diffstat (limited to 'contrib/gdtoa/strtorQ.c')
-rw-r--r-- | contrib/gdtoa/strtorQ.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/gdtoa/strtorQ.c b/contrib/gdtoa/strtorQ.c index b7f9bba..bd183bc 100644 --- a/contrib/gdtoa/strtorQ.c +++ b/contrib/gdtoa/strtorQ.c @@ -65,6 +65,12 @@ ULtoQ(ULong *L, ULong *bits, Long exp, int k) break; case STRTOG_Normal: + L[_3] = bits[0]; + L[_2] = bits[1]; + L[_1] = bits[2]; + L[_0] = (bits[3] & ~0x10000) | ((exp + 0x3fff + 112) << 16); + break; + case STRTOG_NaNbits: L[_3] = bits[0]; L[_2] = bits[1]; |