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