This is the mail archive of the glibc-bugs@sourceware.org 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/6776] New: pow() pole error sets errno to EDOM, should be ERANGE


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.


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