This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/376] New: fdim(+inf, +inf) yields NaN instead of 0.0


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]