26 #ifndef O2SCL_CERN_GAUSS_H 27 #define O2SCL_CERN_GAUSS_H 29 #include <o2scl/inte.h> 31 #ifndef DOXYGEN_NO_O2NS 39 {0.96028985649753623,0.79666647741362674,0.52553240991632899,
40 0.18343464249564980,0.98940093499164993,0.94457502307323258,
41 0.86563120238783175,0.75540440835500303,0.61787624440264375,
42 0.45801677765722739,0.28160355077925891,0.95012509837637440e-1};
48 {0.10122853629037626,0.22238103445337447,0.31370664587788729,
49 0.36268378337836198,0.27152459411754095e-1,0.62253523938647893e-1,
50 0.95158511682492785e-1,0.12462897125553387,0.14959598881657673,
51 0.16915651939500254,0.18260341504492359,0.18945061045506850};
57 {0.96028985649753623168356086856947299L,
58 0.79666647741362673959155393647583044L,
59 0.52553240991632898581773904918924635L,
60 0.18343464249564980493947614236018398L,
61 0.98940093499164993259615417345033263L,
62 0.94457502307323257607798841553460835L,
63 0.86563120238783174388046789771239313L,
64 0.75540440835500303389510119484744227L,
65 0.61787624440264374844667176404879102L,
66 0.45801677765722738634241944298357757L,
67 0.28160355077925891323046050146049611L,
68 0.095012509837637440185319335424958063L};
74 {0.10122853629037625915253135430996219L,
75 0.22238103445337447054435599442624088L,
76 0.31370664587788728733796220198660131L,
77 0.36268378337836198296515044927719561L,
78 0.027152459411754094851780572456018104L,
79 0.062253523938647892862843836994377694L,
80 0.095158511682492784809925107602246226L,
81 0.12462897125553387205247628219201642L,
82 0.14959598881657673208150173054747855L,
83 0.16915651939500253818931207903035996L,
84 0.18260341504492358886676366796921994L,
85 0.18945061045506849628539672320828311L};
151 template<
class func_t=
funct,
class fp_t=double,
153 const fp_t w[]=inte_gauss_cern_w_double>
167 fp_t &res, fp_t &err) {
175 bool loop=
true, loop2=
false;
176 static const fp_t cst=0.005;
184 while (loop==
true || loop2==
true) {
210 if (std::abs(s16-c2*s8)<this->
tol_rel*(1.0+std::abs(s16))) {
212 if (bb!=b) loop=
true;
215 if (1.0+cnst*std::abs(c2)!=1.0) {
231 #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...
fp_t tol_rel
The maximum relative uncertainty in the value of the integral (default )
static constexpr long double inte_gauss_cern_x_long_double[12]
Integration abscissas for o2scl::inte_gauss_cern and o2scl::inte_cauchy_cern in long double precision...
#define O2SCL_CONV2_RET(d, d2, n, b)
Set an error and return the error value, two-string version.
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].
static constexpr long double inte_gauss_cern_w_long_double[12]
Integration weights for o2scl::inte_gauss_cern and o2scl::inte_cauchy_cern in long double precision...
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.
static constexpr double inte_gauss_cern_w_double[12]
Integration weights for o2scl::inte_gauss_cern and o2scl::inte_cauchy_cern in double precision...
std::function< double(double)> funct
One-dimensional function typedef.
Gaussian quadrature (CERNLIB)