diff options
author | bde <bde@FreeBSD.org> | 2008-02-13 15:22:53 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2008-02-13 15:22:53 +0000 |
commit | 403416b247941c8a02ce7d8bbe00fc1f319cc144 (patch) | |
tree | 84f880386872217baecefaef40c4900c9aee0b59 /lib/msun | |
parent | 47937dee2d40bbfa99f73e66928a92ca8ae61c70 (diff) | |
download | FreeBSD-src-403416b247941c8a02ce7d8bbe00fc1f319cc144.zip FreeBSD-src-403416b247941c8a02ce7d8bbe00fc1f319cc144.tar.gz |
Fix the C version of ceill(x) for -1 < x <= -0 in all rounding modes.
The result should be -0, but was +0.
Diffstat (limited to 'lib/msun')
-rw-r--r-- | lib/msun/src/s_ceill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msun/src/s_ceill.c b/lib/msun/src/s_ceill.c index 1de973b..df26e5a 100644 --- a/lib/msun/src/s_ceill.c +++ b/lib/msun/src/s_ceill.c @@ -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) |