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




data FalsePosition a b Source

Iteratively refine a bracketing interval [x1, x2] of a root of f until total convergence (which may or may not ever be achieved) using the false-position method.


falsePosition :: (Ord a, Fractional a) => (a -> a) -> a -> a -> a -> Either (FalsePosition a a) aSource

falsePosition f x1 x2 xacc: Using the false-position method, return a root of a function known to lie between x1 and x2. The root is refined until its accuracy is += xacc.