Class inte_gsl (o2scl)

O2scl : Class List

class inte_gsl

GSL integration base.

This base class does not perform any actual integration, but just provides functions to be used in the integration classes based on GSL.

Subclassed by o2scl::inte_kronrod_gsl< funct >, o2scl::inte_kronrod_gsl< func_t >, o2scl::inte_qng_gsl< func_t >

Public Functions

inline inte_gsl()

Protected Functions

inline double rescale_error(double err, const double result_abs, const double result_asc)

QUADPACK’s nonlinear rescaling of the absolute-error estimate.

The values \f$ \rho_{\mathrm{abs}} \f$ (stored in
result_abs) and \( \rho_{\mathrm{abs}} \) (stored in result_asc) are assumed to be
\[\begin{split}\begin{eqnarray*} \rho_{\mathrm{abs}} &=& \int_a^b |f|\,dx, \\ \rho_{\mathrm{asc}} &=& \int_a^b |f - \mu(f)|\, dx, \qquad \mu(f) = \frac{1}{b-a}\int_a^b f\, dx, \end{eqnarray*}\end{split}\]
all of which are computed from the best (i.e., finest-grid) approximation of the integrals. The rescaled error, \( \sigma_\mathrm{err}, \) is computed from the raw error, err, by
\[ \sigma_\mathrm{err} = \rho_\mathrm{asc} \cdot \min \left\{1, \; \left(\frac{200 |\mathrm{err}|}{\rho_\mathrm{asc}} \right)^{3/2} \right\}, \]
or
\[ \sigma_\mathrm{err} = 50\cdot \epsilon_\mathrm{mach} \cdot \rho_\mathrm{abs}, \]
whichever of the two is greater. The value \( \epsilon_\mathrm{mach} \) denotes “machine epsilon.” (In the case that the second value underflows, the first value is automatically accepted.)

This function is used in inte_qng_gsl and inte_kronrod_gsl::gauss_kronrod_base().