X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FRoots%2FFast.hs;h=5efdf3be99eec871931d18c6095333b8bd31ce83;hb=e505e7e507758201f9b1af450b987d9cb0e6a640;hp=d6e4d7c23f4091c7a573f01eb4d5c6572a1ca2c8;hpb=c5da1efa77844ae6159dfc781ed886fdffbbf4d1;p=numerical-analysis.git diff --git a/src/Roots/Fast.hs b/src/Roots/Fast.hs index d6e4d7c..5efdf3b 100644 --- a/src/Roots/Fast.hs +++ b/src/Roots/Fast.hs @@ -8,7 +8,7 @@ where import Data.List (find) -import Vector +import Normed has_root :: (Fractional a, Ord a, Ord b, Num b) @@ -104,7 +104,7 @@ fixed_point_iterations f x0 = -- -- We also return the number of iterations required. -- -fixed_point_with_iterations :: (Vector a, RealFrac b) +fixed_point_with_iterations :: (Normed a, RealFrac b) => (a -> a) -- ^ The function @f@ to iterate. -> b -- ^ The tolerance, @epsilon@. -> a -- ^ The initial value @x0@.