26 #ifndef O2SCL_CERN_GAUSS56_H 27 #define O2SCL_CERN_GAUSS56_H 29 #include <o2scl/inte.h> 30 #include <o2scl/funct.h> 32 #ifndef DOXYGEN_NO_O2NS 40 {4.6910077030668004e-02,2.3076534494715846e-01,
41 5.0000000000000000e-01,7.6923465505284154e-01,
42 9.5308992296933200e-01};
48 {1.1846344252809454e-01,2.3931433524968324e-01,
49 2.8444444444444444e-01,2.3931433524968324e-01,
50 1.1846344252809454e-01};
56 {3.3765242898423989e-02,1.6939530676686775e-01,
57 3.8069040695840155e-01,6.1930959304159845e-01,
58 8.3060469323313225e-01,9.6623475710157601e-01};
64 {8.5662246189585178e-02,1.8038078652406930e-01,
65 2.3395696728634552e-01,2.3395696728634552e-01,
66 1.8038078652406930e-01,8.5662246189585178e-02};
72 {0.04691007703066800360118656085030352L,
73 0.23076534494715845448184278964989560L,
75 0.76923465505284154551815721035010440L,
76 0.95308992296933199639881343914969648L};
82 {0.11846344252809454375713202035995868L,
83 0.23931433524968323402064575741781910L,
84 0.28444444444444444444444444444444444L,
85 0.23931433524968323402064575741781910L,
86 0.11846344252809454375713202035995868L};
92 {0.03376524289842398609384922275300270L,
93 0.16939530676686774316930020249004733L,
94 0.38069040695840154568474913915964403L,
95 0.61930959304159845431525086084035597L,
96 0.83060469323313225683069979750995267L,
97 0.96623475710157601390615077724699730L};
103 {0.08566224618958517252014807108636645L,
104 0.18038078652406930378491675691885806L,
105 0.23395696728634552369493517199477550L,
106 0.23395696728634552369493517199477550L,
107 0.18038078652406930378491675691885806L,
108 0.08566224618958517252014807108636645L};
124 template<
class func_t=
funct,
class fp_t=double,
128 const fp_t w6[]=inte_gauss56_cern_w6_double>
142 fp_t &res, fp_t &err) {
144 fp_t rang=b-a, e5=0.0, e6=0.0, ytmp;
146 for(
int i=0;i<5;i++) {
147 ytmp=func(a+rang*x5[i]);
149 ytmp=func(a+rang*x6[i]);
152 ytmp=func(a+rang*x6[5]);
154 res=(e6+e5)*rang/2.0;
155 err=std::abs((e6-e5)*rang);
162 #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...
static const long double inte_gauss56_cern_w5_long_double[5]
Fifth order integration weights for o2scl::inte_gauss56_cern in long double precision.
static const double inte_gauss56_cern_w5_double[5]
Fifth order integration weights for o2scl::inte_gauss56_cern in double precision. ...
static const long double inte_gauss56_cern_x6_long_double[6]
Sixth order integration abscissas for o2scl::inte_gauss56_cern in long double precision.
static const long double inte_gauss56_cern_x5_long_double[5]
Fifth order integration abscissas for o2scl::inte_gauss56_cern in long double precision.
Base integration class [abstract base].
5,6-point Gaussian quadrature (CERNLIB)
static const long double inte_gauss56_cern_w6_long_double[6]
Sixth order integration weights for o2scl::inte_gauss56_cern in long double precision.
static const double inte_gauss56_cern_w6_double[6]
Sixth order integration weights for o2scl::inte_gauss56_cern in double precision. ...
static const double inte_gauss56_cern_x6_double[6]
Sixth order integration abscissas for o2scl::inte_gauss56_cern in 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 giving result res and error err.
std::function< double(double)> funct
One-dimensional function typedef.
static const double inte_gauss56_cern_x5_double[5]
Fifth order integration abscissas for o2scl::inte_gauss56_cern in double precision.