Skip to main content

bisection

Function bisection 

Source
pub fn bisection<F>(
    f: F,
    lower: f64,
    upper: f64,
    options: RootOptions,
) -> Result<f64, RootError>
where F: Fn(f64) -> f64,
Expand description

Finds a root with the bisection method on a bracketing interval.

The endpoint values must have opposite signs, unless an endpoint is already approximately zero. The interval bounds and function values must be finite. Convergence uses RootOptions::tolerance as an absolute tolerance.