File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
@testset " Determinant" begin
2
- @test det (@SMatrix [1 ]) === 1
3
- @test logdet (@SMatrix [1 ]) === 0.0
4
- @test det (@SMatrix [0 1 ; 1 0 ]) === - 1
2
+ @test det (@SMatrix [1 ]) == 1
3
+ @test logdet (@SMatrix [1 ]) == 0.0
4
+ @test det (@SMatrix [0 1 ; 1 0 ]) == - 1
5
5
@test logdet (@SMatrix Complex{Float64}[0 1 ; 1 0 ]) == log (det (@SMatrix Complex{Float64}[0 1 ; 1 0 ]))
6
6
7
- @test det (@SMatrix [0 1 0 ; 1 0 0 ; 0 0 1 ]) === - 1
7
+ @test det (@SMatrix [0 1 0 ; 1 0 0 ; 0 0 1 ]) == - 1
8
8
m = randn (Float64, 4 ,4 )
9
9
@test det (SMatrix {4,4} (m)) ≈ det (m)
10
10
# triu/tril
11
- @test det (@SMatrix [1 2 ; 0 3 ]) === 3
12
- @test det (@SMatrix [1 2 3 4 ; 0 5 6 7 ; 0 0 8 9 ; 0 0 0 10 ]) === 400.0
11
+ @test det (@SMatrix [1 2 ; 0 3 ]) == 3
12
+ @test det (@SMatrix [1 2 3 4 ; 0 5 6 7 ; 0 0 8 9 ; 0 0 0 10 ]) == 400.0
13
13
@test logdet (@SMatrix [1 2 3 4 ; 0 5 6 7 ; 0 0 8 9 ; 0 0 0 10 ]) ≈ log (400.0 )
14
14
@test @inferred (det (ones (SMatrix{10 ,10 ,Complex{Float64}}))) == 0
15
15
You can’t perform that action at this time.
0 commit comments