Skip to content

Commit d1678eb

Browse files
committed
add test for complex asin/acos/acosh
1 parent c4ef85e commit d1678eb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/symmetric.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,4 +1199,14 @@ end
11991199
end
12001200
end
12011201

1202+
@testset "asin/acos/acosh for matrix outside the real domain" begin
1203+
M = [0 2;2 0] #eigenvalues are ±2
1204+
for T (Float32, Float64, ComplexF32, ComplexF64)
1205+
M2 = Hermitian(T.(M))
1206+
@test sin(asin(M2)) M2
1207+
@test cos(acos(M2)) M2
1208+
@test cosh(acosh(M2)) M2
1209+
end
1210+
end
1211+
12021212
end # module TestSymmetric

0 commit comments

Comments
 (0)