aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32/e_gammaf_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_gammaf_r.c')
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index f0cd438..bbd1a35 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 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.
@@ -45,8 +45,11 @@ __ieee754_gammaf_r (float x, int *signgamp)
return (x - x) / (x - x);
}
if (hx == 0xff800000)
- /* 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_expf (__ieee754_lgammaf_r (x, signgamp));