public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0
@ 2004-09-09  6:46 rth at gcc dot gnu dot org
  2004-09-26 10:16 ` [Bug math/376] " drepper at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-09  6:46 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug math/376] fdim(+inf, +inf) yields NaN instead of 0.0
  2004-09-09  6:46 [Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0 rth at gcc dot gnu dot org
@ 2004-09-26 10:16 ` drepper at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2004-09-26 10:16 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2004-09-26 10:16 -------
I haven't tested all archs, but this should be fixed now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-26 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09  6:46 [Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0 rth at gcc dot gnu dot org
2004-09-26 10:16 ` [Bug math/376] " drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).