Skip to content

Commit

Permalink
Update src/basicfuns.jl
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
oscardssmith and devmotion authored Nov 16, 2024
1 parent 528545d commit 5cf0058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/basicfuns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Return `log(abs(tanh(x)))`, carefully evaluated without intermediate calculation
The implementation ensures `logabstanh(-x) = logabstanh(x)`.
"""
function logabstanh(x::Real)
return log1p(-2/((exp(2abs(x))+1)))
return log1p(-2/(exp(2*abs(x))+1))
end
function logabstanh(x::Float32)
abs_x = abs(x)
Expand Down

0 comments on commit 5cf0058

Please sign in to comment.