You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Truncate logjac is NaN instead of -Inf at y = ±Inf #24
logjac =log(bma) + y - (2*log1pexp(y)) # Inf - Inf at y = Inf
This happens in practice when a sample lands exactly on a bound, e.g. Beta(1.0, 0.2) draws 1.0 with probability ~6e-4 in Float64, so logit(x) = Inf. The logjac test then fails with NaN ≈ -Inf (AD gets -Inf correctly, since logistic'(Inf) = 0).
The Bijectors form mentioned in the comment above that line handles this:
(Human comment here) there are similar failure modes when the sample is very close to but not 1 (basically the result will have a loss of numerical precision).
Activity
penelopeysm commentedon Sep 27, 2026
(Human comment here) there are similar failure modes when the sample is very close to but not 1 (basically the result will have a loss of numerical precision).