summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32
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/ieee754/flt-32
parentf2fad0ae26d274bd203ba350a66b6f2bec3f6740 (diff)
downloadglibc-b640e88eff2f0c60d1604382c15a147a2373f6d1.tar.gz
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/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index d484e0c288..926c84f368 100644
--- a/sysdeps/ieee754/flt-32/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -34,9 +34,9 @@ __ieee754_gammaf_r (float x, int *signgamp)
if ((hx & 0x7fffffff) == 0)
{
- /* Return value for x == 0 is NaN with invalid exception. */
+ /* Return value for x == 0 is Inf with divide by zero exception. */
*signgamp = 0;
- return x / x;
+ return 1.0 / x;
}
if (hx < 0 && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
{