fe37e427a6528177e7e087383133dc7ac3474574
[gcc.git] /
1 // 2007-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2 //
3 // Copyright (C) 2007-2016 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
9 // any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
19
20 // assoc_laguerre
21
22
23 // Compare against values generated by the GNU Scientific Library.
24 // The GSL can be found on the web: http://www.gnu.org/software/gsl/
25
26 #include <tr1/cmath>
27 #if defined(__TEST_DEBUG)
28 #include <iostream>
29 #define VERIFY(A) \
30 if (!(A)) \
31 { \
32 std::cout << "line " << __LINE__ \
33 << " max_abs_frac = " << max_abs_frac \
34 << std::endl; \
35 }
36 #else
37 #include <testsuite_hooks.h>
38 #endif
39 #include "../testcase.h"
40
41
42 // Test data for n=0, m=0.
43 testcase_assoc_laguerre<double> data001[] = {
44 { 1.0000000000000000, 0, 0,
45 0.0000000000000000 },
46 { 1.0000000000000000, 0, 0,
47 10.000000000000000 },
48 { 1.0000000000000000, 0, 0,
49 20.000000000000000 },
50 { 1.0000000000000000, 0, 0,
51 30.000000000000000 },
52 { 1.0000000000000000, 0, 0,
53 40.000000000000000 },
54 { 1.0000000000000000, 0, 0,
55 50.000000000000000 },
56 { 1.0000000000000000, 0, 0,
57 60.000000000000000 },
58 { 1.0000000000000000, 0, 0,
59 70.000000000000000 },
60 { 1.0000000000000000, 0, 0,
61 80.000000000000000 },
62 { 1.0000000000000000, 0, 0,
63 90.000000000000000 },
64 { 1.0000000000000000, 0, 0,
65 100.00000000000000 },
66 };
67
68 // Test function for n=0, m=0.
69 template <typename Tp>
70 void test001()
71 {
72 const Tp eps = std::numeric_limits<Tp>::epsilon();
73 Tp max_abs_diff = -Tp(1);
74 Tp max_abs_frac = -Tp(1);
75 unsigned int num_datum = sizeof(data001)
76 / sizeof(testcase_assoc_laguerre<double>);
77 for (unsigned int i = 0; i < num_datum; ++i)
78 {
79 const Tp f = std::tr1::assoc_laguerre(Tp(data001[i].n), Tp(data001[i].m),
80 Tp(data001[i].x));
81 const Tp f0 = data001[i].f0;
82 const Tp diff = f - f0;
83 if (std::abs(diff) > max_abs_diff)
84 max_abs_diff = std::abs(diff);
85 if (std::abs(f0) > Tp(10) * eps
86 && std::abs(f) > Tp(10) * eps)
87 {
88 const Tp frac = diff / f0;
89 if (std::abs(frac) > max_abs_frac)
90 max_abs_frac = std::abs(frac);
91 }
92 }
93 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
94 }
95
96 // Test data for n=0, m=1.
97 testcase_assoc_laguerre<double> data002[] = {
98 { 1.0000000000000000, 0, 1,
99 0.0000000000000000 },
100 { 1.0000000000000000, 0, 1,
101 10.000000000000000 },
102 { 1.0000000000000000, 0, 1,
103 20.000000000000000 },
104 { 1.0000000000000000, 0, 1,
105 30.000000000000000 },
106 { 1.0000000000000000, 0, 1,
107 40.000000000000000 },
108 { 1.0000000000000000, 0, 1,
109 50.000000000000000 },
110 { 1.0000000000000000, 0, 1,
111 60.000000000000000 },
112 { 1.0000000000000000, 0, 1,
113 70.000000000000000 },
114 { 1.0000000000000000, 0, 1,
115 80.000000000000000 },
116 { 1.0000000000000000, 0, 1,
117 90.000000000000000 },
118 { 1.0000000000000000, 0, 1,
119 100.00000000000000 },
120 };
121
122 // Test function for n=0, m=1.
123 template <typename Tp>
124 void test002()
125 {
126 const Tp eps = std::numeric_limits<Tp>::epsilon();
127 Tp max_abs_diff = -Tp(1);
128 Tp max_abs_frac = -Tp(1);
129 unsigned int num_datum = sizeof(data002)
130 / sizeof(testcase_assoc_laguerre<double>);
131 for (unsigned int i = 0; i < num_datum; ++i)
132 {
133 const Tp f = std::tr1::assoc_laguerre(Tp(data002[i].n), Tp(data002[i].m),
134 Tp(data002[i].x));
135 const Tp f0 = data002[i].f0;
136 const Tp diff = f - f0;
137 if (std::abs(diff) > max_abs_diff)
138 max_abs_diff = std::abs(diff);
139 if (std::abs(f0) > Tp(10) * eps
140 && std::abs(f) > Tp(10) * eps)
141 {
142 const Tp frac = diff / f0;
143 if (std::abs(frac) > max_abs_frac)
144 max_abs_frac = std::abs(frac);
145 }
146 }
147 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
148 }
149
150 // Test data for n=0, m=2.
151 testcase_assoc_laguerre<double> data003[] = {
152 { 1.0000000000000000, 0, 2,
153 0.0000000000000000 },
154 { 1.0000000000000000, 0, 2,
155 10.000000000000000 },
156 { 1.0000000000000000, 0, 2,
157 20.000000000000000 },
158 { 1.0000000000000000, 0, 2,
159 30.000000000000000 },
160 { 1.0000000000000000, 0, 2,
161 40.000000000000000 },
162 { 1.0000000000000000, 0, 2,
163 50.000000000000000 },
164 { 1.0000000000000000, 0, 2,
165 60.000000000000000 },
166 { 1.0000000000000000, 0, 2,
167 70.000000000000000 },
168 { 1.0000000000000000, 0, 2,
169 80.000000000000000 },
170 { 1.0000000000000000, 0, 2,
171 90.000000000000000 },
172 { 1.0000000000000000, 0, 2,
173 100.00000000000000 },
174 };
175
176 // Test function for n=0, m=2.
177 template <typename Tp>
178 void test003()
179 {
180 const Tp eps = std::numeric_limits<Tp>::epsilon();
181 Tp max_abs_diff = -Tp(1);
182 Tp max_abs_frac = -Tp(1);
183 unsigned int num_datum = sizeof(data003)
184 / sizeof(testcase_assoc_laguerre<double>);
185 for (unsigned int i = 0; i < num_datum; ++i)
186 {
187 const Tp f = std::tr1::assoc_laguerre(Tp(data003[i].n), Tp(data003[i].m),
188 Tp(data003[i].x));
189 const Tp f0 = data003[i].f0;
190 const Tp diff = f - f0;
191 if (std::abs(diff) > max_abs_diff)
192 max_abs_diff = std::abs(diff);
193 if (std::abs(f0) > Tp(10) * eps
194 && std::abs(f) > Tp(10) * eps)
195 {
196 const Tp frac = diff / f0;
197 if (std::abs(frac) > max_abs_frac)
198 max_abs_frac = std::abs(frac);
199 }
200 }
201 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
202 }
203
204 // Test data for n=0, m=5.
205 testcase_assoc_laguerre<double> data004[] = {
206 { 1.0000000000000000, 0, 5,
207 0.0000000000000000 },
208 { 1.0000000000000000, 0, 5,
209 10.000000000000000 },
210 { 1.0000000000000000, 0, 5,
211 20.000000000000000 },
212 { 1.0000000000000000, 0, 5,
213 30.000000000000000 },
214 { 1.0000000000000000, 0, 5,
215 40.000000000000000 },
216 { 1.0000000000000000, 0, 5,
217 50.000000000000000 },
218 { 1.0000000000000000, 0, 5,
219 60.000000000000000 },
220 { 1.0000000000000000, 0, 5,
221 70.000000000000000 },
222 { 1.0000000000000000, 0, 5,
223 80.000000000000000 },
224 { 1.0000000000000000, 0, 5,
225 90.000000000000000 },
226 { 1.0000000000000000, 0, 5,
227 100.00000000000000 },
228 };
229
230 // Test function for n=0, m=5.
231 template <typename Tp>
232 void test004()
233 {
234 const Tp eps = std::numeric_limits<Tp>::epsilon();
235 Tp max_abs_diff = -Tp(1);
236 Tp max_abs_frac = -Tp(1);
237 unsigned int num_datum = sizeof(data004)
238 / sizeof(testcase_assoc_laguerre<double>);
239 for (unsigned int i = 0; i < num_datum; ++i)
240 {
241 const Tp f = std::tr1::assoc_laguerre(Tp(data004[i].n), Tp(data004[i].m),
242 Tp(data004[i].x));
243 const Tp f0 = data004[i].f0;
244 const Tp diff = f - f0;
245 if (std::abs(diff) > max_abs_diff)
246 max_abs_diff = std::abs(diff);
247 if (std::abs(f0) > Tp(10) * eps
248 && std::abs(f) > Tp(10) * eps)
249 {
250 const Tp frac = diff / f0;
251 if (std::abs(frac) > max_abs_frac)
252 max_abs_frac = std::abs(frac);
253 }
254 }
255 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
256 }
257
258 // Test data for n=0, m=10.
259 testcase_assoc_laguerre<double> data005[] = {
260 { 1.0000000000000000, 0, 10,
261 0.0000000000000000 },
262 { 1.0000000000000000, 0, 10,
263 10.000000000000000 },
264 { 1.0000000000000000, 0, 10,
265 20.000000000000000 },
266 { 1.0000000000000000, 0, 10,
267 30.000000000000000 },
268 { 1.0000000000000000, 0, 10,
269 40.000000000000000 },
270 { 1.0000000000000000, 0, 10,
271 50.000000000000000 },
272 { 1.0000000000000000, 0, 10,
273 60.000000000000000 },
274 { 1.0000000000000000, 0, 10,
275 70.000000000000000 },
276 { 1.0000000000000000, 0, 10,
277 80.000000000000000 },
278 { 1.0000000000000000, 0, 10,
279 90.000000000000000 },
280 { 1.0000000000000000, 0, 10,
281 100.00000000000000 },
282 };
283
284 // Test function for n=0, m=10.
285 template <typename Tp>
286 void test005()
287 {
288 const Tp eps = std::numeric_limits<Tp>::epsilon();
289 Tp max_abs_diff = -Tp(1);
290 Tp max_abs_frac = -Tp(1);
291 unsigned int num_datum = sizeof(data005)
292 / sizeof(testcase_assoc_laguerre<double>);
293 for (unsigned int i = 0; i < num_datum; ++i)
294 {
295 const Tp f = std::tr1::assoc_laguerre(Tp(data005[i].n), Tp(data005[i].m),
296 Tp(data005[i].x));
297 const Tp f0 = data005[i].f0;
298 const Tp diff = f - f0;
299 if (std::abs(diff) > max_abs_diff)
300 max_abs_diff = std::abs(diff);
301 if (std::abs(f0) > Tp(10) * eps
302 && std::abs(f) > Tp(10) * eps)
303 {
304 const Tp frac = diff / f0;
305 if (std::abs(frac) > max_abs_frac)
306 max_abs_frac = std::abs(frac);
307 }
308 }
309 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
310 }
311
312 // Test data for n=0, m=20.
313 testcase_assoc_laguerre<double> data006[] = {
314 { 1.0000000000000000, 0, 20,
315 0.0000000000000000 },
316 { 1.0000000000000000, 0, 20,
317 10.000000000000000 },
318 { 1.0000000000000000, 0, 20,
319 20.000000000000000 },
320 { 1.0000000000000000, 0, 20,
321 30.000000000000000 },
322 { 1.0000000000000000, 0, 20,
323 40.000000000000000 },
324 { 1.0000000000000000, 0, 20,
325 50.000000000000000 },
326 { 1.0000000000000000, 0, 20,
327 60.000000000000000 },
328 { 1.0000000000000000, 0, 20,
329 70.000000000000000 },
330 { 1.0000000000000000, 0, 20,
331 80.000000000000000 },
332 { 1.0000000000000000, 0, 20,
333 90.000000000000000 },
334 { 1.0000000000000000, 0, 20,
335 100.00000000000000 },
336 };
337
338 // Test function for n=0, m=20.
339 template <typename Tp>
340 void test006()
341 {
342 const Tp eps = std::numeric_limits<Tp>::epsilon();
343 Tp max_abs_diff = -Tp(1);
344 Tp max_abs_frac = -Tp(1);
345 unsigned int num_datum = sizeof(data006)
346 / sizeof(testcase_assoc_laguerre<double>);
347 for (unsigned int i = 0; i < num_datum; ++i)
348 {
349 const Tp f = std::tr1::assoc_laguerre(Tp(data006[i].n), Tp(data006[i].m),
350 Tp(data006[i].x));
351 const Tp f0 = data006[i].f0;
352 const Tp diff = f - f0;
353 if (std::abs(diff) > max_abs_diff)
354 max_abs_diff = std::abs(diff);
355 if (std::abs(f0) > Tp(10) * eps
356 && std::abs(f) > Tp(10) * eps)
357 {
358 const Tp frac = diff / f0;
359 if (std::abs(frac) > max_abs_frac)
360 max_abs_frac = std::abs(frac);
361 }
362 }
363 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
364 }
365
366 // Test data for n=0, m=50.
367 testcase_assoc_laguerre<double> data007[] = {
368 { 1.0000000000000000, 0, 50,
369 0.0000000000000000 },
370 { 1.0000000000000000, 0, 50,
371 10.000000000000000 },
372 { 1.0000000000000000, 0, 50,
373 20.000000000000000 },
374 { 1.0000000000000000, 0, 50,
375 30.000000000000000 },
376 { 1.0000000000000000, 0, 50,
377 40.000000000000000 },
378 { 1.0000000000000000, 0, 50,
379 50.000000000000000 },
380 { 1.0000000000000000, 0, 50,
381 60.000000000000000 },
382 { 1.0000000000000000, 0, 50,
383 70.000000000000000 },
384 { 1.0000000000000000, 0, 50,
385 80.000000000000000 },
386 { 1.0000000000000000, 0, 50,
387 90.000000000000000 },
388 { 1.0000000000000000, 0, 50,
389 100.00000000000000 },
390 };
391
392 // Test function for n=0, m=50.
393 template <typename Tp>
394 void test007()
395 {
396 const Tp eps = std::numeric_limits<Tp>::epsilon();
397 Tp max_abs_diff = -Tp(1);
398 Tp max_abs_frac = -Tp(1);
399 unsigned int num_datum = sizeof(data007)
400 / sizeof(testcase_assoc_laguerre<double>);
401 for (unsigned int i = 0; i < num_datum; ++i)
402 {
403 const Tp f = std::tr1::assoc_laguerre(Tp(data007[i].n), Tp(data007[i].m),
404 Tp(data007[i].x));
405 const Tp f0 = data007[i].f0;
406 const Tp diff = f - f0;
407 if (std::abs(diff) > max_abs_diff)
408 max_abs_diff = std::abs(diff);
409 if (std::abs(f0) > Tp(10) * eps
410 && std::abs(f) > Tp(10) * eps)
411 {
412 const Tp frac = diff / f0;
413 if (std::abs(frac) > max_abs_frac)
414 max_abs_frac = std::abs(frac);
415 }
416 }
417 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
418 }
419
420 // Test data for n=0, m=100.
421 testcase_assoc_laguerre<double> data008[] = {
422 { 1.0000000000000000, 0, 100,
423 0.0000000000000000 },
424 { 1.0000000000000000, 0, 100,
425 10.000000000000000 },
426 { 1.0000000000000000, 0, 100,
427 20.000000000000000 },
428 { 1.0000000000000000, 0, 100,
429 30.000000000000000 },
430 { 1.0000000000000000, 0, 100,
431 40.000000000000000 },
432 { 1.0000000000000000, 0, 100,
433 50.000000000000000 },
434 { 1.0000000000000000, 0, 100,
435 60.000000000000000 },
436 { 1.0000000000000000, 0, 100,
437 70.000000000000000 },
438 { 1.0000000000000000, 0, 100,
439 80.000000000000000 },
440 { 1.0000000000000000, 0, 100,
441 90.000000000000000 },
442 { 1.0000000000000000, 0, 100,
443 100.00000000000000 },
444 };
445
446 // Test function for n=0, m=100.
447 template <typename Tp>
448 void test008()
449 {
450 const Tp eps = std::numeric_limits<Tp>::epsilon();
451 Tp max_abs_diff = -Tp(1);
452 Tp max_abs_frac = -Tp(1);
453 unsigned int num_datum = sizeof(data008)
454 / sizeof(testcase_assoc_laguerre<double>);
455 for (unsigned int i = 0; i < num_datum; ++i)
456 {
457 const Tp f = std::tr1::assoc_laguerre(Tp(data008[i].n), Tp(data008[i].m),
458 Tp(data008[i].x));
459 const Tp f0 = data008[i].f0;
460 const Tp diff = f - f0;
461 if (std::abs(diff) > max_abs_diff)
462 max_abs_diff = std::abs(diff);
463 if (std::abs(f0) > Tp(10) * eps
464 && std::abs(f) > Tp(10) * eps)
465 {
466 const Tp frac = diff / f0;
467 if (std::abs(frac) > max_abs_frac)
468 max_abs_frac = std::abs(frac);
469 }
470 }
471 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
472 }
473
474 // Test data for n=1, m=0.
475 testcase_assoc_laguerre<double> data009[] = {
476 { 1.0000000000000000, 1, 0,
477 0.0000000000000000 },
478 { -9.0000000000000000, 1, 0,
479 10.000000000000000 },
480 { -19.000000000000000, 1, 0,
481 20.000000000000000 },
482 { -29.000000000000000, 1, 0,
483 30.000000000000000 },
484 { -39.000000000000000, 1, 0,
485 40.000000000000000 },
486 { -49.000000000000000, 1, 0,
487 50.000000000000000 },
488 { -59.000000000000000, 1, 0,
489 60.000000000000000 },
490 { -69.000000000000000, 1, 0,
491 70.000000000000000 },
492 { -79.000000000000000, 1, 0,
493 80.000000000000000 },
494 { -89.000000000000000, 1, 0,
495 90.000000000000000 },
496 { -99.000000000000000, 1, 0,
497 100.00000000000000 },
498 };
499
500 // Test function for n=1, m=0.
501 template <typename Tp>
502 void test009()
503 {
504 const Tp eps = std::numeric_limits<Tp>::epsilon();
505 Tp max_abs_diff = -Tp(1);
506 Tp max_abs_frac = -Tp(1);
507 unsigned int num_datum = sizeof(data009)
508 / sizeof(testcase_assoc_laguerre<double>);
509 for (unsigned int i = 0; i < num_datum; ++i)
510 {
511 const Tp f = std::tr1::assoc_laguerre(Tp(data009[i].n), Tp(data009[i].m),
512 Tp(data009[i].x));
513 const Tp f0 = data009[i].f0;
514 const Tp diff = f - f0;
515 if (std::abs(diff) > max_abs_diff)
516 max_abs_diff = std::abs(diff);
517 if (std::abs(f0) > Tp(10) * eps
518 && std::abs(f) > Tp(10) * eps)
519 {
520 const Tp frac = diff / f0;
521 if (std::abs(frac) > max_abs_frac)
522 max_abs_frac = std::abs(frac);
523 }
524 }
525 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
526 }
527
528 // Test data for n=1, m=1.
529 testcase_assoc_laguerre<double> data010[] = {
530 { 2.0000000000000000, 1, 1,
531 0.0000000000000000 },
532 { -8.0000000000000000, 1, 1,
533 10.000000000000000 },
534 { -18.000000000000000, 1, 1,
535 20.000000000000000 },
536 { -28.000000000000000, 1, 1,
537 30.000000000000000 },
538 { -38.000000000000000, 1, 1,
539 40.000000000000000 },
540 { -48.000000000000000, 1, 1,
541 50.000000000000000 },
542 { -58.000000000000000, 1, 1,
543 60.000000000000000 },
544 { -68.000000000000000, 1, 1,
545 70.000000000000000 },
546 { -78.000000000000000, 1, 1,
547 80.000000000000000 },
548 { -88.000000000000000, 1, 1,
549 90.000000000000000 },
550 { -98.000000000000000, 1, 1,
551 100.00000000000000 },
552 };
553
554 // Test function for n=1, m=1.
555 template <typename Tp>
556 void test010()
557 {
558 const Tp eps = std::numeric_limits<Tp>::epsilon();
559 Tp max_abs_diff = -Tp(1);
560 Tp max_abs_frac = -Tp(1);
561 unsigned int num_datum = sizeof(data010)
562 / sizeof(testcase_assoc_laguerre<double>);
563 for (unsigned int i = 0; i < num_datum; ++i)
564 {
565 const Tp f = std::tr1::assoc_laguerre(Tp(data010[i].n), Tp(data010[i].m),
566 Tp(data010[i].x));
567 const Tp f0 = data010[i].f0;
568 const Tp diff = f - f0;
569 if (std::abs(diff) > max_abs_diff)
570 max_abs_diff = std::abs(diff);
571 if (std::abs(f0) > Tp(10) * eps
572 && std::abs(f) > Tp(10) * eps)
573 {
574 const Tp frac = diff / f0;
575 if (std::abs(frac) > max_abs_frac)
576 max_abs_frac = std::abs(frac);
577 }
578 }
579 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
580 }
581
582 // Test data for n=1, m=2.
583 testcase_assoc_laguerre<double> data011[] = {
584 { 3.0000000000000000, 1, 2,
585 0.0000000000000000 },
586 { -7.0000000000000000, 1, 2,
587 10.000000000000000 },
588 { -17.000000000000000, 1, 2,
589 20.000000000000000 },
590 { -27.000000000000000, 1, 2,
591 30.000000000000000 },
592 { -37.000000000000000, 1, 2,
593 40.000000000000000 },
594 { -47.000000000000000, 1, 2,
595 50.000000000000000 },
596 { -57.000000000000000, 1, 2,
597 60.000000000000000 },
598 { -67.000000000000000, 1, 2,
599 70.000000000000000 },
600 { -77.000000000000000, 1, 2,
601 80.000000000000000 },
602 { -87.000000000000000, 1, 2,
603 90.000000000000000 },
604 { -97.000000000000000, 1, 2,
605 100.00000000000000 },
606 };
607
608 // Test function for n=1, m=2.
609 template <typename Tp>
610 void test011()
611 {
612 const Tp eps = std::numeric_limits<Tp>::epsilon();
613 Tp max_abs_diff = -Tp(1);
614 Tp max_abs_frac = -Tp(1);
615 unsigned int num_datum = sizeof(data011)
616 / sizeof(testcase_assoc_laguerre<double>);
617 for (unsigned int i = 0; i < num_datum; ++i)
618 {
619 const Tp f = std::tr1::assoc_laguerre(Tp(data011[i].n), Tp(data011[i].m),
620 Tp(data011[i].x));
621 const Tp f0 = data011[i].f0;
622 const Tp diff = f - f0;
623 if (std::abs(diff) > max_abs_diff)
624 max_abs_diff = std::abs(diff);
625 if (std::abs(f0) > Tp(10) * eps
626 && std::abs(f) > Tp(10) * eps)
627 {
628 const Tp frac = diff / f0;
629 if (std::abs(frac) > max_abs_frac)
630 max_abs_frac = std::abs(frac);
631 }
632 }
633 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
634 }
635
636 // Test data for n=1, m=5.
637 testcase_assoc_laguerre<double> data012[] = {
638 { 6.0000000000000000, 1, 5,
639 0.0000000000000000 },
640 { -4.0000000000000000, 1, 5,
641 10.000000000000000 },
642 { -14.000000000000000, 1, 5,
643 20.000000000000000 },
644 { -24.000000000000000, 1, 5,
645 30.000000000000000 },
646 { -34.000000000000000, 1, 5,
647 40.000000000000000 },
648 { -44.000000000000000, 1, 5,
649 50.000000000000000 },
650 { -54.000000000000000, 1, 5,
651 60.000000000000000 },
652 { -64.000000000000000, 1, 5,
653 70.000000000000000 },
654 { -74.000000000000000, 1, 5,
655 80.000000000000000 },
656 { -84.000000000000000, 1, 5,
657 90.000000000000000 },
658 { -94.000000000000000, 1, 5,
659 100.00000000000000 },
660 };
661
662 // Test function for n=1, m=5.
663 template <typename Tp>
664 void test012()
665 {
666 const Tp eps = std::numeric_limits<Tp>::epsilon();
667 Tp max_abs_diff = -Tp(1);
668 Tp max_abs_frac = -Tp(1);
669 unsigned int num_datum = sizeof(data012)
670 / sizeof(testcase_assoc_laguerre<double>);
671 for (unsigned int i = 0; i < num_datum; ++i)
672 {
673 const Tp f = std::tr1::assoc_laguerre(Tp(data012[i].n), Tp(data012[i].m),
674 Tp(data012[i].x));
675 const Tp f0 = data012[i].f0;
676 const Tp diff = f - f0;
677 if (std::abs(diff) > max_abs_diff)
678 max_abs_diff = std::abs(diff);
679 if (std::abs(f0) > Tp(10) * eps
680 && std::abs(f) > Tp(10) * eps)
681 {
682 const Tp frac = diff / f0;
683 if (std::abs(frac) > max_abs_frac)
684 max_abs_frac = std::abs(frac);
685 }
686 }
687 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
688 }
689
690 // Test data for n=1, m=10.
691 testcase_assoc_laguerre<double> data013[] = {
692 { 11.000000000000000, 1, 10,
693 0.0000000000000000 },
694 { 1.0000000000000000, 1, 10,
695 10.000000000000000 },
696 { -9.0000000000000000, 1, 10,
697 20.000000000000000 },
698 { -19.000000000000000, 1, 10,
699 30.000000000000000 },
700 { -29.000000000000000, 1, 10,
701 40.000000000000000 },
702 { -39.000000000000000, 1, 10,
703 50.000000000000000 },
704 { -49.000000000000000, 1, 10,
705 60.000000000000000 },
706 { -59.000000000000000, 1, 10,
707 70.000000000000000 },
708 { -69.000000000000000, 1, 10,
709 80.000000000000000 },
710 { -79.000000000000000, 1, 10,
711 90.000000000000000 },
712 { -89.000000000000000, 1, 10,
713 100.00000000000000 },
714 };
715
716 // Test function for n=1, m=10.
717 template <typename Tp>
718 void test013()
719 {
720 const Tp eps = std::numeric_limits<Tp>::epsilon();
721 Tp max_abs_diff = -Tp(1);
722 Tp max_abs_frac = -Tp(1);
723 unsigned int num_datum = sizeof(data013)
724 / sizeof(testcase_assoc_laguerre<double>);
725 for (unsigned int i = 0; i < num_datum; ++i)
726 {
727 const Tp f = std::tr1::assoc_laguerre(Tp(data013[i].n), Tp(data013[i].m),
728 Tp(data013[i].x));
729 const Tp f0 = data013[i].f0;
730 const Tp diff = f - f0;
731 if (std::abs(diff) > max_abs_diff)
732 max_abs_diff = std::abs(diff);
733 if (std::abs(f0) > Tp(10) * eps
734 && std::abs(f) > Tp(10) * eps)
735 {
736 const Tp frac = diff / f0;
737 if (std::abs(frac) > max_abs_frac)
738 max_abs_frac = std::abs(frac);
739 }
740 }
741 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
742 }
743
744 // Test data for n=1, m=20.
745 testcase_assoc_laguerre<double> data014[] = {
746 { 21.000000000000000, 1, 20,
747 0.0000000000000000 },
748 { 11.000000000000000, 1, 20,
749 10.000000000000000 },
750 { 1.0000000000000000, 1, 20,
751 20.000000000000000 },
752 { -9.0000000000000000, 1, 20,
753 30.000000000000000 },
754 { -19.000000000000000, 1, 20,
755 40.000000000000000 },
756 { -29.000000000000000, 1, 20,
757 50.000000000000000 },
758 { -39.000000000000000, 1, 20,
759 60.000000000000000 },
760 { -49.000000000000000, 1, 20,
761 70.000000000000000 },
762 { -59.000000000000000, 1, 20,
763 80.000000000000000 },
764 { -69.000000000000000, 1, 20,
765 90.000000000000000 },
766 { -79.000000000000000, 1, 20,
767 100.00000000000000 },
768 };
769
770 // Test function for n=1, m=20.
771 template <typename Tp>
772 void test014()
773 {
774 const Tp eps = std::numeric_limits<Tp>::epsilon();
775 Tp max_abs_diff = -Tp(1);
776 Tp max_abs_frac = -Tp(1);
777 unsigned int num_datum = sizeof(data014)
778 / sizeof(testcase_assoc_laguerre<double>);
779 for (unsigned int i = 0; i < num_datum; ++i)
780 {
781 const Tp f = std::tr1::assoc_laguerre(Tp(data014[i].n), Tp(data014[i].m),
782 Tp(data014[i].x));
783 const Tp f0 = data014[i].f0;
784 const Tp diff = f - f0;
785 if (std::abs(diff) > max_abs_diff)
786 max_abs_diff = std::abs(diff);
787 if (std::abs(f0) > Tp(10) * eps
788 && std::abs(f) > Tp(10) * eps)
789 {
790 const Tp frac = diff / f0;
791 if (std::abs(frac) > max_abs_frac)
792 max_abs_frac = std::abs(frac);
793 }
794 }
795 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
796 }
797
798 // Test data for n=1, m=50.
799 testcase_assoc_laguerre<double> data015[] = {
800 { 51.000000000000000, 1, 50,
801 0.0000000000000000 },
802 { 41.000000000000000, 1, 50,
803 10.000000000000000 },
804 { 31.000000000000000, 1, 50,
805 20.000000000000000 },
806 { 21.000000000000000, 1, 50,
807 30.000000000000000 },
808 { 11.000000000000000, 1, 50,
809 40.000000000000000 },
810 { 1.0000000000000000, 1, 50,
811 50.000000000000000 },
812 { -9.0000000000000000, 1, 50,
813 60.000000000000000 },
814 { -19.000000000000000, 1, 50,
815 70.000000000000000 },
816 { -29.000000000000000, 1, 50,
817 80.000000000000000 },
818 { -39.000000000000000, 1, 50,
819 90.000000000000000 },
820 { -49.000000000000000, 1, 50,
821 100.00000000000000 },
822 };
823
824 // Test function for n=1, m=50.
825 template <typename Tp>
826 void test015()
827 {
828 const Tp eps = std::numeric_limits<Tp>::epsilon();
829 Tp max_abs_diff = -Tp(1);
830 Tp max_abs_frac = -Tp(1);
831 unsigned int num_datum = sizeof(data015)
832 / sizeof(testcase_assoc_laguerre<double>);
833 for (unsigned int i = 0; i < num_datum; ++i)
834 {
835 const Tp f = std::tr1::assoc_laguerre(Tp(data015[i].n), Tp(data015[i].m),
836 Tp(data015[i].x));
837 const Tp f0 = data015[i].f0;
838 const Tp diff = f - f0;
839 if (std::abs(diff) > max_abs_diff)
840 max_abs_diff = std::abs(diff);
841 if (std::abs(f0) > Tp(10) * eps
842 && std::abs(f) > Tp(10) * eps)
843 {
844 const Tp frac = diff / f0;
845 if (std::abs(frac) > max_abs_frac)
846 max_abs_frac = std::abs(frac);
847 }
848 }
849 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
850 }
851
852 // Test data for n=1, m=100.
853 testcase_assoc_laguerre<double> data016[] = {
854 { 101.00000000000000, 1, 100,
855 0.0000000000000000 },
856 { 91.000000000000000, 1, 100,
857 10.000000000000000 },
858 { 81.000000000000000, 1, 100,
859 20.000000000000000 },
860 { 71.000000000000000, 1, 100,
861 30.000000000000000 },
862 { 61.000000000000000, 1, 100,
863 40.000000000000000 },
864 { 51.000000000000000, 1, 100,
865 50.000000000000000 },
866 { 41.000000000000000, 1, 100,
867 60.000000000000000 },
868 { 31.000000000000000, 1, 100,
869 70.000000000000000 },
870 { 21.000000000000000, 1, 100,
871 80.000000000000000 },
872 { 11.000000000000000, 1, 100,
873 90.000000000000000 },
874 { 1.0000000000000000, 1, 100,
875 100.00000000000000 },
876 };
877
878 // Test function for n=1, m=100.
879 template <typename Tp>
880 void test016()
881 {
882 const Tp eps = std::numeric_limits<Tp>::epsilon();
883 Tp max_abs_diff = -Tp(1);
884 Tp max_abs_frac = -Tp(1);
885 unsigned int num_datum = sizeof(data016)
886 / sizeof(testcase_assoc_laguerre<double>);
887 for (unsigned int i = 0; i < num_datum; ++i)
888 {
889 const Tp f = std::tr1::assoc_laguerre(Tp(data016[i].n), Tp(data016[i].m),
890 Tp(data016[i].x));
891 const Tp f0 = data016[i].f0;
892 const Tp diff = f - f0;
893 if (std::abs(diff) > max_abs_diff)
894 max_abs_diff = std::abs(diff);
895 if (std::abs(f0) > Tp(10) * eps
896 && std::abs(f) > Tp(10) * eps)
897 {
898 const Tp frac = diff / f0;
899 if (std::abs(frac) > max_abs_frac)
900 max_abs_frac = std::abs(frac);
901 }
902 }
903 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
904 }
905
906 // Test data for n=2, m=0.
907 testcase_assoc_laguerre<double> data017[] = {
908 { 1.0000000000000000, 2, 0,
909 0.0000000000000000 },
910 { 31.000000000000000, 2, 0,
911 10.000000000000000 },
912 { 161.00000000000000, 2, 0,
913 20.000000000000000 },
914 { 391.00000000000000, 2, 0,
915 30.000000000000000 },
916 { 721.00000000000000, 2, 0,
917 40.000000000000000 },
918 { 1151.0000000000000, 2, 0,
919 50.000000000000000 },
920 { 1681.0000000000000, 2, 0,
921 60.000000000000000 },
922 { 2311.0000000000000, 2, 0,
923 70.000000000000000 },
924 { 3041.0000000000000, 2, 0,
925 80.000000000000000 },
926 { 3871.0000000000000, 2, 0,
927 90.000000000000000 },
928 { 4801.0000000000000, 2, 0,
929 100.00000000000000 },
930 };
931
932 // Test function for n=2, m=0.
933 template <typename Tp>
934 void test017()
935 {
936 const Tp eps = std::numeric_limits<Tp>::epsilon();
937 Tp max_abs_diff = -Tp(1);
938 Tp max_abs_frac = -Tp(1);
939 unsigned int num_datum = sizeof(data017)
940 / sizeof(testcase_assoc_laguerre<double>);
941 for (unsigned int i = 0; i < num_datum; ++i)
942 {
943 const Tp f = std::tr1::assoc_laguerre(Tp(data017[i].n), Tp(data017[i].m),
944 Tp(data017[i].x));
945 const Tp f0 = data017[i].f0;
946 const Tp diff = f - f0;
947 if (std::abs(diff) > max_abs_diff)
948 max_abs_diff = std::abs(diff);
949 if (std::abs(f0) > Tp(10) * eps
950 && std::abs(f) > Tp(10) * eps)
951 {
952 const Tp frac = diff / f0;
953 if (std::abs(frac) > max_abs_frac)
954 max_abs_frac = std::abs(frac);
955 }
956 }
957 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
958 }
959
960 // Test data for n=2, m=1.
961 testcase_assoc_laguerre<double> data018[] = {
962 { 3.0000000000000000, 2, 1,
963 0.0000000000000000 },
964 { 23.000000000000000, 2, 1,
965 10.000000000000000 },
966 { 143.00000000000000, 2, 1,
967 20.000000000000000 },
968 { 363.00000000000000, 2, 1,
969 30.000000000000000 },
970 { 683.00000000000000, 2, 1,
971 40.000000000000000 },
972 { 1103.0000000000000, 2, 1,
973 50.000000000000000 },
974 { 1623.0000000000000, 2, 1,
975 60.000000000000000 },
976 { 2243.0000000000000, 2, 1,
977 70.000000000000000 },
978 { 2963.0000000000000, 2, 1,
979 80.000000000000000 },
980 { 3783.0000000000000, 2, 1,
981 90.000000000000000 },
982 { 4703.0000000000000, 2, 1,
983 100.00000000000000 },
984 };
985
986 // Test function for n=2, m=1.
987 template <typename Tp>
988 void test018()
989 {
990 const Tp eps = std::numeric_limits<Tp>::epsilon();
991 Tp max_abs_diff = -Tp(1);
992 Tp max_abs_frac = -Tp(1);
993 unsigned int num_datum = sizeof(data018)
994 / sizeof(testcase_assoc_laguerre<double>);
995 for (unsigned int i = 0; i < num_datum; ++i)
996 {
997 const Tp f = std::tr1::assoc_laguerre(Tp(data018[i].n), Tp(data018[i].m),
998 Tp(data018[i].x));
999 const Tp f0 = data018[i].f0;
1000 const Tp diff = f - f0;
1001 if (std::abs(diff) > max_abs_diff)
1002 max_abs_diff = std::abs(diff);
1003 if (std::abs(f0) > Tp(10) * eps
1004 && std::abs(f) > Tp(10) * eps)
1005 {
1006 const Tp frac = diff / f0;
1007 if (std::abs(frac) > max_abs_frac)
1008 max_abs_frac = std::abs(frac);
1009 }
1010 }
1011 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1012 }
1013
1014 // Test data for n=2, m=2.
1015 testcase_assoc_laguerre<double> data019[] = {
1016 { 6.0000000000000000, 2, 2,
1017 0.0000000000000000 },
1018 { 16.000000000000000, 2, 2,
1019 10.000000000000000 },
1020 { 126.00000000000000, 2, 2,
1021 20.000000000000000 },
1022 { 336.00000000000000, 2, 2,
1023 30.000000000000000 },
1024 { 646.00000000000000, 2, 2,
1025 40.000000000000000 },
1026 { 1056.0000000000000, 2, 2,
1027 50.000000000000000 },
1028 { 1566.0000000000000, 2, 2,
1029 60.000000000000000 },
1030 { 2176.0000000000000, 2, 2,
1031 70.000000000000000 },
1032 { 2886.0000000000000, 2, 2,
1033 80.000000000000000 },
1034 { 3696.0000000000000, 2, 2,
1035 90.000000000000000 },
1036 { 4606.0000000000000, 2, 2,
1037 100.00000000000000 },
1038 };
1039
1040 // Test function for n=2, m=2.
1041 template <typename Tp>
1042 void test019()
1043 {
1044 const Tp eps = std::numeric_limits<Tp>::epsilon();
1045 Tp max_abs_diff = -Tp(1);
1046 Tp max_abs_frac = -Tp(1);
1047 unsigned int num_datum = sizeof(data019)
1048 / sizeof(testcase_assoc_laguerre<double>);
1049 for (unsigned int i = 0; i < num_datum; ++i)
1050 {
1051 const Tp f = std::tr1::assoc_laguerre(Tp(data019[i].n), Tp(data019[i].m),
1052 Tp(data019[i].x));
1053 const Tp f0 = data019[i].f0;
1054 const Tp diff = f - f0;
1055 if (std::abs(diff) > max_abs_diff)
1056 max_abs_diff = std::abs(diff);
1057 if (std::abs(f0) > Tp(10) * eps
1058 && std::abs(f) > Tp(10) * eps)
1059 {
1060 const Tp frac = diff / f0;
1061 if (std::abs(frac) > max_abs_frac)
1062 max_abs_frac = std::abs(frac);
1063 }
1064 }
1065 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1066 }
1067
1068 // Test data for n=2, m=5.
1069 testcase_assoc_laguerre<double> data020[] = {
1070 { 21.000000000000000, 2, 5,
1071 0.0000000000000000 },
1072 { 0.99999999999999645, 2, 5,
1073 10.000000000000000 },
1074 { 81.000000000000000, 2, 5,
1075 20.000000000000000 },
1076 { 261.00000000000000, 2, 5,
1077 30.000000000000000 },
1078 { 541.00000000000000, 2, 5,
1079 40.000000000000000 },
1080 { 921.00000000000000, 2, 5,
1081 50.000000000000000 },
1082 { 1401.0000000000000, 2, 5,
1083 60.000000000000000 },
1084 { 1981.0000000000000, 2, 5,
1085 70.000000000000000 },
1086 { 2661.0000000000000, 2, 5,
1087 80.000000000000000 },
1088 { 3441.0000000000000, 2, 5,
1089 90.000000000000000 },
1090 { 4321.0000000000000, 2, 5,
1091 100.00000000000000 },
1092 };
1093
1094 // Test function for n=2, m=5.
1095 template <typename Tp>
1096 void test020()
1097 {
1098 const Tp eps = std::numeric_limits<Tp>::epsilon();
1099 Tp max_abs_diff = -Tp(1);
1100 Tp max_abs_frac = -Tp(1);
1101 unsigned int num_datum = sizeof(data020)
1102 / sizeof(testcase_assoc_laguerre<double>);
1103 for (unsigned int i = 0; i < num_datum; ++i)
1104 {
1105 const Tp f = std::tr1::assoc_laguerre(Tp(data020[i].n), Tp(data020[i].m),
1106 Tp(data020[i].x));
1107 const Tp f0 = data020[i].f0;
1108 const Tp diff = f - f0;
1109 if (std::abs(diff) > max_abs_diff)
1110 max_abs_diff = std::abs(diff);
1111 if (std::abs(f0) > Tp(10) * eps
1112 && std::abs(f) > Tp(10) * eps)
1113 {
1114 const Tp frac = diff / f0;
1115 if (std::abs(frac) > max_abs_frac)
1116 max_abs_frac = std::abs(frac);
1117 }
1118 }
1119 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1120 }
1121
1122 // Test data for n=2, m=10.
1123 testcase_assoc_laguerre<double> data021[] = {
1124 { 66.000000000000000, 2, 10,
1125 0.0000000000000000 },
1126 { -4.0000000000000089, 2, 10,
1127 10.000000000000000 },
1128 { 25.999999999999964, 2, 10,
1129 20.000000000000000 },
1130 { 156.00000000000000, 2, 10,
1131 30.000000000000000 },
1132 { 386.00000000000000, 2, 10,
1133 40.000000000000000 },
1134 { 716.00000000000000, 2, 10,
1135 50.000000000000000 },
1136 { 1146.0000000000000, 2, 10,
1137 60.000000000000000 },
1138 { 1676.0000000000000, 2, 10,
1139 70.000000000000000 },
1140 { 2306.0000000000000, 2, 10,
1141 80.000000000000000 },
1142 { 3036.0000000000000, 2, 10,
1143 90.000000000000000 },
1144 { 3866.0000000000000, 2, 10,
1145 100.00000000000000 },
1146 };
1147
1148 // Test function for n=2, m=10.
1149 template <typename Tp>
1150 void test021()
1151 {
1152 const Tp eps = std::numeric_limits<Tp>::epsilon();
1153 Tp max_abs_diff = -Tp(1);
1154 Tp max_abs_frac = -Tp(1);
1155 unsigned int num_datum = sizeof(data021)
1156 / sizeof(testcase_assoc_laguerre<double>);
1157 for (unsigned int i = 0; i < num_datum; ++i)
1158 {
1159 const Tp f = std::tr1::assoc_laguerre(Tp(data021[i].n), Tp(data021[i].m),
1160 Tp(data021[i].x));
1161 const Tp f0 = data021[i].f0;
1162 const Tp diff = f - f0;
1163 if (std::abs(diff) > max_abs_diff)
1164 max_abs_diff = std::abs(diff);
1165 if (std::abs(f0) > Tp(10) * eps
1166 && std::abs(f) > Tp(10) * eps)
1167 {
1168 const Tp frac = diff / f0;
1169 if (std::abs(frac) > max_abs_frac)
1170 max_abs_frac = std::abs(frac);
1171 }
1172 }
1173 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1174 }
1175
1176 // Test data for n=2, m=20.
1177 testcase_assoc_laguerre<double> data022[] = {
1178 { 231.00000000000000, 2, 20,
1179 0.0000000000000000 },
1180 { 61.000000000000206, 2, 20,
1181 10.000000000000000 },
1182 { -8.9999999999999982, 2, 20,
1183 20.000000000000000 },
1184 { 21.000000000000135, 2, 20,
1185 30.000000000000000 },
1186 { 151.00000000000054, 2, 20,
1187 40.000000000000000 },
1188 { 381.00000000000000, 2, 20,
1189 50.000000000000000 },
1190 { 711.00000000000000, 2, 20,
1191 60.000000000000000 },
1192 { 1141.0000000000000, 2, 20,
1193 70.000000000000000 },
1194 { 1670.9999999999998, 2, 20,
1195 80.000000000000000 },
1196 { 2301.0000000000000, 2, 20,
1197 90.000000000000000 },
1198 { 3031.0000000000000, 2, 20,
1199 100.00000000000000 },
1200 };
1201
1202 // Test function for n=2, m=20.
1203 template <typename Tp>
1204 void test022()
1205 {
1206 const Tp eps = std::numeric_limits<Tp>::epsilon();
1207 Tp max_abs_diff = -Tp(1);
1208 Tp max_abs_frac = -Tp(1);
1209 unsigned int num_datum = sizeof(data022)
1210 / sizeof(testcase_assoc_laguerre<double>);
1211 for (unsigned int i = 0; i < num_datum; ++i)
1212 {
1213 const Tp f = std::tr1::assoc_laguerre(Tp(data022[i].n), Tp(data022[i].m),
1214 Tp(data022[i].x));
1215 const Tp f0 = data022[i].f0;
1216 const Tp diff = f - f0;
1217 if (std::abs(diff) > max_abs_diff)
1218 max_abs_diff = std::abs(diff);
1219 if (std::abs(f0) > Tp(10) * eps
1220 && std::abs(f) > Tp(10) * eps)
1221 {
1222 const Tp frac = diff / f0;
1223 if (std::abs(frac) > max_abs_frac)
1224 max_abs_frac = std::abs(frac);
1225 }
1226 }
1227 VERIFY(max_abs_frac < Tp(5.0000000000000039e-13));
1228 }
1229
1230 // Test data for n=2, m=50.
1231 testcase_assoc_laguerre<double> data023[] = {
1232 { 1326.0000000000000, 2, 50,
1233 0.0000000000000000 },
1234 { 855.99999999999716, 2, 50,
1235 10.000000000000000 },
1236 { 485.99999999999829, 2, 50,
1237 20.000000000000000 },
1238 { 215.99999999999935, 2, 50,
1239 30.000000000000000 },
1240 { 45.999999999999787, 2, 50,
1241 40.000000000000000 },
1242 { -23.999999999999684, 2, 50,
1243 50.000000000000000 },
1244 { 6.0000000000001217, 2, 50,
1245 60.000000000000000 },
1246 { 135.99999999999972, 2, 50,
1247 70.000000000000000 },
1248 { 365.99999999999892, 2, 50,
1249 80.000000000000000 },
1250 { 695.99999999999784, 2, 50,
1251 90.000000000000000 },
1252 { 1125.9999999999964, 2, 50,
1253 100.00000000000000 },
1254 };
1255
1256 // Test function for n=2, m=50.
1257 template <typename Tp>
1258 void test023()
1259 {
1260 const Tp eps = std::numeric_limits<Tp>::epsilon();
1261 Tp max_abs_diff = -Tp(1);
1262 Tp max_abs_frac = -Tp(1);
1263 unsigned int num_datum = sizeof(data023)
1264 / sizeof(testcase_assoc_laguerre<double>);
1265 for (unsigned int i = 0; i < num_datum; ++i)
1266 {
1267 const Tp f = std::tr1::assoc_laguerre(Tp(data023[i].n), Tp(data023[i].m),
1268 Tp(data023[i].x));
1269 const Tp f0 = data023[i].f0;
1270 const Tp diff = f - f0;
1271 if (std::abs(diff) > max_abs_diff)
1272 max_abs_diff = std::abs(diff);
1273 if (std::abs(f0) > Tp(10) * eps
1274 && std::abs(f) > Tp(10) * eps)
1275 {
1276 const Tp frac = diff / f0;
1277 if (std::abs(frac) > max_abs_frac)
1278 max_abs_frac = std::abs(frac);
1279 }
1280 }
1281 VERIFY(max_abs_frac < Tp(2.5000000000000015e-12));
1282 }
1283
1284 // Test data for n=2, m=100.
1285 testcase_assoc_laguerre<double> data024[] = {
1286 { 5151.0000000000000, 2, 100,
1287 0.0000000000000000 },
1288 { 4181.0000000000655, 2, 100,
1289 10.000000000000000 },
1290 { 3311.0000000000518, 2, 100,
1291 20.000000000000000 },
1292 { 2541.0000000000400, 2, 100,
1293 30.000000000000000 },
1294 { 1871.0000000000291, 2, 100,
1295 40.000000000000000 },
1296 { 1301.0000000000207, 2, 100,
1297 50.000000000000000 },
1298 { 831.00000000001364, 2, 100,
1299 60.000000000000000 },
1300 { 461.00000000000682, 2, 100,
1301 70.000000000000000 },
1302 { 191.00000000000227, 2, 100,
1303 80.000000000000000 },
1304 { 21.000000000000128, 2, 100,
1305 90.000000000000000 },
1306 { -49.000000000000369, 2, 100,
1307 100.00000000000000 },
1308 };
1309
1310 // Test function for n=2, m=100.
1311 template <typename Tp>
1312 void test024()
1313 {
1314 const Tp eps = std::numeric_limits<Tp>::epsilon();
1315 Tp max_abs_diff = -Tp(1);
1316 Tp max_abs_frac = -Tp(1);
1317 unsigned int num_datum = sizeof(data024)
1318 / sizeof(testcase_assoc_laguerre<double>);
1319 for (unsigned int i = 0; i < num_datum; ++i)
1320 {
1321 const Tp f = std::tr1::assoc_laguerre(Tp(data024[i].n), Tp(data024[i].m),
1322 Tp(data024[i].x));
1323 const Tp f0 = data024[i].f0;
1324 const Tp diff = f - f0;
1325 if (std::abs(diff) > max_abs_diff)
1326 max_abs_diff = std::abs(diff);
1327 if (std::abs(f0) > Tp(10) * eps
1328 && std::abs(f) > Tp(10) * eps)
1329 {
1330 const Tp frac = diff / f0;
1331 if (std::abs(frac) > max_abs_frac)
1332 max_abs_frac = std::abs(frac);
1333 }
1334 }
1335 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
1336 }
1337
1338 // Test data for n=5, m=0.
1339 testcase_assoc_laguerre<double> data025[] = {
1340 { 1.0000000000000000, 5, 0,
1341 0.0000000000000000 },
1342 { 34.333333333333329, 5, 0,
1343 10.000000000000000 },
1344 { -4765.6666666666670, 5, 0,
1345 20.000000000000000 },
1346 { -74399.000000000000, 5, 0,
1347 30.000000000000000 },
1348 { -418865.66666666663, 5, 0,
1349 40.000000000000000 },
1350 { -1498165.6666666665, 5, 0,
1351 50.000000000000000 },
1352 { -4122299.0000000000, 5, 0,
1353 60.000000000000000 },
1354 { -9551265.6666666679, 5, 0,
1355 70.000000000000000 },
1356 { -19595065.666666664, 5, 0,
1357 80.000000000000000 },
1358 { -36713699.000000000, 5, 0,
1359 90.000000000000000 },
1360 { -64117165.666666664, 5, 0,
1361 100.00000000000000 },
1362 };
1363
1364 // Test function for n=5, m=0.
1365 template <typename Tp>
1366 void test025()
1367 {
1368 const Tp eps = std::numeric_limits<Tp>::epsilon();
1369 Tp max_abs_diff = -Tp(1);
1370 Tp max_abs_frac = -Tp(1);
1371 unsigned int num_datum = sizeof(data025)
1372 / sizeof(testcase_assoc_laguerre<double>);
1373 for (unsigned int i = 0; i < num_datum; ++i)
1374 {
1375 const Tp f = std::tr1::assoc_laguerre(Tp(data025[i].n), Tp(data025[i].m),
1376 Tp(data025[i].x));
1377 const Tp f0 = data025[i].f0;
1378 const Tp diff = f - f0;
1379 if (std::abs(diff) > max_abs_diff)
1380 max_abs_diff = std::abs(diff);
1381 if (std::abs(f0) > Tp(10) * eps
1382 && std::abs(f) > Tp(10) * eps)
1383 {
1384 const Tp frac = diff / f0;
1385 if (std::abs(frac) > max_abs_frac)
1386 max_abs_frac = std::abs(frac);
1387 }
1388 }
1389 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1390 }
1391
1392 // Test data for n=5, m=1.
1393 testcase_assoc_laguerre<double> data026[] = {
1394 { 6.0000000000000000, 5, 1,
1395 0.0000000000000000 },
1396 { 22.666666666666661, 5, 1,
1397 10.000000000000000 },
1398 { -2960.6666666666661, 5, 1,
1399 20.000000000000000 },
1400 { -58944.000000000000, 5, 1,
1401 30.000000000000000 },
1402 { -357927.33333333326, 5, 1,
1403 40.000000000000000 },
1404 { -1329910.6666666665, 5, 1,
1405 50.000000000000000 },
1406 { -3744894.0000000000, 5, 1,
1407 60.000000000000000 },
1408 { -8812877.3333333321, 5, 1,
1409 70.000000000000000 },
1410 { -18283860.666666664, 5, 1,
1411 80.000000000000000 },
1412 { -34547844.000000000, 5, 1,
1413 90.000000000000000 },
1414 { -60734827.333333336, 5, 1,
1415 100.00000000000000 },
1416 };
1417
1418 // Test function for n=5, m=1.
1419 template <typename Tp>
1420 void test026()
1421 {
1422 const Tp eps = std::numeric_limits<Tp>::epsilon();
1423 Tp max_abs_diff = -Tp(1);
1424 Tp max_abs_frac = -Tp(1);
1425 unsigned int num_datum = sizeof(data026)
1426 / sizeof(testcase_assoc_laguerre<double>);
1427 for (unsigned int i = 0; i < num_datum; ++i)
1428 {
1429 const Tp f = std::tr1::assoc_laguerre(Tp(data026[i].n), Tp(data026[i].m),
1430 Tp(data026[i].x));
1431 const Tp f0 = data026[i].f0;
1432 const Tp diff = f - f0;
1433 if (std::abs(diff) > max_abs_diff)
1434 max_abs_diff = std::abs(diff);
1435 if (std::abs(f0) > Tp(10) * eps
1436 && std::abs(f) > Tp(10) * eps)
1437 {
1438 const Tp frac = diff / f0;
1439 if (std::abs(frac) > max_abs_frac)
1440 max_abs_frac = std::abs(frac);
1441 }
1442 }
1443 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1444 }
1445
1446 // Test data for n=5, m=2.
1447 testcase_assoc_laguerre<double> data027[] = {
1448 { 21.000000000000000, 5, 2,
1449 0.0000000000000000 },
1450 { 4.3333333333333339, 5, 2,
1451 10.000000000000000 },
1452 { -1679.0000000000000, 5, 2,
1453 20.000000000000000 },
1454 { -46029.000000000000, 5, 2,
1455 30.000000000000000 },
1456 { -304045.66666666669, 5, 2,
1457 40.000000000000000 },
1458 { -1176729.0000000002, 5, 2,
1459 50.000000000000000 },
1460 { -3395079.0000000000, 5, 2,
1461 60.000000000000000 },
1462 { -8120095.6666666660, 5, 2,
1463 70.000000000000000 },
1464 { -17042778.999999996, 5, 2,
1465 80.000000000000000 },
1466 { -32484129.000000000, 5, 2,
1467 90.000000000000000 },
1468 { -57495145.666666664, 5, 2,
1469 100.00000000000000 },
1470 };
1471
1472 // Test function for n=5, m=2.
1473 template <typename Tp>
1474 void test027()
1475 {
1476 const Tp eps = std::numeric_limits<Tp>::epsilon();
1477 Tp max_abs_diff = -Tp(1);
1478 Tp max_abs_frac = -Tp(1);
1479 unsigned int num_datum = sizeof(data027)
1480 / sizeof(testcase_assoc_laguerre<double>);
1481 for (unsigned int i = 0; i < num_datum; ++i)
1482 {
1483 const Tp f = std::tr1::assoc_laguerre(Tp(data027[i].n), Tp(data027[i].m),
1484 Tp(data027[i].x));
1485 const Tp f0 = data027[i].f0;
1486 const Tp diff = f - f0;
1487 if (std::abs(diff) > max_abs_diff)
1488 max_abs_diff = std::abs(diff);
1489 if (std::abs(f0) > Tp(10) * eps
1490 && std::abs(f) > Tp(10) * eps)
1491 {
1492 const Tp frac = diff / f0;
1493 if (std::abs(frac) > max_abs_frac)
1494 max_abs_frac = std::abs(frac);
1495 }
1496 }
1497 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1498 }
1499
1500 // Test data for n=5, m=5.
1501 testcase_assoc_laguerre<double> data028[] = {
1502 { 252.00000000000000, 5, 5,
1503 0.0000000000000000 },
1504 { -14.666666666666657, 5, 5,
1505 10.000000000000000 },
1506 { 51.999999999999957, 5, 5,
1507 20.000000000000000 },
1508 { -19548.000000000000, 5, 5,
1509 30.000000000000000 },
1510 { -178814.66666666660, 5, 5,
1511 40.000000000000000 },
1512 { -797747.99999999977, 5, 5,
1513 50.000000000000000 },
1514 { -2496348.0000000000, 5, 5,
1515 60.000000000000000 },
1516 { -6294614.6666666660, 5, 5,
1517 70.000000000000000 },
1518 { -13712547.999999996, 5, 5,
1519 80.000000000000000 },
1520 { -26870147.999999993, 5, 5,
1521 90.000000000000000 },
1522 { -48587414.666666672, 5, 5,
1523 100.00000000000000 },
1524 };
1525
1526 // Test function for n=5, m=5.
1527 template <typename Tp>
1528 void test028()
1529 {
1530 const Tp eps = std::numeric_limits<Tp>::epsilon();
1531 Tp max_abs_diff = -Tp(1);
1532 Tp max_abs_frac = -Tp(1);
1533 unsigned int num_datum = sizeof(data028)
1534 / sizeof(testcase_assoc_laguerre<double>);
1535 for (unsigned int i = 0; i < num_datum; ++i)
1536 {
1537 const Tp f = std::tr1::assoc_laguerre(Tp(data028[i].n), Tp(data028[i].m),
1538 Tp(data028[i].x));
1539 const Tp f0 = data028[i].f0;
1540 const Tp diff = f - f0;
1541 if (std::abs(diff) > max_abs_diff)
1542 max_abs_diff = std::abs(diff);
1543 if (std::abs(f0) > Tp(10) * eps
1544 && std::abs(f) > Tp(10) * eps)
1545 {
1546 const Tp frac = diff / f0;
1547 if (std::abs(frac) > max_abs_frac)
1548 max_abs_frac = std::abs(frac);
1549 }
1550 }
1551 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1552 }
1553
1554 // Test data for n=5, m=10.
1555 testcase_assoc_laguerre<double> data029[] = {
1556 { 3003.0000000000000, 5, 10,
1557 0.0000000000000000 },
1558 { 19.666666666666668, 5, 10,
1559 10.000000000000000 },
1560 { 36.333333333333272, 5, 10,
1561 20.000000000000000 },
1562 { -1947.0000000000000, 5, 10,
1563 30.000000000000000 },
1564 { -60930.333333333314, 5, 10,
1565 40.000000000000000 },
1566 { -381913.66666666651, 5, 10,
1567 50.000000000000000 },
1568 { -1419897.0000000000, 5, 10,
1569 60.000000000000000 },
1570 { -3979880.3333333330, 5, 10,
1571 70.000000000000000 },
1572 { -9316863.6666666642, 5, 10,
1573 80.000000000000000 },
1574 { -19235847.000000000, 5, 10,
1575 90.000000000000000 },
1576 { -36191830.333333328, 5, 10,
1577 100.00000000000000 },
1578 };
1579
1580 // Test function for n=5, m=10.
1581 template <typename Tp>
1582 void test029()
1583 {
1584 const Tp eps = std::numeric_limits<Tp>::epsilon();
1585 Tp max_abs_diff = -Tp(1);
1586 Tp max_abs_frac = -Tp(1);
1587 unsigned int num_datum = sizeof(data029)
1588 / sizeof(testcase_assoc_laguerre<double>);
1589 for (unsigned int i = 0; i < num_datum; ++i)
1590 {
1591 const Tp f = std::tr1::assoc_laguerre(Tp(data029[i].n), Tp(data029[i].m),
1592 Tp(data029[i].x));
1593 const Tp f0 = data029[i].f0;
1594 const Tp diff = f - f0;
1595 if (std::abs(diff) > max_abs_diff)
1596 max_abs_diff = std::abs(diff);
1597 if (std::abs(f0) > Tp(10) * eps
1598 && std::abs(f) > Tp(10) * eps)
1599 {
1600 const Tp frac = diff / f0;
1601 if (std::abs(frac) > max_abs_frac)
1602 max_abs_frac = std::abs(frac);
1603 }
1604 }
1605 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1606 }
1607
1608 // Test data for n=5, m=20.
1609 testcase_assoc_laguerre<double> data030[] = {
1610 { 53130.000000000000, 5, 20,
1611 0.0000000000000000 },
1612 { 1213.3333333333335, 5, 20,
1613 10.000000000000000 },
1614 { 129.99999999999963, 5, 20,
1615 20.000000000000000 },
1616 { -119.99999999999974, 5, 20,
1617 30.000000000000000 },
1618 { 463.33333333333320, 5, 20,
1619 40.000000000000000 },
1620 { -48120.000000000015, 5, 20,
1621 50.000000000000000 },
1622 { -345870.00000000017, 5, 20,
1623 60.000000000000000 },
1624 { -1342786.6666666667, 5, 20,
1625 70.000000000000000 },
1626 { -3838870.0000000009, 5, 20,
1627 80.000000000000000 },
1628 { -9084120.0000000000, 5, 20,
1629 90.000000000000000 },
1630 { -18878536.666666668, 5, 20,
1631 100.00000000000000 },
1632 };
1633
1634 // Test function for n=5, m=20.
1635 template <typename Tp>
1636 void test030()
1637 {
1638 const Tp eps = std::numeric_limits<Tp>::epsilon();
1639 Tp max_abs_diff = -Tp(1);
1640 Tp max_abs_frac = -Tp(1);
1641 unsigned int num_datum = sizeof(data030)
1642 / sizeof(testcase_assoc_laguerre<double>);
1643 for (unsigned int i = 0; i < num_datum; ++i)
1644 {
1645 const Tp f = std::tr1::assoc_laguerre(Tp(data030[i].n), Tp(data030[i].m),
1646 Tp(data030[i].x));
1647 const Tp f0 = data030[i].f0;
1648 const Tp diff = f - f0;
1649 if (std::abs(diff) > max_abs_diff)
1650 max_abs_diff = std::abs(diff);
1651 if (std::abs(f0) > Tp(10) * eps
1652 && std::abs(f) > Tp(10) * eps)
1653 {
1654 const Tp frac = diff / f0;
1655 if (std::abs(frac) > max_abs_frac)
1656 max_abs_frac = std::abs(frac);
1657 }
1658 }
1659 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1660 }
1661
1662 // Test data for n=5, m=50.
1663 testcase_assoc_laguerre<double> data031[] = {
1664 { 3478761.0000000000, 5, 50,
1665 0.0000000000000000 },
1666 { 1154544.3333333335, 5, 50,
1667 10.000000000000000 },
1668 { 264661.00000000006, 5, 50,
1669 20.000000000000000 },
1670 { 24111.000000000000, 5, 50,
1671 30.000000000000000 },
1672 { -2105.6666666666665, 5, 50,
1673 40.000000000000000 },
1674 { 1011.0000000000000, 5, 50,
1675 50.000000000000000 },
1676 { -1538.9999999999955, 5, 50,
1677 60.000000000000000 },
1678 { 5244.3333333333449, 5, 50,
1679 70.000000000000000 },
1680 { -13639.000000000015, 5, 50,
1681 80.000000000000000 },
1682 { -243189.00000000006, 5, 50,
1683 90.000000000000000 },
1684 { -1118405.6666666667, 5, 50,
1685 100.00000000000000 },
1686 };
1687
1688 // Test function for n=5, m=50.
1689 template <typename Tp>
1690 void test031()
1691 {
1692 const Tp eps = std::numeric_limits<Tp>::epsilon();
1693 Tp max_abs_diff = -Tp(1);
1694 Tp max_abs_frac = -Tp(1);
1695 unsigned int num_datum = sizeof(data031)
1696 / sizeof(testcase_assoc_laguerre<double>);
1697 for (unsigned int i = 0; i < num_datum; ++i)
1698 {
1699 const Tp f = std::tr1::assoc_laguerre(Tp(data031[i].n), Tp(data031[i].m),
1700 Tp(data031[i].x));
1701 const Tp f0 = data031[i].f0;
1702 const Tp diff = f - f0;
1703 if (std::abs(diff) > max_abs_diff)
1704 max_abs_diff = std::abs(diff);
1705 if (std::abs(f0) > Tp(10) * eps
1706 && std::abs(f) > Tp(10) * eps)
1707 {
1708 const Tp frac = diff / f0;
1709 if (std::abs(frac) > max_abs_frac)
1710 max_abs_frac = std::abs(frac);
1711 }
1712 }
1713 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1714 }
1715
1716 // Test data for n=5, m=100.
1717 testcase_assoc_laguerre<double> data032[] = {
1718 { 96560646.000000000, 5, 100,
1719 0.0000000000000000 },
1720 { 57264262.666666649, 5, 100,
1721 10.000000000000000 },
1722 { 31841379.333333332, 5, 100,
1723 20.000000000000000 },
1724 { 16281996.000000000, 5, 100,
1725 30.000000000000000 },
1726 { 7426112.6666666670, 5, 100,
1727 40.000000000000000 },
1728 { 2863729.3333333330, 5, 100,
1729 50.000000000000000 },
1730 { 834846.00000000000, 5, 100,
1731 60.000000000000000 },
1732 { 129462.66666666663, 5, 100,
1733 70.000000000000000 },
1734 { -12420.666666666666, 5, 100,
1735 80.000000000000000 },
1736 { -804.00000000000000, 5, 100,
1737 90.000000000000000 },
1738 { 4312.6666666666661, 5, 100,
1739 100.00000000000000 },
1740 };
1741
1742 // Test function for n=5, m=100.
1743 template <typename Tp>
1744 void test032()
1745 {
1746 const Tp eps = std::numeric_limits<Tp>::epsilon();
1747 Tp max_abs_diff = -Tp(1);
1748 Tp max_abs_frac = -Tp(1);
1749 unsigned int num_datum = sizeof(data032)
1750 / sizeof(testcase_assoc_laguerre<double>);
1751 for (unsigned int i = 0; i < num_datum; ++i)
1752 {
1753 const Tp f = std::tr1::assoc_laguerre(Tp(data032[i].n), Tp(data032[i].m),
1754 Tp(data032[i].x));
1755 const Tp f0 = data032[i].f0;
1756 const Tp diff = f - f0;
1757 if (std::abs(diff) > max_abs_diff)
1758 max_abs_diff = std::abs(diff);
1759 if (std::abs(f0) > Tp(10) * eps
1760 && std::abs(f) > Tp(10) * eps)
1761 {
1762 const Tp frac = diff / f0;
1763 if (std::abs(frac) > max_abs_frac)
1764 max_abs_frac = std::abs(frac);
1765 }
1766 }
1767 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1768 }
1769
1770 // Test data for n=10, m=0.
1771 testcase_assoc_laguerre<double> data033[] = {
1772 { 1.0000000000000000, 10, 0,
1773 0.0000000000000000 },
1774 { 27.984126984126981, 10, 0,
1775 10.000000000000000 },
1776 { 3227.8077601410932, 10, 0,
1777 20.000000000000000 },
1778 { 15129.571428571489, 10, 0,
1779 30.000000000000000 },
1780 { 79724066.608465582, 10, 0,
1781 40.000000000000000 },
1782 { 2037190065.3738980, 10, 0,
1783 50.000000000000000 },
1784 { 21804200401.000000, 10, 0,
1785 60.000000000000000 },
1786 { 144688291819.51855, 10, 0,
1787 70.000000000000000 },
1788 { 703324772760.08276, 10, 0,
1789 80.000000000000000 },
1790 { 2741055412243.8569, 10, 0,
1791 90.000000000000000 },
1792 { 9051283795429.5723, 10, 0,
1793 100.00000000000000 },
1794 };
1795
1796 // Test function for n=10, m=0.
1797 template <typename Tp>
1798 void test033()
1799 {
1800 const Tp eps = std::numeric_limits<Tp>::epsilon();
1801 Tp max_abs_diff = -Tp(1);
1802 Tp max_abs_frac = -Tp(1);
1803 unsigned int num_datum = sizeof(data033)
1804 / sizeof(testcase_assoc_laguerre<double>);
1805 for (unsigned int i = 0; i < num_datum; ++i)
1806 {
1807 const Tp f = std::tr1::assoc_laguerre(Tp(data033[i].n), Tp(data033[i].m),
1808 Tp(data033[i].x));
1809 const Tp f0 = data033[i].f0;
1810 const Tp diff = f - f0;
1811 if (std::abs(diff) > max_abs_diff)
1812 max_abs_diff = std::abs(diff);
1813 if (std::abs(f0) > Tp(10) * eps
1814 && std::abs(f) > Tp(10) * eps)
1815 {
1816 const Tp frac = diff / f0;
1817 if (std::abs(frac) > max_abs_frac)
1818 max_abs_frac = std::abs(frac);
1819 }
1820 }
1821 VERIFY(max_abs_frac < Tp(5.0000000000000039e-13));
1822 }
1823
1824 // Test data for n=10, m=1.
1825 testcase_assoc_laguerre<double> data034[] = {
1826 { 11.000000000000000, 10, 1,
1827 0.0000000000000000 },
1828 { 14.791887125220455, 10, 1,
1829 10.000000000000000 },
1830 { 2704.6507936507933, 10, 1,
1831 20.000000000000000 },
1832 { -182924.71428571426, 10, 1,
1833 30.000000000000000 },
1834 { 48066036.749559075, 10, 1,
1835 40.000000000000000 },
1836 { 1486264192.2169311, 10, 1,
1837 50.000000000000000 },
1838 { 17239562282.428574, 10, 1,
1839 60.000000000000000 },
1840 { 119837491630.13579, 10, 1,
1841 70.000000000000000 },
1842 { 600681375251.21167, 10, 1,
1843 80.000000000000000 },
1844 { 2392908405632.4287, 10, 1,
1845 90.000000000000000 },
1846 { 8033035722509.2373, 10, 1,
1847 100.00000000000000 },
1848 };
1849
1850 // Test function for n=10, m=1.
1851 template <typename Tp>
1852 void test034()
1853 {
1854 const Tp eps = std::numeric_limits<Tp>::epsilon();
1855 Tp max_abs_diff = -Tp(1);
1856 Tp max_abs_frac = -Tp(1);
1857 unsigned int num_datum = sizeof(data034)
1858 / sizeof(testcase_assoc_laguerre<double>);
1859 for (unsigned int i = 0; i < num_datum; ++i)
1860 {
1861 const Tp f = std::tr1::assoc_laguerre(Tp(data034[i].n), Tp(data034[i].m),
1862 Tp(data034[i].x));
1863 const Tp f0 = data034[i].f0;
1864 const Tp diff = f - f0;
1865 if (std::abs(diff) > max_abs_diff)
1866 max_abs_diff = std::abs(diff);
1867 if (std::abs(f0) > Tp(10) * eps
1868 && std::abs(f) > Tp(10) * eps)
1869 {
1870 const Tp frac = diff / f0;
1871 if (std::abs(frac) > max_abs_frac)
1872 max_abs_frac = std::abs(frac);
1873 }
1874 }
1875 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1876 }
1877
1878 // Test data for n=10, m=2.
1879 testcase_assoc_laguerre<double> data035[] = {
1880 { 66.000000000000000, 10, 2,
1881 0.0000000000000000 },
1882 { -14.511463844797174, 10, 2,
1883 10.000000000000000 },
1884 { 1064.5890652557318, 10, 2,
1885 20.000000000000000 },
1886 { -194569.71428571426, 10, 2,
1887 30.000000000000000 },
1888 { 27343569.350970022, 10, 2,
1889 40.000000000000000 },
1890 { 1067807661.6790125, 10, 2,
1891 50.000000000000000 },
1892 { 13529451580.285713, 10, 2,
1893 60.000000000000000 },
1894 { 98812724224.641937, 10, 2,
1895 70.000000000000000 },
1896 { 511482736187.34021, 10, 2,
1897 80.000000000000000 },
1898 { 2084478393087.4285, 10, 2,
1899 90.000000000000000 },
1900 { 7117724862237.0752, 10, 2,
1901 100.00000000000000 },
1902 };
1903
1904 // Test function for n=10, m=2.
1905 template <typename Tp>
1906 void test035()
1907 {
1908 const Tp eps = std::numeric_limits<Tp>::epsilon();
1909 Tp max_abs_diff = -Tp(1);
1910 Tp max_abs_frac = -Tp(1);
1911 unsigned int num_datum = sizeof(data035)
1912 / sizeof(testcase_assoc_laguerre<double>);
1913 for (unsigned int i = 0; i < num_datum; ++i)
1914 {
1915 const Tp f = std::tr1::assoc_laguerre(Tp(data035[i].n), Tp(data035[i].m),
1916 Tp(data035[i].x));
1917 const Tp f0 = data035[i].f0;
1918 const Tp diff = f - f0;
1919 if (std::abs(diff) > max_abs_diff)
1920 max_abs_diff = std::abs(diff);
1921 if (std::abs(f0) > Tp(10) * eps
1922 && std::abs(f) > Tp(10) * eps)
1923 {
1924 const Tp frac = diff / f0;
1925 if (std::abs(frac) > max_abs_frac)
1926 max_abs_frac = std::abs(frac);
1927 }
1928 }
1929 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1930 }
1931
1932 // Test data for n=10, m=5.
1933 testcase_assoc_laguerre<double> data036[] = {
1934 { 3003.0000000000000, 10, 5,
1935 0.0000000000000000 },
1936 { 11.641975308642024, 10, 5,
1937 10.000000000000000 },
1938 { -1137.5643738977069, 10, 5,
1939 20.000000000000000 },
1940 { -9254.1428571428605, 10, 5,
1941 30.000000000000000 },
1942 { 2121878.8377425023, 10, 5,
1943 40.000000000000000 },
1944 { 352060171.43033499, 10, 5,
1945 50.000000000000000 },
1946 { 6212028560.1428576, 10, 5,
1947 60.000000000000000 },
1948 { 53782171674.604919, 10, 5,
1949 70.000000000000000 },
1950 { 309720255837.56775, 10, 5,
1951 80.000000000000000 },
1952 { 1359043035731.5713, 10, 5,
1953 90.000000000000000 },
1954 { 4900625954398.9434, 10, 5,
1955 100.00000000000000 },
1956 };
1957
1958 // Test function for n=10, m=5.
1959 template <typename Tp>
1960 void test036()
1961 {
1962 const Tp eps = std::numeric_limits<Tp>::epsilon();
1963 Tp max_abs_diff = -Tp(1);
1964 Tp max_abs_frac = -Tp(1);
1965 unsigned int num_datum = sizeof(data036)
1966 / sizeof(testcase_assoc_laguerre<double>);
1967 for (unsigned int i = 0; i < num_datum; ++i)
1968 {
1969 const Tp f = std::tr1::assoc_laguerre(Tp(data036[i].n), Tp(data036[i].m),
1970 Tp(data036[i].x));
1971 const Tp f0 = data036[i].f0;
1972 const Tp diff = f - f0;
1973 if (std::abs(diff) > max_abs_diff)
1974 max_abs_diff = std::abs(diff);
1975 if (std::abs(f0) > Tp(10) * eps
1976 && std::abs(f) > Tp(10) * eps)
1977 {
1978 const Tp frac = diff / f0;
1979 if (std::abs(frac) > max_abs_frac)
1980 max_abs_frac = std::abs(frac);
1981 }
1982 }
1983 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
1984 }
1985
1986 // Test data for n=10, m=10.
1987 testcase_assoc_laguerre<double> data037[] = {
1988 { 184756.00000000000, 10, 10,
1989 0.0000000000000000 },
1990 { -210.84303350970018, 10, 10,
1991 10.000000000000000 },
1992 { 508.38095238095184, 10, 10,
1993 20.000000000000000 },
1994 { 2098.8571428571431, 10, 10,
1995 30.000000000000000 },
1996 { -536338.88536155189, 10, 10,
1997 40.000000000000000 },
1998 { 24865988.804232784, 10, 10,
1999 50.000000000000000 },
2000 { 1343756013.1428571, 10, 10,
2001 60.000000000000000 },
2002 { 17298791247.358025, 10, 10,
2003 70.000000000000000 },
2004 { 124528450897.79892, 10, 10,
2005 80.000000000000000 },
2006 { 632674413641.71423, 10, 10,
2007 90.000000000000000 },
2008 { 2533008935405.0298, 10, 10,
2009 100.00000000000000 },
2010 };
2011
2012 // Test function for n=10, m=10.
2013 template <typename Tp>
2014 void test037()
2015 {
2016 const Tp eps = std::numeric_limits<Tp>::epsilon();
2017 Tp max_abs_diff = -Tp(1);
2018 Tp max_abs_frac = -Tp(1);
2019 unsigned int num_datum = sizeof(data037)
2020 / sizeof(testcase_assoc_laguerre<double>);
2021 for (unsigned int i = 0; i < num_datum; ++i)
2022 {
2023 const Tp f = std::tr1::assoc_laguerre(Tp(data037[i].n), Tp(data037[i].m),
2024 Tp(data037[i].x));
2025 const Tp f0 = data037[i].f0;
2026 const Tp diff = f - f0;
2027 if (std::abs(diff) > max_abs_diff)
2028 max_abs_diff = std::abs(diff);
2029 if (std::abs(f0) > Tp(10) * eps
2030 && std::abs(f) > Tp(10) * eps)
2031 {
2032 const Tp frac = diff / f0;
2033 if (std::abs(frac) > max_abs_frac)
2034 max_abs_frac = std::abs(frac);
2035 }
2036 }
2037 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2038 }
2039
2040 // Test data for n=10, m=20.
2041 testcase_assoc_laguerre<double> data038[] = {
2042 { 30045014.999999993, 10, 20,
2043 0.0000000000000000 },
2044 { -23087.733686067022, 10, 20,
2045 10.000000000000000 },
2046 { 207.23985890652347, 10, 20,
2047 20.000000000000000 },
2048 { 1407.8571428571497, 10, 20,
2049 30.000000000000000 },
2050 { -44618.156966490329, 10, 20,
2051 40.000000000000000 },
2052 { 158690.04409171085, 10, 20,
2053 50.000000000000000 },
2054 { -6870413.5714285728, 10, 20,
2055 60.000000000000000 },
2056 { 793841351.41975331, 10, 20,
2057 70.000000000000000 },
2058 { 13358288958.562618, 10, 20,
2059 80.000000000000000 },
2060 { 106073722407.85715, 10, 20,
2061 90.000000000000000 },
2062 { 566337213392.42493, 10, 20,
2063 100.00000000000000 },
2064 };
2065
2066 // Test function for n=10, m=20.
2067 template <typename Tp>
2068 void test038()
2069 {
2070 const Tp eps = std::numeric_limits<Tp>::epsilon();
2071 Tp max_abs_diff = -Tp(1);
2072 Tp max_abs_frac = -Tp(1);
2073 unsigned int num_datum = sizeof(data038)
2074 / sizeof(testcase_assoc_laguerre<double>);
2075 for (unsigned int i = 0; i < num_datum; ++i)
2076 {
2077 const Tp f = std::tr1::assoc_laguerre(Tp(data038[i].n), Tp(data038[i].m),
2078 Tp(data038[i].x));
2079 const Tp f0 = data038[i].f0;
2080 const Tp diff = f - f0;
2081 if (std::abs(diff) > max_abs_diff)
2082 max_abs_diff = std::abs(diff);
2083 if (std::abs(f0) > Tp(10) * eps
2084 && std::abs(f) > Tp(10) * eps)
2085 {
2086 const Tp frac = diff / f0;
2087 if (std::abs(frac) > max_abs_frac)
2088 max_abs_frac = std::abs(frac);
2089 }
2090 }
2091 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
2092 }
2093
2094 // Test data for n=10, m=50.
2095 testcase_assoc_laguerre<double> data039[] = {
2096 { 75394027566.000000, 10, 50,
2097 0.0000000000000000 },
2098 { 8048106183.3721361, 10, 50,
2099 10.000000000000000 },
2100 { 328045023.84832466, 10, 50,
2101 20.000000000000000 },
2102 { -2568769.7142857141, 10, 50,
2103 30.000000000000000 },
2104 { 6971.9964726631733, 10, 50,
2105 40.000000000000000 },
2106 { 136111.41446208110, 10, 50,
2107 50.000000000000000 },
2108 { -62462.571428570242, 10, 50,
2109 60.000000000000000 },
2110 { -248167.95061728527, 10, 50,
2111 70.000000000000000 },
2112 { 1941270.4091710777, 10, 50,
2113 80.000000000000000 },
2114 { -8643512.5714285783, 10, 50,
2115 90.000000000000000 },
2116 { -140863522.18342155, 10, 50,
2117 100.00000000000000 },
2118 };
2119
2120 // Test function for n=10, m=50.
2121 template <typename Tp>
2122 void test039()
2123 {
2124 const Tp eps = std::numeric_limits<Tp>::epsilon();
2125 Tp max_abs_diff = -Tp(1);
2126 Tp max_abs_frac = -Tp(1);
2127 unsigned int num_datum = sizeof(data039)
2128 / sizeof(testcase_assoc_laguerre<double>);
2129 for (unsigned int i = 0; i < num_datum; ++i)
2130 {
2131 const Tp f = std::tr1::assoc_laguerre(Tp(data039[i].n), Tp(data039[i].m),
2132 Tp(data039[i].x));
2133 const Tp f0 = data039[i].f0;
2134 const Tp diff = f - f0;
2135 if (std::abs(diff) > max_abs_diff)
2136 max_abs_diff = std::abs(diff);
2137 if (std::abs(f0) > Tp(10) * eps
2138 && std::abs(f) > Tp(10) * eps)
2139 {
2140 const Tp frac = diff / f0;
2141 if (std::abs(frac) > max_abs_frac)
2142 max_abs_frac = std::abs(frac);
2143 }
2144 }
2145 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
2146 }
2147
2148 // Test data for n=10, m=100.
2149 testcase_assoc_laguerre<double> data040[] = {
2150 { 46897636623981.000, 10, 100,
2151 0.0000000000000000 },
2152 { 16444031323272.084, 10, 100,
2153 10.000000000000000 },
2154 { 5020343986463.5391, 10, 100,
2155 20.000000000000000 },
2156 { 1270977490645.2859, 10, 100,
2157 30.000000000000000 },
2158 { 244835756822.62262, 10, 100,
2159 40.000000000000000 },
2160 { 29786827693.962963, 10, 100,
2161 50.000000000000000 },
2162 { 1127612095.2857144, 10, 100,
2163 60.000000000000000 },
2164 { -66370555.419753075, 10, 100,
2165 70.000000000000000 },
2166 { 10420852.957671957, 10, 100,
2167 80.000000000000000 },
2168 { -3373097.5714285718, 10, 100,
2169 90.000000000000000 },
2170 { 2065423.6807760142, 10, 100,
2171 100.00000000000000 },
2172 };
2173
2174 // Test function for n=10, m=100.
2175 template <typename Tp>
2176 void test040()
2177 {
2178 const Tp eps = std::numeric_limits<Tp>::epsilon();
2179 Tp max_abs_diff = -Tp(1);
2180 Tp max_abs_frac = -Tp(1);
2181 unsigned int num_datum = sizeof(data040)
2182 / sizeof(testcase_assoc_laguerre<double>);
2183 for (unsigned int i = 0; i < num_datum; ++i)
2184 {
2185 const Tp f = std::tr1::assoc_laguerre(Tp(data040[i].n), Tp(data040[i].m),
2186 Tp(data040[i].x));
2187 const Tp f0 = data040[i].f0;
2188 const Tp diff = f - f0;
2189 if (std::abs(diff) > max_abs_diff)
2190 max_abs_diff = std::abs(diff);
2191 if (std::abs(f0) > Tp(10) * eps
2192 && std::abs(f) > Tp(10) * eps)
2193 {
2194 const Tp frac = diff / f0;
2195 if (std::abs(frac) > max_abs_frac)
2196 max_abs_frac = std::abs(frac);
2197 }
2198 }
2199 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2200 }
2201
2202 // Test data for n=20, m=0.
2203 testcase_assoc_laguerre<double> data041[] = {
2204 { 1.0000000000000000, 20, 0,
2205 0.0000000000000000 },
2206 { -11.961333867812119, 20, 0,
2207 10.000000000000000 },
2208 { 2829.4728613531738, 20, 0,
2209 20.000000000000000 },
2210 { -18439.424502520938, 20, 0,
2211 30.000000000000000 },
2212 { 24799805.877530701, 20, 0,
2213 40.000000000000000 },
2214 { 7551960453.7672529, 20, 0,
2215 50.000000000000000 },
2216 { -1379223608444.9155, 20, 0,
2217 60.000000000000000 },
2218 { 165423821874449.94, 20, 0,
2219 70.000000000000000 },
2220 { 29500368536981676., 20, 0,
2221 80.000000000000000 },
2222 { 1.1292309514432899e+18, 20, 0,
2223 90.000000000000000 },
2224 { 2.2061882785931735e+19, 20, 0,
2225 100.00000000000000 },
2226 };
2227
2228 // Test function for n=20, m=0.
2229 template <typename Tp>
2230 void test041()
2231 {
2232 const Tp eps = std::numeric_limits<Tp>::epsilon();
2233 Tp max_abs_diff = -Tp(1);
2234 Tp max_abs_frac = -Tp(1);
2235 unsigned int num_datum = sizeof(data041)
2236 / sizeof(testcase_assoc_laguerre<double>);
2237 for (unsigned int i = 0; i < num_datum; ++i)
2238 {
2239 const Tp f = std::tr1::assoc_laguerre(Tp(data041[i].n), Tp(data041[i].m),
2240 Tp(data041[i].x));
2241 const Tp f0 = data041[i].f0;
2242 const Tp diff = f - f0;
2243 if (std::abs(diff) > max_abs_diff)
2244 max_abs_diff = std::abs(diff);
2245 if (std::abs(f0) > Tp(10) * eps
2246 && std::abs(f) > Tp(10) * eps)
2247 {
2248 const Tp frac = diff / f0;
2249 if (std::abs(frac) > max_abs_frac)
2250 max_abs_frac = std::abs(frac);
2251 }
2252 }
2253 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2254 }
2255
2256 // Test data for n=20, m=1.
2257 testcase_assoc_laguerre<double> data042[] = {
2258 { 21.000000000000000, 20, 1,
2259 0.0000000000000000 },
2260 { 19.900488129734079, 20, 1,
2261 10.000000000000000 },
2262 { 2208.0318569557589, 20, 1,
2263 20.000000000000000 },
2264 { 263690.96303121914, 20, 1,
2265 30.000000000000000 },
2266 { 40667285.630564235, 20, 1,
2267 40.000000000000000 },
2268 { 1737442572.8115418, 20, 1,
2269 50.000000000000000 },
2270 { -588280953643.28125, 20, 1,
2271 60.000000000000000 },
2272 { 45617733778241.359, 20, 1,
2273 70.000000000000000 },
2274 { 17293487114876860., 20, 1,
2275 80.000000000000000 },
2276 { 7.6219135858585024e+17, 20, 1,
2277 90.000000000000000 },
2278 { 1.6037288204336759e+19, 20, 1,
2279 100.00000000000000 },
2280 };
2281
2282 // Test function for n=20, m=1.
2283 template <typename Tp>
2284 void test042()
2285 {
2286 const Tp eps = std::numeric_limits<Tp>::epsilon();
2287 Tp max_abs_diff = -Tp(1);
2288 Tp max_abs_frac = -Tp(1);
2289 unsigned int num_datum = sizeof(data042)
2290 / sizeof(testcase_assoc_laguerre<double>);
2291 for (unsigned int i = 0; i < num_datum; ++i)
2292 {
2293 const Tp f = std::tr1::assoc_laguerre(Tp(data042[i].n), Tp(data042[i].m),
2294 Tp(data042[i].x));
2295 const Tp f0 = data042[i].f0;
2296 const Tp diff = f - f0;
2297 if (std::abs(diff) > max_abs_diff)
2298 max_abs_diff = std::abs(diff);
2299 if (std::abs(f0) > Tp(10) * eps
2300 && std::abs(f) > Tp(10) * eps)
2301 {
2302 const Tp frac = diff / f0;
2303 if (std::abs(frac) > max_abs_frac)
2304 max_abs_frac = std::abs(frac);
2305 }
2306 }
2307 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2308 }
2309
2310 // Test data for n=20, m=2.
2311 testcase_assoc_laguerre<double> data043[] = {
2312 { 231.00000000000003, 20, 2,
2313 0.0000000000000000 },
2314 { 47.009338065112935, 20, 2,
2315 10.000000000000000 },
2316 { -652.51305461728566, 20, 2,
2317 20.000000000000000 },
2318 { 285388.25895069109, 20, 2,
2319 30.000000000000000 },
2320 { 28664069.685624726, 20, 2,
2321 40.000000000000000 },
2322 { -1399631966.3144732, 20, 2,
2323 50.000000000000000 },
2324 { -115357373248.28198, 20, 2,
2325 60.000000000000000 },
2326 { -3357730872975.8545, 20, 2,
2327 70.000000000000000 },
2328 { 9765808962855122.0, 20, 2,
2329 80.000000000000000 },
2330 { 5.0717292945559181e+17, 20, 2,
2331 90.000000000000000 },
2332 { 1.1564665701334458e+19, 20, 2,
2333 100.00000000000000 },
2334 };
2335
2336 // Test function for n=20, m=2.
2337 template <typename Tp>
2338 void test043()
2339 {
2340 const Tp eps = std::numeric_limits<Tp>::epsilon();
2341 Tp max_abs_diff = -Tp(1);
2342 Tp max_abs_frac = -Tp(1);
2343 unsigned int num_datum = sizeof(data043)
2344 / sizeof(testcase_assoc_laguerre<double>);
2345 for (unsigned int i = 0; i < num_datum; ++i)
2346 {
2347 const Tp f = std::tr1::assoc_laguerre(Tp(data043[i].n), Tp(data043[i].m),
2348 Tp(data043[i].x));
2349 const Tp f0 = data043[i].f0;
2350 const Tp diff = f - f0;
2351 if (std::abs(diff) > max_abs_diff)
2352 max_abs_diff = std::abs(diff);
2353 if (std::abs(f0) > Tp(10) * eps
2354 && std::abs(f) > Tp(10) * eps)
2355 {
2356 const Tp frac = diff / f0;
2357 if (std::abs(frac) > max_abs_frac)
2358 max_abs_frac = std::abs(frac);
2359 }
2360 }
2361 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2362 }
2363
2364 // Test data for n=20, m=5.
2365 testcase_assoc_laguerre<double> data044[] = {
2366 { 53130.000000000000, 20, 5,
2367 0.0000000000000000 },
2368 { -158.69554500944145, 20, 5,
2369 10.000000000000000 },
2370 { 334.08012288038969, 20, 5,
2371 20.000000000000000 },
2372 { -198372.47662554169, 20, 5,
2373 30.000000000000000 },
2374 { -13627144.088579427, 20, 5,
2375 40.000000000000000 },
2376 { -780579985.44731593, 20, 5,
2377 50.000000000000000 },
2378 { 116648634237.73526, 20, 5,
2379 60.000000000000000 },
2380 { -12347348707739.742, 20, 5,
2381 70.000000000000000 },
2382 { 1199516248034090.8, 20, 5,
2383 80.000000000000000 },
2384 { 1.3451503195078531e+17, 20, 5,
2385 90.000000000000000 },
2386 { 4.1058904276111483e+18, 20, 5,
2387 100.00000000000000 },
2388 };
2389
2390 // Test function for n=20, m=5.
2391 template <typename Tp>
2392 void test044()
2393 {
2394 const Tp eps = std::numeric_limits<Tp>::epsilon();
2395 Tp max_abs_diff = -Tp(1);
2396 Tp max_abs_frac = -Tp(1);
2397 unsigned int num_datum = sizeof(data044)
2398 / sizeof(testcase_assoc_laguerre<double>);
2399 for (unsigned int i = 0; i < num_datum; ++i)
2400 {
2401 const Tp f = std::tr1::assoc_laguerre(Tp(data044[i].n), Tp(data044[i].m),
2402 Tp(data044[i].x));
2403 const Tp f0 = data044[i].f0;
2404 const Tp diff = f - f0;
2405 if (std::abs(diff) > max_abs_diff)
2406 max_abs_diff = std::abs(diff);
2407 if (std::abs(f0) > Tp(10) * eps
2408 && std::abs(f) > Tp(10) * eps)
2409 {
2410 const Tp frac = diff / f0;
2411 if (std::abs(frac) > max_abs_frac)
2412 max_abs_frac = std::abs(frac);
2413 }
2414 }
2415 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2416 }
2417
2418 // Test data for n=20, m=10.
2419 testcase_assoc_laguerre<double> data045[] = {
2420 { 30045015.000000000, 20, 10,
2421 0.0000000000000000 },
2422 { -1755.6226861258590, 20, 10,
2423 10.000000000000000 },
2424 { -9081.6726644737901, 20, 10,
2425 20.000000000000000 },
2426 { 95771.650912113109, 20, 10,
2427 30.000000000000000 },
2428 { 5089151.9272779226, 20, 10,
2429 40.000000000000000 },
2430 { 97400399.450206712, 20, 10,
2431 50.000000000000000 },
2432 { -16009352450.477026, 20, 10,
2433 60.000000000000000 },
2434 { 842271286905.01038, 20, 10,
2435 70.000000000000000 },
2436 { -79901725466796.938, 20, 10,
2437 80.000000000000000 },
2438 { 7944103675858638.0, 20, 10,
2439 90.000000000000000 },
2440 { 5.7429821893388288e+17, 20, 10,
2441 100.00000000000000 },
2442 };
2443
2444 // Test function for n=20, m=10.
2445 template <typename Tp>
2446 void test045()
2447 {
2448 const Tp eps = std::numeric_limits<Tp>::epsilon();
2449 Tp max_abs_diff = -Tp(1);
2450 Tp max_abs_frac = -Tp(1);
2451 unsigned int num_datum = sizeof(data045)
2452 / sizeof(testcase_assoc_laguerre<double>);
2453 for (unsigned int i = 0; i < num_datum; ++i)
2454 {
2455 const Tp f = std::tr1::assoc_laguerre(Tp(data045[i].n), Tp(data045[i].m),
2456 Tp(data045[i].x));
2457 const Tp f0 = data045[i].f0;
2458 const Tp diff = f - f0;
2459 if (std::abs(diff) > max_abs_diff)
2460 max_abs_diff = std::abs(diff);
2461 if (std::abs(f0) > Tp(10) * eps
2462 && std::abs(f) > Tp(10) * eps)
2463 {
2464 const Tp frac = diff / f0;
2465 if (std::abs(frac) > max_abs_frac)
2466 max_abs_frac = std::abs(frac);
2467 }
2468 }
2469 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2470 }
2471
2472 // Test data for n=20, m=20.
2473 testcase_assoc_laguerre<double> data046[] = {
2474 { 137846528819.99994, 20, 20,
2475 0.0000000000000000 },
2476 { -136976.49571333214, 20, 20,
2477 10.000000000000000 },
2478 { 113878.49908041637, 20, 20,
2479 20.000000000000000 },
2480 { -342529.21778796182, 20, 20,
2481 30.000000000000000 },
2482 { -350112.66981443466, 20, 20,
2483 40.000000000000000 },
2484 { -10791735.172977794, 20, 20,
2485 50.000000000000000 },
2486 { -1038073940.0811402, 20, 20,
2487 60.000000000000000 },
2488 { 667312550.63616371, 20, 20,
2489 70.000000000000000 },
2490 { 741537869902.29028, 20, 20,
2491 80.000000000000000 },
2492 { -32378376755737.418, 20, 20,
2493 90.000000000000000 },
2494 { -601760332167934.75, 20, 20,
2495 100.00000000000000 },
2496 };
2497
2498 // Test function for n=20, m=20.
2499 template <typename Tp>
2500 void test046()
2501 {
2502 const Tp eps = std::numeric_limits<Tp>::epsilon();
2503 Tp max_abs_diff = -Tp(1);
2504 Tp max_abs_frac = -Tp(1);
2505 unsigned int num_datum = sizeof(data046)
2506 / sizeof(testcase_assoc_laguerre<double>);
2507 for (unsigned int i = 0; i < num_datum; ++i)
2508 {
2509 const Tp f = std::tr1::assoc_laguerre(Tp(data046[i].n), Tp(data046[i].m),
2510 Tp(data046[i].x));
2511 const Tp f0 = data046[i].f0;
2512 const Tp diff = f - f0;
2513 if (std::abs(diff) > max_abs_diff)
2514 max_abs_diff = std::abs(diff);
2515 if (std::abs(f0) > Tp(10) * eps
2516 && std::abs(f) > Tp(10) * eps)
2517 {
2518 const Tp frac = diff / f0;
2519 if (std::abs(frac) > max_abs_frac)
2520 max_abs_frac = std::abs(frac);
2521 }
2522 }
2523 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
2524 }
2525
2526 // Test data for n=20, m=50.
2527 testcase_assoc_laguerre<double> data047[] = {
2528 { 1.6188460366265789e+17, 20, 50,
2529 0.0000000000000000 },
2530 { 1599011936804291.5, 20, 50,
2531 10.000000000000000 },
2532 { -131273880831.42412, 20, 50,
2533 20.000000000000000 },
2534 { -3133213093.6903501, 20, 50,
2535 30.000000000000000 },
2536 { -213935628.04985175, 20, 50,
2537 40.000000000000000 },
2538 { -47375578.495921209, 20, 50,
2539 50.000000000000000 },
2540 { -115731015.14034875, 20, 50,
2541 60.000000000000000 },
2542 { -737415147.29420292, 20, 50,
2543 70.000000000000000 },
2544 { -2123455626.8621781, 20, 50,
2545 80.000000000000000 },
2546 { 29801266858.608925, 20, 50,
2547 90.000000000000000 },
2548 { -132886631026.82561, 20, 50,
2549 100.00000000000000 },
2550 };
2551
2552 // Test function for n=20, m=50.
2553 template <typename Tp>
2554 void test047()
2555 {
2556 const Tp eps = std::numeric_limits<Tp>::epsilon();
2557 Tp max_abs_diff = -Tp(1);
2558 Tp max_abs_frac = -Tp(1);
2559 unsigned int num_datum = sizeof(data047)
2560 / sizeof(testcase_assoc_laguerre<double>);
2561 for (unsigned int i = 0; i < num_datum; ++i)
2562 {
2563 const Tp f = std::tr1::assoc_laguerre(Tp(data047[i].n), Tp(data047[i].m),
2564 Tp(data047[i].x));
2565 const Tp f0 = data047[i].f0;
2566 const Tp diff = f - f0;
2567 if (std::abs(diff) > max_abs_diff)
2568 max_abs_diff = std::abs(diff);
2569 if (std::abs(f0) > Tp(10) * eps
2570 && std::abs(f) > Tp(10) * eps)
2571 {
2572 const Tp frac = diff / f0;
2573 if (std::abs(frac) > max_abs_frac)
2574 max_abs_frac = std::abs(frac);
2575 }
2576 }
2577 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
2578 }
2579
2580 // Test data for n=20, m=100.
2581 testcase_assoc_laguerre<double> data048[] = {
2582 { 2.9462227291176643e+22, 20, 100,
2583 0.0000000000000000 },
2584 { 3.5777890748701244e+21, 20, 100,
2585 10.000000000000000 },
2586 { 3.1584925521456765e+20, 20, 100,
2587 20.000000000000000 },
2588 { 1.7389599388424860e+19, 20, 100,
2589 30.000000000000000 },
2590 { 4.1401342745980646e+17, 20, 100,
2591 40.000000000000000 },
2592 { -79359706102062.672, 20, 100,
2593 50.000000000000000 },
2594 { 22736203650743.145, 20, 100,
2595 60.000000000000000 },
2596 { 65679006380.095215, 20, 100,
2597 70.000000000000000 },
2598 { -236263257610.77969, 20, 100,
2599 80.000000000000000 },
2600 { -38072644585.303085, 20, 100,
2601 90.000000000000000 },
2602 { 68236474365.173950, 20, 100,
2603 100.00000000000000 },
2604 };
2605
2606 // Test function for n=20, m=100.
2607 template <typename Tp>
2608 void test048()
2609 {
2610 const Tp eps = std::numeric_limits<Tp>::epsilon();
2611 Tp max_abs_diff = -Tp(1);
2612 Tp max_abs_frac = -Tp(1);
2613 unsigned int num_datum = sizeof(data048)
2614 / sizeof(testcase_assoc_laguerre<double>);
2615 for (unsigned int i = 0; i < num_datum; ++i)
2616 {
2617 const Tp f = std::tr1::assoc_laguerre(Tp(data048[i].n), Tp(data048[i].m),
2618 Tp(data048[i].x));
2619 const Tp f0 = data048[i].f0;
2620 const Tp diff = f - f0;
2621 if (std::abs(diff) > max_abs_diff)
2622 max_abs_diff = std::abs(diff);
2623 if (std::abs(f0) > Tp(10) * eps
2624 && std::abs(f) > Tp(10) * eps)
2625 {
2626 const Tp frac = diff / f0;
2627 if (std::abs(frac) > max_abs_frac)
2628 max_abs_frac = std::abs(frac);
2629 }
2630 }
2631 VERIFY(max_abs_frac < Tp(2.5000000000000015e-12));
2632 }
2633
2634 // Test data for n=50, m=0.
2635 testcase_assoc_laguerre<double> data049[] = {
2636 { 1.0000000000000000, 50, 0,
2637 0.0000000000000000 },
2638 { 17.534183446338233, 50, 0,
2639 10.000000000000000 },
2640 { 980.26961889790766, 50, 0,
2641 20.000000000000000 },
2642 { 293000.50735962350, 50, 0,
2643 30.000000000000000 },
2644 { -14896937.968694847, 50, 0,
2645 40.000000000000000 },
2646 { 2513677852.6916885, 50, 0,
2647 50.000000000000000 },
2648 { -883876565337.99207, 50, 0,
2649 60.000000000000000 },
2650 { -80967880733583.219, 50, 0,
2651 70.000000000000000 },
2652 { -8217471769564850.0, 50, 0,
2653 80.000000000000000 },
2654 { -2.1140031308048906e+18, 50, 0,
2655 90.000000000000000 },
2656 { -3.9710103487094673e+20, 50, 0,
2657 100.00000000000000 },
2658 };
2659
2660 // Test function for n=50, m=0.
2661 template <typename Tp>
2662 void test049()
2663 {
2664 const Tp eps = std::numeric_limits<Tp>::epsilon();
2665 Tp max_abs_diff = -Tp(1);
2666 Tp max_abs_frac = -Tp(1);
2667 unsigned int num_datum = sizeof(data049)
2668 / sizeof(testcase_assoc_laguerre<double>);
2669 for (unsigned int i = 0; i < num_datum; ++i)
2670 {
2671 const Tp f = std::tr1::assoc_laguerre(Tp(data049[i].n), Tp(data049[i].m),
2672 Tp(data049[i].x));
2673 const Tp f0 = data049[i].f0;
2674 const Tp diff = f - f0;
2675 if (std::abs(diff) > max_abs_diff)
2676 max_abs_diff = std::abs(diff);
2677 if (std::abs(f0) > Tp(10) * eps
2678 && std::abs(f) > Tp(10) * eps)
2679 {
2680 const Tp frac = diff / f0;
2681 if (std::abs(frac) > max_abs_frac)
2682 max_abs_frac = std::abs(frac);
2683 }
2684 }
2685 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2686 }
2687
2688 // Test data for n=50, m=1.
2689 testcase_assoc_laguerre<double> data050[] = {
2690 { 51.000000000000021, 50, 1,
2691 0.0000000000000000 },
2692 { 1.4214573271640045, 50, 1,
2693 10.000000000000000 },
2694 { -2574.8072295127863, 50, 1,
2695 20.000000000000000 },
2696 { 35846.479728359256, 50, 1,
2697 30.000000000000000 },
2698 { -48263698.768318526, 50, 1,
2699 40.000000000000000 },
2700 { 6161525870.2738571, 50, 1,
2701 50.000000000000000 },
2702 { -382655486658.47101, 50, 1,
2703 60.000000000000000 },
2704 { -109635579833241.69, 50, 1,
2705 70.000000000000000 },
2706 { -14623805817283476., 50, 1,
2707 80.000000000000000 },
2708 { -2.0666847190878118e+18, 50, 1,
2709 90.000000000000000 },
2710 { -1.4385187953997626e+20, 50, 1,
2711 100.00000000000000 },
2712 };
2713
2714 // Test function for n=50, m=1.
2715 template <typename Tp>
2716 void test050()
2717 {
2718 const Tp eps = std::numeric_limits<Tp>::epsilon();
2719 Tp max_abs_diff = -Tp(1);
2720 Tp max_abs_frac = -Tp(1);
2721 unsigned int num_datum = sizeof(data050)
2722 / sizeof(testcase_assoc_laguerre<double>);
2723 for (unsigned int i = 0; i < num_datum; ++i)
2724 {
2725 const Tp f = std::tr1::assoc_laguerre(Tp(data050[i].n), Tp(data050[i].m),
2726 Tp(data050[i].x));
2727 const Tp f0 = data050[i].f0;
2728 const Tp diff = f - f0;
2729 if (std::abs(diff) > max_abs_diff)
2730 max_abs_diff = std::abs(diff);
2731 if (std::abs(f0) > Tp(10) * eps
2732 && std::abs(f) > Tp(10) * eps)
2733 {
2734 const Tp frac = diff / f0;
2735 if (std::abs(frac) > max_abs_frac)
2736 max_abs_frac = std::abs(frac);
2737 }
2738 }
2739 VERIFY(max_abs_frac < Tp(5.0000000000000029e-12));
2740 }
2741
2742 // Test data for n=50, m=2.
2743 testcase_assoc_laguerre<double> data051[] = {
2744 { 1326.0000000000000, 50, 2,
2745 0.0000000000000000 },
2746 { -87.860732516444671, 50, 2,
2747 10.000000000000000 },
2748 { -5203.2351191780890, 50, 2,
2749 20.000000000000000 },
2750 { -461059.50012538873, 50, 2,
2751 30.000000000000000 },
2752 { -30476695.327440601, 50, 2,
2753 40.000000000000000 },
2754 { 3720804977.9338136, 50, 2,
2755 50.000000000000000 },
2756 { 362262002434.51440, 50, 2,
2757 60.000000000000000 },
2758 { -52210917867820.273, 50, 2,
2759 70.000000000000000 },
2760 { -9567965136901918.0, 50, 2,
2761 80.000000000000000 },
2762 { -8.9171277517712806e+17, 50, 2,
2763 90.000000000000000 },
2764 { 5.7231129448807039e+19, 50, 2,
2765 100.00000000000000 },
2766 };
2767
2768 // Test function for n=50, m=2.
2769 template <typename Tp>
2770 void test051()
2771 {
2772 const Tp eps = std::numeric_limits<Tp>::epsilon();
2773 Tp max_abs_diff = -Tp(1);
2774 Tp max_abs_frac = -Tp(1);
2775 unsigned int num_datum = sizeof(data051)
2776 / sizeof(testcase_assoc_laguerre<double>);
2777 for (unsigned int i = 0; i < num_datum; ++i)
2778 {
2779 const Tp f = std::tr1::assoc_laguerre(Tp(data051[i].n), Tp(data051[i].m),
2780 Tp(data051[i].x));
2781 const Tp f0 = data051[i].f0;
2782 const Tp diff = f - f0;
2783 if (std::abs(diff) > max_abs_diff)
2784 max_abs_diff = std::abs(diff);
2785 if (std::abs(f0) > Tp(10) * eps
2786 && std::abs(f) > Tp(10) * eps)
2787 {
2788 const Tp frac = diff / f0;
2789 if (std::abs(frac) > max_abs_frac)
2790 max_abs_frac = std::abs(frac);
2791 }
2792 }
2793 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2794 }
2795
2796 // Test data for n=50, m=5.
2797 testcase_assoc_laguerre<double> data052[] = {
2798 { 3478761.0000000000, 50, 5,
2799 0.0000000000000000 },
2800 { 1055.8381917651493, 50, 5,
2801 10.000000000000000 },
2802 { 15264.646660345048, 50, 5,
2803 20.000000000000000 },
2804 { 1229651.8966600855, 50, 5,
2805 30.000000000000000 },
2806 { 39270451.823656857, 50, 5,
2807 40.000000000000000 },
2808 { -4424062601.1152067, 50, 5,
2809 50.000000000000000 },
2810 { -186017434284.19220, 50, 5,
2811 60.000000000000000 },
2812 { 50972853949302.602, 50, 5,
2813 70.000000000000000 },
2814 { 6530702754012518.0, 50, 5,
2815 80.000000000000000 },
2816 { 6.8387592714678016e+17, 50, 5,
2817 90.000000000000000 },
2818 { 3.9198742504338366e+19, 50, 5,
2819 100.00000000000000 },
2820 };
2821
2822 // Test function for n=50, m=5.
2823 template <typename Tp>
2824 void test052()
2825 {
2826 const Tp eps = std::numeric_limits<Tp>::epsilon();
2827 Tp max_abs_diff = -Tp(1);
2828 Tp max_abs_frac = -Tp(1);
2829 unsigned int num_datum = sizeof(data052)
2830 / sizeof(testcase_assoc_laguerre<double>);
2831 for (unsigned int i = 0; i < num_datum; ++i)
2832 {
2833 const Tp f = std::tr1::assoc_laguerre(Tp(data052[i].n), Tp(data052[i].m),
2834 Tp(data052[i].x));
2835 const Tp f0 = data052[i].f0;
2836 const Tp diff = f - f0;
2837 if (std::abs(diff) > max_abs_diff)
2838 max_abs_diff = std::abs(diff);
2839 if (std::abs(f0) > Tp(10) * eps
2840 && std::abs(f) > Tp(10) * eps)
2841 {
2842 const Tp frac = diff / f0;
2843 if (std::abs(frac) > max_abs_frac)
2844 max_abs_frac = std::abs(frac);
2845 }
2846 }
2847 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2848 }
2849
2850 // Test data for n=50, m=10.
2851 testcase_assoc_laguerre<double> data053[] = {
2852 { 75394027565.999985, 50, 10,
2853 0.0000000000000000 },
2854 { 91833.924098770134, 50, 10,
2855 10.000000000000000 },
2856 { 330501.87929778261, 50, 10,
2857 20.000000000000000 },
2858 { 3625088.1635972545, 50, 10,
2859 30.000000000000000 },
2860 { 213954727.28632003, 50, 10,
2861 40.000000000000000 },
2862 { -9381006937.7517643, 50, 10,
2863 50.000000000000000 },
2864 { 535333683777.48627, 50, 10,
2865 60.000000000000000 },
2866 { 18824406573722.156, 50, 10,
2867 70.000000000000000 },
2868 { -533858276780012.81, 50, 10,
2869 80.000000000000000 },
2870 { -52995774666704024., 50, 10,
2871 90.000000000000000 },
2872 { 6.0504182862448855e+18, 50, 10,
2873 100.00000000000000 },
2874 };
2875
2876 // Test function for n=50, m=10.
2877 template <typename Tp>
2878 void test053()
2879 {
2880 const Tp eps = std::numeric_limits<Tp>::epsilon();
2881 Tp max_abs_diff = -Tp(1);
2882 Tp max_abs_frac = -Tp(1);
2883 unsigned int num_datum = sizeof(data053)
2884 / sizeof(testcase_assoc_laguerre<double>);
2885 for (unsigned int i = 0; i < num_datum; ++i)
2886 {
2887 const Tp f = std::tr1::assoc_laguerre(Tp(data053[i].n), Tp(data053[i].m),
2888 Tp(data053[i].x));
2889 const Tp f0 = data053[i].f0;
2890 const Tp diff = f - f0;
2891 if (std::abs(diff) > max_abs_diff)
2892 max_abs_diff = std::abs(diff);
2893 if (std::abs(f0) > Tp(10) * eps
2894 && std::abs(f) > Tp(10) * eps)
2895 {
2896 const Tp frac = diff / f0;
2897 if (std::abs(frac) > max_abs_frac)
2898 max_abs_frac = std::abs(frac);
2899 }
2900 }
2901 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
2902 }
2903
2904 // Test data for n=50, m=20.
2905 testcase_assoc_laguerre<double> data054[] = {
2906 { 1.6188460366265779e+17, 50, 20,
2907 0.0000000000000000 },
2908 { -307637087.25169420, 50, 20,
2909 10.000000000000000 },
2910 { 12524651.102974579, 50, 20,
2911 20.000000000000000 },
2912 { -315460483.86210549, 50, 20,
2913 30.000000000000000 },
2914 { -1889683587.3459976, 50, 20,
2915 40.000000000000000 },
2916 { 37457044404.200340, 50, 20,
2917 50.000000000000000 },
2918 { -843831858224.71826, 50, 20,
2919 60.000000000000000 },
2920 { -92231643172.313248, 50, 20,
2921 70.000000000000000 },
2922 { 904211757769501.25, 50, 20,
2923 80.000000000000000 },
2924 { 46508193600283288., 50, 20,
2925 90.000000000000000 },
2926 { 2.3216887928162714e+18, 50, 20,
2927 100.00000000000000 },
2928 };
2929
2930 // Test function for n=50, m=20.
2931 template <typename Tp>
2932 void test054()
2933 {
2934 const Tp eps = std::numeric_limits<Tp>::epsilon();
2935 Tp max_abs_diff = -Tp(1);
2936 Tp max_abs_frac = -Tp(1);
2937 unsigned int num_datum = sizeof(data054)
2938 / sizeof(testcase_assoc_laguerre<double>);
2939 for (unsigned int i = 0; i < num_datum; ++i)
2940 {
2941 const Tp f = std::tr1::assoc_laguerre(Tp(data054[i].n), Tp(data054[i].m),
2942 Tp(data054[i].x));
2943 const Tp f0 = data054[i].f0;
2944 const Tp diff = f - f0;
2945 if (std::abs(diff) > max_abs_diff)
2946 max_abs_diff = std::abs(diff);
2947 if (std::abs(f0) > Tp(10) * eps
2948 && std::abs(f) > Tp(10) * eps)
2949 {
2950 const Tp frac = diff / f0;
2951 if (std::abs(frac) > max_abs_frac)
2952 max_abs_frac = std::abs(frac);
2953 }
2954 }
2955 VERIFY(max_abs_frac < Tp(2.5000000000000015e-12));
2956 }
2957
2958 // Test data for n=50, m=50.
2959 testcase_assoc_laguerre<double> data055[] = {
2960 { 1.0089134454556417e+29, 50, 50,
2961 0.0000000000000000 },
2962 { 1.3822795753070569e+23, 50, 50,
2963 10.000000000000000 },
2964 { 95817260381628416., 50, 50,
2965 20.000000000000000 },
2966 { -910798580856013.88, 50, 50,
2967 30.000000000000000 },
2968 { 50513254049166.719, 50, 50,
2969 40.000000000000000 },
2970 { 84159703903349.859, 50, 50,
2971 50.000000000000000 },
2972 { -138805244691822.69, 50, 50,
2973 60.000000000000000 },
2974 { 181046391269246.25, 50, 50,
2975 70.000000000000000 },
2976 { 2086884905317107.2, 50, 50,
2977 80.000000000000000 },
2978 { -2765620139862432.5, 50, 50,
2979 90.000000000000000 },
2980 { -1.3706751678146291e+17, 50, 50,
2981 100.00000000000000 },
2982 };
2983
2984 // Test function for n=50, m=50.
2985 template <typename Tp>
2986 void test055()
2987 {
2988 const Tp eps = std::numeric_limits<Tp>::epsilon();
2989 Tp max_abs_diff = -Tp(1);
2990 Tp max_abs_frac = -Tp(1);
2991 unsigned int num_datum = sizeof(data055)
2992 / sizeof(testcase_assoc_laguerre<double>);
2993 for (unsigned int i = 0; i < num_datum; ++i)
2994 {
2995 const Tp f = std::tr1::assoc_laguerre(Tp(data055[i].n), Tp(data055[i].m),
2996 Tp(data055[i].x));
2997 const Tp f0 = data055[i].f0;
2998 const Tp diff = f - f0;
2999 if (std::abs(diff) > max_abs_diff)
3000 max_abs_diff = std::abs(diff);
3001 if (std::abs(f0) > Tp(10) * eps
3002 && std::abs(f) > Tp(10) * eps)
3003 {
3004 const Tp frac = diff / f0;
3005 if (std::abs(frac) > max_abs_frac)
3006 max_abs_frac = std::abs(frac);
3007 }
3008 }
3009 VERIFY(max_abs_frac < Tp(5.0000000000000039e-13));
3010 }
3011
3012 // Test data for n=50, m=100.
3013 testcase_assoc_laguerre<double> data056[] = {
3014 { 2.0128660909731929e+40, 50, 100,
3015 0.0000000000000000 },
3016 { 9.3675094807695474e+37, 50, 100,
3017 10.000000000000000 },
3018 { 1.3009321481877196e+35, 50, 100,
3019 20.000000000000000 },
3020 { 7.3720026893233823e+30, 50, 100,
3021 30.000000000000000 },
3022 { -6.0824679079634607e+25, 50, 100,
3023 40.000000000000000 },
3024 { -6.0053188793543624e+23, 50, 100,
3025 50.000000000000000 },
3026 { 1.4178129287264701e+22, 50, 100,
3027 60.000000000000000 },
3028 { -5.4652099341566765e+20, 50, 100,
3029 70.000000000000000 },
3030 { -1.0817271759263398e+20, 50, 100,
3031 80.000000000000000 },
3032 { 3.8058734007924187e+19, 50, 100,
3033 90.000000000000000 },
3034 { 4.7439240848028353e+19, 50, 100,
3035 100.00000000000000 },
3036 };
3037
3038 // Test function for n=50, m=100.
3039 template <typename Tp>
3040 void test056()
3041 {
3042 const Tp eps = std::numeric_limits<Tp>::epsilon();
3043 Tp max_abs_diff = -Tp(1);
3044 Tp max_abs_frac = -Tp(1);
3045 unsigned int num_datum = sizeof(data056)
3046 / sizeof(testcase_assoc_laguerre<double>);
3047 for (unsigned int i = 0; i < num_datum; ++i)
3048 {
3049 const Tp f = std::tr1::assoc_laguerre(Tp(data056[i].n), Tp(data056[i].m),
3050 Tp(data056[i].x));
3051 const Tp f0 = data056[i].f0;
3052 const Tp diff = f - f0;
3053 if (std::abs(diff) > max_abs_diff)
3054 max_abs_diff = std::abs(diff);
3055 if (std::abs(f0) > Tp(10) * eps
3056 && std::abs(f) > Tp(10) * eps)
3057 {
3058 const Tp frac = diff / f0;
3059 if (std::abs(frac) > max_abs_frac)
3060 max_abs_frac = std::abs(frac);
3061 }
3062 }
3063 VERIFY(max_abs_frac < Tp(2.5000000000000015e-12));
3064 }
3065
3066 // Test data for n=100, m=0.
3067 testcase_assoc_laguerre<double> data057[] = {
3068 { 1.0000000000000000, 100, 0,
3069 0.0000000000000000 },
3070 { 13.277662844303402, 100, 0,
3071 10.000000000000000 },
3072 { 1854.0367283243393, 100, 0,
3073 20.000000000000000 },
3074 { 170141.86987046539, 100, 0,
3075 30.000000000000000 },
3076 { -7272442.3156007063, 100, 0,
3077 40.000000000000000 },
3078 { 4847420871.2690468, 100, 0,
3079 50.000000000000000 },
3080 { 693492765740.29736, 100, 0,
3081 60.000000000000000 },
3082 { 17125518672239.707, 100, 0,
3083 70.000000000000000 },
3084 { -13763178176383754., 100, 0,
3085 80.000000000000000 },
3086 { 2.1307220490380198e+18, 100, 0,
3087 90.000000000000000 },
3088 { -2.6292260693068920e+20, 100, 0,
3089 100.00000000000000 },
3090 };
3091
3092 // Test function for n=100, m=0.
3093 template <typename Tp>
3094 void test057()
3095 {
3096 const Tp eps = std::numeric_limits<Tp>::epsilon();
3097 Tp max_abs_diff = -Tp(1);
3098 Tp max_abs_frac = -Tp(1);
3099 unsigned int num_datum = sizeof(data057)
3100 / sizeof(testcase_assoc_laguerre<double>);
3101 for (unsigned int i = 0; i < num_datum; ++i)
3102 {
3103 const Tp f = std::tr1::assoc_laguerre(Tp(data057[i].n), Tp(data057[i].m),
3104 Tp(data057[i].x));
3105 const Tp f0 = data057[i].f0;
3106 const Tp diff = f - f0;
3107 if (std::abs(diff) > max_abs_diff)
3108 max_abs_diff = std::abs(diff);
3109 if (std::abs(f0) > Tp(10) * eps
3110 && std::abs(f) > Tp(10) * eps)
3111 {
3112 const Tp frac = diff / f0;
3113 if (std::abs(frac) > max_abs_frac)
3114 max_abs_frac = std::abs(frac);
3115 }
3116 }
3117 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
3118 }
3119
3120 // Test data for n=100, m=1.
3121 testcase_assoc_laguerre<double> data058[] = {
3122 { 101.00000000000003, 100, 1,
3123 0.0000000000000000 },
3124 { -14.650661983680466, 100, 1,
3125 10.000000000000000 },
3126 { 1626.5010939361609, 100, 1,
3127 20.000000000000000 },
3128 { 417884.77658268705, 100, 1,
3129 30.000000000000000 },
3130 { -55617646.951649830, 100, 1,
3131 40.000000000000000 },
3132 { 884829874.26626098, 100, 1,
3133 50.000000000000000 },
3134 { 154466082750.32114, 100, 1,
3135 60.000000000000000 },
3136 { -101423973484646.05, 100, 1,
3137 70.000000000000000 },
3138 { -1388352348671755.5, 100, 1,
3139 80.000000000000000 },
3140 { 7.8048705513268326e+17, 100, 1,
3141 90.000000000000000 },
3142 { 1.6948925059042787e+19, 100, 1,
3143 100.00000000000000 },
3144 };
3145
3146 // Test function for n=100, m=1.
3147 template <typename Tp>
3148 void test058()
3149 {
3150 const Tp eps = std::numeric_limits<Tp>::epsilon();
3151 Tp max_abs_diff = -Tp(1);
3152 Tp max_abs_frac = -Tp(1);
3153 unsigned int num_datum = sizeof(data058)
3154 / sizeof(testcase_assoc_laguerre<double>);
3155 for (unsigned int i = 0; i < num_datum; ++i)
3156 {
3157 const Tp f = std::tr1::assoc_laguerre(Tp(data058[i].n), Tp(data058[i].m),
3158 Tp(data058[i].x));
3159 const Tp f0 = data058[i].f0;
3160 const Tp diff = f - f0;
3161 if (std::abs(diff) > max_abs_diff)
3162 max_abs_diff = std::abs(diff);
3163 if (std::abs(f0) > Tp(10) * eps
3164 && std::abs(f) > Tp(10) * eps)
3165 {
3166 const Tp frac = diff / f0;
3167 if (std::abs(frac) > max_abs_frac)
3168 max_abs_frac = std::abs(frac);
3169 }
3170 }
3171 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
3172 }
3173
3174 // Test data for n=100, m=2.
3175 testcase_assoc_laguerre<double> data059[] = {
3176 { 5151.0000000000055, 100, 2,
3177 0.0000000000000000 },
3178 { -150.22012290951341, 100, 2,
3179 10.000000000000000 },
3180 { -7655.0593294049440, 100, 2,
3181 20.000000000000000 },
3182 { -140996.69276179170, 100, 2,
3183 30.000000000000000 },
3184 { -38645171.278549291, 100, 2,
3185 40.000000000000000 },
3186 { -8889263688.2118778, 100, 2,
3187 50.000000000000000 },
3188 { -1010338971533.3397, 100, 2,
3189 60.000000000000000 },
3190 { -127582564332943.91, 100, 2,
3191 70.000000000000000 },
3192 { 15970305694654336., 100, 2,
3193 80.000000000000000 },
3194 { -1.6019844992862840e+18, 100, 2,
3195 90.000000000000000 },
3196 { 2.8267024730962919e+20, 100, 2,
3197 100.00000000000000 },
3198 };
3199
3200 // Test function for n=100, m=2.
3201 template <typename Tp>
3202 void test059()
3203 {
3204 const Tp eps = std::numeric_limits<Tp>::epsilon();
3205 Tp max_abs_diff = -Tp(1);
3206 Tp max_abs_frac = -Tp(1);
3207 unsigned int num_datum = sizeof(data059)
3208 / sizeof(testcase_assoc_laguerre<double>);
3209 for (unsigned int i = 0; i < num_datum; ++i)
3210 {
3211 const Tp f = std::tr1::assoc_laguerre(Tp(data059[i].n), Tp(data059[i].m),
3212 Tp(data059[i].x));
3213 const Tp f0 = data059[i].f0;
3214 const Tp diff = f - f0;
3215 if (std::abs(diff) > max_abs_diff)
3216 max_abs_diff = std::abs(diff);
3217 if (std::abs(f0) > Tp(10) * eps
3218 && std::abs(f) > Tp(10) * eps)
3219 {
3220 const Tp frac = diff / f0;
3221 if (std::abs(frac) > max_abs_frac)
3222 max_abs_frac = std::abs(frac);
3223 }
3224 }
3225 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
3226 }
3227
3228 // Test data for n=100, m=5.
3229 testcase_assoc_laguerre<double> data060[] = {
3230 { 96560646.000000030, 100, 5,
3231 0.0000000000000000 },
3232 { 2430.6732236677576, 100, 5,
3233 10.000000000000000 },
3234 { 111162.32026994640, 100, 5,
3235 20.000000000000000 },
3236 { 4036708.2599413753, 100, 5,
3237 30.000000000000000 },
3238 { -34055982.664405435, 100, 5,
3239 40.000000000000000 },
3240 { 30110688343.562344, 100, 5,
3241 50.000000000000000 },
3242 { 2651429940558.2920, 100, 5,
3243 60.000000000000000 },
3244 { 192108556058942.84, 100, 5,
3245 70.000000000000000 },
3246 { -25410533973455528., 100, 5,
3247 80.000000000000000 },
3248 { 2.1072955633564431e+18, 100, 5,
3249 90.000000000000000 },
3250 { -2.9434005355877260e+20, 100, 5,
3251 100.00000000000000 },
3252 };
3253
3254 // Test function for n=100, m=5.
3255 template <typename Tp>
3256 void test060()
3257 {
3258 const Tp eps = std::numeric_limits<Tp>::epsilon();
3259 Tp max_abs_diff = -Tp(1);
3260 Tp max_abs_frac = -Tp(1);
3261 unsigned int num_datum = sizeof(data060)
3262 / sizeof(testcase_assoc_laguerre<double>);
3263 for (unsigned int i = 0; i < num_datum; ++i)
3264 {
3265 const Tp f = std::tr1::assoc_laguerre(Tp(data060[i].n), Tp(data060[i].m),
3266 Tp(data060[i].x));
3267 const Tp f0 = data060[i].f0;
3268 const Tp diff = f - f0;
3269 if (std::abs(diff) > max_abs_diff)
3270 max_abs_diff = std::abs(diff);
3271 if (std::abs(f0) > Tp(10) * eps
3272 && std::abs(f) > Tp(10) * eps)
3273 {
3274 const Tp frac = diff / f0;
3275 if (std::abs(frac) > max_abs_frac)
3276 max_abs_frac = std::abs(frac);
3277 }
3278 }
3279 VERIFY(max_abs_frac < Tp(5.0000000000000039e-13));
3280 }
3281
3282 // Test data for n=100, m=10.
3283 testcase_assoc_laguerre<double> data061[] = {
3284 { 46897636623981.039, 100, 10,
3285 0.0000000000000000 },
3286 { 529208.11550990446, 100, 10,
3287 10.000000000000000 },
3288 { 7402892.1748803742, 100, 10,
3289 20.000000000000000 },
3290 { 88369632.083243459, 100, 10,
3291 30.000000000000000 },
3292 { 822187797.59096730, 100, 10,
3293 40.000000000000000 },
3294 { 180231446033.06866, 100, 10,
3295 50.000000000000000 },
3296 { 7922942703798.1309, 100, 10,
3297 60.000000000000000 },
3298 { 784424250559043.38, 100, 10,
3299 70.000000000000000 },
3300 { -16325634720239362., 100, 10,
3301 80.000000000000000 },
3302 { -1.0879588307443181e+18, 100, 10,
3303 90.000000000000000 },
3304 { 3.0114394463610495e+19, 100, 10,
3305 100.00000000000000 },
3306 };
3307
3308 // Test function for n=100, m=10.
3309 template <typename Tp>
3310 void test061()
3311 {
3312 const Tp eps = std::numeric_limits<Tp>::epsilon();
3313 Tp max_abs_diff = -Tp(1);
3314 Tp max_abs_frac = -Tp(1);
3315 unsigned int num_datum = sizeof(data061)
3316 / sizeof(testcase_assoc_laguerre<double>);
3317 for (unsigned int i = 0; i < num_datum; ++i)
3318 {
3319 const Tp f = std::tr1::assoc_laguerre(Tp(data061[i].n), Tp(data061[i].m),
3320 Tp(data061[i].x));
3321 const Tp f0 = data061[i].f0;
3322 const Tp diff = f - f0;
3323 if (std::abs(diff) > max_abs_diff)
3324 max_abs_diff = std::abs(diff);
3325 if (std::abs(f0) > Tp(10) * eps
3326 && std::abs(f) > Tp(10) * eps)
3327 {
3328 const Tp frac = diff / f0;
3329 if (std::abs(frac) > max_abs_frac)
3330 max_abs_frac = std::abs(frac);
3331 }
3332 }
3333 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
3334 }
3335
3336 // Test data for n=100, m=20.
3337 testcase_assoc_laguerre<double> data062[] = {
3338 { 2.9462227291176614e+22, 100, 20,
3339 0.0000000000000000 },
3340 { 313694958939.90436, 100, 20,
3341 10.000000000000000 },
3342 { 45396489338.096252, 100, 20,
3343 20.000000000000000 },
3344 { -7215826758.0078783, 100, 20,
3345 30.000000000000000 },
3346 { 825949194005.88831, 100, 20,
3347 40.000000000000000 },
3348 { -2764742119971.0747, 100, 20,
3349 50.000000000000000 },
3350 { -219802198273516.03, 100, 20,
3351 60.000000000000000 },
3352 { -1699053306145266.0, 100, 20,
3353 70.000000000000000 },
3354 { 3.5495709345023853e+17, 100, 20,
3355 80.000000000000000 },
3356 { -9.6128675110292439e+18, 100, 20,
3357 90.000000000000000 },
3358 { 4.3619868422072153e+20, 100, 20,
3359 100.00000000000000 },
3360 };
3361
3362 // Test function for n=100, m=20.
3363 template <typename Tp>
3364 void test062()
3365 {
3366 const Tp eps = std::numeric_limits<Tp>::epsilon();
3367 Tp max_abs_diff = -Tp(1);
3368 Tp max_abs_frac = -Tp(1);
3369 unsigned int num_datum = sizeof(data062)
3370 / sizeof(testcase_assoc_laguerre<double>);
3371 for (unsigned int i = 0; i < num_datum; ++i)
3372 {
3373 const Tp f = std::tr1::assoc_laguerre(Tp(data062[i].n), Tp(data062[i].m),
3374 Tp(data062[i].x));
3375 const Tp f0 = data062[i].f0;
3376 const Tp diff = f - f0;
3377 if (std::abs(diff) > max_abs_diff)
3378 max_abs_diff = std::abs(diff);
3379 if (std::abs(f0) > Tp(10) * eps
3380 && std::abs(f) > Tp(10) * eps)
3381 {
3382 const Tp frac = diff / f0;
3383 if (std::abs(frac) > max_abs_frac)
3384 max_abs_frac = std::abs(frac);
3385 }
3386 }
3387 VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
3388 }
3389
3390 // Test data for n=100, m=50.
3391 testcase_assoc_laguerre<double> data063[] = {
3392 { 2.0128660909731931e+40, 100, 50,
3393 0.0000000000000000 },
3394 { -4.0151443913473681e+28, 100, 50,
3395 10.000000000000000 },
3396 { 3.2199632594552201e+22, 100, 50,
3397 20.000000000000000 },
3398 { -2.7568702092659717e+20, 100, 50,
3399 30.000000000000000 },
3400 { 7.5553066015421530e+19, 100, 50,
3401 40.000000000000000 },
3402 { -2.7651625252388041e+19, 100, 50,
3403 50.000000000000000 },
3404 { -5.8963680147283821e+19, 100, 50,
3405 60.000000000000000 },
3406 { -1.8082798163033126e+20, 100, 50,
3407 70.000000000000000 },
3408 { -3.9044276986817249e+20, 100, 50,
3409 80.000000000000000 },
3410 { 6.9926310700401904e+21, 100, 50,
3411 90.000000000000000 },
3412 { -5.5727272809923697e+22, 100, 50,
3413 100.00000000000000 },
3414 };
3415
3416 // Test function for n=100, m=50.
3417 template <typename Tp>
3418 void test063()
3419 {
3420 const Tp eps = std::numeric_limits<Tp>::epsilon();
3421 Tp max_abs_diff = -Tp(1);
3422 Tp max_abs_frac = -Tp(1);
3423 unsigned int num_datum = sizeof(data063)
3424 / sizeof(testcase_assoc_laguerre<double>);
3425 for (unsigned int i = 0; i < num_datum; ++i)
3426 {
3427 const Tp f = std::tr1::assoc_laguerre(Tp(data063[i].n), Tp(data063[i].m),
3428 Tp(data063[i].x));
3429 const Tp f0 = data063[i].f0;
3430 const Tp diff = f - f0;
3431 if (std::abs(diff) > max_abs_diff)
3432 max_abs_diff = std::abs(diff);
3433 if (std::abs(f0) > Tp(10) * eps
3434 && std::abs(f) > Tp(10) * eps)
3435 {
3436 const Tp frac = diff / f0;
3437 if (std::abs(frac) > max_abs_frac)
3438 max_abs_frac = std::abs(frac);
3439 }
3440 }
3441 VERIFY(max_abs_frac < Tp(1.0000000000000008e-12));
3442 }
3443
3444 // Test data for n=100, m=100.
3445 testcase_assoc_laguerre<double> data064[] = {
3446 { 9.0548514656103225e+58, 100, 100,
3447 0.0000000000000000 },
3448 { 1.3334078033060576e+54, 100, 100,
3449 10.000000000000000 },
3450 { 2.1002639254211231e+46, 100, 100,
3451 20.000000000000000 },
3452 { -1.1073158068796240e+39, 100, 100,
3453 30.000000000000000 },
3454 { -8.3640937363981405e+35, 100, 100,
3455 40.000000000000000 },
3456 { -6.5879339429312671e+32, 100, 100,
3457 50.000000000000000 },
3458 { -2.4190645077698453e+30, 100, 100,
3459 60.000000000000000 },
3460 { -7.9224960465662002e+29, 100, 100,
3461 70.000000000000000 },
3462 { -2.8605772478408853e+29, 100, 100,
3463 80.000000000000000 },
3464 { 2.4149589189610125e+28, 100, 100,
3465 90.000000000000000 },
3466 { 5.1146476014859003e+28, 100, 100,
3467 100.00000000000000 },
3468 };
3469
3470 // Test function for n=100, m=100.
3471 template <typename Tp>
3472 void test064()
3473 {
3474 const Tp eps = std::numeric_limits<Tp>::epsilon();
3475 Tp max_abs_diff = -Tp(1);
3476 Tp max_abs_frac = -Tp(1);
3477 unsigned int num_datum = sizeof(data064)
3478 / sizeof(testcase_assoc_laguerre<double>);
3479 for (unsigned int i = 0; i < num_datum; ++i)
3480 {
3481 const Tp f = std::tr1::assoc_laguerre(Tp(data064[i].n), Tp(data064[i].m),
3482 Tp(data064[i].x));
3483 const Tp f0 = data064[i].f0;
3484 const Tp diff = f - f0;
3485 if (std::abs(diff) > max_abs_diff)
3486 max_abs_diff = std::abs(diff);
3487 if (std::abs(f0) > Tp(10) * eps
3488 && std::abs(f) > Tp(10) * eps)
3489 {
3490 const Tp frac = diff / f0;
3491 if (std::abs(frac) > max_abs_frac)
3492 max_abs_frac = std::abs(frac);
3493 }
3494 }
3495 VERIFY(max_abs_frac < Tp(2.5000000000000015e-12));
3496 }
3497
3498 int main(int, char**)
3499 {
3500 test001<double>();
3501 test002<double>();
3502 test003<double>();
3503 test004<double>();
3504 test005<double>();
3505 test006<double>();
3506 test007<double>();
3507 test008<double>();
3508 test009<double>();
3509 test010<double>();
3510 test011<double>();
3511 test012<double>();
3512 test013<double>();
3513 test014<double>();
3514 test015<double>();
3515 test016<double>();
3516 test017<double>();
3517 test018<double>();
3518 test019<double>();
3519 test020<double>();
3520 test021<double>();
3521 test022<double>();
3522 test023<double>();
3523 test024<double>();
3524 test025<double>();
3525 test026<double>();
3526 test027<double>();
3527 test028<double>();
3528 test029<double>();
3529 test030<double>();
3530 test031<double>();
3531 test032<double>();
3532 test033<double>();
3533 test034<double>();
3534 test035<double>();
3535 test036<double>();
3536 test037<double>();
3537 test038<double>();
3538 test039<double>();
3539 test040<double>();
3540 test041<double>();
3541 test042<double>();
3542 test043<double>();
3543 test044<double>();
3544 test045<double>();
3545 test046<double>();
3546 test047<double>();
3547 test048<double>();
3548 test049<double>();
3549 test050<double>();
3550 test051<double>();
3551 test052<double>();
3552 test053<double>();
3553 test054<double>();
3554 test055<double>();
3555 test056<double>();
3556 test057<double>();
3557 test058<double>();
3558 test059<double>();
3559 test060<double>();
3560 test061<double>();
3561 test062<double>();
3562 test063<double>();
3563 test064<double>();
3564 return 0;
3565 }