diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-23 14:59:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-23 14:59:16 +0000 |
commit | cc60175e8cecbedb4c555379c3c667c9cf9420fa (patch) | |
tree | 69af14220d49051875cbe973110661bcc80c7bdd /sysdeps/libm-ieee754/w_gammal.c | |
parent | 69050873152acb2d2bd2b77c82078259ed59e2e2 (diff) | |
download | glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.tar glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.tar.gz glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.tar.bz2 glibc-cc60175e8cecbedb4c555379c3c667c9cf9420fa.zip |
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 'sysdeps/libm-ieee754/w_gammal.c')
-rw-r--r-- | sysdeps/libm-ieee754/w_gammal.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/sysdeps/libm-ieee754/w_gammal.c b/sysdeps/libm-ieee754/w_gammal.c index 1b4ae2cc7b..68328f652a 100644 --- a/sysdeps/libm-ieee754/w_gammal.c +++ b/sysdeps/libm-ieee754/w_gammal.c @@ -35,7 +35,18 @@ static char rcsid[] = "$NetBSD: $"; long double y; #ifndef _IEEE_LIBM if (_LIB_VERSION == _SVID_) - y = __ieee754_lgammal_r(x,&signgam); + { + y = __ieee754_lgammal_r(x,&signgam); + + if(!__finitel(y)&&__finitel(x)) { + if(__floorl(x)==x&&x<=(long double)0.0) + /* lgamma pole */ + return (long double)__kernel_standard((double)x,(double)x,15); + else + /* lgamma overflow */ + return (long double)__kernel_standard((double)x,(double)x,14); + } + } else { #endif @@ -46,14 +57,15 @@ static char rcsid[] = "$NetBSD: $"; return y; #else if(_LIB_VERSION == _IEEE_) return y; - } - if(!__finitel(y)&&__finitel(x)) { - if(__floorl(x)==x&&x<=0.0) + + if(!__finitel(y)&&__finitel(x)) { + if(__floorl(x)==x&&x<=0.0) return __kernel_standard(x,x,241); /* gamma pole */ - else + else return __kernel_standard(x,x,240); /* gamma overflow */ - } else - return y; + } + } + return y; #endif } weak_alias (__gammal, gammal) |