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
-- 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@.
-- @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.