From 0a9ef8f5b0088c1ac25175bffca4ed95d9e109a5 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Fri, 23 May 2014 10:51:16 +0200 Subject: relativeError, cgSolve' --- packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'packages/tests/src/Numeric') diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs index 657689a..423edaa 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs @@ -54,19 +54,9 @@ import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector trivial :: Testable a => Bool -> a -> Property trivial = (`classify` "trivial") - -- relative error dist :: (Normed c t, Num (c t)) => c t -> c t -> Double -dist a b = realToFrac r - where norm = pnorm Infinity - na = norm a - nb = norm b - nab = norm (a-b) - mx = max na nb - mn = min na nb - r = if mn < peps - then mx - else nab/mx +dist = relativeError Infinity infixl 4 |~| a |~| b = a :~10~: b -- cgit v1.2.3