mirror of git://sourceware.org/git/glibc.git
* sysdeps/ieee754/k_standard.c (__kernel_standard): Pole errors
for lgamma should se errno to ERANGE, not EDOM. * math/libm-test.inc (lgamma_test): Check errno for pole errors.
This commit is contained in:
parent
db6edfb341
commit
e971e76d8d
|
|
@ -1,5 +1,9 @@
|
||||||
2009-04-25 Ulrich Drepper <drepper@redhat.com>
|
2009-04-25 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/ieee754/k_standard.c (__kernel_standard): Pole errors
|
||||||
|
for lgamma should se errno to ERANGE, not EDOM.
|
||||||
|
* math/libm-test.inc (lgamma_test): Check errno for pole errors.
|
||||||
|
|
||||||
* sysdeps/generic/stdint.h (WINT_MAX): Define as 2147483647 since
|
* sysdeps/generic/stdint.h (WINT_MAX): Define as 2147483647 since
|
||||||
this is the maximum UCS4 value.
|
this is the maximum UCS4 value.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3241,7 +3241,9 @@ lgamma_test (void)
|
||||||
TEST_f_f (lgamma, nan_value, nan_value);
|
TEST_f_f (lgamma, nan_value, nan_value);
|
||||||
|
|
||||||
/* lgamma (x) == +inf plus divide by zero exception for integer x <= 0. */
|
/* lgamma (x) == +inf plus divide by zero exception for integer x <= 0. */
|
||||||
|
errno = 0;
|
||||||
TEST_f_f (lgamma, -3, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
|
TEST_f_f (lgamma, -3, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
|
||||||
|
check_int ("errno for lgamma(-integer) == ERANGE", errno, ERANGE, 0, 0, 0);
|
||||||
TEST_f_f (lgamma, minus_infty, plus_infty);
|
TEST_f_f (lgamma, minus_infty, plus_infty);
|
||||||
|
|
||||||
TEST_f_f1 (lgamma, 1, 0, 1);
|
TEST_f_f1 (lgamma, 1, 0, 1);
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ static double zero = 0.0; /* used as const */
|
||||||
else
|
else
|
||||||
exc.retval = HUGE_VAL;
|
exc.retval = HUGE_VAL;
|
||||||
if (_LIB_VERSION == _POSIX_)
|
if (_LIB_VERSION == _POSIX_)
|
||||||
__set_errno (EDOM);
|
__set_errno (ERANGE);
|
||||||
else if (!matherr(&exc)) {
|
else if (!matherr(&exc)) {
|
||||||
if (_LIB_VERSION == _SVID_) {
|
if (_LIB_VERSION == _SVID_) {
|
||||||
(void) WRITE2("lgamma: SING error\n", 19);
|
(void) WRITE2("lgamma: SING error\n", 19);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue