public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/6776] New: pow() pole error sets errno to EDOM, should be ERANGE
@ 2008-07-30 10:50 mtk dot manpages at gmail dot com
  2008-07-30 20:22 ` [Bug math/6776] " mtk dot manpages at googlemail dot com
  2010-09-12  6:00 ` mtk dot manpages at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-30 10:50 UTC (permalink / raw)
  To: glibc-bugs

The POSIX.1 specification of pow says for a pole error:

==
Pole Error
    The value of x is zero and y is negative.

    If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then
errno shall be set to [ERANGE]. If the integer expression (math_errhandling &
MATH_ERREXCEPT) is non-zero, then the divide-by-zero floating-point exception
shall be raised. 
==

glibc 2.8's pow() does raise the divide-by-zero, as expected.

It also sets errno, but to the wrong value: errno is set to EDOM, when it should
instead be ERANGE.

-- 
           Summary: pow() pole error sets errno to EDOM, should be ERANGE
           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=6776

------- 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] 3+ messages in thread

end of thread, other threads:[~2010-09-12  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 10:50 [Bug math/6776] New: pow() pole error sets errno to EDOM, should be ERANGE mtk dot manpages at gmail dot com
2008-07-30 20:22 ` [Bug math/6776] " mtk dot manpages at googlemail dot com
2010-09-12  6:00 ` 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).