Class inte_multip_tanh_sinh_boost (o2scl)

O2scl : Class List

template<size_t max_refine = 15>
class inte_multip_tanh_sinh_boost

Tanh-sinh multiprecision integration class (Boost)

Note

The uncertainties reported by this class depend on those returned by the boost integration object and are occasionally be underestimated.

Public Functions

inline inte_multip_tanh_sinh_boost()
template<typename func_t, class fp_t>
inline int integ_err(func_t &&func, fp_t a, fp_t b, fp_t &res, fp_t &err, double integ_tol = -1.0)

Calculate the first derivative of func w.r.t. x and uncertainty.

template<typename func_t, class fp_t>
inline int integ_iu_err(func_t &&func, fp_t a, fp_t &res, fp_t &err, double integ_tol = -1.0)

Calculate the first derivative of func w.r.t. x and uncertainty.

Public Members

size_t levels

Number of refinement levels in last integral computed.

double tol_rel

Relative tolerance.

double pow_tol_func

Power for tolerance of function evaluations (default 1.33)

int verbose

Verbosity parameter.

bool err_nonconv

If true, call the error handler if the integration does not succeed (default true)

Protected Types

typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<25>> cpp_dec_float_25
typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<35>> cpp_dec_float_35
typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50>> cpp_dec_float_50
typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<100>> cpp_dec_float_100

Protected Functions

template<typename func_t, class fp_t, class it_t>
inline int integ_err_int(it_t &it, func_t &&func, fp_t a, fp_t b, fp_t &res, fp_t &err, fp_t &L1norm, double target_tol, double integ_tol, double func_tol)

Integrate function func from a to b and place the result in res and the error in err.

There are three tolerances:

  • target_tol is the target tolerance which is sent to the boost integration function. The error value returned by the boost integration function is often larger than this

  • integ_tol is the desired final tolerance of the integration. This function regards the integration as a failure if the error value is larger than integ_tol

  • func_tol is the tolerance for evaluations of the integrand. This value is passed to o2scl::funct_multip.

template<typename func_t, class fp_t, class it_t>
inline int integ_iu_err_int(it_t &it, func_t &&func, fp_t a, fp_t &res, fp_t &err, fp_t &L1norm, double target_tol, double integ_tol, double func_tol)

Protected Attributes

boost::math::quadrature::tanh_sinh<double> it_d
boost::math::quadrature::tanh_sinh<long double> it_ld
boost::math::quadrature::tanh_sinh<cpp_dec_float_25> it_cdf25
boost::math::quadrature::tanh_sinh<cpp_dec_float_35> it_cdf35
boost::math::quadrature::tanh_sinh<cpp_dec_float_50> it_cdf50
boost::math::quadrature::tanh_sinh<cpp_dec_float_100> it_cdf100