Function solve_itp_fallible

Source
pub(crate) fn solve_itp_fallible<E>(
    f: impl FnMut(f64) -> Result<f64, E>,
    a: f64,
    b: f64,
    epsilon: f64,
    n0: usize,
    k1: f64,
    ya: f64,
    yb: f64,
) -> Result<(f64, f64), E>
Expand description

A variant ITP solver that allows fallible functions.

Another difference: it returns the bracket that contains the root, which may be important if the function has a discontinuity.