about summary refs log tree commit diff
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index 926905e7cd..f0cd43840b 100644
--- a/sysdeps/ieee754/flt-32/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
@@ -44,6 +44,9 @@ __ieee754_gammaf_r (float x, int *signgamp)
       *signgamp = 0;
       return (x - x) / (x - x);
     }
+  if (hx == 0xff800000)
+    /* x == -Inf.  According to ISO this is NaN.  */
+    return x - x;
 
   /* XXX FIXME.  */
   return __ieee754_expf (__ieee754_lgammaf_r (x, signgamp));