Open andreasnoack opened 3 years ago
Adding one more example here
julia> A = @SMatrix([-1.0 0.0; 1.0 -0.1875])
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):
-1.0 0.0
1.0 -0.1875
julia> exp(2016*A)
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):
NaN NaN
NaN NaN
julia> exp(2016*Matrix(A))
2×2 Matrix{Float64}:
0.0 0.0
8.45011e-165 6.86572e-165
The test in https://github.com/JuliaArrays/StaticArrays.jl/blob/59f92e0ca7ac391a850a6e7a2ce1eb53aa237fc4/src/expm.jl#L21-L32 don't cover the
NaN
case sowhich should either throw or give a NaN. Also, https://github.com/JuliaArrays/StaticArrays.jl/blob/59f92e0ca7ac391a850a6e7a2ce1eb53aa237fc4/src/expm.jl#L96-L99 can be reached for matrices with
Inf
s which will error in an uninformative way