Skip to content

Commit

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

function logabsgamma(x::Float128)
sign = x >= 0 ? 1 : 2*mod(ceil(Int64,x),2)-1
if isfinite(x)
sign = x >= 0 ? 1 : 2*mod(ceil(Int64,x),2)-1
else
sign = 1

Check warning on line 34 in src/specfun.jl

View check run for this annotation

Codecov / codecov/patch

src/specfun.jl#L34

Added line #L34 was not covered by tests
end
return lgamma(x), sign
end

0 comments on commit 7d25d9d

Please sign in to comment.