summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_gamma_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_gamma_r.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_gamma_r.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c
index 4614bcf46e..f32309350c 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, 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.
 
@@ -35,9 +35,9 @@ __ieee754_gamma_r (double x, int *signgamp)
 
   if (((hx & 0x7fffffff) | lx) == 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 < 0xfff00000 && __rint (x) == x)
     {