Theoretica
A C++ numerical and automatic mathematical library
Loading...
Searching...
No Matches
gauss.h
Go to the documentation of this file.
1
5
6#ifndef THEORETICA_GAUSS_H
7#define THEORETICA_GAUSS_H
8
9#include "../core/constants.h"
10
11
12namespace theoretica {
13
15 namespace tables {
16
17
18 // Legendre
19
20 static real legendre_roots_2[2] = {
21 -0.577350269189625764506505,
22 0.577350269189625764506505
23 };
24
25 static real legendre_weights_2[2] = {
26 1, 1
27 };
28
29 static real legendre_roots_4[4] = {
30 -0.861136311594052575194101,
31 -0.339981043584856264846549,
32 0.339981043584856264738129,
33 0.861136311594052575194101
34 };
35
36 static real legendre_weights_4[4] = {
37 0.347854845137453857491878,
38 0.652145154862546142535227,
39 0.652145154862546142643647,
40 0.347854845137453857491878
41 };
42
43 static real legendre_roots_8[8] = {
44 -0.960289856497536231715127,
45 -0.796666477413626739621007,
46 -0.525532409916328985884527,
47 -0.183434642495649804990214,
48 0.183434642495649804936004,
49 0.525532409916328985884527,
50 0.796666477413626739621007,
51 0.960289856497536231715127
52 };
53
54 static real legendre_weights_8[8] = {
55 0.101228536290376258828787,
56 0.222381034453374470260959,
57 0.313706645877887287419484,
58 0.362683783378361982948669,
59 0.362683783378361982948669,
60 0.313706645877887287419484,
61 0.222381034453374470260959,
62 0.101228536290376258828787
63 };
64
65 static real legendre_roots_16[16] = {
66 -0.989400934991649929186111,
67 -0.944575023073232580589787,
68 -0.865631202387831746901999,
69 -0.755404408355003026897482,
70 -0.617876244402643747097217,
71 -0.458016777657227386105678,
72 -0.281603550779258913257935,
73 -0.0950125098376374401876535,
74 0.0950125098376374401605484,
75 0.281603550779258913203725,
76 0.458016777657227386701989,
77 0.617876244402643747097217,
78 0.755404408355003026897482,
79 0.865631202387831746901999,
80 0.944575023073232565953058,
81 0.989400934991649929186111
82 };
83
84 static real legendre_weights_16[16] = {
85 0.0271524594117540951122847,
86 0.0622535239386478849447004,
87 0.0951585116824928647197876,
88 0.124628971255533850669866,
89 0.149595988816576744480109,
90 0.169156519395002539321907,
91 0.182603415044923588682552,
92 0.189450610455068496273891,
93 0.189450610455068496300996,
94 0.182603415044923588967155,
95 0.169156519395002538020865,
96 0.149595988816576744480109,
97 0.124628971255533850669866,
98 0.0951585116824928647197876,
99 0.0622535239386479161324535,
100 0.0271524594117540951122847
101 };
102
103
104 // Laguerre
105
106 static real laguerre_roots_2[2] = {
107 0.58578643762690546732,
108 3.4142135623730945322
109 };
110
111 static real laguerre_weights_2[2] = {
112 0.85355339059327000202,
113 0.14644660940672634871
114 };
115
116
117 static real laguerre_roots_4[4] = {
118 0.32254768961939191742,
119 1.7457611011583463777,
120 4.5366202969211275316,
121 9.3950709123011330332
122 };
123
124 static real laguerre_weights_4[4] = {
125 0.60315410434164023839,
126 0.35741869243780005017,
127 0.03888790851500541948,
128 0.00053929470556132749637
129 };
130
131
132 static real laguerre_roots_8[8] = {
133 0.17027963230510124502,
134 0.90370177679937967218,
135 2.2510866298661306928,
136 4.2667001702876592626,
137 7.0459054023934658056,
138 10.758516010180995295,
139 15.740678641278004193,
140 22.863131736889263833
141 };
142
143 static real laguerre_weights_8[8] = {
144 0.36918858934162849121,
145 0.41878678081434484077,
146 0.17579498663717180432,
147 0.033343492261215595242,
148 0.0027945362352256706928,
149 9.0765087733582173847e-005,
150 8.4857467162725295329e-007,
151 1.0480011748715107818e-009
152 };
153
154
155 static real laguerre_roots_16[16] = {
156 0.087649410478928189153,
157 0.46269632891508138072,
158 1.1410577748312272208,
159 2.1292836450983810438,
160 3.4370866338932063403,
161 5.0780186145497663115,
162 7.0703385350482545854,
163 9.4383143363918924219,
164 12.214223368866159374,
165 15.441527368781641486,
166 19.180156856752924456,
167 23.51590569399238859,
168 28.578729742881671998,
169 34.583398702286930866,
170 41.940452647688152288,
171 51.701160339543346826
172 };
173
174 static real laguerre_weights_16[16] = {
175 0.20615171495777392289,
176 0.33105785495087120126,
177 0.26579577764421131011,
178 0.13629693429637680541,
179 0.047328928694125499268,
180 0.011299900080339313299,
181 0.0018490709435266595795,
182 0.00020427191530818007586,
183 1.4844586873978733152e-005,
184 6.8283193308651186878e-007,
185 1.8810248410831411265e-008,
186 2.8623502429707047297e-010,
187 2.1270790332192899185e-012,
188 6.2979670025300090354e-015,
189 5.050473700032298015e-018,
190 4.1614623703730629937e-022
191 };
192
193
194 // Hermite
195
196
197 static real hermite_roots_2[2] = {
198 -0.707106781186547524,
199 0.707106781186547524
200 };
201
202 static real hermite_weights_2[2] = {
203 0.886226925452757941,
204 0.886226925452757941
205 };
206
207
208 static real hermite_roots_4[4] = {
209 -1.65068012388578456,
210 -0.52464762327529032,
211 0.52464762327529032,
212 1.65068012388578456
213 };
214
215 static real hermite_weights_4[4] = {
216 0.08131283544724517,
217 0.80491409000551277,
218 0.80491409000551277,
219 0.08131283544724517
220 };
221
222
223 static real hermite_roots_8[8] = {
224 -2.93063742025724402,
225 -1.98165675669584293,
226 -1.15719371244678019,
227 -0.381186990207322117,
228 0.381186990207322117,
229 1.15719371244678019,
230 1.98165675669584293,
231 2.93063742025724402,
232 };
233
234 static real hermite_weights_8[8] = {
235 0.0001996040722113676,
236 0.0170779830074134741,
237 0.207802325814891863,
238 0.66114701255824124,
239 0.66114701255824124,
240 0.207802325814891863,
241 0.0170779830074134741,
242 0.0001996040722113676
243 };
244
245
246 static real hermite_roots_16[16] = {
247 -4.68873893930581836,
248 -3.86944790486012269,
249 -3.17699916197995602,
250 -2.54620215784748137,
251 -1.95178799091625398,
252 -1.3802585391988808,
253 -0.822951449144655892,
254 -0.273481046138152452,
255 0.273481046138152453,
256 0.822951449144655892,
257 1.3802585391988808,
258 1.95178799091625398,
259 2.54620215784748136,
260 3.17699916197995602,
261 3.86944790486012269,
262 4.68873893930581836
263 };
264
265 static real hermite_weights_16[16] = {
266 2.65480747401118205e-010,
267 2.32098084486521081e-007,
268 2.71186009253788177e-005,
269 0.000932284008624180443,
270 0.0128803115355099723,
271 0.0838100413989858226,
272 0.280647458528533652,
273 0.5079294790166137,
274 0.5079294790166137,
275 0.280647458528533652,
276 0.0838100413989858228,
277 0.0128803115355099723,
278 0.000932284008624180486,
279 2.71186009253788177e-005,
280 2.32098084486521081e-007,
281 2.65480747401118205e-010
282 };
283
284 }
285
286}
287
288#endif
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27
double real
A real number, defined as a floating point type.
Definition constants.h:198