From cc60175e8cecbedb4c555379c3c667c9cf9420fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Jul 1998 14:59:16 +0000 Subject: Update. 1998-07-23 Ulrich Drepper * sysdeps/generic/glob.c: Fix two problems with GLOB_DOOFFS. Reported by bwelling@anomaly.munge.com [PR libc/720]. * sysdeps/libm-ieee754/k_standard.c: Return NAN for libm not in SVID more for gamma(x) with x interger <= 0. Reported by Stephen L Moshier . * math/libm-test.c (gamma_test): Add test for gamma(-1) and gamma(0). Correct test for SVID version of gamma. * sysdeps/libm-ieee754/w_gamma.c: Use correct matherr call in SVID emulation mode. * sysdeps/libm-ieee754/w_gammaf.c: Likewise. * sysdeps/libm-ieee754/w_gammal.c: Likewise. * string/string.h: Don't use string function optimization for C++ as long as we use macros. --- math/libm-test.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'math') diff --git a/math/libm-test.c b/math/libm-test.c index a4e8492..52358d5 100644 --- a/math/libm-test.c +++ b/math/libm-test.c @@ -1433,17 +1433,17 @@ gamma_test (void) _LIB_VERSION = _SVID_; check_isinfp ("gamma (+inf) == +inf", FUNC(gamma) (plus_infty)); - check_isinfp_exc ("gamma (0) == +inf plus divide by zero exception", - FUNC(gamma) (0), DIVIDE_BY_ZERO_EXCEPTION); + check_exc ("gamma (0) == HUGE plus divide by zero exception", + FUNC(gamma) (0), HUGE, DIVIDE_BY_ZERO_EXCEPTION); - check_isinfp_exc ("gamma (x) == +inf plus divide by zero exception for integer x <= 0", - FUNC(gamma) (-3), DIVIDE_BY_ZERO_EXCEPTION); + check_exc ("gamma (x) == HUGE plus divide by zero exception for integer x <= 0", + FUNC(gamma) (-3), HUGE, DIVIDE_BY_ZERO_EXCEPTION); check_isnan_exc ("gamma (-inf) == NaN plus invalid exception", FUNC(gamma) (minus_infty), INVALID_EXCEPTION); signgam = 0; check ("gamma (1) == 0", FUNC(gamma) (1), 0); - check_int ("gamma (0) sets signgam to 1", signgam, 1); + check_int ("gamma (1) sets signgam to 1", signgam, 1); signgam = 0; check ("gamma (3) == M_LN2", FUNC(gamma) (3), M_LN2l); @@ -1486,6 +1486,11 @@ gamma_test (void) 1.29805533264755778568L, CHOOSE(0, 3e-16, 2e-7)); check ("gamma (1.2) == 0.91816...", FUNC(gamma) (1.2), 0.91816874239976061064L); + check_isnan_exc ("gamma (0.0) == NaN plus invalid exception", + FUNC(gamma) (0.0), INVALID_EXCEPTION); + check_isnan_exc ("gamma (-1.0) == NaN plus invalid exception", + FUNC(gamma) (-1.0), INVALID_EXCEPTION); + _LIB_VERSION = save_lib_version; } -- cgit v1.1