public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/6779] New: remainder() wrongly gives a domain error for (NaN, 0)
@ 2008-07-30 11:15 mtk dot manpages at gmail dot com
  2008-07-31  8:36 ` [Bug math/6779] " mtk dot manpages at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-30 11:15 UTC (permalink / raw)
  To: glibc-bugs

The posix reaminder() spec says:

==
If x or y is NaN, a NaN shall be returned.

If x is infinite or y is 0 and the other is non-NaN, a domain error shall occur,
and either a NaN (if supported), or an implementation-defined value shall be
returned
==

On glibc 2.8, remainder(NaN, 0) gives a domain error (EDOM, FE_INVALID).  As per
the above spec, it should return a NaN without error.

-- 
           Summary: remainder() wrongly gives a domain error for (NaN, 0)
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: aj at suse dot de
        ReportedBy: mtk dot manpages at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6779

------- 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/6779] remainder() wrongly gives a domain error for (NaN, 0)
  2008-07-30 11:15 [Bug math/6779] New: remainder() wrongly gives a domain error for (NaN, 0) mtk dot manpages at gmail dot com
@ 2008-07-31  8:36 ` mtk dot manpages at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-31  8:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From mtk dot manpages at gmail dot com  2008-07-31 08:34 -------
Created an attachment (id=2844)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2844&action=view)
test program

Sample run showing problem:

$ /tmp/mt_remainder nan 0
errno == EDOM
fetestexcept() says:  FE_INVALID
remainder(nan,0.00000000000000000e+00)=nan
EDOM FE_INVALID nan


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6779

------- 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:[~2008-07-31  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 11:15 [Bug math/6779] New: remainder() wrongly gives a domain error for (NaN, 0) mtk dot manpages at gmail dot com
2008-07-31  8:36 ` [Bug math/6779] " mtk dot manpages at gmail 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).