Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Root finding.
- type RootFinder a = (a -> a) -> (a, a) -> Either String a
- type Bracketer a = (a -> a) -> (a, a) -> Either String (a, a)
- bracket :: (Fractional a, Num a, Ord a) => Int -> Bracketer a
- bracketInward :: (Num a, Ord a) => Int -> Bracketer a
- bracketOutward :: (Fractional a, Num a, Ord a) => Int -> Bracketer a
Types.
type RootFinder a Source #
= (a -> a) | The function. |
-> (a, a) | The interval bracketing the root. |
-> Either String a | The root, or an error message if it could not be found. |
A function for findng a root.
= (a -> a) | The function. |
-> (a, a) | A guess at the interval bracketing a root. |
-> Either String (a, a) | The bracketing of the root, or an error message if it could not be found. |
A function for bracketing a root.
Functions.
:: (Fractional a, Num a, Ord a) | |
=> Int | The maximum number of function evaluations allowed. |
-> Bracketer a | The root bracketing function. |
Bracket a bracket around a root.
:: (Num a, Ord a) | |
=> Int | The maximum number of function evaluations allowed. |
-> Bracketer a | The root bracketing function. |
Search for a bracket around a root inside an interval. | | Reference: William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C: The Art of Scientific Computing>, Second Edition (New York: Cambridge Univ. Press, 1992).
:: (Fractional a, Num a, Ord a) | |
=> Int | The maximum number of function evaluations allowed. |
-> Bracketer a | The root bracketing function. |
Search for a bracket around a root outside an interval. | | Reference: William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C: The Art of Scientific Computing>, Second Edition (New York: Cambridge Univ. Press, 1992).