summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-01-08 13:54:23 +0100
committerAlberto Ruiz <aruiz@um.es>2015-01-08 13:54:23 +0100
commit8878aaaf649962f4360a94109a674da756ad2202 (patch)
treed131b381c200796715b14a6eda1d0ae001032777 /packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
parent432d80a0b65b0be64fe0dc0d7816f1f738895458 (diff)
update base to ghc-7.10
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Algorithms.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Algorithms.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
index 02ac6a0..a113d48 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
@@ -935,10 +935,9 @@ relativeError' x y = dig (norm (x `sub` y) / norm x)
935 dig r = round $ -logBase 10 (realToFrac r :: Double) 935 dig r = round $ -logBase 10 (realToFrac r :: Double)
936 936
937 937
938relativeError :: (Normed c t, Num (c t)) => NormType -> c t -> c t -> Double 938relativeError :: Num a => (a -> Double) -> a -> a -> Double
939relativeError t a b = realToFrac r 939relativeError norm a b = r
940 where 940 where
941 norm = pnorm t
942 na = norm a 941 na = norm a
943 nb = norm b 942 nb = norm b
944 nab = norm (a-b) 943 nab = norm (a-b)