summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Algorithms.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2011-12-25 03:33:01 -0800
committerAlberto Ruiz <aruiz@um.es>2011-12-25 03:33:01 -0800
commitea4da824ebc0ad09431aa276d8d44e4908e542c0 (patch)
tree950e968a34d46011476bb7fe0adf25c2f6c37ae4 /lib/Numeric/LinearAlgebra/Algorithms.hs
parentc3bda2d38c432fb53ce456cba295b097fd4d6ad1 (diff)
parent43956aff360476d095b03fbbdef20f18df2dc933 (diff)
Merge pull request #1 from basvandijk/master
Fix build on GHC-7.4.1-rc1 and some other patches
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Algorithms.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs
index bea33ea..a6b4dae 100644
--- a/lib/Numeric/LinearAlgebra/Algorithms.hs
+++ b/lib/Numeric/LinearAlgebra/Algorithms.hs
@@ -567,6 +567,11 @@ epslist = [ (fromIntegral k, golubeps k k) | k <- [1..]]
567 567
568geps delta = head [ k | (k,g) <- epslist, g<delta] 568geps delta = head [ k | (k,g) <- epslist, g<delta]
569 569
570expGolub :: ( Fractional t, Element t, Field t
571 , Normed Matrix t
572 , RealFrac (RealOf t)
573 , Floating (RealOf t)
574 ) => Matrix t -> Matrix t
570expGolub m = iterate msq f !! j 575expGolub m = iterate msq f !! j
571 where j = max 0 $ floor $ logBase 2 $ pnorm Infinity m 576 where j = max 0 $ floor $ logBase 2 $ pnorm Infinity m
572 a = m */ fromIntegral ((2::Int)^j) 577 a = m */ fromIntegral ((2::Int)^j)