Protected Member Functions | List of all members
o2scl::inte_gsl Class Reference

GSL integration base. More...

#include <inte_gsl.h>

Inheritance diagram for o2scl::inte_gsl:
o2scl::inte_kronrod_gsl< func_t > o2scl::inte_qng_gsl< func_t > o2scl::inte_qag_gsl< func_t > o2scl::inte_singular_gsl< func_t > o2scl::inte_qags_gsl< func_t > o2scl::inte_transform_gsl< func_t > o2scl::inte_cheb_gsl< func_t > o2scl::inte_qagi_gsl< func_t > o2scl::inte_qagil_gsl< func_t > o2scl::inte_qagiu_gsl< func_t > o2scl::inte_qawc_gsl< func_t > o2scl::inte_qawo_gsl_sin< func_t > o2scl::inte_qaws_gsl< func_t > o2scl::inte_qawf_gsl_sin< func_t > o2scl::inte_qawo_gsl_cos< func_t > o2scl::inte_qawf_gsl_cos< func_t >

Protected Member Functions

double rescale_error (double err, const double result_abs, const double result_asc)
 QUADPACK's nonlinear rescaling of the absolute-error estimate. More...

Detailed Description

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

Definition at line 62 of file inte_gsl.h.

Member Function Documentation

◆ rescale_error()

double o2scl::inte_gsl::rescale_error ( double  err,
const double  result_abs,
const double  result_asc 

The values $ \rho_{\mathrm{abs}} $ (stored in result_abs) and $ \rho_{\mathrm{abs}} $ (stored in result_asc) are assumed to be

\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*}

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\}, \]


\[ \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().

Definition at line 106 of file inte_gsl.h.

The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).