add det(Symmetric) and method= to expm(Matrix)#13093
add det(Symmetric) and method= to expm(Matrix)#13093alyst wants to merge 3 commits intoJuliaLang:masterfrom
Conversation
closes #13088
det(expm(mtx)) should be 1.0, this should be a good test for numerical stability
|
If the matrix is symmetric, isn't the |
|
I guess for |
|
For example, if A = [-0.8599805912689542 44.28830587812244
44.28830587812245 0.8599805912689469]
julia> eigvals(A)
JuliaLang/julia#2-element Array{Float64,1}:
# -44.2967
# 44.2967Then |
|
The alternative to It would also be possible to eliminate two matrix allocations when
|
|
I think it's fair to say that we don't like these kinds cases where keyword arguments are used to disable a specific piece of functionality. If this is still of interest, I would suggest extracting |
det(Symmetric)(see det(Symmetric) fails LinearAlgebra.jl#252). Now it just falls back to the dense case, don't know if there's better solution.method=:auto/:highamtoexpm(AbstractMatrix)to avoid switching toSymmetricbranch if the dense matrix is symmetric. Otherwise, tests for exponential of symmetric matrix are essentially comparingexpm(Symmetric)to itself. Also, given many numerical stability problems ofexpm(), it would be convenient to have several numerical methods to choose from.