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
DominiqueMakowski and devmotion authored Sep 4, 2024
1 parent 35f18e3 commit 83acf1d
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 @@ -260,7 +260,7 @@ Return `log(exp(x) - 1)` or the “invsoftplus” function. It is the inverse o
[`log1pexp`](@ref) (aka “softplus”).
"""
logexpm1(x::Real) = x <= 18.0 ? log(_expm1(x)) : x <= 33.3 ? x - exp(-x) : oftype(exp(-x), x)
logexpm1(x::Float32) = x <= 9.0f0 ? log(expm1(x)) : x <= 16.0f0 ? x - exp(-x) : oftype(exp(-x), x)
logexpm1(x::Float32) = x <= 9f0 ? log(expm1(x)) : x <= 16f0 ? x - exp(-x) : oftype(exp(-x), x)

function softplus(x; a::Real=1.0)
if a == 1.0
Expand Down

0 comments on commit 83acf1d

Please sign in to comment.