26 #ifndef O2SCL_CERN_CAUCHY_H 27 #define O2SCL_CERN_CAUCHY_H 29 #include <o2scl/inte.h> 30 #include <o2scl/inte_gauss_cern.h> 32 #ifndef DOXYGEN_NO_O2NS 69 template<
class func_t,
class fp_t=double,
94 fp_t &res, fp_t &err) {
102 "inte_cauchy_cern::integ_err().",
104 }
else if ((s<a && s<b) || (s>a && s>b)) {
105 return it->integ_err(func,a,b,res,err);
109 h=
it->integ(func,2.0*s-a,b);
112 h=
it->integ(func,a,2.0*s-b);
131 for(
int i=0;i<4;i++) {
137 s8+=w[i]*((y1+y2)+(y3+y4));
140 for(
int i=4;i<12;i++) {
146 s16+=w[i]*((y1+y2)+(y3+y4));
150 if (std::abs(s16-s8)<=this->
tol_rel*(1.0+std::abs(s16))) {
154 if ((1.0+std::abs(c*c2))==1.0) {
164 if (bb==b0) loop1=
false;
176 #ifndef DOXYGEN_INTERNAL 185 #ifndef DOXYGEN_NO_O2NS The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
int set_inte(inte< func_t, fp_t > &i)
Set the base integration object to use (default is inte_cauchy_cern::def_inte of type inte_gauss_cern...
fp_t tol_rel
The maximum relative uncertainty in the value of the integral (default )
inte_gauss_cern< func_t, fp_t > def_inte
Default integration object.
invalid argument supplied by user
#define O2SCL_CONV2_RET(d, d2, n, b)
Set an error and return the error value, two-string version.
fp_t s
The singularity (must be set before calling integ() or integ_err())
bool err_nonconv
If true, call the error handler if the routine does not converge or reach the desired tolerance (defa...
size_t last_iter
The most recent number of iterations taken.
static constexpr double inte_gauss_cern_x_double[12]
Integration abscissas for o2scl::inte_gauss_cern and o2scl::inte_cauchy_cern in double precision...
Base integration class [abstract base].
inte< func_t, fp_t > * it
The base integration object.
static constexpr double inte_gauss_cern_w_double[12]
Integration weights for o2scl::inte_gauss_cern and o2scl::inte_cauchy_cern in double precision...
Cauchy principal value integration (CERNLIB)
virtual int integ_err(func_t &func, fp_t a, fp_t b, fp_t &res, fp_t &err)
Integrate function func from a to b.