ExponentialUtilities.jl icon indicating copy to clipboard operation
ExponentialUtilities.jl copied to clipboard

exp_generic has low precision for BigFloats

Open andreasnoack opened this issue 5 years ago • 1 comments

julia> _x = range(-10, stop=10, length=200);

julia> maximum(abs, (x -> ExponentialUtilities.exp_generic(x)/exp(x) - 1).(_x))/eps(Float64)
10.5

julia> maximum(abs, (x -> ExponentialUtilities.exp_generic(x)/exp(x) - 1).(big.(_x)))/eps(BigFloat)
3.990156146456241410115233813819434452173187e+42

The number of terms in the Padé approximant probably needs to depend on the precision.

andreasnoack avatar Aug 16 '20 20:08 andreasnoack

In the meantime there is research in the direction of arbitrary precision matrix exponential which might be a better basis than Higham 2005. https://epubs.siam.org/doi/10.1137/18M1228876

jarlebring avatar Aug 18 '21 13:08 jarlebring