Function integrate

Source
pub fn integrate<F>(
    f: F,
    lower: f64,
    upper: f64,
    options: IntegrationOptions,
) -> NumericResult<Integral>
where F: FnMut(f64) -> f64,
Expand description

Integrate f over [lower, upper] by adaptive Gauss-Kronrod (G7/K15).

lower > upper integrates in reverse (negated value). The integrand is evaluated only strictly inside the interval.

ยงErrors

Refuses non-finite bounds or tolerances, negative tolerances, a tolerance request below the rounding level (absolute 0 with relative under 50 eps), a zero panel budget, and any non-finite integrand value.