Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ext/IntervalArithmeticLinearAlgebraExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,15 @@ end

# matrix exponential and logarithm

function LinearAlgebra.exp!(A::AbstractMatrix{<:RealOrComplexI})
function LinearAlgebra.exp!(A::AbstractMatrix{T}) where T<:RealOrComplexI
# note: this function does not overwrite `A`
Λ, V = LinearAlgebra.eigen(A)
V⁻¹ = inv(V)
return V * LinearAlgebra.Diagonal(exp.(Λ)) * V⁻¹
if T <: Real
return real(V * LinearAlgebra.Diagonal(exp.(Λ)) * V⁻¹)
else
return V * LinearAlgebra.Diagonal(exp.(Λ)) * V⁻¹
end
end

function LinearAlgebra.log(A::AbstractMatrix{<:Interval})
Expand Down
Loading