]> gitweb.michael.orlitzky.com - numerical-analysis.git/blobdiff - src/Roots/Simple.hs
Fix compiler warnings and doctests.
[numerical-analysis.git] / src / Roots / Simple.hs
index d3c10cd8a3dfb95c001aeb5ce244b1bc7f14f7ed..414b77787262e608ceef4a66981a5dc5ab82cc50 100644 (file)
@@ -18,7 +18,6 @@ import Normed
 import qualified Roots.Fast as F
 
 import NumericPrelude hiding (abs)
 import qualified Roots.Fast as F
 
 import NumericPrelude hiding (abs)
-import qualified Algebra.Absolute as Absolute
 import Algebra.Absolute (abs)
 import qualified Algebra.Additive as Additive
 import qualified Algebra.Algebraic as Algebraic
 import Algebra.Absolute (abs)
 import qualified Algebra.Additive as Additive
 import qualified Algebra.Algebraic as Algebraic
@@ -89,7 +88,7 @@ bisect f a b epsilon =
 --   at x0. We delegate to the version that returns the number of
 --   iterations and simply discard the number of iterations.
 --
 --   at x0. We delegate to the version that returns the number of
 --   iterations and simply discard the number of iterations.
 --
-fixed_point :: (Normed a, Algebraic.C a, Algebraic.C b, RealField.C b)
+fixed_point :: (Normed a, Additive.C a, Algebraic.C b, RealField.C b)
             => (a -> a) -- ^ The function @f@ to iterate.
             -> b       -- ^ The tolerance, @epsilon@.
             -> a       -- ^ The initial value @x0@.
             => (a -> a) -- ^ The function @f@ to iterate.
             -> b       -- ^ The tolerance, @epsilon@.
             -> a       -- ^ The initial value @x0@.
@@ -103,7 +102,7 @@ fixed_point f epsilon x0 =
 --   @epsilon@. We delegate to the version that returns the number of
 --   iterations and simply discard the fixed point.
 fixed_point_iteration_count :: (Normed a,
 --   @epsilon@. We delegate to the version that returns the number of
 --   iterations and simply discard the fixed point.
 fixed_point_iteration_count :: (Normed a,
-                                Algebraic.C a,
+                                Additive.C a,
                                 RealField.C b,
                                 Algebraic.C b)
                             => (a -> a) -- ^ The function @f@ to iterate.
                                 RealField.C b,
                                 Algebraic.C b)
                             => (a -> a) -- ^ The function @f@ to iterate.