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. --- sysdeps/libm-ieee754/k_standard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/libm-ieee754/k_standard.c') diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/libm-ieee754/k_standard.c index aeaa50f2ee..82cfbe467a 100644 --- a/sysdeps/libm-ieee754/k_standard.c +++ b/sysdeps/libm-ieee754/k_standard.c @@ -845,12 +845,13 @@ static double zero = 0.0; /* used as const */ exc.type = SING; exc.name = type < 100 ? "gamma" : (type < 200 ? "gammaf" : "gammal"); - exc.retval = HUGE_VAL; + exc.retval = NAN; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("gamma: SING error\n", 18); + exc.retval = HUGE_VAL; } __set_errno (EDOM); } -- cgit 1.4.1