summaryrefslogtreecommitdiff
path: root/missing/lgamma_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'missing/lgamma_r.c')
-rw-r--r--missing/lgamma_r.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/missing/lgamma_r.c b/missing/lgamma_r.c
index 70b6259c6b..856cc83288 100644
--- a/missing/lgamma_r.c
+++ b/missing/lgamma_r.c
@@ -51,8 +51,9 @@ lgamma_r(double x, int *signp)
double i, f, s;
f = modf(-x, &i);
if (f == 0.0) {
+ static const double zero = 0.0;
*signp = 1;
- return 1.0/0.0;
+ return 1.0/zero;
}
*signp = (fmod(i, 2.0) != 0.0) ? 1 : -1;
s = sin(PI * x);