Class inte_gauss_cern (o2scl)¶
-
template<class func_t = funct, class fp_t = double, class weights_t = inte_gauss_coeffs_double>
class inte_gauss_cern : public o2scl::inte<funct, double>¶ Gaussian quadrature (CERNLIB)
For any interval
, we define and to be the 8- and 16-point Gaussian quadrature approximations to given by and and the subdivision points are given by is the first number in the sequence for which is indistinguishable from unity, then the accuracy is required is not reachable and the error handler is called.Unless there is severe cancellation, inte::tol_rel may be considered as specifying a bound on the relative error of the integral in the case that
and an absolute error if . More precisely, if is the number of subintervals from above, and ifIf the desired accuracy is not achieved, the integration functions will call the error handler and return the best guess, unless inte::err_nonconv is false, in which case the error handler is not called.
The constructor sets the value of inte::tol_rel to the square root of
numeric_limits::epsilon
. For double precision numbers, this tolerance is usually about .This function is based on the CERNLIB routines GAUSS and DGAUSS which are documented at http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/d103/top.html . (3/10/2020: The CERNLIB links are apparently dead and haven’t been supported since 2003.)
- Idea for Future:
Allow user to change
cst
? Is the current value appropriate for multiprecision types?