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

Math.Root.Bracket

Synopsis

Documentation

brackets :: (Eq a, Num b) => (a -> b) -> (a, a) -> BoolSource

Predicate that returns True whenever the given pair of points brackets a root of the given function.

bracket :: (Fractional a, Num b, Ord b) => (a -> b) -> a -> a -> [(a, a)]Source

bracket f x1 x2: Given a function and an initial guessed range x1 to x2, this function expands the range geometrically until a root is bracketed by the returned values, returning a list of the successively expanded ranges. The list will be finite if and only if the sequence yields a bracketing pair.

subdivideAndBracket :: (Num b, Fractional a, Integral c) => (a -> b) -> a -> a -> c -> [(a, a)]Source

subdivideAndBracket f x1 x2 n: Given a function defined on the interval [x1,x2], subdivide the interval into n equally spaced segments and search for zero crossings of the function. The returned list will contain all bracketing pairs found.