26 #ifndef O2SCL_CERN_GAUSS_H 27 #define O2SCL_CERN_GAUSS_H 29 #include <o2scl/inte.h> 31 #ifndef DOXYGEN_NO_O2NS 101 x[0]=0.96028985649753623;
102 x[1]=0.79666647741362674;
103 x[2]=0.52553240991632899;
104 x[3]=0.18343464249564980;
105 x[4]=0.98940093499164993;
106 x[5]=0.94457502307323258;
107 x[6]=0.86563120238783175;
108 x[7]=0.75540440835500303;
109 x[8]=0.61787624440264375;
110 x[9]=0.45801677765722739;
111 x[10]=0.28160355077925891;
112 x[11]=0.95012509837637440e-1;
114 w[0]=0.10122853629037626;
115 w[1]=0.22238103445337447;
116 w[2]=0.31370664587788729;
117 w[3]=0.36268378337836198;
118 w[4]=0.27152459411754095e-1;
119 w[5]=0.62253523938647893e-1;
120 w[6]=0.95158511682492785e-1;
121 w[7]=0.12462897125553387;
122 w[8]=0.14959598881657673;
123 w[9]=0.16915651939500254;
124 w[10]=0.18260341504492359;
125 w[11]=0.18945061045506850;
131 double &res,
double &err) {
139 bool loop=
true, loop2=
false;
140 static const double cst=0.005;
146 double cnst=cst/(b-a);
148 while (loop==
true || loop2==
true) {
154 double c1=(bb+aa)/2.0;
155 double c2=(bb-aa)/2.0;
174 if (fabs(s16-c2*s8)<this->
tol_rel*(1.0+fabs(s16))) {
176 if (bb!=b) loop=
true;
179 if (1.0+cnst*fabs(c2)!=1.0) {
195 #ifndef DOXYGEN_INTERNAL 207 #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...
virtual int integ_err(func_t &func, double a, double b, double &res, double &err)
Integrate function func from a to b.
#define O2SCL_CONV2_RET(d, d2, n, b)
Set an error and return the error value, two-string version.
size_t last_iter
The most recent number of iterations taken.
bool err_nonconv
If true, call the error handler if the routine does not converge or reach the desired tolerance (defa...
Base integration class [abstract base].
double tol_rel
The maximum relative uncertainty in the value of the integral (default )
Gaussian quadrature (CERNLIB)