This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/4997] lround(nexafter(0.5,-1)) has incorrect value
- From: "rsa at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Nov 2007 19:41:12 -0000
- Subject: [Bug math/4997] lround(nexafter(0.5,-1)) has incorrect value
- References: <20070906173748.4997.fxcoudert@gcc.gnu.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rsa at us dot ibm dot com 2007-11-09 19:41 -------
Buggy llround output to be used for baseline for a fix:
Expect 4503599627370496: Got 004503599627370496 = llround(2^52
[0x1.0000000000000p+52] {4503599627370496.0000000000000000})
Expect 4503599627370497 : Got 4503599627370498 = llround(2^52+1
[0x1.0000000000001p+52] {4503599627370497.0})
Expect 4503599627370498 : Got 4503599627370498 = llround(2^52+2
[0x1.0000000000002p+52] {4503599627370498.0})
Expect 4503599627370499 : Got 4503599627370500 = llround(2^52+3
[0x1.0000000000003p+52] {4503599627370499.0})
Expect 9007199254740991: Got 9007199254740992 = llround(2^52
[0x1.fffffffffffffp+52] {9007199254740991.0})
Expect 9007199254740992: Got 9007199254740992 = llround(2^52
[0x1.0000000000000p+53] {9007199254740992.0})
I have a fix for these cases that I'm trying out.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4997
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.