Calculate the integral of f(x) over the finite interval (a,b)
using a simple
non-adaptive automatic integrator, based on a sequence of rules with
increasing degree of algebraic precision.
This method should only be used for well-behaved integrands, or when
speed is a lot more important than accuracy.
// Despite the statement above, integrateQNG() can handle some// difficulties, such as the endpoint singularity in the following// example:doublef(doublex) { returnx^^2 * log(1/x); }
autoi = integrateQNG(&f, 0.0, 1.0);
Calculate the integral of f(x) over the finite interval (a,b) using a simple non-adaptive automatic integrator, based on a sequence of rules with increasing degree of algebraic precision.
This method should only be used for well-behaved integrands, or when speed is a lot more important than accuracy.