pub fn simpsons_rule<F>(
integrand: F,
lower_bound: f64,
upper_bound: f64,
subinterval_count: usize,
) -> Option<f64>Expand description
Approximates an integral with Simpson’s rule.
Returns None when n == 0, when n is odd, when the bounds are not
finite, or when a sampled function value is not finite. Reversed bounds
return the negative integral.