26 #ifndef O2SCL_CERN_GAUSS_H
27 #define O2SCL_CERN_GAUSS_H
29 #include <o2scl/misc.h>
30 #include <o2scl/inte.h>
33 #include <boost/multiprecision/cpp_dec_float.hpp>
36 #ifndef DOXYGEN_NO_O2NS
59 x[0]=0.96028985649753623;
60 x[1]=0.79666647741362674;
61 x[2]=0.52553240991632899;
62 x[3]=0.18343464249564980;
63 x[4]=0.98940093499164993;
64 x[5]=0.94457502307323258;
65 x[6]=0.86563120238783175;
66 x[7]=0.75540440835500303;
67 x[8]=0.61787624440264375;
68 x[9]=0.45801677765722739;
69 x[10]=0.28160355077925891;
70 x[11]=0.95012509837637440e-1;
72 w[0]=0.10122853629037626;
73 w[1]=0.22238103445337447;
74 w[2]=0.31370664587788729;
75 w[3]=0.36268378337836198;
76 w[4]=0.27152459411754095e-1;
77 w[5]=0.62253523938647893e-1;
78 w[6]=0.95158511682492785e-1;
79 w[7]=0.12462897125553387;
80 w[8]=0.14959598881657673;
81 w[9]=0.16915651939500254;
82 w[10]=0.18260341504492359;
83 w[11]=0.18945061045506850;
110 x[0]=0.96028985649753623168356086856947299L;
111 x[1]=0.79666647741362673959155393647583044L;
112 x[2]=0.52553240991632898581773904918924635L;
113 x[3]=0.18343464249564980493947614236018398L;
114 x[4]=0.98940093499164993259615417345033263L;
115 x[5]=0.94457502307323257607798841553460835L;
116 x[6]=0.86563120238783174388046789771239313L;
117 x[7]=0.75540440835500303389510119484744227L;
118 x[8]=0.61787624440264374844667176404879102L;
119 x[9]=0.45801677765722738634241944298357757L;
120 x[10]=0.28160355077925891323046050146049611L;
121 x[11]=0.095012509837637440185319335424958063L;
123 w[0]=0.10122853629037625915253135430996219L;
124 w[1]=0.22238103445337447054435599442624088L;
125 w[2]=0.31370664587788728733796220198660131L;
126 w[3]=0.36268378337836198296515044927719561L;
127 w[4]=0.027152459411754094851780572456018104L;
128 w[5]=0.062253523938647892862843836994377694L;
129 w[6]=0.095158511682492784809925107602246226L;
130 w[7]=0.12462897125553387205247628219201642L;
131 w[8]=0.14959598881657673208150173054747855L;
132 w[9]=0.16915651939500253818931207903035996L;
133 w[10]=0.18260341504492358886676366796921994L;
134 w[11]=0.18945061045506849628539672320828311L;
139 #if defined(O2SCL_LD_TYPES) || defined(DOXYGEN)
157 typedef boost::multiprecision::cpp_dec_float_50 cpp_dec_float_50;
162 cpp_dec_float_50
x[12];
167 cpp_dec_float_50
w[12];
172 x[0]=cpp_dec_float_50
173 (
"9.60289856497536231683560868569472990428235234301452e-01");
174 x[1]=cpp_dec_float_50
175 (
"7.96666477413626739591553936475830436837171731615965e-01");
176 x[2]=cpp_dec_float_50
177 (
"5.25532409916328985817739049189246349041964243120393e-01");
178 x[3]=cpp_dec_float_50
179 (
"1.83434642495649804939476142360183980666757812912974e-01");
180 x[4]=cpp_dec_float_50
181 (
"9.89400934991649932596154173450332627426274071657645e-01");
182 x[5]=cpp_dec_float_50
183 (
"9.44575023073232576077988415534608345091139272591073e-01");
184 x[6]=cpp_dec_float_50
185 (
"8.65631202387831743880467897712393132387335384847527e-01");
186 x[7]=cpp_dec_float_50
187 (
"7.55404408355003033895101194847442268353813656457503e-01");
188 x[8]=cpp_dec_float_50
189 (
"6.17876244402643748446671764048791018991882217765658e-01");
190 x[9]=cpp_dec_float_50
191 (
"4.58016777657227386342419442983577573540031613035523e-01");
192 x[10]=cpp_dec_float_50
193 (
"2.81603550779258913230460501460496106486069490770600e-01");
194 x[11]=cpp_dec_float_50
195 (
"9.50125098376374401853193354249580631303530556890655e-02");
197 w[0]=cpp_dec_float_50
198 (
"1.01228536290376259152531354309962190115394091051685e-01");
199 w[1]=cpp_dec_float_50
200 (
"2.22381034453374470544355994426240884430130870051250e-01");
201 w[2]=cpp_dec_float_50
202 (
"3.13706645877887287337962201986601313260328999002735e-01");
203 w[3]=cpp_dec_float_50
204 (
"3.62683783378361982965150449277195612194146039894331e-01");
205 w[4]=cpp_dec_float_50
206 (
"2.71524594117540948517805724560181035122673755667608e-02");
207 w[5]=cpp_dec_float_50
208 (
"6.22535239386478928628438369943776942749865083529069e-02");
209 w[6]=cpp_dec_float_50
210 (
"9.51585116824927848099251076022462263552635031837127e-02");
211 w[7]=cpp_dec_float_50
212 (
"1.24628971255533872052476282192016420144886859222203e-01");
213 w[8]=cpp_dec_float_50
214 (
"1.49595988816576732081501730547478548970491068207836e-01");
215 w[9]=cpp_dec_float_50
216 (
"1.69156519395002538189312079030359962211639473416028e-01");
217 w[10]=cpp_dec_float_50
218 (
"1.82603415044923588866763667969219939383556223654649e-01");
219 w[11]=cpp_dec_float_50
220 (
"1.89450610455068496285396723208283105146908988395903e-01");
291 template<
class func_t=
funct,
class fp_t=double,
292 class weights_t=inte_gauss_coeffs_double>
311 fp_t &res, fp_t &err) {
319 bool loop=
true, loop2=
false;
320 static const fp_t cst=0.005;
328 while (loop==
true || loop2==
true) {
358 if (bb!=b) loop=
true;
378 #ifndef DOXYGEN_NO_O2NS