Function rgsl::integration::qng
source · [−]pub fn qng<F: Fn(f64) -> f64>(
f: F,
a: f64,
b: f64,
eps_abs: f64,
eps_rel: f64
) -> (Value, f64, f64, usize)
Expand description
This function applies the Gauss-Kronrod 10-point, 21-point, 43-point and 87-point integration rules in succession until an estimate of the integral of f over (a,b) is achieved within the desired absolute and relative error limits, eps_abs and eps_rel. The function returns the final approximation, result, an estimate of the absolute error, abserr and the number of function evaluations used, neval. The Gauss-Kronrod rules are designed in such a way that each rule uses all the results of its predecessors, in order to minimize the total number of function evaluations.
Returns (result, abs_err, n_eval)
.