Skip to content

Commit 7d25d9d

Browse files
araujomsRalphAS
andauthored
Update src/specfun.jl
Co-authored-by: RalphAS <[email protected]>
1 parent 0f7bb97 commit 7d25d9d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/specfun.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ lgamma(x::Float128) =
2828
Float128(@ccall(libquadmath.lgammaq(x::Cfloat128)::Cfloat128))
2929

3030
function logabsgamma(x::Float128)
31-
sign = x >= 0 ? 1 : 2*mod(ceil(Int64,x),2)-1
31+
if isfinite(x)
32+
sign = x >= 0 ? 1 : 2*mod(ceil(Int64,x),2)-1
33+
else
34+
sign = 1
35+
end
3236
return lgamma(x), sign
3337
end

0 commit comments

Comments
 (0)