Skip to content

Commit

Permalink
Update src/specfun.jl
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
araujoms and devmotion authored Apr 4, 2024
1 parent 7d25d9d commit 1c4fb18
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/specfun.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ lgamma(x::Float128) =
Float128(@ccall(libquadmath.lgammaq(x::Cfloat128)::Cfloat128))

function logabsgamma(x::Float128)
if isfinite(x)
sign = x >= 0 ? 1 : 2*mod(ceil(Int64,x),2)-1
else
sign = 1
end
sign = !isfinite(x) || x >= 0 || !iszero(mod(ceil(x), 2)) ? 1 : -1
return lgamma(x), sign
end

0 comments on commit 1c4fb18

Please sign in to comment.