This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/887] Math library function "logb" and "nextafter" inconsistent
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 21 Nov 2005 18:07:11 -0000
- Subject: [Bug math/887] Math library function "logb" and "nextafter" inconsistent
- References: <20050428174956.887.uttamp@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2005-11-21 18:07 -------
The patch is definitely wrong.
First of all, you haven't proven in any way with standard references that
the current behaviour is incorrect.
If that is a bug (I'm not aware of any part of the standard that would mandate
that), then it would be a generic GCC problem on ppc32 with casts from int
to double with FE_DOWNWARD rounding. As on ppc32 we can't assume a hw
instruction for that, GCC on ppc32 computes the cast as
((double) (4503601774854144 + i)) - 4503601774854144.0
for int i. With FE_DOWNWARD rounding and i == 0, this results in -0.0.
Working around this for two randomly picked functions when the same thing
occurs in hundreds of other functions is certainly not the way to go.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=887
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.