Module quadrature::double_exponential [] [src]

The double exponential algorithm is naturally adaptive, it stops calling the integrand when the error is reduced to below the desired threshold. It also does not allocate. No box, no vec, etc. It has a hard coded maximum of approximately 350 function evaluations. This guarantees that the algorithm will return. The error in the algorithm decreases exponentially in the number of function evaluations, specifically O(exp(-cN/log(N))). So if 350 function evaluations is not giving the desired accuracy than the programmer probably needs to give some guidance by splitting up the range at singularities or other preparation techniques.

This is a port of the Fast Numerical Integration from c++ to rust. The original code is by John D. Cook, and is licensed under the BSD.

Functions

integrate

Integrate an analytic function over a finite interval. f is the function to be integrated. a is left limit of integration. b is right limit of integration target_absolute_error is the desired bound on error