Skip to main content

bisection

Function bisection 

Source
pub fn bisection(
    cfg: &Solver1d,
    f: impl Fn(f64) -> f64,
    lo: f64,
    hi: f64,
) -> Result<Root, RustyQLibError>
Expand description

Bisection on a sign-changing bracket [lo, hi]. Errors when the bracket does not straddle a root.