Skip to content

Commit bfeb066

Browse files
committed
missing test
1 parent 879dc88 commit bfeb066

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/dense.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ end
10681068
@test lyap(1.0+2.0im, 3.0+4.0im) == -1.5 - 2.0im
10691069
end
10701070

1071-
@testset "$elty Matrix to real power" for elty in (Float64, ComplexF64)
1071+
@testset "$elty Matrix to real power" for elty in (Float32, Float64, ComplexF32, ComplexF64)
10721072
# Tests proposed at Higham, Deadman: Testing Matrix Function Algorithms Using Identities, March 2014
10731073
#Aa : only positive real eigenvalues
10741074
Aa = convert(Matrix{elty}, [5 4 2 1; 0 1 -1 -1; -1 -1 3 0; 1 1 -1 2])
@@ -1094,7 +1094,13 @@ end
10941094
ADi += [im 0; 0 im]
10951095
end
10961096

1097-
for A in (Aa, Ab, Ac, Ad, Ah, ADi)
1097+
#ADin : negative Diagonal Matrix
1098+
ADin = convert(Matrix{elty}, [-3 0; 0 3])
1099+
if elty <: LinearAlgebra.BlasComplex
1100+
ADin += [im 0; 0 im]
1101+
end
1102+
1103+
for A in (Aa, Ab, Ac, Ad, Ah, ADi, ADin)
10981104
@test A^(1/2) sqrt(A)
10991105
@test A^(-1/2) inv(sqrt(A))
11001106
@test A^(3/4) sqrt(A) * sqrt(sqrt(A))
@@ -1107,7 +1113,7 @@ end
11071113
end
11081114

11091115
Tschurpow = Union{Matrix{real(elty)}, Matrix{complex(elty)}}
1110-
@test (@inferred Tschurpow LinearAlgebra.schurpow(Aa, 2.0)) Aa^2
1116+
@test (@inferred Tschurpow LinearAlgebra.schurpow(Aa, real(elty)(2.0))) Aa^2
11111117
end
11121118

11131119
@testset "BigFloat triangular real power" begin

0 commit comments

Comments
 (0)