summaryrefslogtreecommitdiff
path: root/sysdeps/generic/w_tgammaf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-21 11:42:09 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-21 11:42:09 +0000
commitb640e88eff2f0c60d1604382c15a147a2373f6d1 (patch)
treef7d8c9841b3b9163b5c13f49f44c27015a0f2ec6 /sysdeps/generic/w_tgammaf.c
parentf2fad0ae26d274bd203ba350a66b6f2bec3f6740 (diff)
2004-11-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/k_standard.c: Document code 50. (__kernel_standard) <case 50>: Avoid raising div-by-zero exception again. 2004-11-19 H.J. Lu <hongjiu.lu@intel.com> [BZ #552] * math/libm-test.inc (tgamma_test): Update tgamma (0) and tgamma (-0). * sysdeps/generic/w_tgamma.c (__tgamma): Properly handle |x| == 0. * sysdeps/generic/w_tgammaf.c (__tgammaf): Likewise. * sysdeps/generic/w_tgammal.c (__tgammal): Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. * sysdeps/ieee754/k_standard.c (__kernel_standard): Handle tgamma (0) and tgamma (-0).
Diffstat (limited to 'sysdeps/generic/w_tgammaf.c')
-rw-r--r--sysdeps/generic/w_tgammaf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/generic/w_tgammaf.c b/sysdeps/generic/w_tgammaf.c
index 152f4be156..e7b0d87ab5 100644
--- a/sysdeps/generic/w_tgammaf.c
+++ b/sysdeps/generic/w_tgammaf.c
@@ -37,8 +37,11 @@ static char rcsid[] = "$NetBSD: w_gammaf.c,v 1.4 1995/11/20 22:06:48 jtc Exp $";
if(_LIB_VERSION == _IEEE_) return y;
if(!__finitef(y)&&__finitef(x)) {
- if(__floorf(x)==x&&x<=(float)0.0)
+ if (x == (float)0.0)
/* tgammaf pole */
+ return (float)__kernel_standard((double)x,(double)x,150);
+ else if(__floorf(x)==x&&x<(float)0.0)
+ /* tgammaf domain */
return (float)__kernel_standard((double)x,(double)x,141);
else
/* tgammaf overflow */