We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 634f7a5 commit dcbf39eCopy full SHA for dcbf39e
src/symmetric.jl
@@ -854,7 +854,7 @@ function ^(A::SelfAdjoint, p::Real)
854
isinteger(p) && return integerpow(A, p)
855
F = eigen(A)
856
if all(λ -> λ ≥ 0, F.values)
857
- rootpower = map(λ -> λ^0.5p, F.values)
+ rootpower = map(λ -> λ^(p / 2), F.values)
858
retmat = _psd_spectral_product(rootpower, F.vectors)
859
return wrappertype(A)(retmat)
860
else
@@ -879,7 +879,7 @@ end
879
880
function exp(A::SelfAdjoint)
881
882
- rootexp = map(λ -> exp(0.5λ), F.values)
+ rootexp = map(λ -> exp(λ / 2), F.values)
883
retmat = _psd_spectral_product(rootexp, F.vectors)
884
885
end
0 commit comments