This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/6776] New: pow() pole error sets errno to EDOM, should be ERANGE
- From: "mtk dot manpages at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 30 Jul 2008 10:49:47 -0000
- Subject: [Bug math/6776] New: pow() pole error sets errno to EDOM, should be ERANGE
- Reply-to: sourceware-bugzilla at sourceware dot org
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.