diff options
Diffstat (limited to 'missing/lgamma_r.c')
-rw-r--r-- | missing/lgamma_r.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/missing/lgamma_r.c b/missing/lgamma_r.c index ab6c28294..ae93d078c 100644 --- a/missing/lgamma_r.c +++ b/missing/lgamma_r.c @@ -34,6 +34,8 @@ loggamma(double x) /* the natural logarithm of the Gamma function. */ { double v, w; + if (x == 1.0 || x == 2.0) return 0.0; + v = 1; while (x < N) { v *= x; x++; } w = 1 / (x * x); |