Skip to content

Commit fd136dc

Browse files
authored
fix gamma(Inf)
1 parent a9a81cf commit fd136dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gamma.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function gamma(_x::Float64)
88
x = -x # Use this rather than the traditional x = 1-x to avoid roundoff.
99
s *= x
1010
end
11+
isfinite(x) || return x
1112
if x > 11.5
1213
w = inv(x)
1314
coefs = (1.0,

0 commit comments

Comments
 (0)