From 002a604fd61d1d3b8d82a5a85959ba4ebd210aec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Apr 2009 04:46:54 +0000 Subject: * sysdeps/ieee754/k_standard.c (__kernel_standard): Use correct errno value vor pow(+-0,neg). * math/libm-test.inc (pow_test): Add tests for errno value for pole errors. --- sysdeps/ieee754/k_standard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/ieee754') diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c index a81da13b8c..c13d11fe4e 100644 --- a/sysdeps/ieee754/k_standard.c +++ b/sysdeps/ieee754/k_standard.c @@ -528,7 +528,7 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - __set_errno (EDOM); + __set_errno (ERANGE); else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("pow(0,neg): DOMAIN error\n", 25); @@ -547,7 +547,7 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - __set_errno (EDOM); + __set_errno (ERANGE); else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("pow(0,neg): DOMAIN error\n", 25); -- cgit 1.4.1