Function rgsl::integration::qng [] [src]

pub fn qng<T>(
    f: function<T>,
    arg: &mut T,
    a: f64,
    b: f64,
    eps_abs: f64,
    eps_rel: f64,
    result: &mut f64,
    abs_err: &mut f64,
    n_eval: &mut usize
) -> Value

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.