aboutsummaryrefslogtreecommitdiff
path: root/math/libm-test.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-23 14:59:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-23 14:59:16 +0000
commitcc60175e8cecbedb4c555379c3c667c9cf9420fa (patch)
tree69af14220d49051875cbe973110661bcc80c7bdd /math/libm-test.c
parent69050873152acb2d2bd2b77c82078259ed59e2e2 (diff)
downloadglibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.zip
glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.tar.gz
glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.tar.bz2
Update.
1998-07-23 Ulrich Drepper <drepper@cygnus.com> * 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 <moshier@mediaone.net>. * 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.
Diffstat (limited to 'math/libm-test.c')
-rw-r--r--math/libm-test.c15
1 files changed, 10 insertions, 5 deletions
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;
}