Skip to main content

integrate

Function integrate 

Source
pub fn integrate<const N: usize, F>(
    f: F,
    a: f64,
    b: f64,
    tolerance: Tolerance,
) -> Result<Integral<N>, CoreError>
where F: FnMut(f64) -> [f64; N],
Expand description

Integrates the vector-valued f over [a, b] to tolerance.

a > b integrates backwards (the result changes sign) and a == b gives zeros. Integrands whose components differ in scale should be scaled to order one first, so one absolute tolerance suits them all.

§Errors