Safe Haskell | Safe-Inferred |
---|

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

# Documentation

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.

(Fractional a, Ord a) => RootFinder FalsePosition a a | |

Eq a => Eq (FalsePosition a b) | |

Show a => Show (FalsePosition a b) |

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.