package root1d
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Root1DSource
1D Root finding algorithms.
brent f a b returns an approximation x of a root of f in the interval [a,b] with absolute accuracy 6. *. epsilon_float *. abs_float(x) +. tol.
Ref.: Brent, R. (1973) Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Prentice-Hall.
bisection f a b find an approximation of a root in the interval [a,b] using the bisection algorithm.
illinois f a b find an approximation of a root in the interval [a,b] using the Illinois algorithm (which is the Regula Falsi method with a small twist). Order of convergence: ³√3 ≈ 1.442.
val newton :
?good_enough:(float -> float -> float -> bool) ->
(float -> float * float) ->
float ->
floatnewton f_f' x0 returns an approximate root of f close to the initial guess x0 using Newton's method. f_f' is a function such that f_f' x returns the couple (f x, f' x) where f' x is the derivative of f at x.
brent2 f a b finds a zero of the function f in the same way brent f a b does except that f x returns the couple (y, z) for the number y * 2**z. Thus underflow and overflow can be avoided for a function with large range.
Ref.: Brent, R. (1973) Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Prentice-Hall.