Skip to content

Commit

Permalink
Use expm1
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
  • Loading branch information
rubenseyer and devmotion authored Jan 8, 2024
1 parent 07d0ed5 commit 8f68d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/univariate/continuous/gumbel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ logcdf(d::Gumbel, x::Real) = -exp(-zval(d, x))

quantile(d::Gumbel, p::Real) = d.μ - d.θ * log(-log(p))

gradlogpdf(d::Gumbel, x::Real) = (-1 + exp(-zval(d, x))) / d.θ
gradlogpdf(d::Gumbel, x::Real) = expm1(-zval(d, x)) / d.θ

0 comments on commit 8f68d06

Please sign in to comment.