Fix the C version of ceill(x) for -1 < x <= -0 in all rounding modes.

The result should be -0, but was +0.
This commit is contained in:
Bruce Evans 2008-02-13 15:22:53 +00:00
parent 7913e26359
commit 6597187205
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176236

View File

@ -63,7 +63,7 @@ ceill(long double x)
if (huge + x > 0.0)
if (u.bits.exp > 0 ||
(u.bits.manh | u.bits.manl) != 0)
u.e = u.bits.sign ? 0.0 : 1.0;
u.e = u.bits.sign ? -0.0 : 1.0;
} else {
uint64_t m = ((1llu << MANH_SIZE) - 1) >> (e + 1);
if (((u.bits.manh & m) | u.bits.manl) == 0)