summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Properties.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Properties.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Properties.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests/Properties.hs b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
index 9891d8a..d6bb338 100644
--- a/lib/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/lib/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -54,15 +54,15 @@ complex x = complex'' x
54debug x = trace (show x) x 54debug x = trace (show x) x
55 55
56-- relative error 56-- relative error
57dist :: (Normed t, Num t) => t -> t -> Double 57--dist :: (Normed t, Num t) => t -> t -> Double
58dist a b = r 58dist a b = r
59 where norm = pnorm Infinity 59 where norm = normInf
60 na = norm a 60 na = norm a
61 nb = norm b 61 nb = norm b
62 nab = norm (a-b) 62 nab = norm (a-b)
63 mx = max na nb 63 mx = max na nb
64 mn = min na nb 64 mn = min na nb
65 r = if mn < eps 65 r = if mn < peps
66 then mx 66 then mx
67 else nab/mx 67 else nab/mx
68 68
@@ -71,7 +71,7 @@ a |~| b = a :~10~: b
71--a |~| b = dist a b < 10^^(-10) 71--a |~| b = dist a b < 10^^(-10)
72 72
73data Aprox a = (:~) a Int 73data Aprox a = (:~) a Int
74(~:) :: (Normed a, Num a) => Aprox a -> a -> Bool 74-- (~:) :: (Normed a, Num a) => Aprox a -> a -> Bool
75a :~n~: b = dist a b < 10^^(-n) 75a :~n~: b = dist a b < 10^^(-n)
76 76
77------------------------------------------------------ 77------------------------------------------------------