tpapp / TransformVariables.jl

Transformations to contrained variables from ℝⁿ.
Other
66 stars 14 forks source link

Use LogExpFunctions instead of own implementations of logistic and logit #88

Closed andreasnoack closed 2 years ago

andreasnoack commented 2 years ago

With the current version of logistic

xd = ForwardDiff.Dual(-800.0, 1.0)
first(ForwardDiff.partials(transform(as(Real, 0.0, 1.0), xd)))

returns NaN.

(Notice that I've set the version to 0.5.99 to work around https://github.com/tpapp/LogDensityProblems.jl/issues/80)

tpapp commented 2 years ago

Good catch, thanks.