roots-0.1.1.2: Root-finding algorithms (1-dimensional)

Safe HaskellSafe-Inferred

Math.Root.Finder.Brent

Synopsis

Documentation

data Brent a b Source

Working state for Brent's root-finding method.

Instances

(RealFloat a, Real b, Fractional b) => RootFinder Brent a b 
(Eq a, Eq b) => Eq (Brent a b) 
(Show a, Show b) => Show (Brent a b) 

brent :: RealFloat a => (a -> a) -> a -> a -> a -> Either (Brent a a) aSource

brent f x1 x2 xacc: attempt to find a root of a function known to lie between x1 and x2, using Brent's method. The root will be refined till its accuracy is +-xacc. If convergence fails, returns the final state of the search.