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
* log1pexp(x) for x < -37
Based on
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
* generic log1pexp
* simpler
* generic threshold
* support Julia 1.0
expm1(::Float16) was not defined in Julia 1.0
So it's better (and more accurate) to compute the threshold in BigFloat,
and convert to the appropriate float type in the end.
Since this is generated it doesn't cost in terms of performance.
* special thresholds
* add exp branch
* simplify thresholds
* more comments
* more tests
* inline
* generic x2
* comment
* unnecessary broadcast
* oftype -> float
since x0 is of type float(x) anyway
* comment
* < instead of <=
* x = float(_x)
* hard-coded bounds for FLoat32, Float64
* typo
* comment
* typo
* comment
* compiler is smart enough we don't need generated thresholds!
* special case log1pexp(x::BigFloat)
dynamic thresholds for log1pexp(x::BigFloat) are slow, so use
slower but accurate implementation in this case
* rewrite comment
* don't need float(x)
* rewrite _log1pexp_thresholds (more readable?)
* Float16 and typo
* test at +/- 1
* comment tests
* typo
Co-authored-by: David Widmann <[email protected]>
* one-line
Co-authored-by: David Widmann <[email protected]>
* better comments
* test log1pexp with multiple precisions
* bump version
* hard-code same thresholds as given by generic fallback
* Final fixes
Co-authored-by: David Widmann <[email protected]>
0 commit comments