summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_gamma_r.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-04 19:25:06 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-04 19:25:06 +0000
commit3bde1a69c1a9eadb99e3342db125e546c3d453ff (patch)
tree4b26b16ea9ab780493f862668097ad157673aed7 /sysdeps/ieee754/dbl-64/e_gamma_r.c
parent73807ef933b5444bfed021987b6a2d18faead551 (diff)
downloadglibc-3bde1a69c1a9eadb99e3342db125e546c3d453ff.tar.gz
glibc-3bde1a69c1a9eadb99e3342db125e546c3d453ff.tar.xz
glibc-3bde1a69c1a9eadb99e3342db125e546c3d453ff.zip
Update.
	* sysdeps/ieee754/ldbl-96/e_lgammal_r.c: New file.
	Contributed by Stephen L. Moshier <moshier@na-net.ornl.gov>.

	* sysdeps/ieee754/ldbl-96/e_gammal_r.c: Fix handling of boundary cases.

	* sysdeps/ieee754/dbl-64/e_gamma_r.c: Always initialize sign variable.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise.

	* sysdeps/i386/fpu/libm-test-ulps: Adjust after addition of lgammal.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_gamma_r.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_gamma_r.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c
index eff40463be..9dc68f69b3 100644
--- a/sysdeps/ieee754/dbl-64/e_gamma_r.c
+++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c
@@ -1,5 +1,5 @@
 /* Implementation of gamma function according to ISO C.
-   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -46,8 +46,11 @@ __ieee754_gamma_r (double x, int *signgamp)
       return (x - x) / (x - x);
     }
   if ((unsigned int) hx == 0xfff00000 && lx==0)
-    /* x == -Inf.  According to ISO this is NaN.  */
-    return x - x;
+    {
+      /* x == -Inf.  According to ISO this is NaN.  */
+      *signgamp = 0;
+      return x - x;
+    }
 
   /* XXX FIXME.  */
   return __ieee754_exp (__ieee754_lgamma_r (x, signgamp));