]>
Commit | Line | Data |
---|---|---|
196c9e7a | 1 | // { dg-do run { target c++11 } } |
2be75957 ESR |
2 | // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" } |
3 | // | |
4 | // Copyright (C) 2016 Free Software Foundation, Inc. | |
5 | // | |
6 | // This file is part of the GNU ISO C++ Library. This library is free | |
7 | // software; you can redistribute it and/or modify it under the | |
8 | // terms of the GNU General Public License as published by the | |
9 | // Free Software Foundation; either version 3, or (at your option) | |
10 | // any later version. | |
11 | // | |
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | // GNU General Public License for more details. | |
16 | // | |
17 | // You should have received a copy of the GNU General Public License along | |
18 | // with this library; see the file COPYING3. If not see | |
19 | // <http://www.gnu.org/licenses/>. | |
20 | ||
21 | // sph_legendre | |
22 | // Compare against values generated by the GNU Scientific Library. | |
23 | // The GSL can be found on the web: http://www.gnu.org/software/gsl/ | |
24 | #include <limits> | |
25 | #include <cmath> | |
26 | #if defined(__TEST_DEBUG) | |
27 | # include <iostream> | |
28 | # define VERIFY(A) \ | |
29 | if (!(A)) \ | |
30 | { \ | |
31 | std::cout << "line " << __LINE__ \ | |
32 | << " max_abs_frac = " << max_abs_frac \ | |
33 | << std::endl; \ | |
34 | } | |
35 | #else | |
36 | # include <testsuite_hooks.h> | |
37 | #endif | |
38 | #include <specfun_testcase.h> | |
39 | ||
40 | ||
41 | // Test data for l=0, m=0. | |
42 | // max(|f - f_GSL|): 0.0000000000000000 | |
43 | // max(|f - f_GSL| / |f_GSL|): 0.0000000000000000 | |
44 | const testcase_sph_legendre<double> | |
45 | data001[21] = | |
46 | { | |
47 | { 0.28209479177387814, 0, 0, | |
48 | 0.0000000000000000 }, | |
49 | { 0.28209479177387814, 0, 0, | |
50 | 0.15707963267948966 }, | |
51 | { 0.28209479177387814, 0, 0, | |
52 | 0.31415926535897931 }, | |
53 | { 0.28209479177387814, 0, 0, | |
54 | 0.47123889803846897 }, | |
55 | { 0.28209479177387814, 0, 0, | |
56 | 0.62831853071795862 }, | |
57 | { 0.28209479177387814, 0, 0, | |
58 | 0.78539816339744828 }, | |
59 | { 0.28209479177387814, 0, 0, | |
60 | 0.94247779607693793 }, | |
61 | { 0.28209479177387814, 0, 0, | |
62 | 1.0995574287564276 }, | |
63 | { 0.28209479177387814, 0, 0, | |
64 | 1.2566370614359172 }, | |
65 | { 0.28209479177387814, 0, 0, | |
66 | 1.4137166941154069 }, | |
67 | { 0.28209479177387814, 0, 0, | |
68 | 1.5707963267948966 }, | |
69 | { 0.28209479177387814, 0, 0, | |
70 | 1.7278759594743860 }, | |
71 | { 0.28209479177387814, 0, 0, | |
72 | 1.8849555921538759 }, | |
73 | { 0.28209479177387814, 0, 0, | |
74 | 2.0420352248333655 }, | |
75 | { 0.28209479177387814, 0, 0, | |
76 | 2.1991148575128552 }, | |
77 | { 0.28209479177387814, 0, 0, | |
78 | 2.3561944901923448 }, | |
79 | { 0.28209479177387814, 0, 0, | |
80 | 2.5132741228718345 }, | |
81 | { 0.28209479177387814, 0, 0, | |
82 | 2.6703537555513241 }, | |
83 | { 0.28209479177387814, 0, 0, | |
84 | 2.8274333882308138 }, | |
85 | { 0.28209479177387814, 0, 0, | |
86 | 2.9845130209103035 }, | |
87 | { 0.28209479177387814, 0, 0, | |
88 | 3.1415926535897931 }, | |
89 | }; | |
90 | const double toler001 = 2.5000000000000020e-13; | |
91 | ||
92 | // Test data for l=1, m=0. | |
93 | // max(|f - f_GSL|): 0.0000000000000000 | |
94 | // max(|f - f_GSL| / |f_GSL|): 0.0000000000000000 | |
95 | const testcase_sph_legendre<double> | |
96 | data002[21] = | |
97 | { | |
98 | { 0.48860251190291992, 1, 0, | |
99 | 0.0000000000000000 }, | |
100 | { 0.48258700419201100, 1, 0, | |
101 | 0.15707963267948966 }, | |
102 | { 0.46468860282345231, 1, 0, | |
103 | 0.31415926535897931 }, | |
104 | { 0.43534802584032634, 1, 0, | |
105 | 0.47123889803846897 }, | |
106 | { 0.39528773562374975, 1, 0, | |
107 | 0.62831853071795862 }, | |
108 | { 0.34549414947133550, 1, 0, | |
109 | 0.78539816339744828 }, | |
110 | { 0.28719335072959390, 1, 0, | |
111 | 0.94247779607693793 }, | |
112 | { 0.22182089855280449, 1, 0, | |
113 | 1.0995574287564276 }, | |
114 | { 0.15098647967228981, 1, 0, | |
115 | 1.2566370614359172 }, | |
116 | { 0.076434272566846345, 1, 0, | |
117 | 1.4137166941154069 }, | |
118 | { 2.9918275112863369e-17, 1, 0, | |
119 | 1.5707963267948966 }, | |
120 | { -0.076434272566846179, 1, 0, | |
121 | 1.7278759594743860 }, | |
122 | { -0.15098647967228976, 1, 0, | |
123 | 1.8849555921538759 }, | |
124 | { -0.22182089855280443, 1, 0, | |
125 | 2.0420352248333655 }, | |
126 | { -0.28719335072959384, 1, 0, | |
127 | 2.1991148575128552 }, | |
128 | { -0.34549414947133544, 1, 0, | |
129 | 2.3561944901923448 }, | |
130 | { -0.39528773562374969, 1, 0, | |
131 | 2.5132741228718345 }, | |
132 | { -0.43534802584032628, 1, 0, | |
133 | 2.6703537555513241 }, | |
134 | { -0.46468860282345231, 1, 0, | |
135 | 2.8274333882308138 }, | |
136 | { -0.48258700419201095, 1, 0, | |
137 | 2.9845130209103035 }, | |
138 | { -0.48860251190291992, 1, 0, | |
139 | 3.1415926535897931 }, | |
140 | }; | |
141 | const double toler002 = 2.5000000000000020e-13; | |
142 | ||
143 | // Test data for l=1, m=1. | |
144 | // max(|f - f_GSL|): 2.2204460492503131e-16 | |
145 | // max(|f - f_GSL| / |f_GSL|): 7.7031500691196945e-16 | |
146 | const testcase_sph_legendre<double> | |
147 | data003[21] = | |
148 | { | |
149 | { 0.0000000000000000, 1, 1, | |
150 | 0.0000000000000000 }, | |
151 | { -0.054047192447077917, 1, 1, | |
152 | 0.15707963267948966 }, | |
153 | { -0.10676356364376104, 1, 1, | |
154 | 0.31415926535897931 }, | |
155 | { -0.15685106157558129, 1, 1, | |
156 | 0.47123889803846897 }, | |
157 | { -0.20307636581258243, 1, 1, | |
158 | 0.62831853071795862 }, | |
159 | { -0.24430125595146007, 1, 1, | |
160 | 0.78539816339744828 }, | |
161 | { -0.27951063837942880, 1, 1, | |
162 | 0.94247779607693793 }, | |
163 | { -0.30783754124787122, 1, 1, | |
164 | 1.0995574287564276 }, | |
165 | { -0.32858446219656556, 1, 1, | |
166 | 1.2566370614359172 }, | |
167 | { -0.34124054317667202, 1, 1, | |
168 | 1.4137166941154069 }, | |
169 | { -0.34549414947133567, 1, 1, | |
170 | 1.5707963267948966 }, | |
171 | { -0.34124054317667202, 1, 1, | |
172 | 1.7278759594743860 }, | |
173 | { -0.32858446219656556, 1, 1, | |
174 | 1.8849555921538759 }, | |
175 | { -0.30783754124787127, 1, 1, | |
176 | 2.0420352248333655 }, | |
177 | { -0.27951063837942880, 1, 1, | |
178 | 2.1991148575128552 }, | |
179 | { -0.24430125595146013, 1, 1, | |
180 | 2.3561944901923448 }, | |
181 | { -0.20307636581258248, 1, 1, | |
182 | 2.5132741228718345 }, | |
183 | { -0.15685106157558140, 1, 1, | |
184 | 2.6703537555513241 }, | |
185 | { -0.10676356364376104, 1, 1, | |
186 | 2.8274333882308138 }, | |
187 | { -0.054047192447078167, 1, 1, | |
188 | 2.9845130209103035 }, | |
189 | { 0.0000000000000000, 1, 1, | |
190 | 3.1415926535897931 }, | |
191 | }; | |
192 | const double toler003 = 2.5000000000000020e-13; | |
193 | ||
194 | // Test data for l=2, m=0. | |
195 | // max(|f - f_GSL|): 5.5511151231257827e-17 | |
196 | // max(|f - f_GSL| / |f_GSL|): 3.0159263334953002e-15 | |
197 | const testcase_sph_legendre<double> | |
198 | data004[21] = | |
199 | { | |
200 | { 0.63078313050504009, 2, 0, | |
201 | 0.0000000000000000 }, | |
202 | { 0.60762858760316607, 2, 0, | |
203 | 0.15707963267948966 }, | |
204 | { 0.54043148688396569, 2, 0, | |
205 | 0.31415926535897931 }, | |
206 | { 0.43576954875556589, 2, 0, | |
207 | 0.47123889803846897 }, | |
208 | { 0.30388781294457579, 2, 0, | |
209 | 0.62831853071795862 }, | |
210 | { 0.15769578262626011, 2, 0, | |
211 | 0.78539816339744828 }, | |
212 | { 0.011503752307944235, 2, 0, | |
213 | 0.94247779607693793 }, | |
214 | { -0.12037798350304570, 2, 0, | |
215 | 1.0995574287564276 }, | |
216 | { -0.22503992163144576, 2, 0, | |
217 | 1.2566370614359172 }, | |
218 | { -0.29223702235064597, 2, 0, | |
219 | 1.4137166941154069 }, | |
220 | { -0.31539156525252005, 2, 0, | |
221 | 1.5707963267948966 }, | |
222 | { -0.29223702235064608, 2, 0, | |
223 | 1.7278759594743860 }, | |
224 | { -0.22503992163144584, 2, 0, | |
225 | 1.8849555921538759 }, | |
226 | { -0.12037798350304584, 2, 0, | |
227 | 2.0420352248333655 }, | |
228 | { 0.011503752307944164, 2, 0, | |
229 | 2.1991148575128552 }, | |
230 | { 0.15769578262625994, 2, 0, | |
231 | 2.3561944901923448 }, | |
232 | { 0.30388781294457567, 2, 0, | |
233 | 2.5132741228718345 }, | |
234 | { 0.43576954875556562, 2, 0, | |
235 | 2.6703537555513241 }, | |
236 | { 0.54043148688396569, 2, 0, | |
237 | 2.8274333882308138 }, | |
238 | { 0.60762858760316585, 2, 0, | |
239 | 2.9845130209103035 }, | |
240 | { 0.63078313050504009, 2, 0, | |
241 | 3.1415926535897931 }, | |
242 | }; | |
243 | const double toler004 = 2.5000000000000020e-13; | |
244 | ||
245 | // Test data for l=2, m=1. | |
246 | // max(|f - f_GSL|): 2.2204460492503131e-16 | |
247 | // max(|f - f_GSL| / |f_GSL|): 8.1384221730905279e-16 | |
248 | const testcase_sph_legendre<double> | |
249 | data005[21] = | |
250 | { | |
251 | { 0.0000000000000000, 2, 1, | |
252 | 0.0000000000000000 }, | |
253 | { -0.11936529291378727, 2, 1, | |
254 | 0.15707963267948966 }, | |
255 | { -0.22704627929027449, 2, 1, | |
256 | 0.31415926535897931 }, | |
257 | { -0.31250239392538215, 2, 1, | |
258 | 0.47123889803846897 }, | |
259 | { -0.36736859691086526, 2, 1, | |
260 | 0.62831853071795862 }, | |
261 | { -0.38627420202318979, 2, 1, | |
262 | 0.78539816339744828 }, | |
263 | { -0.36736859691086526, 2, 1, | |
264 | 0.94247779607693793 }, | |
265 | { -0.31250239392538226, 2, 1, | |
266 | 1.0995574287564276 }, | |
267 | { -0.22704627929027438, 2, 1, | |
268 | 1.2566370614359172 }, | |
269 | { -0.11936529291378740, 2, 1, | |
270 | 1.4137166941154069 }, | |
271 | { -4.7304946510089748e-17, 2, 1, | |
272 | 1.5707963267948966 }, | |
273 | { 0.11936529291378714, 2, 1, | |
274 | 1.7278759594743860 }, | |
275 | { 0.22704627929027429, 2, 1, | |
276 | 1.8849555921538759 }, | |
277 | { 0.31250239392538220, 2, 1, | |
278 | 2.0420352248333655 }, | |
279 | { 0.36736859691086521, 2, 1, | |
280 | 2.1991148575128552 }, | |
281 | { 0.38627420202318979, 2, 1, | |
282 | 2.3561944901923448 }, | |
283 | { 0.36736859691086526, 2, 1, | |
284 | 2.5132741228718345 }, | |
285 | { 0.31250239392538232, 2, 1, | |
286 | 2.6703537555513241 }, | |
287 | { 0.22704627929027449, 2, 1, | |
288 | 2.8274333882308138 }, | |
289 | { 0.11936529291378781, 2, 1, | |
290 | 2.9845130209103035 }, | |
291 | { 0.0000000000000000, 2, 1, | |
292 | 3.1415926535897931 }, | |
293 | }; | |
294 | const double toler005 = 2.5000000000000020e-13; | |
295 | ||
296 | // Test data for l=2, m=2. | |
297 | // max(|f - f_GSL|): 1.6653345369377348e-16 | |
298 | // max(|f - f_GSL| / |f_GSL|): 6.2393366429561032e-16 | |
299 | const testcase_sph_legendre<double> | |
300 | data006[21] = | |
301 | { | |
302 | { 0.0000000000000000, 2, 2, | |
303 | 0.0000000000000000 }, | |
304 | { 0.0094528025561622549, 2, 2, | |
305 | 0.15707963267948966 }, | |
306 | { 0.036885904048903795, 2, 2, | |
307 | 0.31415926535897931 }, | |
308 | { 0.079613961366457681, 2, 2, | |
309 | 0.47123889803846897 }, | |
310 | { 0.13345445455470123, 2, 2, | |
311 | 0.62831853071795862 }, | |
312 | { 0.19313710101159484, 2, 2, | |
313 | 0.78539816339744828 }, | |
314 | { 0.25281974746848851, 2, 2, | |
315 | 0.94247779607693793 }, | |
316 | { 0.30666024065673209, 2, 2, | |
317 | 1.0995574287564276 }, | |
318 | { 0.34938829797428600, 2, 2, | |
319 | 1.2566370614359172 }, | |
320 | { 0.37682139946702747, 2, 2, | |
321 | 1.4137166941154069 }, | |
322 | { 0.38627420202318979, 2, 2, | |
323 | 1.5707963267948966 }, | |
324 | { 0.37682139946702753, 2, 2, | |
325 | 1.7278759594743860 }, | |
326 | { 0.34938829797428606, 2, 2, | |
327 | 1.8849555921538759 }, | |
328 | { 0.30666024065673209, 2, 2, | |
329 | 2.0420352248333655 }, | |
330 | { 0.25281974746848856, 2, 2, | |
331 | 2.1991148575128552 }, | |
332 | { 0.19313710101159492, 2, 2, | |
333 | 2.3561944901923448 }, | |
334 | { 0.13345445455470126, 2, 2, | |
335 | 2.5132741228718345 }, | |
336 | { 0.079613961366457764, 2, 2, | |
337 | 2.6703537555513241 }, | |
338 | { 0.036885904048903795, 2, 2, | |
339 | 2.8274333882308138 }, | |
340 | { 0.0094528025561623433, 2, 2, | |
341 | 2.9845130209103035 }, | |
342 | { 0.0000000000000000, 2, 2, | |
343 | 3.1415926535897931 }, | |
344 | }; | |
345 | const double toler006 = 2.5000000000000020e-13; | |
346 | ||
347 | // Test data for l=5, m=0. | |
348 | // max(|f - f_GSL|): 1.0547118733938987e-15 | |
349 | // max(|f - f_GSL| / |f_GSL|): 2.9385557676213648e-15 | |
350 | const testcase_sph_legendre<double> | |
351 | data007[21] = | |
352 | { | |
353 | { 0.93560257962738880, 5, 0, | |
354 | 0.0000000000000000 }, | |
355 | { 0.77014422942079963, 5, 0, | |
356 | 0.15707963267948966 }, | |
357 | { 0.35892185032365165, 5, 0, | |
358 | 0.31415926535897931 }, | |
359 | { -0.090214932090594294, 5, 0, | |
360 | 0.47123889803846897 }, | |
361 | { -0.36214460396518883, 5, 0, | |
362 | 0.62831853071795862 }, | |
363 | { -0.35145955579226906, 5, 0, | |
364 | 0.78539816339744828 }, | |
365 | { -0.11441703594725168, 5, 0, | |
366 | 0.94247779607693793 }, | |
367 | { 0.17248966720808107, 5, 0, | |
368 | 1.0995574287564276 }, | |
369 | { 0.32128384287200523, 5, 0, | |
370 | 1.2566370614359172 }, | |
371 | { 0.24377632246714948, 5, 0, | |
372 | 1.4137166941154069 }, | |
373 | { 1.0741712853887702e-16, 5, 0, | |
374 | 1.5707963267948966 }, | |
375 | { -0.24377632246714911, 5, 0, | |
376 | 1.7278759594743860 }, | |
377 | { -0.32128384287200534, 5, 0, | |
378 | 1.8849555921538759 }, | |
379 | { -0.17248966720808132, 5, 0, | |
380 | 2.0420352248333655 }, | |
381 | { 0.11441703594725151, 5, 0, | |
382 | 2.1991148575128552 }, | |
383 | { 0.35145955579226895, 5, 0, | |
384 | 2.3561944901923448 }, | |
385 | { 0.36214460396518905, 5, 0, | |
386 | 2.5132741228718345 }, | |
387 | { 0.090214932090594752, 5, 0, | |
388 | 2.6703537555513241 }, | |
389 | { -0.35892185032365165, 5, 0, | |
390 | 2.8274333882308138 }, | |
391 | { -0.77014422942079852, 5, 0, | |
392 | 2.9845130209103035 }, | |
393 | { -0.93560257962738880, 5, 0, | |
394 | 3.1415926535897931 }, | |
395 | }; | |
396 | const double toler007 = 2.5000000000000020e-13; | |
397 | ||
398 | // Test data for l=5, m=1. | |
399 | // max(|f - f_GSL|): 4.4408920985006262e-16 | |
400 | // max(|f - f_GSL| / |f_GSL|): 1.4161260272615034e-15 | |
401 | const testcase_sph_legendre<double> | |
402 | data008[21] = | |
403 | { | |
404 | { 0.0000000000000000, 5, 1, | |
405 | 0.0000000000000000 }, | |
406 | { -0.36712373713318258, 5, 1, | |
407 | 0.15707963267948966 }, | |
408 | { -0.54610329010534753, 5, 1, | |
409 | 0.31415926535897931 }, | |
410 | { -0.45381991493631763, 5, 1, | |
411 | 0.47123889803846897 }, | |
412 | { -0.15679720635769961, 5, 1, | |
413 | 0.62831853071795862 }, | |
414 | { 0.16985499419838601, 5, 1, | |
415 | 0.78539816339744828 }, | |
416 | { 0.34468004499725180, 5, 1, | |
417 | 0.94247779607693793 }, | |
418 | { 0.28349471119605985, 5, 1, | |
419 | 1.0995574287564276 }, | |
420 | { 0.044286619339675815, 5, 1, | |
421 | 1.2566370614359172 }, | |
422 | { -0.21193784177193470, 5, 1, | |
423 | 1.4137166941154069 }, | |
424 | { -0.32028164857621527, 5, 1, | |
425 | 1.5707963267948966 }, | |
426 | { -0.21193784177193514, 5, 1, | |
427 | 1.7278759594743860 }, | |
428 | { 0.044286619339675592, 5, 1, | |
429 | 1.8849555921538759 }, | |
430 | { 0.28349471119605968, 5, 1, | |
431 | 2.0420352248333655 }, | |
432 | { 0.34468004499725174, 5, 1, | |
433 | 2.1991148575128552 }, | |
434 | { 0.16985499419838640, 5, 1, | |
435 | 2.3561944901923448 }, | |
436 | { -0.15679720635769906, 5, 1, | |
437 | 2.5132741228718345 }, | |
438 | { -0.45381991493631768, 5, 1, | |
439 | 2.6703537555513241 }, | |
440 | { -0.54610329010534753, 5, 1, | |
441 | 2.8274333882308138 }, | |
442 | { -0.36712373713318402, 5, 1, | |
443 | 2.9845130209103035 }, | |
444 | { 0.0000000000000000, 5, 1, | |
445 | 3.1415926535897931 }, | |
446 | }; | |
447 | const double toler008 = 2.5000000000000020e-13; | |
448 | ||
449 | // Test data for l=5, m=2. | |
450 | // max(|f - f_GSL|): 1.6653345369377348e-16 | |
451 | // max(|f - f_GSL| / |f_GSL|): 3.0636916515712721e-15 | |
452 | const testcase_sph_legendre<double> | |
453 | data009[21] = | |
454 | { | |
455 | { 0.0000000000000000, 5, 2, | |
456 | 0.0000000000000000 }, | |
457 | { 0.078919441745546146, 5, 2, | |
458 | 0.15707963267948966 }, | |
459 | { 0.26373799140437987, 5, 2, | |
460 | 0.31415926535897931 }, | |
461 | { 0.43002359842080096, 5, 2, | |
462 | 0.47123889803846897 }, | |
463 | { 0.45642486439050983, 5, 2, | |
464 | 0.62831853071795862 }, | |
465 | { 0.29959604906083293, 5, 2, | |
466 | 0.78539816339744828 }, | |
467 | { 0.023781239849532215, 5, 2, | |
468 | 0.94247779607693793 }, | |
469 | { -0.23313989334673826, 5, 2, | |
470 | 1.0995574287564276 }, | |
471 | { -0.33799912776303714, 5, 2, | |
472 | 1.2566370614359172 }, | |
473 | { -0.23964508489529743, 5, 2, | |
474 | 1.4137166941154069 }, | |
475 | { -1.0377480524338170e-16, 5, 2, | |
476 | 1.5707963267948966 }, | |
477 | { 0.23964508489529704, 5, 2, | |
478 | 1.7278759594743860 }, | |
479 | { 0.33799912776303714, 5, 2, | |
480 | 1.8849555921538759 }, | |
481 | { 0.23313989334673843, 5, 2, | |
482 | 2.0420352248333655 }, | |
483 | { -0.023781239849531916, 5, 2, | |
484 | 2.1991148575128552 }, | |
485 | { -0.29959604906083276, 5, 2, | |
486 | 2.3561944901923448 }, | |
487 | { -0.45642486439050983, 5, 2, | |
488 | 2.5132741228718345 }, | |
489 | { -0.43002359842080118, 5, 2, | |
490 | 2.6703537555513241 }, | |
491 | { -0.26373799140437987, 5, 2, | |
492 | 2.8274333882308138 }, | |
493 | { -0.078919441745546867, 5, 2, | |
494 | 2.9845130209103035 }, | |
495 | { 0.0000000000000000, 5, 2, | |
496 | 3.1415926535897931 }, | |
497 | }; | |
498 | const double toler009 = 2.5000000000000020e-13; | |
499 | ||
500 | // Test data for l=5, m=5. | |
501 | // max(|f - f_GSL|): 1.1102230246251565e-16 | |
502 | // max(|f - f_GSL| / |f_GSL|): 4.2617219728402347e-16 | |
503 | const testcase_sph_legendre<double> | |
504 | data010[21] = | |
505 | { | |
506 | { 0.0000000000000000, 5, 5, | |
507 | 0.0000000000000000 }, | |
508 | { -4.3481439097909148e-05, 5, 5, | |
509 | 0.15707963267948966 }, | |
510 | { -0.0013078367086431812, 5, 5, | |
511 | 0.31415926535897931 }, | |
512 | { -0.0089510818191922761, 5, 5, | |
513 | 0.47123889803846897 }, | |
514 | { -0.032563803777573896, 5, 5, | |
515 | 0.62831853071795862 }, | |
516 | { -0.082047757105021241, 5, 5, | |
517 | 0.78539816339744828 }, | |
518 | { -0.16085328164143814, 5, 5, | |
519 | 0.94247779607693793 }, | |
520 | { -0.26064303436645381, 5, 5, | |
521 | 1.0995574287564276 }, | |
522 | { -0.36113811790820571, 5, 5, | |
523 | 1.2566370614359172 }, | |
524 | { -0.43625592459446139, 5, 5, | |
525 | 1.4137166941154069 }, | |
526 | { -0.46413220344085809, 5, 5, | |
527 | 1.5707963267948966 }, | |
528 | { -0.43625592459446155, 5, 5, | |
529 | 1.7278759594743860 }, | |
530 | { -0.36113811790820577, 5, 5, | |
531 | 1.8849555921538759 }, | |
532 | { -0.26064303436645386, 5, 5, | |
533 | 2.0420352248333655 }, | |
534 | { -0.16085328164143822, 5, 5, | |
535 | 2.1991148575128552 }, | |
536 | { -0.082047757105021310, 5, 5, | |
537 | 2.3561944901923448 }, | |
538 | { -0.032563803777573910, 5, 5, | |
539 | 2.5132741228718345 }, | |
540 | { -0.0089510818191923004, 5, 5, | |
541 | 2.6703537555513241 }, | |
542 | { -0.0013078367086431812, 5, 5, | |
543 | 2.8274333882308138 }, | |
544 | { -4.3481439097910151e-05, 5, 5, | |
545 | 2.9845130209103035 }, | |
546 | { 0.0000000000000000, 5, 5, | |
547 | 3.1415926535897931 }, | |
548 | }; | |
549 | const double toler010 = 2.5000000000000020e-13; | |
550 | ||
551 | // Test data for l=10, m=0. | |
552 | // max(|f - f_GSL|): 9.9920072216264089e-16 | |
553 | // max(|f - f_GSL| / |f_GSL|): 2.2266594990531305e-15 | |
554 | const testcase_sph_legendre<double> | |
555 | data011[21] = | |
556 | { | |
557 | { 1.2927207364566027, 10, 0, | |
558 | 0.0000000000000000 }, | |
559 | { 0.55288895150522555, 10, 0, | |
560 | 0.15707963267948966 }, | |
561 | { -0.44874428379711545, 10, 0, | |
562 | 0.31415926535897931 }, | |
563 | { -0.25532095827149687, 10, 0, | |
564 | 0.47123889803846897 }, | |
565 | { 0.36625249688013961, 10, 0, | |
566 | 0.62831853071795862 }, | |
567 | { 0.14880806329084206, 10, 0, | |
568 | 0.78539816339744828 }, | |
569 | { -0.33533356797848757, 10, 0, | |
570 | 0.94247779607693793 }, | |
571 | { -0.080639967662335665, 10, 0, | |
572 | 1.0995574287564276 }, | |
573 | { 0.32197986450174521, 10, 0, | |
574 | 1.2566370614359172 }, | |
575 | { 0.025713542103667848, 10, 0, | |
576 | 1.4137166941154069 }, | |
577 | { -0.31813049373736707, 10, 0, | |
578 | 1.5707963267948966 }, | |
579 | { 0.025713542103666699, 10, 0, | |
580 | 1.7278759594743860 }, | |
581 | { 0.32197986450174543, 10, 0, | |
582 | 1.8849555921538759 }, | |
583 | { -0.080639967662335096, 10, 0, | |
584 | 2.0420352248333655 }, | |
585 | { -0.33533356797848757, 10, 0, | |
586 | 2.1991148575128552 }, | |
587 | { 0.14880806329084156, 10, 0, | |
588 | 2.3561944901923448 }, | |
589 | { 0.36625249688013994, 10, 0, | |
590 | 2.5132741228718345 }, | |
591 | { -0.25532095827149576, 10, 0, | |
592 | 2.6703537555513241 }, | |
593 | { -0.44874428379711545, 10, 0, | |
594 | 2.8274333882308138 }, | |
595 | { 0.55288895150522011, 10, 0, | |
596 | 2.9845130209103035 }, | |
597 | { 1.2927207364566027, 10, 0, | |
598 | 3.1415926535897931 }, | |
599 | }; | |
600 | const double toler011 = 2.5000000000000020e-13; | |
601 | ||
602 | // Test data for l=10, m=1. | |
603 | // max(|f - f_GSL|): 1.4432899320127035e-15 | |
604 | // max(|f - f_GSL| / |f_GSL|): 4.9708436073954521e-15 | |
605 | const testcase_sph_legendre<double> | |
606 | data012[21] = | |
607 | { | |
608 | { 0.0000000000000000, 10, 1, | |
609 | 0.0000000000000000 }, | |
610 | { -0.74373723919063894, 10, 1, | |
611 | 0.15707963267948966 }, | |
612 | { -0.29035110456209601, 10, 1, | |
613 | 0.31415926535897931 }, | |
614 | { 0.42219282075271530, 10, 1, | |
615 | 0.47123889803846897 }, | |
616 | { 0.17109256898931269, 10, 1, | |
617 | 0.62831853071795862 }, | |
618 | { -0.35583574648544281, 10, 1, | |
619 | 0.78539816339744828 }, | |
620 | { -0.10089212303543979, 10, 1, | |
621 | 0.94247779607693793 }, | |
622 | { 0.32997652649321085, 10, 1, | |
623 | 1.0995574287564276 }, | |
624 | { 0.047416376890032939, 10, 1, | |
625 | 1.2566370614359172 }, | |
626 | { -0.31999356750295660, 10, 1, | |
627 | 1.4137166941154069 }, | |
628 | { -2.0430664782290766e-16, 10, 1, | |
629 | 1.5707963267948966 }, | |
630 | { 0.31999356750295660, 10, 1, | |
631 | 1.7278759594743860 }, | |
632 | { -0.047416376890032544, 10, 1, | |
633 | 1.8849555921538759 }, | |
634 | { -0.32997652649321091, 10, 1, | |
635 | 2.0420352248333655 }, | |
636 | { 0.10089212303543935, 10, 1, | |
637 | 2.1991148575128552 }, | |
638 | { 0.35583574648544292, 10, 1, | |
639 | 2.3561944901923448 }, | |
640 | { -0.17109256898931161, 10, 1, | |
641 | 2.5132741228718345 }, | |
642 | { -0.42219282075271569, 10, 1, | |
643 | 2.6703537555513241 }, | |
644 | { 0.29035110456209601, 10, 1, | |
645 | 2.8274333882308138 }, | |
646 | { 0.74373723919064050, 10, 1, | |
647 | 2.9845130209103035 }, | |
648 | { 0.0000000000000000, 10, 1, | |
649 | 3.1415926535897931 }, | |
650 | }; | |
651 | const double toler012 = 2.5000000000000020e-13; | |
652 | ||
653 | // Test data for l=10, m=2. | |
654 | // max(|f - f_GSL|): 3.3306690738754696e-16 | |
655 | // max(|f - f_GSL| / |f_GSL|): 3.3968188217108871e-15 | |
656 | const testcase_sph_legendre<double> | |
657 | data013[21] = | |
658 | { | |
659 | { 0.0000000000000000, 10, 2, | |
660 | 0.0000000000000000 }, | |
661 | { 0.34571695599980246, 10, 2, | |
662 | 0.15707963267948966 }, | |
663 | { 0.62485535978198059, 10, 2, | |
664 | 0.31415926535897931 }, | |
665 | { 0.098210039644716252, 10, 2, | |
666 | 0.47123889803846897 }, | |
667 | { -0.41494799233049684, 10, 2, | |
668 | 0.62831853071795862 }, | |
669 | { -0.081698973831472732, 10, 2, | |
670 | 0.78539816339744828 }, | |
671 | { 0.35253132222271277, 10, 2, | |
672 | 0.94247779607693793 }, | |
673 | { 0.049026298555980979, 10, 2, | |
674 | 1.0995574287564276 }, | |
675 | { -0.32791246874130792, 10, 2, | |
676 | 1.2566370614359172 }, | |
677 | { -0.016196782433946885, 10, 2, | |
678 | 1.4137166941154069 }, | |
679 | { 0.32106263400438328, 10, 2, | |
680 | 1.5707963267948966 }, | |
681 | { -0.016196782433945761, 10, 2, | |
682 | 1.7278759594743860 }, | |
683 | { -0.32791246874130803, 10, 2, | |
684 | 1.8849555921538759 }, | |
685 | { 0.049026298555980424, 10, 2, | |
686 | 2.0420352248333655 }, | |
687 | { 0.35253132222271266, 10, 2, | |
688 | 2.1991148575128552 }, | |
689 | { -0.081698973831472121, 10, 2, | |
690 | 2.3561944901923448 }, | |
691 | { -0.41494799233049695, 10, 2, | |
692 | 2.5132741228718345 }, | |
693 | { 0.098210039644715197, 10, 2, | |
694 | 2.6703537555513241 }, | |
695 | { 0.62485535978198059, 10, 2, | |
696 | 2.8274333882308138 }, | |
697 | { 0.34571695599980545, 10, 2, | |
698 | 2.9845130209103035 }, | |
699 | { 0.0000000000000000, 10, 2, | |
700 | 3.1415926535897931 }, | |
701 | }; | |
702 | const double toler013 = 2.5000000000000020e-13; | |
703 | ||
704 | // Test data for l=10, m=5. | |
705 | // max(|f - f_GSL|): 3.6082248300317588e-16 | |
706 | // max(|f - f_GSL| / |f_GSL|): 1.6350423942234514e-15 | |
707 | const testcase_sph_legendre<double> | |
708 | data014[21] = | |
709 | { | |
710 | { 0.0000000000000000, 10, 5, | |
711 | 0.0000000000000000 }, | |
712 | { -0.0030300124052750196, 10, 5, | |
713 | 0.15707963267948966 }, | |
714 | { -0.070348585248056802, 10, 5, | |
715 | 0.31415926535897931 }, | |
716 | { -0.30055029290703639, 10, 5, | |
717 | 0.47123889803846897 }, | |
718 | { -0.49987818144009155, 10, 5, | |
719 | 0.62831853071795862 }, | |
720 | { -0.28108771757150108, 10, 5, | |
721 | 0.78539816339744828 }, | |
722 | { 0.22068081187249292, 10, 5, | |
723 | 0.94247779607693793 }, | |
724 | { 0.33689502212592121, 10, 5, | |
725 | 1.0995574287564276 }, | |
726 | { -0.086095515520764110, 10, 5, | |
727 | 1.2566370614359172 }, | |
728 | { -0.33935827318511558, 10, 5, | |
729 | 1.4137166941154069 }, | |
730 | { -1.9213014340664578e-16, 10, 5, | |
731 | 1.5707963267948966 }, | |
732 | { 0.33935827318511552, 10, 5, | |
733 | 1.7278759594743860 }, | |
734 | { 0.086095515520764512, 10, 5, | |
735 | 1.8849555921538759 }, | |
736 | { -0.33689502212592087, 10, 5, | |
737 | 2.0420352248333655 }, | |
738 | { -0.22068081187249344, 10, 5, | |
739 | 2.1991148575128552 }, | |
740 | { 0.28108771757150064, 10, 5, | |
741 | 2.3561944901923448 }, | |
742 | { 0.49987818144009138, 10, 5, | |
743 | 2.5132741228718345 }, | |
744 | { 0.30055029290703672, 10, 5, | |
745 | 2.6703537555513241 }, | |
746 | { 0.070348585248056802, 10, 5, | |
747 | 2.8274333882308138 }, | |
748 | { 0.0030300124052750873, 10, 5, | |
749 | 2.9845130209103035 }, | |
750 | { 0.0000000000000000, 10, 5, | |
751 | 3.1415926535897931 }, | |
752 | }; | |
753 | const double toler014 = 2.5000000000000020e-13; | |
754 | ||
755 | // Test data for l=10, m=10. | |
756 | // max(|f - f_GSL|): 9.9920072216264089e-16 | |
757 | // max(|f - f_GSL| / |f_GSL|): 1.9163828344752537e-15 | |
758 | const testcase_sph_legendre<double> | |
759 | data015[21] = | |
760 | { | |
761 | { 0.0000000000000000, 10, 10, | |
762 | 0.0000000000000000 }, | |
763 | { 4.7624282733343473e-09, 10, 10, | |
764 | 0.15707963267948966 }, | |
765 | { 4.3085156534549772e-06, 10, 10, | |
766 | 0.31415926535897931 }, | |
767 | { 0.00020182347649472387, 10, 10, | |
768 | 0.47123889803846897 }, | |
769 | { 0.0026711045506511684, 10, 10, | |
770 | 0.62831853071795862 }, | |
771 | { 0.016957196623256909, 10, 10, | |
772 | 0.78539816339744828 }, | |
773 | { 0.065174916004990341, 10, 10, | |
774 | 0.94247779607693793 }, | |
775 | { 0.17112476903017845, 10, 10, | |
776 | 1.0995574287564276 }, | |
777 | { 0.32852414199733554, 10, 10, | |
778 | 1.2566370614359172 }, | |
779 | { 0.47940582314838287, 10, 10, | |
780 | 1.4137166941154069 }, | |
781 | { 0.54263029194422152, 10, 10, | |
782 | 1.5707963267948966 }, | |
783 | { 0.47940582314838309, 10, 10, | |
784 | 1.7278759594743860 }, | |
785 | { 0.32852414199733571, 10, 10, | |
786 | 1.8849555921538759 }, | |
787 | { 0.17112476903017856, 10, 10, | |
788 | 2.0420352248333655 }, | |
789 | { 0.065174916004990410, 10, 10, | |
790 | 2.1991148575128552 }, | |
791 | { 0.016957196623256943, 10, 10, | |
792 | 2.3561944901923448 }, | |
793 | { 0.0026711045506511706, 10, 10, | |
794 | 2.5132741228718345 }, | |
795 | { 0.00020182347649472493, 10, 10, | |
796 | 2.6703537555513241 }, | |
797 | { 4.3085156534549772e-06, 10, 10, | |
798 | 2.8274333882308138 }, | |
799 | { 4.7624282733345673e-09, 10, 10, | |
800 | 2.9845130209103035 }, | |
801 | { 0.0000000000000000, 10, 10, | |
802 | 3.1415926535897931 }, | |
803 | }; | |
804 | const double toler015 = 2.5000000000000020e-13; | |
805 | ||
806 | // Test data for l=20, m=0. | |
807 | // max(|f - f_GSL|): 1.2212453270876722e-15 | |
808 | // max(|f - f_GSL| / |f_GSL|): 2.1900476331757668e-15 | |
809 | const testcase_sph_legendre<double> | |
810 | data016[21] = | |
811 | { | |
812 | { 1.8062879984608917, 20, 0, | |
813 | 0.0000000000000000 }, | |
814 | { -0.58906549291415933, 20, 0, | |
815 | 0.15707963267948966 }, | |
816 | { 0.45624611402342408, 20, 0, | |
817 | 0.31415926535897931 }, | |
818 | { -0.39955402700466724, 20, 0, | |
819 | 0.47123889803846897 }, | |
820 | { 0.36818552901640772, 20, 0, | |
821 | 0.62831853071795862 }, | |
822 | { -0.34873131330857743, 20, 0, | |
823 | 0.78539816339744828 }, | |
824 | { 0.33600882829186507, 20, 0, | |
825 | 0.94247779607693793 }, | |
826 | { -0.32759286308122931, 20, 0, | |
827 | 1.0995574287564276 }, | |
828 | { 0.32222458068091325, 20, 0, | |
829 | 1.2566370614359172 }, | |
830 | { -0.31922731037135965, 20, 0, | |
831 | 1.4137166941154069 }, | |
832 | { 0.31826262039531755, 20, 0, | |
833 | 1.5707963267948966 }, | |
834 | { -0.31922731037135987, 20, 0, | |
835 | 1.7278759594743860 }, | |
836 | { 0.32222458068091342, 20, 0, | |
837 | 1.8849555921538759 }, | |
838 | { -0.32759286308122942, 20, 0, | |
839 | 2.0420352248333655 }, | |
840 | { 0.33600882829186518, 20, 0, | |
841 | 2.1991148575128552 }, | |
842 | { -0.34873131330857782, 20, 0, | |
843 | 2.3561944901923448 }, | |
844 | { 0.36818552901640805, 20, 0, | |
845 | 2.5132741228718345 }, | |
846 | { -0.39955402700466824, 20, 0, | |
847 | 2.6703537555513241 }, | |
848 | { 0.45624611402342408, 20, 0, | |
849 | 2.8274333882308138 }, | |
850 | { -0.58906549291416732, 20, 0, | |
851 | 2.9845130209103035 }, | |
852 | { 1.8062879984608917, 20, 0, | |
853 | 3.1415926535897931 }, | |
854 | }; | |
855 | const double toler016 = 2.5000000000000020e-13; | |
856 | ||
857 | // Test data for l=20, m=1. | |
858 | // max(|f - f_GSL|): 2.8310687127941492e-15 | |
859 | // max(|f - f_GSL| / |f_GSL|): 9.0837292708194213e-15 | |
860 | const testcase_sph_legendre<double> | |
861 | data017[21] = | |
862 | { | |
863 | { 0.0000000000000000, 20, 1, | |
864 | 0.0000000000000000 }, | |
865 | { -0.45905213045060256, 20, 1, | |
866 | 0.15707963267948966 }, | |
867 | { 0.31166370423309253, 20, 1, | |
868 | 0.31415926535897931 }, | |
869 | { -0.23278757741246778, 20, 1, | |
870 | 0.47123889803846897 }, | |
871 | { 0.17937240823504172, 20, 1, | |
872 | 0.62831853071795862 }, | |
873 | { -0.13857299972299839, 20, 1, | |
874 | 0.78539816339744828 }, | |
875 | { 0.10495324841927722, 20, 1, | |
876 | 0.94247779607693793 }, | |
877 | { -0.075707774352163665, 20, 1, | |
878 | 1.0995574287564276 }, | |
879 | { 0.049168697683476224, 20, 1, | |
880 | 1.2566370614359172 }, | |
881 | { -0.024216050551253303, 20, 1, | |
882 | 1.4137166941154069 }, | |
883 | { 3.9938443510694349e-16, 20, 1, | |
884 | 1.5707963267948966 }, | |
885 | { 0.024216050551250919, 20, 1, | |
886 | 1.7278759594743860 }, | |
887 | { -0.049168697683475482, 20, 1, | |
888 | 1.8849555921538759 }, | |
889 | { 0.075707774352163068, 20, 1, | |
890 | 2.0420352248333655 }, | |
891 | { -0.10495324841927638, 20, 1, | |
892 | 2.1991148575128552 }, | |
893 | { 0.13857299972299741, 20, 1, | |
894 | 2.3561944901923448 }, | |
895 | { -0.17937240823503983, 20, 1, | |
896 | 2.5132741228718345 }, | |
897 | { 0.23278757741246703, 20, 1, | |
898 | 2.6703537555513241 }, | |
899 | { -0.31166370423309253, 20, 1, | |
900 | 2.8274333882308138 }, | |
901 | { 0.45905213045059046, 20, 1, | |
902 | 2.9845130209103035 }, | |
903 | { 0.0000000000000000, 20, 1, | |
904 | 3.1415926535897931 }, | |
905 | }; | |
906 | const double toler017 = 5.0000000000000039e-13; | |
907 | ||
908 | // Test data for l=20, m=2. | |
909 | // max(|f - f_GSL|): 2.3314683517128287e-15 | |
910 | // max(|f - f_GSL| / |f_GSL|): 2.6675898738403374e-15 | |
911 | const testcase_sph_legendre<double> | |
912 | data018[21] = | |
913 | { | |
914 | { 0.0000000000000000, 20, 2, | |
915 | 0.0000000000000000 }, | |
916 | { 0.87399805141574394, 20, 2, | |
917 | 0.15707963267948966 }, | |
918 | { -0.55116854080895061, 20, 2, | |
919 | 0.31415926535897931 }, | |
920 | { 0.44520137308557572, 20, 2, | |
921 | 0.47123889803846897 }, | |
922 | { -0.39321637877908228, 20, 2, | |
923 | 0.62831853071795862 }, | |
924 | { 0.36312025711350937, 20, 2, | |
925 | 0.78539816339744828 }, | |
926 | { -0.34427103004873116, 20, 2, | |
927 | 0.94247779607693793 }, | |
928 | { 0.33214917638387642, 20, 2, | |
929 | 1.0995574287564276 }, | |
930 | { -0.32455734448839091, 20, 2, | |
931 | 1.2566370614359172 }, | |
932 | { 0.32036529628513238, 20, 2, | |
933 | 1.4137166941154069 }, | |
934 | { -0.31902310563819986, 20, 2, | |
935 | 1.5707963267948966 }, | |
936 | { 0.32036529628513266, 20, 2, | |
937 | 1.7278759594743860 }, | |
938 | { -0.32455734448839102, 20, 2, | |
939 | 1.8849555921538759 }, | |
940 | { 0.33214917638387659, 20, 2, | |
941 | 2.0420352248333655 }, | |
942 | { -0.34427103004873105, 20, 2, | |
943 | 2.1991148575128552 }, | |
944 | { 0.36312025711350981, 20, 2, | |
945 | 2.3561944901923448 }, | |
946 | { -0.39321637877908278, 20, 2, | |
947 | 2.5132741228718345 }, | |
948 | { 0.44520137308557650, 20, 2, | |
949 | 2.6703537555513241 }, | |
950 | { -0.55116854080895061, 20, 2, | |
951 | 2.8274333882308138 }, | |
952 | { 0.87399805141574527, 20, 2, | |
953 | 2.9845130209103035 }, | |
954 | { 0.0000000000000000, 20, 2, | |
955 | 3.1415926535897931 }, | |
956 | }; | |
957 | const double toler018 = 2.5000000000000020e-13; | |
958 | ||
959 | // Test data for l=20, m=5. | |
960 | // max(|f - f_GSL|): 3.5388358909926865e-16 | |
961 | // max(|f - f_GSL| / |f_GSL|): 1.2458491381272207e-14 | |
962 | const testcase_sph_legendre<double> | |
963 | data019[21] = | |
964 | { | |
965 | { 0.0000000000000000, 20, 5, | |
966 | 0.0000000000000000 }, | |
967 | { -0.10024848623504863, 20, 5, | |
968 | 0.15707963267948966 }, | |
969 | { -0.68115361075940484, 20, 5, | |
970 | 0.31415926535897931 }, | |
971 | { 0.31774532551156298, 20, 5, | |
972 | 0.47123889803846897 }, | |
973 | { -0.16011868165390544, 20, 5, | |
974 | 0.62831853071795862 }, | |
975 | { 0.085844143304115578, 20, 5, | |
976 | 0.78539816339744828 }, | |
977 | { -0.047467540840864568, 20, 5, | |
978 | 0.94247779607693793 }, | |
979 | { 0.026283575189471796, 20, 5, | |
980 | 1.0995574287564276 }, | |
981 | { -0.013891104052597688, 20, 5, | |
982 | 1.2566370614359172 }, | |
983 | { 0.0059873308239496957, 20, 5, | |
984 | 1.4137166941154069 }, | |
985 | { 3.9355286582083095e-16, 20, 5, | |
986 | 1.5707963267948966 }, | |
987 | { -0.0059873308239519014, 20, 5, | |
988 | 1.7278759594743860 }, | |
989 | { 0.013891104052598547, 20, 5, | |
990 | 1.8849555921538759 }, | |
991 | { -0.026283575189472864, 20, 5, | |
992 | 2.0420352248333655 }, | |
993 | { 0.047467540840865928, 20, 5, | |
994 | 2.1991148575128552 }, | |
995 | { -0.085844143304117007, 20, 5, | |
996 | 2.3561944901923448 }, | |
997 | { 0.16011868165390658, 20, 5, | |
998 | 2.5132741228718345 }, | |
999 | { -0.31774532551156381, 20, 5, | |
1000 | 2.6703537555513241 }, | |
1001 | { 0.68115361075940484, 20, 5, | |
1002 | 2.8274333882308138 }, | |
1003 | { 0.10024848623505046, 20, 5, | |
1004 | 2.9845130209103035 }, | |
1005 | { 0.0000000000000000, 20, 5, | |
1006 | 3.1415926535897931 }, | |
1007 | }; | |
1008 | const double toler019 = 1.0000000000000008e-12; | |
1009 | ||
1010 | // Test data for l=20, m=10. | |
1011 | // max(|f - f_GSL|): 1.6653345369377348e-15 | |
1012 | // max(|f - f_GSL| / |f_GSL|): 2.0744116940226714e-14 | |
1013 | const testcase_sph_legendre<double> | |
1014 | data020[21] = | |
1015 | { | |
1016 | { 0.0000000000000000, 20, 10, | |
1017 | 0.0000000000000000 }, | |
1018 | { 3.0595797603706485e-05, 20, 10, | |
1019 | 0.15707963267948966 }, | |
1020 | { 0.015924453916397002, 20, 10, | |
1021 | 0.31415926535897931 }, | |
1022 | { 0.26588079118745744, 20, 10, | |
1023 | 0.47123889803846897 }, | |
1024 | { 0.54045081420686869, 20, 10, | |
1025 | 0.62831853071795862 }, | |
1026 | { -0.28215279394285531, 20, 10, | |
1027 | 0.78539816339744828 }, | |
1028 | { 0.0085297337582245884, 20, 10, | |
1029 | 0.94247779607693793 }, | |
1030 | { 0.16930127953533738, 20, 10, | |
1031 | 1.0995574287564276 }, | |
1032 | { -0.27215134048018325, 20, 10, | |
1033 | 1.2566370614359172 }, | |
1034 | { 0.32456597088029526, 20, 10, | |
1035 | 1.4137166941154069 }, | |
1036 | { -0.34057893241353715, 20, 10, | |
1037 | 1.5707963267948966 }, | |
1038 | { 0.32456597088029449, 20, 10, | |
1039 | 1.7278759594743860 }, | |
1040 | { -0.27215134048018291, 20, 10, | |
1041 | 1.8849555921538759 }, | |
1042 | { 0.16930127953533675, 20, 10, | |
1043 | 2.0420352248333655 }, | |
1044 | { 0.0085297337582257438, 20, 10, | |
1045 | 2.1991148575128552 }, | |
1046 | { -0.28215279394285619, 20, 10, | |
1047 | 2.3561944901923448 }, | |
1048 | { 0.54045081420686736, 20, 10, | |
1049 | 2.5132741228718345 }, | |
1050 | { 0.26588079118745828, 20, 10, | |
1051 | 2.6703537555513241 }, | |
1052 | { 0.015924453916397002, 20, 10, | |
1053 | 2.8274333882308138 }, | |
1054 | { 3.0595797603707888e-05, 20, 10, | |
1055 | 2.9845130209103035 }, | |
1056 | { 0.0000000000000000, 20, 10, | |
1057 | 3.1415926535897931 }, | |
1058 | }; | |
1059 | const double toler020 = 2.5000000000000015e-12; | |
1060 | ||
1061 | // Test data for l=20, m=20. | |
1062 | // max(|f - f_GSL|): 3.3306690738754696e-16 | |
1063 | // max(|f - f_GSL| / |f_GSL|): 8.6795105199201385e-16 | |
1064 | const testcase_sph_legendre<double> | |
1065 | data021[21] = | |
1066 | { | |
1067 | { 0.0000000000000000, 20, 20, | |
1068 | 0.0000000000000000 }, | |
1069 | { 4.9264471419246231e-17, 20, 20, | |
1070 | 0.15707963267948966 }, | |
1071 | { 4.0321091681531780e-11, 20, 20, | |
1072 | 0.31415926535897931 }, | |
1073 | { 8.8474944184471664e-08, 20, 20, | |
1074 | 0.47123889803846897 }, | |
1075 | { 1.5497395129387764e-05, 20, 20, | |
1076 | 0.62831853071795862 }, | |
1077 | { 0.00062457564282984495, 20, 20, | |
1078 | 0.78539816339744828 }, | |
1079 | { 0.0092265192458967568, 20, 20, | |
1080 | 0.94247779607693793 }, | |
1081 | { 0.063606673236323297, 20, 20, | |
1082 | 1.0995574287564276 }, | |
1083 | { 0.23442909509776316, 20, 20, | |
1084 | 1.2566370614359172 }, | |
1085 | { 0.49921030481087009, 20, 20, | |
1086 | 1.4137166941154069 }, | |
1087 | { 0.63956545825776223, 20, 20, | |
1088 | 1.5707963267948966 }, | |
1089 | { 0.49921030481087064, 20, 20, | |
1090 | 1.7278759594743860 }, | |
1091 | { 0.23442909509776336, 20, 20, | |
1092 | 1.8849555921538759 }, | |
1093 | { 0.063606673236323380, 20, 20, | |
1094 | 2.0420352248333655 }, | |
1095 | { 0.0092265192458967742, 20, 20, | |
1096 | 2.1991148575128552 }, | |
1097 | { 0.00062457564282984766, 20, 20, | |
1098 | 2.3561944901923448 }, | |
1099 | { 1.5497395129387791e-05, 20, 20, | |
1100 | 2.5132741228718345 }, | |
1101 | { 8.8474944184472617e-08, 20, 20, | |
1102 | 2.6703537555513241 }, | |
1103 | { 4.0321091681531780e-11, 20, 20, | |
1104 | 2.8274333882308138 }, | |
1105 | { 4.9264471419250786e-17, 20, 20, | |
1106 | 2.9845130209103035 }, | |
1107 | { 0.0000000000000000, 20, 20, | |
1108 | 3.1415926535897931 }, | |
1109 | }; | |
1110 | const double toler021 = 2.5000000000000020e-13; | |
1111 | ||
1112 | // Test data for l=50, m=0. | |
1113 | // max(|f - f_GSL|): 4.8849813083506888e-15 | |
1114 | // max(|f - f_GSL| / |f_GSL|): 9.2046020313085697e-15 | |
1115 | const testcase_sph_legendre<double> | |
1116 | data022[21] = | |
1117 | { | |
1118 | { 2.8350175706934717, 50, 0, | |
1119 | 0.0000000000000000 }, | |
1120 | { 0.53157537495174900, 50, 0, | |
1121 | 0.15707963267948966 }, | |
1122 | { -0.46056183476301255, 50, 0, | |
1123 | 0.31415926535897931 }, | |
1124 | { -0.24876032079677909, 50, 0, | |
1125 | 0.47123889803846897 }, | |
1126 | { 0.36926172901532522, 50, 0, | |
1127 | 0.62831853071795862 }, | |
1128 | { 0.14571730283563575, 50, 0, | |
1129 | 0.78539816339744828 }, | |
1130 | { -0.33636199170850806, 50, 0, | |
1131 | 0.94247779607693793 }, | |
1132 | { -0.079132716267091507, 50, 0, | |
1133 | 1.0995574287564276 }, | |
1134 | { 0.32232921941301451, 50, 0, | |
1135 | 1.2566370614359172 }, | |
1136 | { 0.025253991969481544, 50, 0, | |
1137 | 1.4137166941154069 }, | |
1138 | { -0.31830208724152359, 50, 0, | |
1139 | 1.5707963267948966 }, | |
1140 | { 0.025253991969476332, 50, 0, | |
1141 | 1.7278759594743860 }, | |
1142 | { 0.32232921941301479, 50, 0, | |
1143 | 1.8849555921538759 }, | |
1144 | { -0.079132716267088510, 50, 0, | |
1145 | 2.0420352248333655 }, | |
1146 | { -0.33636199170850883, 50, 0, | |
1147 | 2.1991148575128552 }, | |
1148 | { 0.14571730283563347, 50, 0, | |
1149 | 2.3561944901923448 }, | |
1150 | { 0.36926172901532667, 50, 0, | |
1151 | 2.5132741228718345 }, | |
1152 | { -0.24876032079677354, 50, 0, | |
1153 | 2.6703537555513241 }, | |
1154 | { -0.46056183476301255, 50, 0, | |
1155 | 2.8274333882308138 }, | |
1156 | { 0.53157537495172758, 50, 0, | |
1157 | 2.9845130209103035 }, | |
1158 | { 2.8350175706934717, 50, 0, | |
1159 | 3.1415926535897931 }, | |
1160 | }; | |
1161 | const double toler022 = 5.0000000000000039e-13; | |
1162 | ||
1163 | // Test data for l=50, m=1. | |
1164 | // max(|f - f_GSL|): 4.2743586448068527e-15 | |
1165 | // max(|f - f_GSL| / |f_GSL|): 1.3104848798660735e-14 | |
1166 | const testcase_sph_legendre<double> | |
1167 | data023[21] = | |
1168 | { | |
1169 | { 0.0000000000000000, 50, 1, | |
1170 | 0.0000000000000000 }, | |
1171 | { -0.63751752155226260, 50, 1, | |
1172 | 0.15707963267948966 }, | |
1173 | { -0.32616619317604606, 50, 1, | |
1174 | 0.31415926535897931 }, | |
1175 | { 0.40649930826162850, 50, 1, | |
1176 | 0.47123889803846897 }, | |
1177 | { 0.18473991408344057, 50, 1, | |
1178 | 0.62831853071795862 }, | |
1179 | { -0.35083930302013117, 50, 1, | |
1180 | 0.78539816339744828 }, | |
1181 | { -0.10755382110947125, 50, 1, | |
1182 | 0.94247779607693793 }, | |
1183 | { 0.32822568316499900, 50, 1, | |
1184 | 1.0995574287564276 }, | |
1185 | { 0.050286056609797389, 50, 1, | |
1186 | 1.2566370614359172 }, | |
1187 | { -0.31935368562159644, 50, 1, | |
1188 | 1.4137166941154069 }, | |
1189 | { -9.8421602686195941e-16, 50, 1, | |
1190 | 1.5707963267948966 }, | |
1191 | { 0.31935368562159716, 50, 1, | |
1192 | 1.7278759594743860 }, | |
1193 | { -0.050286056609795446, 50, 1, | |
1194 | 1.8849555921538759 }, | |
1195 | { -0.32822568316499912, 50, 1, | |
1196 | 2.0420352248333655 }, | |
1197 | { 0.10755382110946902, 50, 1, | |
1198 | 2.1991148575128552 }, | |
1199 | { 0.35083930302013205, 50, 1, | |
1200 | 2.3561944901923448 }, | |
1201 | { -0.18473991408343635, 50, 1, | |
1202 | 2.5132741228718345 }, | |
1203 | { -0.40649930826163011, 50, 1, | |
1204 | 2.6703537555513241 }, | |
1205 | { 0.32616619317604606, 50, 1, | |
1206 | 2.8274333882308138 }, | |
1207 | { 0.63751752155228247, 50, 1, | |
1208 | 2.9845130209103035 }, | |
1209 | { 0.0000000000000000, 50, 1, | |
1210 | 3.1415926535897931 }, | |
1211 | }; | |
1212 | const double toler023 = 1.0000000000000008e-12; | |
1213 | ||
1214 | // Test data for l=50, m=2. | |
1215 | // max(|f - f_GSL|): 7.5495165674510645e-15 | |
1216 | // max(|f - f_GSL| / |f_GSL|): 2.0277903864891892e-14 | |
1217 | const testcase_sph_legendre<double> | |
1218 | data024[21] = | |
1219 | { | |
1220 | { 0.0000000000000000, 50, 2, | |
1221 | 0.0000000000000000 }, | |
1222 | { -0.37230261163838724, 50, 2, | |
1223 | 0.15707963267948966 }, | |
1224 | { 0.50051599680316194, 50, 2, | |
1225 | 0.31415926535897931 }, | |
1226 | { 0.21724795180329495, 50, 2, | |
1227 | 0.47123889803846897 }, | |
1228 | { -0.37948127307610924, 50, 2, | |
1229 | 0.62831853071795862 }, | |
1230 | { -0.13187372121003396, 50, 2, | |
1231 | 0.78539816339744828 }, | |
1232 | { 0.33959009162400228, 50, 2, | |
1233 | 0.94247779607693793 }, | |
1234 | { 0.072537503112489563, 50, 2, | |
1235 | 1.0995574287564276 }, | |
1236 | { -0.32310306941855266, 50, 2, | |
1237 | 1.2566370614359172 }, | |
1238 | { -0.023259822816436588, 50, 2, | |
1239 | 1.4137166941154069 }, | |
1240 | { 0.31842698506357275, 50, 2, | |
1241 | 1.5707963267948966 }, | |
1242 | { -0.023259822816431196, 50, 2, | |
1243 | 1.7278759594743860 }, | |
1244 | { -0.32310306941855316, 50, 2, | |
1245 | 1.8849555921538759 }, | |
1246 | { 0.072537503112487453, 50, 2, | |
1247 | 2.0420352248333655 }, | |
1248 | { 0.33959009162400267, 50, 2, | |
1249 | 2.1991148575128552 }, | |
1250 | { -0.13187372121003124, 50, 2, | |
1251 | 2.3561944901923448 }, | |
1252 | { -0.37948127307611107, 50, 2, | |
1253 | 2.5132741228718345 }, | |
1254 | { 0.21724795180329090, 50, 2, | |
1255 | 2.6703537555513241 }, | |
1256 | { 0.50051599680316194, 50, 2, | |
1257 | 2.8274333882308138 }, | |
1258 | { -0.37230261163837081, 50, 2, | |
1259 | 2.9845130209103035 }, | |
1260 | { 0.0000000000000000, 50, 2, | |
1261 | 3.1415926535897931 }, | |
1262 | }; | |
1263 | const double toler024 = 2.5000000000000015e-12; | |
1264 | ||
1265 | // Test data for l=50, m=5. | |
1266 | // max(|f - f_GSL|): 4.3021142204224816e-16 | |
1267 | // max(|f - f_GSL| / |f_GSL|): 8.9548506383410822e-15 | |
1268 | const testcase_sph_legendre<double> | |
1269 | data025[21] = | |
1270 | { | |
1271 | { 0.0000000000000000, 50, 5, | |
1272 | 0.0000000000000000 }, | |
1273 | { -0.57750385903193124, 50, 5, | |
1274 | 0.15707963267948966 }, | |
1275 | { 0.077360497065588632, 50, 5, | |
1276 | 0.31415926535897931 }, | |
1277 | { 0.47707267400540226, 50, 5, | |
1278 | 0.47123889803846897 }, | |
1279 | { 0.055370615126630517, 50, 5, | |
1280 | 0.62831853071795862 }, | |
1281 | { -0.37629451847202833, 50, 5, | |
1282 | 0.78539816339744828 }, | |
1283 | { -0.048042277801960784, 50, 5, | |
1284 | 0.94247779607693793 }, | |
1285 | { 0.33619379362228718, 50, 5, | |
1286 | 1.0995574287564276 }, | |
1287 | { 0.025265227185718764, 50, 5, | |
1288 | 1.2566370614359172 }, | |
1289 | { -0.32083679430964535, 50, 5, | |
1290 | 1.4137166941154069 }, | |
1291 | { -9.8189201019751884e-16, 50, 5, | |
1292 | 1.5707963267948966 }, | |
1293 | { 0.32083679430964579, 50, 5, | |
1294 | 1.7278759594743860 }, | |
1295 | { -0.025265227185716790, 50, 5, | |
1296 | 1.8849555921538759 }, | |
1297 | { -0.33619379362228752, 50, 5, | |
1298 | 2.0420352248333655 }, | |
1299 | { 0.048042277801958064, 50, 5, | |
1300 | 2.1991148575128552 }, | |
1301 | { 0.37629451847202872, 50, 5, | |
1302 | 2.3561944901923448 }, | |
1303 | { -0.055370615126626811, 50, 5, | |
1304 | 2.5132741228718345 }, | |
1305 | { -0.47707267400540176, 50, 5, | |
1306 | 2.6703537555513241 }, | |
1307 | { -0.077360497065588632, 50, 5, | |
1308 | 2.8274333882308138 }, | |
1309 | { 0.57750385903191603, 50, 5, | |
1310 | 2.9845130209103035 }, | |
1311 | { 0.0000000000000000, 50, 5, | |
1312 | 3.1415926535897931 }, | |
1313 | }; | |
1314 | const double toler025 = 5.0000000000000039e-13; | |
1315 | ||
1316 | // Test data for l=50, m=10. | |
1317 | // max(|f - f_GSL|): 1.3322676295501878e-15 | |
1318 | // max(|f - f_GSL| / |f_GSL|): 6.0812430149180488e-15 | |
1319 | const testcase_sph_legendre<double> | |
1320 | data026[21] = | |
1321 | { | |
1322 | { 0.0000000000000000, 50, 10, | |
1323 | 0.0000000000000000 }, | |
1324 | { 0.15606941844800776, 50, 10, | |
1325 | 0.15707963267948966 }, | |
1326 | { -0.53748868836814501, 50, 10, | |
1327 | 0.31415926535897931 }, | |
1328 | { -0.49304919025183969, 50, 10, | |
1329 | 0.47123889803846897 }, | |
1330 | { -0.26267582750428364, 50, 10, | |
1331 | 0.62831853071795862 }, | |
1332 | { 0.22058983666314153, 50, 10, | |
1333 | 0.78539816339744828 }, | |
1334 | { 0.32936725160671754, 50, 10, | |
1335 | 0.94247779607693793 }, | |
1336 | { -0.092053311559447959, 50, 10, | |
1337 | 1.0995574287564276 }, | |
1338 | { -0.32542913495935522, 50, 10, | |
1339 | 1.2566370614359172 }, | |
1340 | { 0.025673223789103351, 50, 10, | |
1341 | 1.4137166941154069 }, | |
1342 | { 0.32150019350255743, 50, 10, | |
1343 | 1.5707963267948966 }, | |
1344 | { 0.025673223789108836, 50, 10, | |
1345 | 1.7278759594743860 }, | |
1346 | { -0.32542913495935510, 50, 10, | |
1347 | 1.8849555921538759 }, | |
1348 | { -0.092053311559449819, 50, 10, | |
1349 | 2.0420352248333655 }, | |
1350 | { 0.32936725160671687, 50, 10, | |
1351 | 2.1991148575128552 }, | |
1352 | { 0.22058983666314380, 50, 10, | |
1353 | 2.3561944901923448 }, | |
1354 | { -0.26267582750427920, 50, 10, | |
1355 | 2.5132741228718345 }, | |
1356 | { -0.49304919025184135, 50, 10, | |
1357 | 2.6703537555513241 }, | |
1358 | { -0.53748868836814501, 50, 10, | |
1359 | 2.8274333882308138 }, | |
1360 | { 0.15606941844801256, 50, 10, | |
1361 | 2.9845130209103035 }, | |
1362 | { 0.0000000000000000, 50, 10, | |
1363 | 3.1415926535897931 }, | |
1364 | }; | |
1365 | const double toler026 = 5.0000000000000039e-13; | |
1366 | ||
1367 | // Test data for l=50, m=20. | |
1368 | // max(|f - f_GSL|): 4.4408920985006262e-16 | |
1369 | // max(|f - f_GSL| / |f_GSL|): 6.0930911637998029e-15 | |
1370 | const testcase_sph_legendre<double> | |
1371 | data027[21] = | |
1372 | { | |
1373 | { 0.0000000000000000, 50, 20, | |
1374 | 0.0000000000000000 }, | |
1375 | { 3.0409598712833246e-07, 50, 20, | |
1376 | 0.15707963267948966 }, | |
1377 | { 0.030940518122882274, 50, 20, | |
1378 | 0.31415926535897931 }, | |
1379 | { 0.64134588721659802, 50, 20, | |
1380 | 0.47123889803846897 }, | |
1381 | { 0.29895244392136405, 50, 20, | |
1382 | 0.62831853071795862 }, | |
1383 | { 0.25309324781873871, 50, 20, | |
1384 | 0.78539816339744828 }, | |
1385 | { 0.34368634714931717, 50, 20, | |
1386 | 0.94247779607693793 }, | |
1387 | { 0.33996764360663945, 50, 20, | |
1388 | 1.0995574287564276 }, | |
1389 | { 0.12866267745104024, 50, 20, | |
1390 | 1.2566370614359172 }, | |
1391 | { -0.18201114398922874, 50, 20, | |
1392 | 1.4137166941154069 }, | |
1393 | { -0.33216683431510857, 50, 20, | |
1394 | 1.5707963267948966 }, | |
1395 | { -0.18201114398923302, 50, 20, | |
1396 | 1.7278759594743860 }, | |
1397 | { 0.12866267745103857, 50, 20, | |
1398 | 1.8849555921538759 }, | |
1399 | { 0.33996764360663895, 50, 20, | |
1400 | 2.0420352248333655 }, | |
1401 | { 0.34368634714931812, 50, 20, | |
1402 | 2.1991148575128552 }, | |
1403 | { 0.25309324781874126, 50, 20, | |
1404 | 2.3561944901923448 }, | |
1405 | { 0.29895244392136594, 50, 20, | |
1406 | 2.5132741228718345 }, | |
1407 | { 0.64134588721659869, 50, 20, | |
1408 | 2.6703537555513241 }, | |
1409 | { 0.030940518122882274, 50, 20, | |
1410 | 2.8274333882308138 }, | |
1411 | { 3.0409598712835887e-07, 50, 20, | |
1412 | 2.9845130209103035 }, | |
1413 | { 0.0000000000000000, 50, 20, | |
1414 | 3.1415926535897931 }, | |
1415 | }; | |
1416 | const double toler027 = 5.0000000000000039e-13; | |
1417 | ||
1418 | // Test data for l=50, m=50. | |
1419 | // max(|f - f_GSL|): 1.2323475573339238e-14 | |
1420 | // max(|f - f_GSL| / |f_GSL|): 1.6099735616249234e-14 | |
1421 | const testcase_sph_legendre<double> | |
1422 | data028[21] = | |
1423 | { | |
1424 | { 0.0000000000000000, 50, 50, | |
1425 | 0.0000000000000000 }, | |
1426 | { 4.1649039898151844e-41, 50, 50, | |
1427 | 0.15707963267948966 }, | |
1428 | { 2.5240684647724192e-26, 50, 50, | |
1429 | 0.31415926535897931 }, | |
1430 | { 5.6927376423967334e-18, 50, 50, | |
1431 | 0.47123889803846897 }, | |
1432 | { 2.3116239814797057e-12, 50, 50, | |
1433 | 0.62831853071795862 }, | |
1434 | { 2.3835981241325056e-08, 50, 50, | |
1435 | 0.78539816339744828 }, | |
1436 | { 1.9992410287270356e-05, 50, 50, | |
1437 | 0.94247779607693793 }, | |
1438 | { 0.0024947505670829834, 50, 50, | |
1439 | 1.0995574287564276 }, | |
1440 | { 0.065057774647971231, 50, 50, | |
1441 | 1.2566370614359172 }, | |
1442 | { 0.43050607056732243, 50, 50, | |
1443 | 1.4137166941154069 }, | |
1444 | { 0.79980281171531975, 50, 50, | |
1445 | 1.5707963267948966 }, | |
1446 | { 0.43050607056732360, 50, 50, | |
1447 | 1.7278759594743860 }, | |
1448 | { 0.065057774647971398, 50, 50, | |
1449 | 1.8849555921538759 }, | |
1450 | { 0.0024947505670829899, 50, 50, | |
1451 | 2.0420352248333655 }, | |
1452 | { 1.9992410287270427e-05, 50, 50, | |
1453 | 2.1991148575128552 }, | |
1454 | { 2.3835981241325311e-08, 50, 50, | |
1455 | 2.3561944901923448 }, | |
1456 | { 2.3116239814797222e-12, 50, 50, | |
1457 | 2.5132741228718345 }, | |
1458 | { 5.6927376423968952e-18, 50, 50, | |
1459 | 2.6703537555513241 }, | |
1460 | { 2.5240684647724192e-26, 50, 50, | |
1461 | 2.8274333882308138 }, | |
1462 | { 4.1649039898161316e-41, 50, 50, | |
1463 | 2.9845130209103035 }, | |
1464 | { 0.0000000000000000, 50, 50, | |
1465 | 3.1415926535897931 }, | |
1466 | }; | |
1467 | const double toler028 = 1.0000000000000008e-12; | |
1468 | ||
1469 | // Test data for l=100, m=0. | |
1470 | // max(|f - f_GSL|): 7.5495165674510645e-15 | |
1471 | // max(|f - f_GSL| / |f_GSL|): 1.2423065089723510e-14 | |
1472 | const testcase_sph_legendre<double> | |
1473 | data029[21] = | |
1474 | { | |
1475 | { 3.9993839251484076, 100, 0, | |
1476 | 0.0000000000000000 }, | |
1477 | { -0.60770160285935426, 100, 0, | |
1478 | 0.15707963267948966 }, | |
1479 | { 0.46193027883955923, 100, 0, | |
1480 | 0.31415926535897931 }, | |
1481 | { -0.40218718869815234, 100, 0, | |
1482 | 0.47123889803846897 }, | |
1483 | { 0.36960201406910725, 100, 0, | |
1484 | 0.62831853071795862 }, | |
1485 | { -0.34953726547378389, 100, 0, | |
1486 | 0.78539816339744828 }, | |
1487 | { 0.33646959352497829, 100, 0, | |
1488 | 0.94247779607693793 }, | |
1489 | { -0.32784733067663224, 100, 0, | |
1490 | 1.0995574287564276 }, | |
1491 | { 0.32235624474047969, 100, 0, | |
1492 | 1.2566370614359172 }, | |
1493 | { -0.31929330706601350, 100, 0, | |
1494 | 1.4137166941154069 }, | |
1495 | { 0.31830791662110325, 100, 0, | |
1496 | 1.5707963267948966 }, | |
1497 | { -0.31929330706601405, 100, 0, | |
1498 | 1.7278759594743860 }, | |
1499 | { 0.32235624474048036, 100, 0, | |
1500 | 1.8849555921538759 }, | |
1501 | { -0.32784733067663357, 100, 0, | |
1502 | 2.0420352248333655 }, | |
1503 | { 0.33646959352498013, 100, 0, | |
1504 | 2.1991148575128552 }, | |
1505 | { -0.34953726547378589, 100, 0, | |
1506 | 2.3561944901923448 }, | |
1507 | { 0.36960201406911097, 100, 0, | |
1508 | 2.5132741228718345 }, | |
1509 | { -0.40218718869815723, 100, 0, | |
1510 | 2.6703537555513241 }, | |
1511 | { 0.46193027883955923, 100, 0, | |
1512 | 2.8274333882308138 }, | |
1513 | { -0.60770160285939456, 100, 0, | |
1514 | 2.9845130209103035 }, | |
1515 | { 3.9993839251484076, 100, 0, | |
1516 | 3.1415926535897931 }, | |
1517 | }; | |
1518 | const double toler029 = 1.0000000000000008e-12; | |
1519 | ||
1520 | // Test data for l=100, m=1. | |
1521 | // max(|f - f_GSL|): 4.1078251911130792e-15 | |
1522 | // max(|f - f_GSL| / |f_GSL|): 1.5162419336330716e-14 | |
1523 | const testcase_sph_legendre<double> | |
1524 | data030[21] = | |
1525 | { | |
1526 | { 0.0000000000000000, 100, 1, | |
1527 | 0.0000000000000000 }, | |
1528 | { -0.50851949013719866, 100, 1, | |
1529 | 0.15707963267948966 }, | |
1530 | { 0.33129641402221749, 100, 1, | |
1531 | 0.31415926535897931 }, | |
1532 | { -0.24390405750942512, 100, 1, | |
1533 | 0.47123889803846897 }, | |
1534 | { 0.18659755088414104, 100, 1, | |
1535 | 0.62831853071795862 }, | |
1536 | { -0.14355908970517178, 100, 1, | |
1537 | 0.78539816339744828 }, | |
1538 | { 0.10844906813251107, 100, 1, | |
1539 | 0.94247779607693793 }, | |
1540 | { -0.078100088690857675, 100, 1, | |
1541 | 1.0995574287564276 }, | |
1542 | { 0.050670002998302717, 100, 1, | |
1543 | 1.2566370614359172 }, | |
1544 | { -0.024941251747138900, 100, 1, | |
1545 | 1.4137166941154069 }, | |
1546 | { 1.9587949830851623e-15, 100, 1, | |
1547 | 1.5707963267948966 }, | |
1548 | { 0.024941251747127875, 100, 1, | |
1549 | 1.7278759594743860 }, | |
1550 | { -0.050670002998298824, 100, 1, | |
1551 | 1.8849555921538759 }, | |
1552 | { 0.078100088690853664, 100, 1, | |
1553 | 2.0420352248333655 }, | |
1554 | { -0.10844906813250622, 100, 1, | |
1555 | 2.1991148575128552 }, | |
1556 | { 0.14355908970516626, 100, 1, | |
1557 | 2.3561944901923448 }, | |
1558 | { -0.18659755088413388, 100, 1, | |
1559 | 2.5132741228718345 }, | |
1560 | { 0.24390405750941679, 100, 1, | |
1561 | 2.6703537555513241 }, | |
1562 | { -0.33129641402221749, 100, 1, | |
1563 | 2.8274333882308138 }, | |
1564 | { 0.50851949013714159, 100, 1, | |
1565 | 2.9845130209103035 }, | |
1566 | { 0.0000000000000000, 100, 1, | |
1567 | 3.1415926535897931 }, | |
1568 | }; | |
1569 | const double toler030 = 1.0000000000000008e-12; | |
1570 | ||
1571 | // Test data for l=100, m=2. | |
1572 | // max(|f - f_GSL|): 2.7755575615628914e-15 | |
1573 | // max(|f - f_GSL| / |f_GSL|): 5.7552022268705475e-15 | |
1574 | const testcase_sph_legendre<double> | |
1575 | data031[21] = | |
1576 | { | |
1577 | { 0.0000000000000000, 100, 2, | |
1578 | 0.0000000000000000 }, | |
1579 | { 0.67166274297193962, 100, 2, | |
1580 | 0.15707963267948966 }, | |
1581 | { -0.48226933687995360, 100, 2, | |
1582 | 0.31415926535897931 }, | |
1583 | { 0.41175421895715525, 100, 2, | |
1584 | 0.47123889803846897 }, | |
1585 | { -0.37475021787822438, 100, 2, | |
1586 | 0.62831853071795862 }, | |
1587 | { 0.35242909383605225, 100, 2, | |
1588 | 0.78539816339744828 }, | |
1589 | { -0.33807110409160063, 100, 2, | |
1590 | 0.94247779607693793 }, | |
1591 | { 0.32867180390710077, 100, 2, | |
1592 | 1.0995574287564276 }, | |
1593 | { -0.32271583790278502, 100, 2, | |
1594 | 1.2566370614359172 }, | |
1595 | { 0.31940354677687444, 100, 2, | |
1596 | 1.4137166941154069 }, | |
1597 | { -0.31833943693772526, 100, 2, | |
1598 | 1.5707963267948966 }, | |
1599 | { 0.31940354677687555, 100, 2, | |
1600 | 1.7278759594743860 }, | |
1601 | { -0.32271583790278552, 100, 2, | |
1602 | 1.8849555921538759 }, | |
1603 | { 0.32867180390710193, 100, 2, | |
1604 | 2.0420352248333655 }, | |
1605 | { -0.33807110409160157, 100, 2, | |
1606 | 2.1991148575128552 }, | |
1607 | { 0.35242909383605503, 100, 2, | |
1608 | 2.3561944901923448 }, | |
1609 | { -0.37475021787822776, 100, 2, | |
1610 | 2.5132741228718345 }, | |
1611 | { 0.41175421895716052, 100, 2, | |
1612 | 2.6703537555513241 }, | |
1613 | { -0.48226933687995360, 100, 2, | |
1614 | 2.8274333882308138 }, | |
1615 | { 0.67166274297196660, 100, 2, | |
1616 | 2.9845130209103035 }, | |
1617 | { 0.0000000000000000, 100, 2, | |
1618 | 3.1415926535897931 }, | |
1619 | }; | |
1620 | const double toler031 = 5.0000000000000039e-13; | |
1621 | ||
1622 | // Test data for l=100, m=5. | |
1623 | // max(|f - f_GSL|): 5.9674487573602164e-16 | |
1624 | // max(|f - f_GSL| / |f_GSL|): 8.4413588189215985e-15 | |
1625 | const testcase_sph_legendre<double> | |
1626 | data032[21] = | |
1627 | { | |
1628 | { 0.0000000000000000, 100, 5, | |
1629 | 0.0000000000000000 }, | |
1630 | { 0.062564361105902272, 100, 5, | |
1631 | 0.15707963267948966 }, | |
1632 | { 0.14179554455879767, 100, 5, | |
1633 | 0.31415926535897931 }, | |
1634 | { -0.14356866942905960, 100, 5, | |
1635 | 0.47123889803846897 }, | |
1636 | { 0.12355483388448550, 100, 5, | |
1637 | 0.62831853071795862 }, | |
1638 | { -0.10090029999681642, 100, 5, | |
1639 | 0.78539816339744828 }, | |
1640 | { 0.078905134460230675, 100, 5, | |
1641 | 0.94247779607693793 }, | |
1642 | { -0.058040182398185071, 100, 5, | |
1643 | 1.0995574287564276 }, | |
1644 | { 0.038142759389482424, 100, 5, | |
1645 | 1.2566370614359172 }, | |
1646 | { -0.018906264170660478, 100, 5, | |
1647 | 1.4137166941154069 }, | |
1648 | { 1.9576303042914544e-15, 100, 5, | |
1649 | 1.5707963267948966 }, | |
1650 | { 0.018906264170649455, 100, 5, | |
1651 | 1.7278759594743860 }, | |
1652 | { -0.038142759389478365, 100, 5, | |
1653 | 1.8849555921538759 }, | |
1654 | { 0.058040182398180429, 100, 5, | |
1655 | 2.0420352248333655 }, | |
1656 | { -0.078905134460225707, 100, 5, | |
1657 | 2.1991148575128552 }, | |
1658 | { 0.10090029999681013, 100, 5, | |
1659 | 2.3561944901923448 }, | |
1660 | { -0.12355483388447824, 100, 5, | |
1661 | 2.5132741228718345 }, | |
1662 | { 0.14356866942904906, 100, 5, | |
1663 | 2.6703537555513241 }, | |
1664 | { -0.14179554455879767, 100, 5, | |
1665 | 2.8274333882308138 }, | |
1666 | { -0.062564361105954577, 100, 5, | |
1667 | 2.9845130209103035 }, | |
1668 | { 0.0000000000000000, 100, 5, | |
1669 | 3.1415926535897931 }, | |
1670 | }; | |
1671 | const double toler032 = 5.0000000000000039e-13; | |
1672 | ||
1673 | // Test data for l=100, m=10. | |
1674 | // max(|f - f_GSL|): 1.7763568394002505e-15 | |
1675 | // max(|f - f_GSL| / |f_GSL|): 4.0853922061744651e-15 | |
1676 | const testcase_sph_legendre<double> | |
1677 | data033[21] = | |
1678 | { | |
1679 | { 0.0000000000000000, 100, 10, | |
1680 | 0.0000000000000000 }, | |
1681 | { -0.75366545187996004, 100, 10, | |
1682 | 0.15707963267948966 }, | |
1683 | { -0.35914570017276798, 100, 10, | |
1684 | 0.31415926535897931 }, | |
1685 | { 0.43480692911578295, 100, 10, | |
1686 | 0.47123889803846897 }, | |
1687 | { -0.40862111080315755, 100, 10, | |
1688 | 0.62831853071795862 }, | |
1689 | { 0.37832688692909411, 100, 10, | |
1690 | 0.78539816339744828 }, | |
1691 | { -0.35484056194773445, 100, 10, | |
1692 | 0.94247779607693793 }, | |
1693 | { 0.33821981171196341, 100, 10, | |
1694 | 1.0995574287564276 }, | |
1695 | { -0.32729120767830594, 100, 10, | |
1696 | 1.2566370614359172 }, | |
1697 | { 0.32110336937091438, 100, 10, | |
1698 | 1.4137166941154069 }, | |
1699 | { -0.31910064020036194, 100, 10, | |
1700 | 1.5707963267948966 }, | |
1701 | { 0.32110336937091460, 100, 10, | |
1702 | 1.7278759594743860 }, | |
1703 | { -0.32729120767830605, 100, 10, | |
1704 | 1.8849555921538759 }, | |
1705 | { 0.33821981171196341, 100, 10, | |
1706 | 2.0420352248333655 }, | |
1707 | { -0.35484056194773461, 100, 10, | |
1708 | 2.1991148575128552 }, | |
1709 | { 0.37832688692909372, 100, 10, | |
1710 | 2.3561944901923448 }, | |
1711 | { -0.40862111080315500, 100, 10, | |
1712 | 2.5132741228718345 }, | |
1713 | { 0.43480692911577751, 100, 10, | |
1714 | 2.6703537555513241 }, | |
1715 | { -0.35914570017276798, 100, 10, | |
1716 | 2.8274333882308138 }, | |
1717 | { -0.75366545187997991, 100, 10, | |
1718 | 2.9845130209103035 }, | |
1719 | { 0.0000000000000000, 100, 10, | |
1720 | 3.1415926535897931 }, | |
1721 | }; | |
1722 | const double toler033 = 2.5000000000000020e-13; | |
1723 | ||
1724 | // Test data for l=100, m=20. | |
1725 | // max(|f - f_GSL|): 9.7144514654701197e-16 | |
1726 | // max(|f - f_GSL| / |f_GSL|): 2.8802569343392205e-14 | |
1727 | const testcase_sph_legendre<double> | |
1728 | data034[21] = | |
1729 | { | |
1730 | { 0.0000000000000000, 100, 20, | |
1731 | 0.0000000000000000 }, | |
1732 | { 0.053569660841553700, 100, 20, | |
1733 | 0.15707963267948966 }, | |
1734 | { 0.57154926874732348, 100, 20, | |
1735 | 0.31415926535897931 }, | |
1736 | { 0.47536909969585633, 100, 20, | |
1737 | 0.47123889803846897 }, | |
1738 | { -0.28882554564109075, 100, 20, | |
1739 | 0.62831853071795862 }, | |
1740 | { 0.020116179014043743, 100, 20, | |
1741 | 0.78539816339744828 }, | |
1742 | { 0.14752195931706563, 100, 20, | |
1743 | 0.94247779607693793 }, | |
1744 | { -0.24069428588868366, 100, 20, | |
1745 | 1.0995574287564276 }, | |
1746 | { 0.29031796025014306, 100, 20, | |
1747 | 1.2566370614359172 }, | |
1748 | { -0.31437256851143458, 100, 20, | |
1749 | 1.4137166941154069 }, | |
1750 | { 0.32153954851141792, 100, 20, | |
1751 | 1.5707963267948966 }, | |
1752 | { -0.31437256851143169, 100, 20, | |
1753 | 1.7278759594743860 }, | |
1754 | { 0.29031796025014139, 100, 20, | |
1755 | 1.8849555921538759 }, | |
1756 | { -0.24069428588868083, 100, 20, | |
1757 | 2.0420352248333655 }, | |
1758 | { 0.14752195931706186, 100, 20, | |
1759 | 2.1991148575128552 }, | |
1760 | { 0.020116179014049562, 100, 20, | |
1761 | 2.3561944901923448 }, | |
1762 | { -0.28882554564109575, 100, 20, | |
1763 | 2.5132741228718345 }, | |
1764 | { 0.47536909969585545, 100, 20, | |
1765 | 2.6703537555513241 }, | |
1766 | { 0.57154926874732348, 100, 20, | |
1767 | 2.8274333882308138 }, | |
1768 | { 0.053569660841557079, 100, 20, | |
1769 | 2.9845130209103035 }, | |
1770 | { 0.0000000000000000, 100, 20, | |
1771 | 3.1415926535897931 }, | |
1772 | }; | |
1773 | const double toler034 = 2.5000000000000015e-12; | |
1774 | ||
1775 | // Test data for l=100, m=50. | |
1776 | // max(|f - f_GSL|): 8.3266726846886741e-15 | |
1777 | // max(|f - f_GSL| / |f_GSL|): 1.8981734972089879e-14 | |
1778 | const testcase_sph_legendre<double> | |
1779 | data035[21] = | |
1780 | { | |
1781 | { 0.0000000000000000, 100, 50, | |
1782 | 0.0000000000000000 }, | |
1783 | { 3.3047910392590615e-21, 100, 50, | |
1784 | 0.15707963267948966 }, | |
1785 | { 1.0592655372554981e-07, 100, 50, | |
1786 | 0.31415926535897931 }, | |
1787 | { 0.080418744223952773, 100, 50, | |
1788 | 0.47123889803846897 }, | |
1789 | { -0.56450600580393095, 100, 50, | |
1790 | 0.62831853071795862 }, | |
1791 | { 0.33338739844742110, 100, 50, | |
1792 | 0.78539816339744828 }, | |
1793 | { 0.39741714816514706, 100, 50, | |
1794 | 0.94247779607693793 }, | |
1795 | { 0.35223993750972243, 100, 50, | |
1796 | 1.0995574287564276 }, | |
1797 | { 0.17885891940721577, 100, 50, | |
1798 | 1.2566370614359172 }, | |
1799 | { -0.15341660126461967, 100, 50, | |
1800 | 1.4137166941154069 }, | |
1801 | { -0.34175924303503102, 100, 50, | |
1802 | 1.5707963267948966 }, | |
1803 | { -0.15341660126462869, 100, 50, | |
1804 | 1.7278759594743860 }, | |
1805 | { 0.17885891940721302, 100, 50, | |
1806 | 1.8849555921538759 }, | |
1807 | { 0.35223993750972105, 100, 50, | |
1808 | 2.0420352248333655 }, | |
1809 | { 0.39741714816514595, 100, 50, | |
1810 | 2.1991148575128552 }, | |
1811 | { 0.33338739844741666, 100, 50, | |
1812 | 2.3561944901923448 }, | |
1813 | { -0.56450600580392973, 100, 50, | |
1814 | 2.5132741228718345 }, | |
1815 | { 0.080418744223953911, 100, 50, | |
1816 | 2.6703537555513241 }, | |
1817 | { 1.0592655372554981e-07, 100, 50, | |
1818 | 2.8274333882308138 }, | |
1819 | { 3.3047910392597822e-21, 100, 50, | |
1820 | 2.9845130209103035 }, | |
1821 | { 0.0000000000000000, 100, 50, | |
1822 | 3.1415926535897931 }, | |
1823 | }; | |
1824 | const double toler035 = 1.0000000000000008e-12; | |
1825 | ||
1826 | // Test data for l=100, m=100. | |
1827 | // max(|f - f_GSL|): 2.3314683517128287e-14 | |
1828 | // max(|f - f_GSL| / |f_GSL|): 2.6593512237122742e-14 | |
1829 | const testcase_sph_legendre<double> | |
1830 | data036[21] = | |
1831 | { | |
1832 | { 0.0000000000000000, 100, 100, | |
1833 | 0.0000000000000000 }, | |
1834 | { 2.5744136608862186e-81, 100, 100, | |
1835 | 0.15707963267948966 }, | |
1836 | { 9.4551974868956498e-52, 100, 100, | |
1837 | 0.31415926535897931 }, | |
1838 | { 4.8096190703397596e-35, 100, 100, | |
1839 | 0.47123889803846897 }, | |
1840 | { 7.9305393636342891e-24, 100, 100, | |
1841 | 0.62831853071795862 }, | |
1842 | { 8.4320740610944858e-16, 100, 100, | |
1843 | 0.78539816339744828 }, | |
1844 | { 5.9319660146027522e-10, 100, 100, | |
1845 | 0.94247779607693793 }, | |
1846 | { 9.2368225946797243e-06, 100, 100, | |
1847 | 1.0995574287564276 }, | |
1848 | { 0.0062815489742044095, 100, 100, | |
1849 | 1.2566370614359172 }, | |
1850 | { 0.27505966018176986, 100, 100, | |
1851 | 1.4137166941154069 }, | |
1852 | { 0.94936713998764621, 100, 100, | |
1853 | 1.5707963267948966 }, | |
1854 | { 0.27505966018177130, 100, 100, | |
1855 | 1.7278759594743860 }, | |
1856 | { 0.0062815489742044433, 100, 100, | |
1857 | 1.8849555921538759 }, | |
1858 | { 9.2368225946797734e-06, 100, 100, | |
1859 | 2.0420352248333655 }, | |
1860 | { 5.9319660146027946e-10, 100, 100, | |
1861 | 2.1991148575128552 }, | |
1862 | { 8.4320740610946652e-16, 100, 100, | |
1863 | 2.3561944901923448 }, | |
1864 | { 7.9305393636344023e-24, 100, 100, | |
1865 | 2.5132741228718345 }, | |
1866 | { 4.8096190703400333e-35, 100, 100, | |
1867 | 2.6703537555513241 }, | |
1868 | { 9.4551974868956498e-52, 100, 100, | |
1869 | 2.8274333882308138 }, | |
1870 | { 2.5744136608873895e-81, 100, 100, | |
1871 | 2.9845130209103035 }, | |
1872 | { 0.0000000000000000, 100, 100, | |
1873 | 3.1415926535897931 }, | |
1874 | }; | |
1875 | const double toler036 = 2.5000000000000015e-12; | |
1876 | ||
1877 | template<typename Tp, unsigned int Num> | |
1878 | void | |
1879 | test(const testcase_sph_legendre<Tp> (&data)[Num], Tp toler) | |
1880 | { | |
2be75957 ESR |
1881 | const Tp eps = std::numeric_limits<Tp>::epsilon(); |
1882 | Tp max_abs_diff = -Tp(1); | |
1883 | Tp max_abs_frac = -Tp(1); | |
1884 | unsigned int num_datum = Num; | |
1885 | for (unsigned int i = 0; i < num_datum; ++i) | |
1886 | { | |
1887 | const Tp f = std::sph_legendre(data[i].l, data[i].m, | |
1888 | data[i].theta); | |
1889 | const Tp f0 = data[i].f0; | |
1890 | const Tp diff = f - f0; | |
1891 | if (std::abs(diff) > max_abs_diff) | |
1892 | max_abs_diff = std::abs(diff); | |
1893 | if (std::abs(f0) > Tp(10) * eps | |
1894 | && std::abs(f) > Tp(10) * eps) | |
1895 | { | |
1896 | const Tp frac = diff / f0; | |
1897 | if (std::abs(frac) > max_abs_frac) | |
1898 | max_abs_frac = std::abs(frac); | |
1899 | } | |
1900 | } | |
1901 | VERIFY(max_abs_frac < toler); | |
1902 | } | |
1903 | ||
1904 | int | |
1905 | main() | |
1906 | { | |
1907 | test(data001, toler001); | |
1908 | test(data002, toler002); | |
1909 | test(data003, toler003); | |
1910 | test(data004, toler004); | |
1911 | test(data005, toler005); | |
1912 | test(data006, toler006); | |
1913 | test(data007, toler007); | |
1914 | test(data008, toler008); | |
1915 | test(data009, toler009); | |
1916 | test(data010, toler010); | |
1917 | test(data011, toler011); | |
1918 | test(data012, toler012); | |
1919 | test(data013, toler013); | |
1920 | test(data014, toler014); | |
1921 | test(data015, toler015); | |
1922 | test(data016, toler016); | |
1923 | test(data017, toler017); | |
1924 | test(data018, toler018); | |
1925 | test(data019, toler019); | |
1926 | test(data020, toler020); | |
1927 | test(data021, toler021); | |
1928 | test(data022, toler022); | |
1929 | test(data023, toler023); | |
1930 | test(data024, toler024); | |
1931 | test(data025, toler025); | |
1932 | test(data026, toler026); | |
1933 | test(data027, toler027); | |
1934 | test(data028, toler028); | |
1935 | test(data029, toler029); | |
1936 | test(data030, toler030); | |
1937 | test(data031, toler031); | |
1938 | test(data032, toler032); | |
1939 | test(data033, toler033); | |
1940 | test(data034, toler034); | |
1941 | test(data035, toler035); | |
1942 | test(data036, toler036); | |
1943 | return 0; | |
1944 | } |