summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 093e4ef..68e77f1 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -67,6 +67,14 @@ detTest1 = det m == 26
67 , 2, 8, i 67 , 2, 8, i
68 ] 68 ]
69 69
70detTest2 = inv1 |~| inv2 && [det1] ~~ [det2]
71 where
72 m = complex (feye 6)
73 inv1 = inv m
74 det1 = det m
75 (inv2,(lda,sa)) = invlndet m
76 det2 = sa * exp lda
77
70-------------------------------------------------------------------- 78--------------------------------------------------------------------
71 79
72polyEval cs x = foldr (\c ac->ac*x+c) 0 cs 80polyEval cs x = foldr (\c ac->ac*x+c) 0 cs
@@ -493,6 +501,7 @@ runTests n = do
493 _ <- runTestTT $ TestList 501 _ <- runTestTT $ TestList
494 [ utest "1E5 rots" rotTest 502 [ utest "1E5 rots" rotTest
495 , utest "det1" detTest1 503 , utest "det1" detTest1
504 , utest "invlndet" detTest2
496 , utest "expm1" (expmTest1) 505 , utest "expm1" (expmTest1)
497 , utest "expm2" (expmTest2) 506 , utest "expm2" (expmTest2)
498 , utest "arith1" $ ((ones (100,100) * 5 + 2)/0.5 - 7)**2 |~| (49 :: RM) 507 , utest "arith1" $ ((ones (100,100) * 5 + 2)/0.5 - 7)**2 |~| (49 :: RM)