summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-02-24 13:23:42 +0000
committerAlberto Ruiz <aruiz@um.es>2010-02-24 13:23:42 +0000
commit54bcc1fc1e0f9676cb10f627f412eeeea34b5d2c (patch)
tree3983a0046ce08a2390c5a495aae60fd419c58986 /lib/Numeric/LinearAlgebra/Tests.hs
parentaae45de54aca92c5f0f013e46c6d6f65508d76f5 (diff)
created package hmatrix-special
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 46c1804..016b9a1 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -28,7 +28,7 @@ import Numeric.LinearAlgebra.Tests.Properties
28import Test.HUnit hiding ((~:),test,Testable) 28import Test.HUnit hiding ((~:),test,Testable)
29import System.Info 29import System.Info
30import Data.List(foldl1') 30import Data.List(foldl1')
31import Numeric.GSL hiding (sin,cos,exp,choose) 31import Numeric.GSL
32import Prelude hiding ((^)) 32import Prelude hiding ((^))
33import qualified Prelude 33import qualified Prelude
34import System.CPUTime 34import System.CPUTime
@@ -78,13 +78,13 @@ volSphere r = 8 * quad2 (\x y -> sqrt (r*r-x*x-y*y))
78 78
79--------------------------------------------------------------------- 79---------------------------------------------------------------------
80 80
81besselTest = utest "bessel_J0_e" ( abs (r-expected) < e ) 81-- besselTest = utest "bessel_J0_e" ( abs (r-expected) < e )
82 where (r,e) = bessel_J0_e 5.0 82-- where (r,e) = bessel_J0_e 5.0
83 expected = -0.17759677131433830434739701 83-- expected = -0.17759677131433830434739701
84 84
85exponentialTest = utest "exp_e10_e" ( abs (v*10^e - expected) < 4E-2 ) 85-- exponentialTest = utest "exp_e10_e" ( abs (v*10^e - expected) < 4E-2 )
86 where (v,e,_err) = exp_e10_e 30.0 86-- where (v,e,_err) = exp_e10_e 30.0
87 expected = exp 30.0 87-- expected = exp 30.0
88 88
89--------------------------------------------------------------------- 89---------------------------------------------------------------------
90 90
@@ -273,9 +273,9 @@ runTests n = do
273 , utest "arith2" $ ((scalar (1+i) * ones (100,100) * 5 + 2)/0.5 - 7)**2 |~| ( scalar (140*i-51) :: CM) 273 , utest "arith2" $ ((scalar (1+i) * ones (100,100) * 5 + 2)/0.5 - 7)**2 |~| ( scalar (140*i-51) :: CM)
274 , utest "arith3" $ exp (scalar i * ones(10,10)*pi) + 1 |~| 0 274 , utest "arith3" $ exp (scalar i * ones(10,10)*pi) + 1 |~| 0
275 , utest "<\\>" $ (3><2) [2,0,0,3,1,1::Double] <\> 3|>[4,9,5] |~| 2|>[2,3] 275 , utest "<\\>" $ (3><2) [2,0,0,3,1,1::Double] <\> 3|>[4,9,5] |~| 2|>[2,3]
276 , utest "gamma" (gamma 5 == 24.0) 276-- , utest "gamma" (gamma 5 == 24.0)
277 , besselTest 277-- , besselTest
278 , exponentialTest 278-- , exponentialTest
279 , utest "integrate" (abs (volSphere 2.5 - 4/3*pi*2.5^3) < 1E-8) 279 , utest "integrate" (abs (volSphere 2.5 - 4/3*pi*2.5^3) < 1E-8)
280 , utest "polySolve" (polySolveProp [1,2,3,4]) 280 , utest "polySolve" (polySolveProp [1,2,3,4])
281 , minimizationTest 281 , minimizationTest