This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0
- From: "rth at gcc dot gnu dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Sep 2004 06:46:21 -0000
- Subject: [Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
C99 7.12.12.1 says the result is
x - y if x > y
+0 if x <= y
This says to me that fdim(+inf, +inf) = 0.0, not NaN as currently reported.
Comparisons between infinities are strictly defined, even though subtracting
them yields NaN.
Except for the out-of-line routines that use fpclassify (why?) it seems as
if we just need to change the condition on the ?: from < to <=.
--
Summary: fdim(+inf, +inf) yields NaN instead of 0.0
Product: glibc
Version: unspecified
Status: NEW
Severity: minor
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: rth at gcc dot gnu dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=376
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.