1 |
424 |
jeremybenn |
// 2007-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
|
2 |
|
|
//
|
3 |
|
|
// Copyright (C) 2007, 2009 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 |
|
|
// ellint_3
|
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 k=-0.90000000000000002, nu=0.0000000000000000.
|
43 |
|
|
testcase_ellint_3<double> data001[] = {
|
44 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.0000000000000000,
|
45 |
|
|
0.0000000000000000 },
|
46 |
|
|
{ 0.17525427376115027, -0.90000000000000002, 0.0000000000000000,
|
47 |
|
|
0.17453292519943295 },
|
48 |
|
|
{ 0.35492464591297446, -0.90000000000000002, 0.0000000000000000,
|
49 |
|
|
0.34906585039886590 },
|
50 |
|
|
{ 0.54388221416157134, -0.90000000000000002, 0.0000000000000000,
|
51 |
|
|
0.52359877559829882 },
|
52 |
|
|
{ 0.74797400423532523, -0.90000000000000002, 0.0000000000000000,
|
53 |
|
|
0.69813170079773179 },
|
54 |
|
|
{ 0.97463898451966458, -0.90000000000000002, 0.0000000000000000,
|
55 |
|
|
0.87266462599716477 },
|
56 |
|
|
{ 1.2334463254523440, -0.90000000000000002, 0.0000000000000000,
|
57 |
|
|
1.0471975511965976 },
|
58 |
|
|
{ 1.5355247765594910, -0.90000000000000002, 0.0000000000000000,
|
59 |
|
|
1.2217304763960306 },
|
60 |
|
|
{ 1.8882928567775124, -0.90000000000000002, 0.0000000000000000,
|
61 |
|
|
1.3962634015954636 },
|
62 |
|
|
{ 2.2805491384227703, -0.90000000000000002, 0.0000000000000000,
|
63 |
|
|
1.5707963267948966 },
|
64 |
|
|
};
|
65 |
|
|
|
66 |
|
|
// Test function for k=-0.90000000000000002, nu=0.0000000000000000.
|
67 |
|
|
template <typename Tp>
|
68 |
|
|
void test001()
|
69 |
|
|
{
|
70 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
71 |
|
|
Tp max_abs_diff = -Tp(1);
|
72 |
|
|
Tp max_abs_frac = -Tp(1);
|
73 |
|
|
unsigned int num_datum = sizeof(data001)
|
74 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
75 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
76 |
|
|
{
|
77 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data001[i].k), Tp(data001[i].nu),
|
78 |
|
|
Tp(data001[i].phi));
|
79 |
|
|
const Tp f0 = data001[i].f0;
|
80 |
|
|
const Tp diff = f - f0;
|
81 |
|
|
if (std::abs(diff) > max_abs_diff)
|
82 |
|
|
max_abs_diff = std::abs(diff);
|
83 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
84 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
85 |
|
|
{
|
86 |
|
|
const Tp frac = diff / f0;
|
87 |
|
|
if (std::abs(frac) > max_abs_frac)
|
88 |
|
|
max_abs_frac = std::abs(frac);
|
89 |
|
|
}
|
90 |
|
|
}
|
91 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
// Test data for k=-0.90000000000000002, nu=0.10000000000000001.
|
95 |
|
|
testcase_ellint_3<double> data002[] = {
|
96 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.10000000000000001,
|
97 |
|
|
0.0000000000000000 },
|
98 |
|
|
{ 0.17507714233254659, -0.90000000000000002, 0.10000000000000001,
|
99 |
|
|
0.17453292519943295 },
|
100 |
|
|
{ 0.35350932904326521, -0.90000000000000002, 0.10000000000000001,
|
101 |
|
|
0.34906585039886590 },
|
102 |
|
|
{ 0.53911129989870998, -0.90000000000000002, 0.10000000000000001,
|
103 |
|
|
0.52359877559829882 },
|
104 |
|
|
{ 0.73666644254508429, -0.90000000000000002, 0.10000000000000001,
|
105 |
|
|
0.69813170079773179 },
|
106 |
|
|
{ 0.95250736612100184, -0.90000000000000002, 0.10000000000000001,
|
107 |
|
|
0.87266462599716477 },
|
108 |
|
|
{ 1.1950199550905594, -0.90000000000000002, 0.10000000000000001,
|
109 |
|
|
1.0471975511965976 },
|
110 |
|
|
{ 1.4741687286340848, -0.90000000000000002, 0.10000000000000001,
|
111 |
|
|
1.2217304763960306 },
|
112 |
|
|
{ 1.7968678183506059, -0.90000000000000002, 0.10000000000000001,
|
113 |
|
|
1.3962634015954636 },
|
114 |
|
|
{ 2.1537868513875287, -0.90000000000000002, 0.10000000000000001,
|
115 |
|
|
1.5707963267948966 },
|
116 |
|
|
};
|
117 |
|
|
|
118 |
|
|
// Test function for k=-0.90000000000000002, nu=0.10000000000000001.
|
119 |
|
|
template <typename Tp>
|
120 |
|
|
void test002()
|
121 |
|
|
{
|
122 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
123 |
|
|
Tp max_abs_diff = -Tp(1);
|
124 |
|
|
Tp max_abs_frac = -Tp(1);
|
125 |
|
|
unsigned int num_datum = sizeof(data002)
|
126 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
127 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
128 |
|
|
{
|
129 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data002[i].k), Tp(data002[i].nu),
|
130 |
|
|
Tp(data002[i].phi));
|
131 |
|
|
const Tp f0 = data002[i].f0;
|
132 |
|
|
const Tp diff = f - f0;
|
133 |
|
|
if (std::abs(diff) > max_abs_diff)
|
134 |
|
|
max_abs_diff = std::abs(diff);
|
135 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
136 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
137 |
|
|
{
|
138 |
|
|
const Tp frac = diff / f0;
|
139 |
|
|
if (std::abs(frac) > max_abs_frac)
|
140 |
|
|
max_abs_frac = std::abs(frac);
|
141 |
|
|
}
|
142 |
|
|
}
|
143 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
144 |
|
|
}
|
145 |
|
|
|
146 |
|
|
// Test data for k=-0.90000000000000002, nu=0.20000000000000001.
|
147 |
|
|
testcase_ellint_3<double> data003[] = {
|
148 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.20000000000000001,
|
149 |
|
|
0.0000000000000000 },
|
150 |
|
|
{ 0.17490065089140930, -0.90000000000000002, 0.20000000000000001,
|
151 |
|
|
0.17453292519943295 },
|
152 |
|
|
{ 0.35211377590661436, -0.90000000000000002, 0.20000000000000001,
|
153 |
|
|
0.34906585039886590 },
|
154 |
|
|
{ 0.53448220334204122, -0.90000000000000002, 0.20000000000000001,
|
155 |
|
|
0.52359877559829882 },
|
156 |
|
|
{ 0.72591368943179613, -0.90000000000000002, 0.20000000000000001,
|
157 |
|
|
0.69813170079773179 },
|
158 |
|
|
{ 0.93192539780038763, -0.90000000000000002, 0.20000000000000001,
|
159 |
|
|
0.87266462599716477 },
|
160 |
|
|
{ 1.1600809679692683, -0.90000000000000002, 0.20000000000000001,
|
161 |
|
|
1.0471975511965976 },
|
162 |
|
|
{ 1.4195407225882508, -0.90000000000000002, 0.20000000000000001,
|
163 |
|
|
1.2217304763960306 },
|
164 |
|
|
{ 1.7168966476424528, -0.90000000000000002, 0.20000000000000001,
|
165 |
|
|
1.3962634015954636 },
|
166 |
|
|
{ 2.0443194576468890, -0.90000000000000002, 0.20000000000000001,
|
167 |
|
|
1.5707963267948966 },
|
168 |
|
|
};
|
169 |
|
|
|
170 |
|
|
// Test function for k=-0.90000000000000002, nu=0.20000000000000001.
|
171 |
|
|
template <typename Tp>
|
172 |
|
|
void test003()
|
173 |
|
|
{
|
174 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
175 |
|
|
Tp max_abs_diff = -Tp(1);
|
176 |
|
|
Tp max_abs_frac = -Tp(1);
|
177 |
|
|
unsigned int num_datum = sizeof(data003)
|
178 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
179 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
180 |
|
|
{
|
181 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data003[i].k), Tp(data003[i].nu),
|
182 |
|
|
Tp(data003[i].phi));
|
183 |
|
|
const Tp f0 = data003[i].f0;
|
184 |
|
|
const Tp diff = f - f0;
|
185 |
|
|
if (std::abs(diff) > max_abs_diff)
|
186 |
|
|
max_abs_diff = std::abs(diff);
|
187 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
188 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
189 |
|
|
{
|
190 |
|
|
const Tp frac = diff / f0;
|
191 |
|
|
if (std::abs(frac) > max_abs_frac)
|
192 |
|
|
max_abs_frac = std::abs(frac);
|
193 |
|
|
}
|
194 |
|
|
}
|
195 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
196 |
|
|
}
|
197 |
|
|
|
198 |
|
|
// Test data for k=-0.90000000000000002, nu=0.29999999999999999.
|
199 |
|
|
testcase_ellint_3<double> data004[] = {
|
200 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.29999999999999999,
|
201 |
|
|
0.0000000000000000 },
|
202 |
|
|
{ 0.17472479532647534, -0.90000000000000002, 0.29999999999999999,
|
203 |
|
|
0.17453292519943295 },
|
204 |
|
|
{ 0.35073750187374114, -0.90000000000000002, 0.29999999999999999,
|
205 |
|
|
0.34906585039886590 },
|
206 |
|
|
{ 0.52998766129466979, -0.90000000000000002, 0.29999999999999999,
|
207 |
|
|
0.52359877559829882 },
|
208 |
|
|
{ 0.71566993548699587, -0.90000000000000002, 0.29999999999999999,
|
209 |
|
|
0.69813170079773179 },
|
210 |
|
|
{ 0.91271517762560195, -0.90000000000000002, 0.29999999999999999,
|
211 |
|
|
0.87266462599716477 },
|
212 |
|
|
{ 1.1281241199843370, -0.90000000000000002, 0.29999999999999999,
|
213 |
|
|
1.0471975511965976 },
|
214 |
|
|
{ 1.3704929576917448, -0.90000000000000002, 0.29999999999999999,
|
215 |
|
|
1.2217304763960306 },
|
216 |
|
|
{ 1.6461981511487715, -0.90000000000000002, 0.29999999999999999,
|
217 |
|
|
1.3962634015954636 },
|
218 |
|
|
{ 1.9486280260314426, -0.90000000000000002, 0.29999999999999999,
|
219 |
|
|
1.5707963267948966 },
|
220 |
|
|
};
|
221 |
|
|
|
222 |
|
|
// Test function for k=-0.90000000000000002, nu=0.29999999999999999.
|
223 |
|
|
template <typename Tp>
|
224 |
|
|
void test004()
|
225 |
|
|
{
|
226 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
227 |
|
|
Tp max_abs_diff = -Tp(1);
|
228 |
|
|
Tp max_abs_frac = -Tp(1);
|
229 |
|
|
unsigned int num_datum = sizeof(data004)
|
230 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
231 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
232 |
|
|
{
|
233 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data004[i].k), Tp(data004[i].nu),
|
234 |
|
|
Tp(data004[i].phi));
|
235 |
|
|
const Tp f0 = data004[i].f0;
|
236 |
|
|
const Tp diff = f - f0;
|
237 |
|
|
if (std::abs(diff) > max_abs_diff)
|
238 |
|
|
max_abs_diff = std::abs(diff);
|
239 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
240 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
241 |
|
|
{
|
242 |
|
|
const Tp frac = diff / f0;
|
243 |
|
|
if (std::abs(frac) > max_abs_frac)
|
244 |
|
|
max_abs_frac = std::abs(frac);
|
245 |
|
|
}
|
246 |
|
|
}
|
247 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
248 |
|
|
}
|
249 |
|
|
|
250 |
|
|
// Test data for k=-0.90000000000000002, nu=0.40000000000000002.
|
251 |
|
|
testcase_ellint_3<double> data005[] = {
|
252 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.40000000000000002,
|
253 |
|
|
0.0000000000000000 },
|
254 |
|
|
{ 0.17454957156468839, -0.90000000000000002, 0.40000000000000002,
|
255 |
|
|
0.17453292519943295 },
|
256 |
|
|
{ 0.34938003933330430, -0.90000000000000002, 0.40000000000000002,
|
257 |
|
|
0.34906585039886590 },
|
258 |
|
|
{ 0.52562093533067455, -0.90000000000000002, 0.40000000000000002,
|
259 |
|
|
0.52359877559829882 },
|
260 |
|
|
{ 0.70589461324915703, -0.90000000000000002, 0.40000000000000002,
|
261 |
|
|
0.69813170079773179 },
|
262 |
|
|
{ 0.89472658511942849, -0.90000000000000002, 0.40000000000000002,
|
263 |
|
|
0.87266462599716477 },
|
264 |
|
|
{ 1.0987419542323440, -0.90000000000000002, 0.40000000000000002,
|
265 |
|
|
1.0471975511965976 },
|
266 |
|
|
{ 1.3261349565496301, -0.90000000000000002, 0.40000000000000002,
|
267 |
|
|
1.2217304763960306 },
|
268 |
|
|
{ 1.5831293909853767, -0.90000000000000002, 0.40000000000000002,
|
269 |
|
|
1.3962634015954636 },
|
270 |
|
|
{ 1.8641114227238349, -0.90000000000000002, 0.40000000000000002,
|
271 |
|
|
1.5707963267948966 },
|
272 |
|
|
};
|
273 |
|
|
|
274 |
|
|
// Test function for k=-0.90000000000000002, nu=0.40000000000000002.
|
275 |
|
|
template <typename Tp>
|
276 |
|
|
void test005()
|
277 |
|
|
{
|
278 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
279 |
|
|
Tp max_abs_diff = -Tp(1);
|
280 |
|
|
Tp max_abs_frac = -Tp(1);
|
281 |
|
|
unsigned int num_datum = sizeof(data005)
|
282 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
283 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
284 |
|
|
{
|
285 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data005[i].k), Tp(data005[i].nu),
|
286 |
|
|
Tp(data005[i].phi));
|
287 |
|
|
const Tp f0 = data005[i].f0;
|
288 |
|
|
const Tp diff = f - f0;
|
289 |
|
|
if (std::abs(diff) > max_abs_diff)
|
290 |
|
|
max_abs_diff = std::abs(diff);
|
291 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
292 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
293 |
|
|
{
|
294 |
|
|
const Tp frac = diff / f0;
|
295 |
|
|
if (std::abs(frac) > max_abs_frac)
|
296 |
|
|
max_abs_frac = std::abs(frac);
|
297 |
|
|
}
|
298 |
|
|
}
|
299 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
300 |
|
|
}
|
301 |
|
|
|
302 |
|
|
// Test data for k=-0.90000000000000002, nu=0.50000000000000000.
|
303 |
|
|
testcase_ellint_3<double> data006[] = {
|
304 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.50000000000000000,
|
305 |
|
|
0.0000000000000000 },
|
306 |
|
|
{ 0.17437497557073336, -0.90000000000000002, 0.50000000000000000,
|
307 |
|
|
0.17453292519943295 },
|
308 |
|
|
{ 0.34804093691586013, -0.90000000000000002, 0.50000000000000000,
|
309 |
|
|
0.34906585039886590 },
|
310 |
|
|
{ 0.52137576320372914, -0.90000000000000002, 0.50000000000000000,
|
311 |
|
|
0.52359877559829882 },
|
312 |
|
|
{ 0.69655163996912284, -0.90000000000000002, 0.50000000000000000,
|
313 |
|
|
0.69813170079773179 },
|
314 |
|
|
{ 0.87783188683054236, -0.90000000000000002, 0.50000000000000000,
|
315 |
|
|
0.87266462599716477 },
|
316 |
|
|
{ 1.0716015959755185, -0.90000000000000002, 0.50000000000000000,
|
317 |
|
|
1.0471975511965976 },
|
318 |
|
|
{ 1.2857636916026747, -0.90000000000000002, 0.50000000000000000,
|
319 |
|
|
1.2217304763960306 },
|
320 |
|
|
{ 1.5264263913252365, -0.90000000000000002, 0.50000000000000000,
|
321 |
|
|
1.3962634015954636 },
|
322 |
|
|
{ 1.7888013241937861, -0.90000000000000002, 0.50000000000000000,
|
323 |
|
|
1.5707963267948966 },
|
324 |
|
|
};
|
325 |
|
|
|
326 |
|
|
// Test function for k=-0.90000000000000002, nu=0.50000000000000000.
|
327 |
|
|
template <typename Tp>
|
328 |
|
|
void test006()
|
329 |
|
|
{
|
330 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
331 |
|
|
Tp max_abs_diff = -Tp(1);
|
332 |
|
|
Tp max_abs_frac = -Tp(1);
|
333 |
|
|
unsigned int num_datum = sizeof(data006)
|
334 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
335 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
336 |
|
|
{
|
337 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data006[i].k), Tp(data006[i].nu),
|
338 |
|
|
Tp(data006[i].phi));
|
339 |
|
|
const Tp f0 = data006[i].f0;
|
340 |
|
|
const Tp diff = f - f0;
|
341 |
|
|
if (std::abs(diff) > max_abs_diff)
|
342 |
|
|
max_abs_diff = std::abs(diff);
|
343 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
344 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
345 |
|
|
{
|
346 |
|
|
const Tp frac = diff / f0;
|
347 |
|
|
if (std::abs(frac) > max_abs_frac)
|
348 |
|
|
max_abs_frac = std::abs(frac);
|
349 |
|
|
}
|
350 |
|
|
}
|
351 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
352 |
|
|
}
|
353 |
|
|
|
354 |
|
|
// Test data for k=-0.90000000000000002, nu=0.59999999999999998.
|
355 |
|
|
testcase_ellint_3<double> data007[] = {
|
356 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.59999999999999998,
|
357 |
|
|
0.0000000000000000 },
|
358 |
|
|
{ 0.17420100334657815, -0.90000000000000002, 0.59999999999999998,
|
359 |
|
|
0.17453292519943295 },
|
360 |
|
|
{ 0.34671975876122157, -0.90000000000000002, 0.59999999999999998,
|
361 |
|
|
0.34906585039886590 },
|
362 |
|
|
{ 0.51724631570707968, -0.90000000000000002, 0.59999999999999998,
|
363 |
|
|
0.52359877559829882 },
|
364 |
|
|
{ 0.68760879113743056, -0.90000000000000002, 0.59999999999999998,
|
365 |
|
|
0.69813170079773179 },
|
366 |
|
|
{ 0.86192157779698364, -0.90000000000000002, 0.59999999999999998,
|
367 |
|
|
0.87266462599716477 },
|
368 |
|
|
{ 1.0464279696166354, -0.90000000000000002, 0.59999999999999998,
|
369 |
|
|
1.0471975511965976 },
|
370 |
|
|
{ 1.2488156247094004, -0.90000000000000002, 0.59999999999999998,
|
371 |
|
|
1.2217304763960306 },
|
372 |
|
|
{ 1.4750988777188474, -0.90000000000000002, 0.59999999999999998,
|
373 |
|
|
1.3962634015954636 },
|
374 |
|
|
{ 1.7211781128919523, -0.90000000000000002, 0.59999999999999998,
|
375 |
|
|
1.5707963267948966 },
|
376 |
|
|
};
|
377 |
|
|
|
378 |
|
|
// Test function for k=-0.90000000000000002, nu=0.59999999999999998.
|
379 |
|
|
template <typename Tp>
|
380 |
|
|
void test007()
|
381 |
|
|
{
|
382 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
383 |
|
|
Tp max_abs_diff = -Tp(1);
|
384 |
|
|
Tp max_abs_frac = -Tp(1);
|
385 |
|
|
unsigned int num_datum = sizeof(data007)
|
386 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
387 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
388 |
|
|
{
|
389 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data007[i].k), Tp(data007[i].nu),
|
390 |
|
|
Tp(data007[i].phi));
|
391 |
|
|
const Tp f0 = data007[i].f0;
|
392 |
|
|
const Tp diff = f - f0;
|
393 |
|
|
if (std::abs(diff) > max_abs_diff)
|
394 |
|
|
max_abs_diff = std::abs(diff);
|
395 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
396 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
397 |
|
|
{
|
398 |
|
|
const Tp frac = diff / f0;
|
399 |
|
|
if (std::abs(frac) > max_abs_frac)
|
400 |
|
|
max_abs_frac = std::abs(frac);
|
401 |
|
|
}
|
402 |
|
|
}
|
403 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
404 |
|
|
}
|
405 |
|
|
|
406 |
|
|
// Test data for k=-0.90000000000000002, nu=0.69999999999999996.
|
407 |
|
|
testcase_ellint_3<double> data008[] = {
|
408 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.69999999999999996,
|
409 |
|
|
0.0000000000000000 },
|
410 |
|
|
{ 0.17402765093102210, -0.90000000000000002, 0.69999999999999996,
|
411 |
|
|
0.17453292519943295 },
|
412 |
|
|
{ 0.34541608382635131, -0.90000000000000002, 0.69999999999999996,
|
413 |
|
|
0.34906585039886590 },
|
414 |
|
|
{ 0.51322715827061705, -0.90000000000000002, 0.69999999999999996,
|
415 |
|
|
0.52359877559829882 },
|
416 |
|
|
{ 0.67903717872440306, -0.90000000000000002, 0.69999999999999996,
|
417 |
|
|
0.69813170079773179 },
|
418 |
|
|
{ 0.84690113601682671, -0.90000000000000002, 0.69999999999999996,
|
419 |
|
|
0.87266462599716477 },
|
420 |
|
|
{ 1.0229914311548418, -0.90000000000000002, 0.69999999999999996,
|
421 |
|
|
1.0471975511965976 },
|
422 |
|
|
{ 1.2148329639709381, -0.90000000000000002, 0.69999999999999996,
|
423 |
|
|
1.2217304763960306 },
|
424 |
|
|
{ 1.4283586501307806, -0.90000000000000002, 0.69999999999999996,
|
425 |
|
|
1.3962634015954636 },
|
426 |
|
|
{ 1.6600480747670938, -0.90000000000000002, 0.69999999999999996,
|
427 |
|
|
1.5707963267948966 },
|
428 |
|
|
};
|
429 |
|
|
|
430 |
|
|
// Test function for k=-0.90000000000000002, nu=0.69999999999999996.
|
431 |
|
|
template <typename Tp>
|
432 |
|
|
void test008()
|
433 |
|
|
{
|
434 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
435 |
|
|
Tp max_abs_diff = -Tp(1);
|
436 |
|
|
Tp max_abs_frac = -Tp(1);
|
437 |
|
|
unsigned int num_datum = sizeof(data008)
|
438 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
439 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
440 |
|
|
{
|
441 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data008[i].k), Tp(data008[i].nu),
|
442 |
|
|
Tp(data008[i].phi));
|
443 |
|
|
const Tp f0 = data008[i].f0;
|
444 |
|
|
const Tp diff = f - f0;
|
445 |
|
|
if (std::abs(diff) > max_abs_diff)
|
446 |
|
|
max_abs_diff = std::abs(diff);
|
447 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
448 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
449 |
|
|
{
|
450 |
|
|
const Tp frac = diff / f0;
|
451 |
|
|
if (std::abs(frac) > max_abs_frac)
|
452 |
|
|
max_abs_frac = std::abs(frac);
|
453 |
|
|
}
|
454 |
|
|
}
|
455 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
456 |
|
|
}
|
457 |
|
|
|
458 |
|
|
// Test data for k=-0.90000000000000002, nu=0.80000000000000004.
|
459 |
|
|
testcase_ellint_3<double> data009[] = {
|
460 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.80000000000000004,
|
461 |
|
|
0.0000000000000000 },
|
462 |
|
|
{ 0.17385491439925149, -0.90000000000000002, 0.80000000000000004,
|
463 |
|
|
0.17453292519943295 },
|
464 |
|
|
{ 0.34412950523113928, -0.90000000000000002, 0.80000000000000004,
|
465 |
|
|
0.34906585039886590 },
|
466 |
|
|
{ 0.50931321668729612, -0.90000000000000002, 0.80000000000000004,
|
467 |
|
|
0.52359877559829882 },
|
468 |
|
|
{ 0.67081081392296349, -0.90000000000000002, 0.80000000000000004,
|
469 |
|
|
0.69813170079773179 },
|
470 |
|
|
{ 0.83268846097293259, -0.90000000000000002, 0.80000000000000004,
|
471 |
|
|
0.87266462599716477 },
|
472 |
|
|
{ 1.0010985015814027, -0.90000000000000002, 0.80000000000000004,
|
473 |
|
|
1.0471975511965976 },
|
474 |
|
|
{ 1.1834394045489678, -0.90000000000000002, 0.80000000000000004,
|
475 |
|
|
1.2217304763960306 },
|
476 |
|
|
{ 1.3855695891683188, -0.90000000000000002, 0.80000000000000004,
|
477 |
|
|
1.3962634015954636 },
|
478 |
|
|
{ 1.6044591960982204, -0.90000000000000002, 0.80000000000000004,
|
479 |
|
|
1.5707963267948966 },
|
480 |
|
|
};
|
481 |
|
|
|
482 |
|
|
// Test function for k=-0.90000000000000002, nu=0.80000000000000004.
|
483 |
|
|
template <typename Tp>
|
484 |
|
|
void test009()
|
485 |
|
|
{
|
486 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
487 |
|
|
Tp max_abs_diff = -Tp(1);
|
488 |
|
|
Tp max_abs_frac = -Tp(1);
|
489 |
|
|
unsigned int num_datum = sizeof(data009)
|
490 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
491 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
492 |
|
|
{
|
493 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data009[i].k), Tp(data009[i].nu),
|
494 |
|
|
Tp(data009[i].phi));
|
495 |
|
|
const Tp f0 = data009[i].f0;
|
496 |
|
|
const Tp diff = f - f0;
|
497 |
|
|
if (std::abs(diff) > max_abs_diff)
|
498 |
|
|
max_abs_diff = std::abs(diff);
|
499 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
500 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
501 |
|
|
{
|
502 |
|
|
const Tp frac = diff / f0;
|
503 |
|
|
if (std::abs(frac) > max_abs_frac)
|
504 |
|
|
max_abs_frac = std::abs(frac);
|
505 |
|
|
}
|
506 |
|
|
}
|
507 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
508 |
|
|
}
|
509 |
|
|
|
510 |
|
|
// Test data for k=-0.90000000000000002, nu=0.90000000000000002.
|
511 |
|
|
testcase_ellint_3<double> data010[] = {
|
512 |
|
|
{ -0.0000000000000000, -0.90000000000000002, 0.90000000000000002,
|
513 |
|
|
0.0000000000000000 },
|
514 |
|
|
{ 0.17368278986240138, -0.90000000000000002, 0.90000000000000002,
|
515 |
|
|
0.17453292519943295 },
|
516 |
|
|
{ 0.34285962963961397, -0.90000000000000002, 0.90000000000000002,
|
517 |
|
|
0.34906585039886590 },
|
518 |
|
|
{ 0.50549974644993323, -0.90000000000000002, 0.90000000000000002,
|
519 |
|
|
0.52359877559829882 },
|
520 |
|
|
{ 0.66290623857720898, -0.90000000000000002, 0.90000000000000002,
|
521 |
|
|
0.69813170079773179 },
|
522 |
|
|
{ 0.81921183128847164, -0.90000000000000002, 0.90000000000000002,
|
523 |
|
|
0.87266462599716477 },
|
524 |
|
|
{ 0.98058481956066390, -0.90000000000000002, 0.90000000000000002,
|
525 |
|
|
1.0471975511965976 },
|
526 |
|
|
{ 1.1543223520473567, -0.90000000000000002, 0.90000000000000002,
|
527 |
|
|
1.2217304763960306 },
|
528 |
|
|
{ 1.3462119782292938, -0.90000000000000002, 0.90000000000000002,
|
529 |
|
|
1.3962634015954636 },
|
530 |
|
|
{ 1.5536420236310946, -0.90000000000000002, 0.90000000000000002,
|
531 |
|
|
1.5707963267948966 },
|
532 |
|
|
};
|
533 |
|
|
|
534 |
|
|
// Test function for k=-0.90000000000000002, nu=0.90000000000000002.
|
535 |
|
|
template <typename Tp>
|
536 |
|
|
void test010()
|
537 |
|
|
{
|
538 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
539 |
|
|
Tp max_abs_diff = -Tp(1);
|
540 |
|
|
Tp max_abs_frac = -Tp(1);
|
541 |
|
|
unsigned int num_datum = sizeof(data010)
|
542 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
543 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
544 |
|
|
{
|
545 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data010[i].k), Tp(data010[i].nu),
|
546 |
|
|
Tp(data010[i].phi));
|
547 |
|
|
const Tp f0 = data010[i].f0;
|
548 |
|
|
const Tp diff = f - f0;
|
549 |
|
|
if (std::abs(diff) > max_abs_diff)
|
550 |
|
|
max_abs_diff = std::abs(diff);
|
551 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
552 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
553 |
|
|
{
|
554 |
|
|
const Tp frac = diff / f0;
|
555 |
|
|
if (std::abs(frac) > max_abs_frac)
|
556 |
|
|
max_abs_frac = std::abs(frac);
|
557 |
|
|
}
|
558 |
|
|
}
|
559 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
560 |
|
|
}
|
561 |
|
|
|
562 |
|
|
// Test data for k=-0.80000000000000004, nu=0.0000000000000000.
|
563 |
|
|
testcase_ellint_3<double> data011[] = {
|
564 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.0000000000000000,
|
565 |
|
|
0.0000000000000000 },
|
566 |
|
|
{ 0.17510154241338902, -0.80000000000000004, 0.0000000000000000,
|
567 |
|
|
0.17453292519943295 },
|
568 |
|
|
{ 0.35365068839779390, -0.80000000000000004, 0.0000000000000000,
|
569 |
|
|
0.34906585039886590 },
|
570 |
|
|
{ 0.53926804409084561, -0.80000000000000004, 0.0000000000000000,
|
571 |
|
|
0.52359877559829882 },
|
572 |
|
|
{ 0.73587926028070383, -0.80000000000000004, 0.0000000000000000,
|
573 |
|
|
0.69813170079773179 },
|
574 |
|
|
{ 0.94770942970071170, -0.80000000000000004, 0.0000000000000000,
|
575 |
|
|
0.87266462599716477 },
|
576 |
|
|
{ 1.1789022995388239, -0.80000000000000004, 0.0000000000000000,
|
577 |
|
|
1.0471975511965976 },
|
578 |
|
|
{ 1.4323027881876009, -0.80000000000000004, 0.0000000000000000,
|
579 |
|
|
1.2217304763960306 },
|
580 |
|
|
{ 1.7069629739121674, -0.80000000000000004, 0.0000000000000000,
|
581 |
|
|
1.3962634015954636 },
|
582 |
|
|
{ 1.9953027776647296, -0.80000000000000004, 0.0000000000000000,
|
583 |
|
|
1.5707963267948966 },
|
584 |
|
|
};
|
585 |
|
|
|
586 |
|
|
// Test function for k=-0.80000000000000004, nu=0.0000000000000000.
|
587 |
|
|
template <typename Tp>
|
588 |
|
|
void test011()
|
589 |
|
|
{
|
590 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
591 |
|
|
Tp max_abs_diff = -Tp(1);
|
592 |
|
|
Tp max_abs_frac = -Tp(1);
|
593 |
|
|
unsigned int num_datum = sizeof(data011)
|
594 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
595 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
596 |
|
|
{
|
597 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data011[i].k), Tp(data011[i].nu),
|
598 |
|
|
Tp(data011[i].phi));
|
599 |
|
|
const Tp f0 = data011[i].f0;
|
600 |
|
|
const Tp diff = f - f0;
|
601 |
|
|
if (std::abs(diff) > max_abs_diff)
|
602 |
|
|
max_abs_diff = std::abs(diff);
|
603 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
604 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
605 |
|
|
{
|
606 |
|
|
const Tp frac = diff / f0;
|
607 |
|
|
if (std::abs(frac) > max_abs_frac)
|
608 |
|
|
max_abs_frac = std::abs(frac);
|
609 |
|
|
}
|
610 |
|
|
}
|
611 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
612 |
|
|
}
|
613 |
|
|
|
614 |
|
|
// Test data for k=-0.80000000000000004, nu=0.10000000000000001.
|
615 |
|
|
testcase_ellint_3<double> data012[] = {
|
616 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.10000000000000001,
|
617 |
|
|
0.0000000000000000 },
|
618 |
|
|
{ 0.17492468824017166, -0.80000000000000004, 0.10000000000000001,
|
619 |
|
|
0.17453292519943295 },
|
620 |
|
|
{ 0.35224443521476911, -0.80000000000000004, 0.10000000000000001,
|
621 |
|
|
0.34906585039886590 },
|
622 |
|
|
{ 0.53456851853226961, -0.80000000000000004, 0.10000000000000001,
|
623 |
|
|
0.52359877559829882 },
|
624 |
|
|
{ 0.72488875602364944, -0.80000000000000004, 0.10000000000000001,
|
625 |
|
|
0.69813170079773179 },
|
626 |
|
|
{ 0.92661354274638952, -0.80000000000000004, 0.10000000000000001,
|
627 |
|
|
0.87266462599716477 },
|
628 |
|
|
{ 1.1432651144499077, -0.80000000000000004, 0.10000000000000001,
|
629 |
|
|
1.0471975511965976 },
|
630 |
|
|
{ 1.3774479927211429, -0.80000000000000004, 0.10000000000000001,
|
631 |
|
|
1.2217304763960306 },
|
632 |
|
|
{ 1.6287092337196041, -0.80000000000000004, 0.10000000000000001,
|
633 |
|
|
1.3962634015954636 },
|
634 |
|
|
{ 1.8910755418379521, -0.80000000000000004, 0.10000000000000001,
|
635 |
|
|
1.5707963267948966 },
|
636 |
|
|
};
|
637 |
|
|
|
638 |
|
|
// Test function for k=-0.80000000000000004, nu=0.10000000000000001.
|
639 |
|
|
template <typename Tp>
|
640 |
|
|
void test012()
|
641 |
|
|
{
|
642 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
643 |
|
|
Tp max_abs_diff = -Tp(1);
|
644 |
|
|
Tp max_abs_frac = -Tp(1);
|
645 |
|
|
unsigned int num_datum = sizeof(data012)
|
646 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
647 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
648 |
|
|
{
|
649 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data012[i].k), Tp(data012[i].nu),
|
650 |
|
|
Tp(data012[i].phi));
|
651 |
|
|
const Tp f0 = data012[i].f0;
|
652 |
|
|
const Tp diff = f - f0;
|
653 |
|
|
if (std::abs(diff) > max_abs_diff)
|
654 |
|
|
max_abs_diff = std::abs(diff);
|
655 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
656 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
657 |
|
|
{
|
658 |
|
|
const Tp frac = diff / f0;
|
659 |
|
|
if (std::abs(frac) > max_abs_frac)
|
660 |
|
|
max_abs_frac = std::abs(frac);
|
661 |
|
|
}
|
662 |
|
|
}
|
663 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
664 |
|
|
}
|
665 |
|
|
|
666 |
|
|
// Test data for k=-0.80000000000000004, nu=0.20000000000000001.
|
667 |
|
|
testcase_ellint_3<double> data013[] = {
|
668 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.20000000000000001,
|
669 |
|
|
0.0000000000000000 },
|
670 |
|
|
{ 0.17474847286224943, -0.80000000000000004, 0.20000000000000001,
|
671 |
|
|
0.17453292519943295 },
|
672 |
|
|
{ 0.35085779529084682, -0.80000000000000004, 0.20000000000000001,
|
673 |
|
|
0.34906585039886590 },
|
674 |
|
|
{ 0.53000829263059157, -0.80000000000000004, 0.20000000000000001,
|
675 |
|
|
0.52359877559829882 },
|
676 |
|
|
{ 0.71443466027453406, -0.80000000000000004, 0.20000000000000001,
|
677 |
|
|
0.69813170079773179 },
|
678 |
|
|
{ 0.90698196872715420, -0.80000000000000004, 0.20000000000000001,
|
679 |
|
|
0.87266462599716477 },
|
680 |
|
|
{ 1.1108198200558581, -0.80000000000000004, 0.20000000000000001,
|
681 |
|
|
1.0471975511965976 },
|
682 |
|
|
{ 1.3284988909963957, -0.80000000000000004, 0.20000000000000001,
|
683 |
|
|
1.2217304763960306 },
|
684 |
|
|
{ 1.5600369318140328, -0.80000000000000004, 0.20000000000000001,
|
685 |
|
|
1.3962634015954636 },
|
686 |
|
|
{ 1.8007226661734588, -0.80000000000000004, 0.20000000000000001,
|
687 |
|
|
1.5707963267948966 },
|
688 |
|
|
};
|
689 |
|
|
|
690 |
|
|
// Test function for k=-0.80000000000000004, nu=0.20000000000000001.
|
691 |
|
|
template <typename Tp>
|
692 |
|
|
void test013()
|
693 |
|
|
{
|
694 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
695 |
|
|
Tp max_abs_diff = -Tp(1);
|
696 |
|
|
Tp max_abs_frac = -Tp(1);
|
697 |
|
|
unsigned int num_datum = sizeof(data013)
|
698 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
699 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
700 |
|
|
{
|
701 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data013[i].k), Tp(data013[i].nu),
|
702 |
|
|
Tp(data013[i].phi));
|
703 |
|
|
const Tp f0 = data013[i].f0;
|
704 |
|
|
const Tp diff = f - f0;
|
705 |
|
|
if (std::abs(diff) > max_abs_diff)
|
706 |
|
|
max_abs_diff = std::abs(diff);
|
707 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
708 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
709 |
|
|
{
|
710 |
|
|
const Tp frac = diff / f0;
|
711 |
|
|
if (std::abs(frac) > max_abs_frac)
|
712 |
|
|
max_abs_frac = std::abs(frac);
|
713 |
|
|
}
|
714 |
|
|
}
|
715 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
716 |
|
|
}
|
717 |
|
|
|
718 |
|
|
// Test data for k=-0.80000000000000004, nu=0.29999999999999999.
|
719 |
|
|
testcase_ellint_3<double> data014[] = {
|
720 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.29999999999999999,
|
721 |
|
|
0.0000000000000000 },
|
722 |
|
|
{ 0.17457289217669891, -0.80000000000000004, 0.29999999999999999,
|
723 |
|
|
0.17453292519943295 },
|
724 |
|
|
{ 0.34949028801501258, -0.80000000000000004, 0.29999999999999999,
|
725 |
|
|
0.34906585039886590 },
|
726 |
|
|
{ 0.52558024362769318, -0.80000000000000004, 0.29999999999999999,
|
727 |
|
|
0.52359877559829882 },
|
728 |
|
|
{ 0.70447281740094914, -0.80000000000000004, 0.29999999999999999,
|
729 |
|
|
0.69813170079773179 },
|
730 |
|
|
{ 0.88864745641528986, -0.80000000000000004, 0.29999999999999999,
|
731 |
|
|
0.87266462599716477 },
|
732 |
|
|
{ 1.0811075819341465, -0.80000000000000004, 0.29999999999999999,
|
733 |
|
|
1.0471975511965976 },
|
734 |
|
|
{ 1.2844589654082377, -0.80000000000000004, 0.29999999999999999,
|
735 |
|
|
1.2217304763960306 },
|
736 |
|
|
{ 1.4991461361277849, -0.80000000000000004, 0.29999999999999999,
|
737 |
|
|
1.3962634015954636 },
|
738 |
|
|
{ 1.7214611048717301, -0.80000000000000004, 0.29999999999999999,
|
739 |
|
|
1.5707963267948966 },
|
740 |
|
|
};
|
741 |
|
|
|
742 |
|
|
// Test function for k=-0.80000000000000004, nu=0.29999999999999999.
|
743 |
|
|
template <typename Tp>
|
744 |
|
|
void test014()
|
745 |
|
|
{
|
746 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
747 |
|
|
Tp max_abs_diff = -Tp(1);
|
748 |
|
|
Tp max_abs_frac = -Tp(1);
|
749 |
|
|
unsigned int num_datum = sizeof(data014)
|
750 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
751 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
752 |
|
|
{
|
753 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data014[i].k), Tp(data014[i].nu),
|
754 |
|
|
Tp(data014[i].phi));
|
755 |
|
|
const Tp f0 = data014[i].f0;
|
756 |
|
|
const Tp diff = f - f0;
|
757 |
|
|
if (std::abs(diff) > max_abs_diff)
|
758 |
|
|
max_abs_diff = std::abs(diff);
|
759 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
760 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
761 |
|
|
{
|
762 |
|
|
const Tp frac = diff / f0;
|
763 |
|
|
if (std::abs(frac) > max_abs_frac)
|
764 |
|
|
max_abs_frac = std::abs(frac);
|
765 |
|
|
}
|
766 |
|
|
}
|
767 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
768 |
|
|
}
|
769 |
|
|
|
770 |
|
|
// Test data for k=-0.80000000000000004, nu=0.40000000000000002.
|
771 |
|
|
testcase_ellint_3<double> data015[] = {
|
772 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.40000000000000002,
|
773 |
|
|
0.0000000000000000 },
|
774 |
|
|
{ 0.17439794211872178, -0.80000000000000004, 0.40000000000000002,
|
775 |
|
|
0.17453292519943295 },
|
776 |
|
|
{ 0.34814144964568972, -0.80000000000000004, 0.40000000000000002,
|
777 |
|
|
0.34906585039886590 },
|
778 |
|
|
{ 0.52127776285273075, -0.80000000000000004, 0.40000000000000002,
|
779 |
|
|
0.52359877559829882 },
|
780 |
|
|
{ 0.69496411438966599, -0.80000000000000004, 0.40000000000000002,
|
781 |
|
|
0.69813170079773179 },
|
782 |
|
|
{ 0.87146878427509589, -0.80000000000000004, 0.40000000000000002,
|
783 |
|
|
0.87266462599716477 },
|
784 |
|
|
{ 1.0537579024937762, -0.80000000000000004, 0.40000000000000002,
|
785 |
|
|
1.0471975511965976 },
|
786 |
|
|
{ 1.2445534387922637, -0.80000000000000004, 0.40000000000000002,
|
787 |
|
|
1.2217304763960306 },
|
788 |
|
|
{ 1.4446769766361993, -0.80000000000000004, 0.40000000000000002,
|
789 |
|
|
1.3962634015954636 },
|
790 |
|
|
{ 1.6512267838651289, -0.80000000000000004, 0.40000000000000002,
|
791 |
|
|
1.5707963267948966 },
|
792 |
|
|
};
|
793 |
|
|
|
794 |
|
|
// Test function for k=-0.80000000000000004, nu=0.40000000000000002.
|
795 |
|
|
template <typename Tp>
|
796 |
|
|
void test015()
|
797 |
|
|
{
|
798 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
799 |
|
|
Tp max_abs_diff = -Tp(1);
|
800 |
|
|
Tp max_abs_frac = -Tp(1);
|
801 |
|
|
unsigned int num_datum = sizeof(data015)
|
802 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
803 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
804 |
|
|
{
|
805 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data015[i].k), Tp(data015[i].nu),
|
806 |
|
|
Tp(data015[i].phi));
|
807 |
|
|
const Tp f0 = data015[i].f0;
|
808 |
|
|
const Tp diff = f - f0;
|
809 |
|
|
if (std::abs(diff) > max_abs_diff)
|
810 |
|
|
max_abs_diff = std::abs(diff);
|
811 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
812 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
813 |
|
|
{
|
814 |
|
|
const Tp frac = diff / f0;
|
815 |
|
|
if (std::abs(frac) > max_abs_frac)
|
816 |
|
|
max_abs_frac = std::abs(frac);
|
817 |
|
|
}
|
818 |
|
|
}
|
819 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
820 |
|
|
}
|
821 |
|
|
|
822 |
|
|
// Test data for k=-0.80000000000000004, nu=0.50000000000000000.
|
823 |
|
|
testcase_ellint_3<double> data016[] = {
|
824 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.50000000000000000,
|
825 |
|
|
0.0000000000000000 },
|
826 |
|
|
{ 0.17422361866118047, -0.80000000000000004, 0.50000000000000000,
|
827 |
|
|
0.17453292519943295 },
|
828 |
|
|
{ 0.34681083254170475, -0.80000000000000004, 0.50000000000000000,
|
829 |
|
|
0.34906585039886590 },
|
830 |
|
|
{ 0.51709470815494440, -0.80000000000000004, 0.50000000000000000,
|
831 |
|
|
0.52359877559829882 },
|
832 |
|
|
{ 0.68587375344080259, -0.80000000000000004, 0.50000000000000000,
|
833 |
|
|
0.69813170079773179 },
|
834 |
|
|
{ 0.85532571852810624, -0.80000000000000004, 0.50000000000000000,
|
835 |
|
|
0.87266462599716477 },
|
836 |
|
|
{ 1.0284677391874906, -0.80000000000000004, 0.50000000000000000,
|
837 |
|
|
1.0471975511965976 },
|
838 |
|
|
{ 1.2081693942686225, -0.80000000000000004, 0.50000000000000000,
|
839 |
|
|
1.2217304763960306 },
|
840 |
|
|
{ 1.3955803006426311, -0.80000000000000004, 0.50000000000000000,
|
841 |
|
|
1.3962634015954636 },
|
842 |
|
|
{ 1.5884528947755532, -0.80000000000000004, 0.50000000000000000,
|
843 |
|
|
1.5707963267948966 },
|
844 |
|
|
};
|
845 |
|
|
|
846 |
|
|
// Test function for k=-0.80000000000000004, nu=0.50000000000000000.
|
847 |
|
|
template <typename Tp>
|
848 |
|
|
void test016()
|
849 |
|
|
{
|
850 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
851 |
|
|
Tp max_abs_diff = -Tp(1);
|
852 |
|
|
Tp max_abs_frac = -Tp(1);
|
853 |
|
|
unsigned int num_datum = sizeof(data016)
|
854 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
855 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
856 |
|
|
{
|
857 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data016[i].k), Tp(data016[i].nu),
|
858 |
|
|
Tp(data016[i].phi));
|
859 |
|
|
const Tp f0 = data016[i].f0;
|
860 |
|
|
const Tp diff = f - f0;
|
861 |
|
|
if (std::abs(diff) > max_abs_diff)
|
862 |
|
|
max_abs_diff = std::abs(diff);
|
863 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
864 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
865 |
|
|
{
|
866 |
|
|
const Tp frac = diff / f0;
|
867 |
|
|
if (std::abs(frac) > max_abs_frac)
|
868 |
|
|
max_abs_frac = std::abs(frac);
|
869 |
|
|
}
|
870 |
|
|
}
|
871 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
872 |
|
|
}
|
873 |
|
|
|
874 |
|
|
// Test data for k=-0.80000000000000004, nu=0.59999999999999998.
|
875 |
|
|
testcase_ellint_3<double> data017[] = {
|
876 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.59999999999999998,
|
877 |
|
|
0.0000000000000000 },
|
878 |
|
|
{ 0.17404991781414092, -0.80000000000000004, 0.59999999999999998,
|
879 |
|
|
0.17453292519943295 },
|
880 |
|
|
{ 0.34549800443625167, -0.80000000000000004, 0.59999999999999998,
|
881 |
|
|
0.34906585039886590 },
|
882 |
|
|
{ 0.51302536167001556, -0.80000000000000004, 0.59999999999999998,
|
883 |
|
|
0.52359877559829882 },
|
884 |
|
|
{ 0.67717065003912258, -0.80000000000000004, 0.59999999999999998,
|
885 |
|
|
0.69813170079773179 },
|
886 |
|
|
{ 0.84011512421134416, -0.80000000000000004, 0.59999999999999998,
|
887 |
|
|
0.87266462599716477 },
|
888 |
|
|
{ 1.0049863847088742, -0.80000000000000004, 0.59999999999999998,
|
889 |
|
|
1.0471975511965976 },
|
890 |
|
|
{ 1.1748145941898918, -0.80000000000000004, 0.59999999999999998,
|
891 |
|
|
1.2217304763960306 },
|
892 |
|
|
{ 1.3510319699755071, -0.80000000000000004, 0.59999999999999998,
|
893 |
|
|
1.3962634015954636 },
|
894 |
|
|
{ 1.5319262547427865, -0.80000000000000004, 0.59999999999999998,
|
895 |
|
|
1.5707963267948966 },
|
896 |
|
|
};
|
897 |
|
|
|
898 |
|
|
// Test function for k=-0.80000000000000004, nu=0.59999999999999998.
|
899 |
|
|
template <typename Tp>
|
900 |
|
|
void test017()
|
901 |
|
|
{
|
902 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
903 |
|
|
Tp max_abs_diff = -Tp(1);
|
904 |
|
|
Tp max_abs_frac = -Tp(1);
|
905 |
|
|
unsigned int num_datum = sizeof(data017)
|
906 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
907 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
908 |
|
|
{
|
909 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data017[i].k), Tp(data017[i].nu),
|
910 |
|
|
Tp(data017[i].phi));
|
911 |
|
|
const Tp f0 = data017[i].f0;
|
912 |
|
|
const Tp diff = f - f0;
|
913 |
|
|
if (std::abs(diff) > max_abs_diff)
|
914 |
|
|
max_abs_diff = std::abs(diff);
|
915 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
916 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
917 |
|
|
{
|
918 |
|
|
const Tp frac = diff / f0;
|
919 |
|
|
if (std::abs(frac) > max_abs_frac)
|
920 |
|
|
max_abs_frac = std::abs(frac);
|
921 |
|
|
}
|
922 |
|
|
}
|
923 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
924 |
|
|
}
|
925 |
|
|
|
926 |
|
|
// Test data for k=-0.80000000000000004, nu=0.69999999999999996.
|
927 |
|
|
testcase_ellint_3<double> data018[] = {
|
928 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.69999999999999996,
|
929 |
|
|
0.0000000000000000 },
|
930 |
|
|
{ 0.17387683562442202, -0.80000000000000004, 0.69999999999999996,
|
931 |
|
|
0.17453292519943295 },
|
932 |
|
|
{ 0.34420254775101611, -0.80000000000000004, 0.69999999999999996,
|
933 |
|
|
0.34906585039886590 },
|
934 |
|
|
{ 0.50906439222143685, -0.80000000000000004, 0.69999999999999996,
|
935 |
|
|
0.52359877559829882 },
|
936 |
|
|
{ 0.66882693152688433, -0.80000000000000004, 0.69999999999999996,
|
937 |
|
|
0.69813170079773179 },
|
938 |
|
|
{ 0.82574792844091316, -0.80000000000000004, 0.69999999999999996,
|
939 |
|
|
0.87266462599716477 },
|
940 |
|
|
{ 0.98310431309490953, -0.80000000000000004, 0.69999999999999996,
|
941 |
|
|
1.0471975511965976 },
|
942 |
|
|
{ 1.1440884535113258, -0.80000000000000004, 0.69999999999999996,
|
943 |
|
|
1.2217304763960306 },
|
944 |
|
|
{ 1.3103743938952537, -0.80000000000000004, 0.69999999999999996,
|
945 |
|
|
1.3962634015954636 },
|
946 |
|
|
{ 1.4806912324625332, -0.80000000000000004, 0.69999999999999996,
|
947 |
|
|
1.5707963267948966 },
|
948 |
|
|
};
|
949 |
|
|
|
950 |
|
|
// Test function for k=-0.80000000000000004, nu=0.69999999999999996.
|
951 |
|
|
template <typename Tp>
|
952 |
|
|
void test018()
|
953 |
|
|
{
|
954 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
955 |
|
|
Tp max_abs_diff = -Tp(1);
|
956 |
|
|
Tp max_abs_frac = -Tp(1);
|
957 |
|
|
unsigned int num_datum = sizeof(data018)
|
958 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
959 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
960 |
|
|
{
|
961 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data018[i].k), Tp(data018[i].nu),
|
962 |
|
|
Tp(data018[i].phi));
|
963 |
|
|
const Tp f0 = data018[i].f0;
|
964 |
|
|
const Tp diff = f - f0;
|
965 |
|
|
if (std::abs(diff) > max_abs_diff)
|
966 |
|
|
max_abs_diff = std::abs(diff);
|
967 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
968 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
969 |
|
|
{
|
970 |
|
|
const Tp frac = diff / f0;
|
971 |
|
|
if (std::abs(frac) > max_abs_frac)
|
972 |
|
|
max_abs_frac = std::abs(frac);
|
973 |
|
|
}
|
974 |
|
|
}
|
975 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
976 |
|
|
}
|
977 |
|
|
|
978 |
|
|
// Test data for k=-0.80000000000000004, nu=0.80000000000000004.
|
979 |
|
|
testcase_ellint_3<double> data019[] = {
|
980 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.80000000000000004,
|
981 |
|
|
0.0000000000000000 },
|
982 |
|
|
{ 0.17370436817515206, -0.80000000000000004, 0.80000000000000004,
|
983 |
|
|
0.17453292519943295 },
|
984 |
|
|
{ 0.34292405894783395, -0.80000000000000004, 0.80000000000000004,
|
985 |
|
|
0.34906585039886590 },
|
986 |
|
|
{ 0.50520682176250087, -0.80000000000000004, 0.80000000000000004,
|
987 |
|
|
0.52359877559829882 },
|
988 |
|
|
{ 0.66081751679736189, -0.80000000000000004, 0.80000000000000004,
|
989 |
|
|
0.69813170079773179 },
|
990 |
|
|
{ 0.81214672249355102, -0.80000000000000004, 0.80000000000000004,
|
991 |
|
|
0.87266462599716477 },
|
992 |
|
|
{ 0.96264481387685574, -0.80000000000000004, 0.80000000000000004,
|
993 |
|
|
1.0471975511965976 },
|
994 |
|
|
{ 1.1156611352656258, -0.80000000000000004, 0.80000000000000004,
|
995 |
|
|
1.2217304763960306 },
|
996 |
|
|
{ 1.2730756225143889, -0.80000000000000004, 0.80000000000000004,
|
997 |
|
|
1.3962634015954636 },
|
998 |
|
|
{ 1.4339837018309474, -0.80000000000000004, 0.80000000000000004,
|
999 |
|
|
1.5707963267948966 },
|
1000 |
|
|
};
|
1001 |
|
|
|
1002 |
|
|
// Test function for k=-0.80000000000000004, nu=0.80000000000000004.
|
1003 |
|
|
template <typename Tp>
|
1004 |
|
|
void test019()
|
1005 |
|
|
{
|
1006 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1007 |
|
|
Tp max_abs_diff = -Tp(1);
|
1008 |
|
|
Tp max_abs_frac = -Tp(1);
|
1009 |
|
|
unsigned int num_datum = sizeof(data019)
|
1010 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1011 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1012 |
|
|
{
|
1013 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data019[i].k), Tp(data019[i].nu),
|
1014 |
|
|
Tp(data019[i].phi));
|
1015 |
|
|
const Tp f0 = data019[i].f0;
|
1016 |
|
|
const Tp diff = f - f0;
|
1017 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1018 |
|
|
max_abs_diff = std::abs(diff);
|
1019 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1020 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1021 |
|
|
{
|
1022 |
|
|
const Tp frac = diff / f0;
|
1023 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1024 |
|
|
max_abs_frac = std::abs(frac);
|
1025 |
|
|
}
|
1026 |
|
|
}
|
1027 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1028 |
|
|
}
|
1029 |
|
|
|
1030 |
|
|
// Test data for k=-0.80000000000000004, nu=0.90000000000000002.
|
1031 |
|
|
testcase_ellint_3<double> data020[] = {
|
1032 |
|
|
{ -0.0000000000000000, -0.80000000000000004, 0.90000000000000002,
|
1033 |
|
|
0.0000000000000000 },
|
1034 |
|
|
{ 0.17353251158533153, -0.80000000000000004, 0.90000000000000002,
|
1035 |
|
|
0.17453292519943295 },
|
1036 |
|
|
{ 0.34166214791545768, -0.80000000000000004, 0.90000000000000002,
|
1037 |
|
|
0.34906585039886590 },
|
1038 |
|
|
{ 0.50144799535130580, -0.80000000000000004, 0.90000000000000002,
|
1039 |
|
|
0.52359877559829882 },
|
1040 |
|
|
{ 0.65311976193814447, -0.80000000000000004, 0.90000000000000002,
|
1041 |
|
|
0.69813170079773179 },
|
1042 |
|
|
{ 0.79924384892320866, -0.80000000000000004, 0.90000000000000002,
|
1043 |
|
|
0.87266462599716477 },
|
1044 |
|
|
{ 0.94345762353365625, -0.80000000000000004, 0.90000000000000002,
|
1045 |
|
|
1.0471975511965976 },
|
1046 |
|
|
{ 1.0892582069219159, -0.80000000000000004, 0.90000000000000002,
|
1047 |
|
|
1.2217304763960306 },
|
1048 |
|
|
{ 1.2387000876610268, -0.80000000000000004, 0.90000000000000002,
|
1049 |
|
|
1.3962634015954636 },
|
1050 |
|
|
{ 1.3911845406776222, -0.80000000000000004, 0.90000000000000002,
|
1051 |
|
|
1.5707963267948966 },
|
1052 |
|
|
};
|
1053 |
|
|
|
1054 |
|
|
// Test function for k=-0.80000000000000004, nu=0.90000000000000002.
|
1055 |
|
|
template <typename Tp>
|
1056 |
|
|
void test020()
|
1057 |
|
|
{
|
1058 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1059 |
|
|
Tp max_abs_diff = -Tp(1);
|
1060 |
|
|
Tp max_abs_frac = -Tp(1);
|
1061 |
|
|
unsigned int num_datum = sizeof(data020)
|
1062 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1063 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1064 |
|
|
{
|
1065 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data020[i].k), Tp(data020[i].nu),
|
1066 |
|
|
Tp(data020[i].phi));
|
1067 |
|
|
const Tp f0 = data020[i].f0;
|
1068 |
|
|
const Tp diff = f - f0;
|
1069 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1070 |
|
|
max_abs_diff = std::abs(diff);
|
1071 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1072 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1073 |
|
|
{
|
1074 |
|
|
const Tp frac = diff / f0;
|
1075 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1076 |
|
|
max_abs_frac = std::abs(frac);
|
1077 |
|
|
}
|
1078 |
|
|
}
|
1079 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1080 |
|
|
}
|
1081 |
|
|
|
1082 |
|
|
// Test data for k=-0.69999999999999996, nu=0.0000000000000000.
|
1083 |
|
|
testcase_ellint_3<double> data021[] = {
|
1084 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.0000000000000000,
|
1085 |
|
|
0.0000000000000000 },
|
1086 |
|
|
{ 0.17496737466916720, -0.69999999999999996, 0.0000000000000000,
|
1087 |
|
|
0.17453292519943295 },
|
1088 |
|
|
{ 0.35254687535677925, -0.69999999999999996, 0.0000000000000000,
|
1089 |
|
|
0.34906585039886590 },
|
1090 |
|
|
{ 0.53536740275997130, -0.69999999999999996, 0.0000000000000000,
|
1091 |
|
|
0.52359877559829882 },
|
1092 |
|
|
{ 0.72603797651684465, -0.69999999999999996, 0.0000000000000000,
|
1093 |
|
|
0.69813170079773179 },
|
1094 |
|
|
{ 0.92698296348313458, -0.69999999999999996, 0.0000000000000000,
|
1095 |
|
|
0.87266462599716477 },
|
1096 |
|
|
{ 1.1400447527693316, -0.69999999999999996, 0.0000000000000000,
|
1097 |
|
|
1.0471975511965976 },
|
1098 |
|
|
{ 1.3657668117194071, -0.69999999999999996, 0.0000000000000000,
|
1099 |
|
|
1.2217304763960306 },
|
1100 |
|
|
{ 1.6024686895959159, -0.69999999999999996, 0.0000000000000000,
|
1101 |
|
|
1.3962634015954636 },
|
1102 |
|
|
{ 1.8456939983747236, -0.69999999999999996, 0.0000000000000000,
|
1103 |
|
|
1.5707963267948966 },
|
1104 |
|
|
};
|
1105 |
|
|
|
1106 |
|
|
// Test function for k=-0.69999999999999996, nu=0.0000000000000000.
|
1107 |
|
|
template <typename Tp>
|
1108 |
|
|
void test021()
|
1109 |
|
|
{
|
1110 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1111 |
|
|
Tp max_abs_diff = -Tp(1);
|
1112 |
|
|
Tp max_abs_frac = -Tp(1);
|
1113 |
|
|
unsigned int num_datum = sizeof(data021)
|
1114 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1115 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1116 |
|
|
{
|
1117 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data021[i].k), Tp(data021[i].nu),
|
1118 |
|
|
Tp(data021[i].phi));
|
1119 |
|
|
const Tp f0 = data021[i].f0;
|
1120 |
|
|
const Tp diff = f - f0;
|
1121 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1122 |
|
|
max_abs_diff = std::abs(diff);
|
1123 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1124 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1125 |
|
|
{
|
1126 |
|
|
const Tp frac = diff / f0;
|
1127 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1128 |
|
|
max_abs_frac = std::abs(frac);
|
1129 |
|
|
}
|
1130 |
|
|
}
|
1131 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1132 |
|
|
}
|
1133 |
|
|
|
1134 |
|
|
// Test data for k=-0.69999999999999996, nu=0.10000000000000001.
|
1135 |
|
|
testcase_ellint_3<double> data022[] = {
|
1136 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.10000000000000001,
|
1137 |
|
|
0.0000000000000000 },
|
1138 |
|
|
{ 0.17479076384884681, -0.69999999999999996, 0.10000000000000001,
|
1139 |
|
|
0.17453292519943295 },
|
1140 |
|
|
{ 0.35114844900396364, -0.69999999999999996, 0.10000000000000001,
|
1141 |
|
|
0.34906585039886590 },
|
1142 |
|
|
{ 0.53072776947527012, -0.69999999999999996, 0.10000000000000001,
|
1143 |
|
|
0.52359877559829882 },
|
1144 |
|
|
{ 0.71530198262386246, -0.69999999999999996, 0.10000000000000001,
|
1145 |
|
|
0.69813170079773179 },
|
1146 |
|
|
{ 0.90666760677828306, -0.69999999999999996, 0.10000000000000001,
|
1147 |
|
|
0.87266462599716477 },
|
1148 |
|
|
{ 1.1063366517438080, -0.69999999999999996, 0.10000000000000001,
|
1149 |
|
|
1.0471975511965976 },
|
1150 |
|
|
{ 1.3149477243092147, -0.69999999999999996, 0.10000000000000001,
|
1151 |
|
|
1.2217304763960306 },
|
1152 |
|
|
{ 1.5314886725038925, -0.69999999999999996, 0.10000000000000001,
|
1153 |
|
|
1.3962634015954636 },
|
1154 |
|
|
{ 1.7528050171757608, -0.69999999999999996, 0.10000000000000001,
|
1155 |
|
|
1.5707963267948966 },
|
1156 |
|
|
};
|
1157 |
|
|
|
1158 |
|
|
// Test function for k=-0.69999999999999996, nu=0.10000000000000001.
|
1159 |
|
|
template <typename Tp>
|
1160 |
|
|
void test022()
|
1161 |
|
|
{
|
1162 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1163 |
|
|
Tp max_abs_diff = -Tp(1);
|
1164 |
|
|
Tp max_abs_frac = -Tp(1);
|
1165 |
|
|
unsigned int num_datum = sizeof(data022)
|
1166 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1167 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1168 |
|
|
{
|
1169 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data022[i].k), Tp(data022[i].nu),
|
1170 |
|
|
Tp(data022[i].phi));
|
1171 |
|
|
const Tp f0 = data022[i].f0;
|
1172 |
|
|
const Tp diff = f - f0;
|
1173 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1174 |
|
|
max_abs_diff = std::abs(diff);
|
1175 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1176 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1177 |
|
|
{
|
1178 |
|
|
const Tp frac = diff / f0;
|
1179 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1180 |
|
|
max_abs_frac = std::abs(frac);
|
1181 |
|
|
}
|
1182 |
|
|
}
|
1183 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1184 |
|
|
}
|
1185 |
|
|
|
1186 |
|
|
// Test data for k=-0.69999999999999996, nu=0.20000000000000001.
|
1187 |
|
|
testcase_ellint_3<double> data023[] = {
|
1188 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.20000000000000001,
|
1189 |
|
|
0.0000000000000000 },
|
1190 |
|
|
{ 0.17461479077791472, -0.69999999999999996, 0.20000000000000001,
|
1191 |
|
|
0.17453292519943295 },
|
1192 |
|
|
{ 0.34976950621407538, -0.69999999999999996, 0.20000000000000001,
|
1193 |
|
|
0.34906585039886590 },
|
1194 |
|
|
{ 0.52622533231350188, -0.69999999999999996, 0.20000000000000001,
|
1195 |
|
|
0.52359877559829882 },
|
1196 |
|
|
{ 0.70508774017895226, -0.69999999999999996, 0.20000000000000001,
|
1197 |
|
|
0.69813170079773179 },
|
1198 |
|
|
{ 0.88775302531730294, -0.69999999999999996, 0.20000000000000001,
|
1199 |
|
|
0.87266462599716477 },
|
1200 |
|
|
{ 1.0756195476149006, -0.69999999999999996, 0.20000000000000001,
|
1201 |
|
|
1.0471975511965976 },
|
1202 |
|
|
{ 1.2695349716654372, -0.69999999999999996, 0.20000000000000001,
|
1203 |
|
|
1.2217304763960306 },
|
1204 |
|
|
{ 1.4690814617070540, -0.69999999999999996, 0.20000000000000001,
|
1205 |
|
|
1.3962634015954636 },
|
1206 |
|
|
{ 1.6721098780092147, -0.69999999999999996, 0.20000000000000001,
|
1207 |
|
|
1.5707963267948966 },
|
1208 |
|
|
};
|
1209 |
|
|
|
1210 |
|
|
// Test function for k=-0.69999999999999996, nu=0.20000000000000001.
|
1211 |
|
|
template <typename Tp>
|
1212 |
|
|
void test023()
|
1213 |
|
|
{
|
1214 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1215 |
|
|
Tp max_abs_diff = -Tp(1);
|
1216 |
|
|
Tp max_abs_frac = -Tp(1);
|
1217 |
|
|
unsigned int num_datum = sizeof(data023)
|
1218 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1219 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1220 |
|
|
{
|
1221 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data023[i].k), Tp(data023[i].nu),
|
1222 |
|
|
Tp(data023[i].phi));
|
1223 |
|
|
const Tp f0 = data023[i].f0;
|
1224 |
|
|
const Tp diff = f - f0;
|
1225 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1226 |
|
|
max_abs_diff = std::abs(diff);
|
1227 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1228 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1229 |
|
|
{
|
1230 |
|
|
const Tp frac = diff / f0;
|
1231 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1232 |
|
|
max_abs_frac = std::abs(frac);
|
1233 |
|
|
}
|
1234 |
|
|
}
|
1235 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1236 |
|
|
}
|
1237 |
|
|
|
1238 |
|
|
// Test data for k=-0.69999999999999996, nu=0.29999999999999999.
|
1239 |
|
|
testcase_ellint_3<double> data024[] = {
|
1240 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.29999999999999999,
|
1241 |
|
|
0.0000000000000000 },
|
1242 |
|
|
{ 0.17443945136076172, -0.69999999999999996, 0.29999999999999999,
|
1243 |
|
|
0.17453292519943295 },
|
1244 |
|
|
{ 0.34840956983535287, -0.69999999999999996, 0.29999999999999999,
|
1245 |
|
|
0.34906585039886590 },
|
1246 |
|
|
{ 0.52185308551329179, -0.69999999999999996, 0.29999999999999999,
|
1247 |
|
|
0.52359877559829882 },
|
1248 |
|
|
{ 0.69535240431168266, -0.69999999999999996, 0.29999999999999999,
|
1249 |
|
|
0.69813170079773179 },
|
1250 |
|
|
{ 0.87007983473964923, -0.69999999999999996, 0.29999999999999999,
|
1251 |
|
|
0.87266462599716477 },
|
1252 |
|
|
{ 1.0474657975577066, -0.69999999999999996, 0.29999999999999999,
|
1253 |
|
|
1.0471975511965976 },
|
1254 |
|
|
{ 1.2286225419931889, -0.69999999999999996, 0.29999999999999999,
|
1255 |
|
|
1.2217304763960306 },
|
1256 |
|
|
{ 1.4136490671013271, -0.69999999999999996, 0.29999999999999999,
|
1257 |
|
|
1.3962634015954636 },
|
1258 |
|
|
{ 1.6011813647733213, -0.69999999999999996, 0.29999999999999999,
|
1259 |
|
|
1.5707963267948966 },
|
1260 |
|
|
};
|
1261 |
|
|
|
1262 |
|
|
// Test function for k=-0.69999999999999996, nu=0.29999999999999999.
|
1263 |
|
|
template <typename Tp>
|
1264 |
|
|
void test024()
|
1265 |
|
|
{
|
1266 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1267 |
|
|
Tp max_abs_diff = -Tp(1);
|
1268 |
|
|
Tp max_abs_frac = -Tp(1);
|
1269 |
|
|
unsigned int num_datum = sizeof(data024)
|
1270 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1271 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1272 |
|
|
{
|
1273 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data024[i].k), Tp(data024[i].nu),
|
1274 |
|
|
Tp(data024[i].phi));
|
1275 |
|
|
const Tp f0 = data024[i].f0;
|
1276 |
|
|
const Tp diff = f - f0;
|
1277 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1278 |
|
|
max_abs_diff = std::abs(diff);
|
1279 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1280 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1281 |
|
|
{
|
1282 |
|
|
const Tp frac = diff / f0;
|
1283 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1284 |
|
|
max_abs_frac = std::abs(frac);
|
1285 |
|
|
}
|
1286 |
|
|
}
|
1287 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1288 |
|
|
}
|
1289 |
|
|
|
1290 |
|
|
// Test data for k=-0.69999999999999996, nu=0.40000000000000002.
|
1291 |
|
|
testcase_ellint_3<double> data025[] = {
|
1292 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.40000000000000002,
|
1293 |
|
|
0.0000000000000000 },
|
1294 |
|
|
{ 0.17426474153983226, -0.69999999999999996, 0.40000000000000002,
|
1295 |
|
|
0.17453292519943295 },
|
1296 |
|
|
{ 0.34706817945773732, -0.69999999999999996, 0.40000000000000002,
|
1297 |
|
|
0.34906585039886590 },
|
1298 |
|
|
{ 0.51760452851738159, -0.69999999999999996, 0.40000000000000002,
|
1299 |
|
|
0.52359877559829882 },
|
1300 |
|
|
{ 0.68605801534722766, -0.69999999999999996, 0.40000000000000002,
|
1301 |
|
|
0.69813170079773179 },
|
1302 |
|
|
{ 0.85351339387296532, -0.69999999999999996, 0.40000000000000002,
|
1303 |
|
|
0.87266462599716477 },
|
1304 |
|
|
{ 1.0215297967969537, -0.69999999999999996, 0.40000000000000002,
|
1305 |
|
|
1.0471975511965976 },
|
1306 |
|
|
{ 1.1915051074460528, -0.69999999999999996, 0.40000000000000002,
|
1307 |
|
|
1.2217304763960306 },
|
1308 |
|
|
{ 1.3639821911744707, -0.69999999999999996, 0.40000000000000002,
|
1309 |
|
|
1.3962634015954636 },
|
1310 |
|
|
{ 1.5382162002954762, -0.69999999999999996, 0.40000000000000002,
|
1311 |
|
|
1.5707963267948966 },
|
1312 |
|
|
};
|
1313 |
|
|
|
1314 |
|
|
// Test function for k=-0.69999999999999996, nu=0.40000000000000002.
|
1315 |
|
|
template <typename Tp>
|
1316 |
|
|
void test025()
|
1317 |
|
|
{
|
1318 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1319 |
|
|
Tp max_abs_diff = -Tp(1);
|
1320 |
|
|
Tp max_abs_frac = -Tp(1);
|
1321 |
|
|
unsigned int num_datum = sizeof(data025)
|
1322 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1323 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1324 |
|
|
{
|
1325 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data025[i].k), Tp(data025[i].nu),
|
1326 |
|
|
Tp(data025[i].phi));
|
1327 |
|
|
const Tp f0 = data025[i].f0;
|
1328 |
|
|
const Tp diff = f - f0;
|
1329 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1330 |
|
|
max_abs_diff = std::abs(diff);
|
1331 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1332 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1333 |
|
|
{
|
1334 |
|
|
const Tp frac = diff / f0;
|
1335 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1336 |
|
|
max_abs_frac = std::abs(frac);
|
1337 |
|
|
}
|
1338 |
|
|
}
|
1339 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1340 |
|
|
}
|
1341 |
|
|
|
1342 |
|
|
// Test data for k=-0.69999999999999996, nu=0.50000000000000000.
|
1343 |
|
|
testcase_ellint_3<double> data026[] = {
|
1344 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.50000000000000000,
|
1345 |
|
|
0.0000000000000000 },
|
1346 |
|
|
{ 0.17409065729516093, -0.69999999999999996, 0.50000000000000000,
|
1347 |
|
|
0.17453292519943295 },
|
1348 |
|
|
{ 0.34574489064986091, -0.69999999999999996, 0.50000000000000000,
|
1349 |
|
|
0.34906585039886590 },
|
1350 |
|
|
{ 0.51347361925579793, -0.69999999999999996, 0.50000000000000000,
|
1351 |
|
|
0.52359877559829882 },
|
1352 |
|
|
{ 0.67717079489579290, -0.69999999999999996, 0.50000000000000000,
|
1353 |
|
|
0.69813170079773179 },
|
1354 |
|
|
{ 0.83793902055292280, -0.69999999999999996, 0.50000000000000000,
|
1355 |
|
|
0.87266462599716477 },
|
1356 |
|
|
{ 0.99752863545289705, -0.69999999999999996, 0.50000000000000000,
|
1357 |
|
|
1.0471975511965976 },
|
1358 |
|
|
{ 1.1576240080401499, -0.69999999999999996, 0.50000000000000000,
|
1359 |
|
|
1.2217304763960306 },
|
1360 |
|
|
{ 1.3191464023923762, -0.69999999999999996, 0.50000000000000000,
|
1361 |
|
|
1.3962634015954636 },
|
1362 |
|
|
{ 1.4818433192178544, -0.69999999999999996, 0.50000000000000000,
|
1363 |
|
|
1.5707963267948966 },
|
1364 |
|
|
};
|
1365 |
|
|
|
1366 |
|
|
// Test function for k=-0.69999999999999996, nu=0.50000000000000000.
|
1367 |
|
|
template <typename Tp>
|
1368 |
|
|
void test026()
|
1369 |
|
|
{
|
1370 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1371 |
|
|
Tp max_abs_diff = -Tp(1);
|
1372 |
|
|
Tp max_abs_frac = -Tp(1);
|
1373 |
|
|
unsigned int num_datum = sizeof(data026)
|
1374 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1375 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1376 |
|
|
{
|
1377 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data026[i].k), Tp(data026[i].nu),
|
1378 |
|
|
Tp(data026[i].phi));
|
1379 |
|
|
const Tp f0 = data026[i].f0;
|
1380 |
|
|
const Tp diff = f - f0;
|
1381 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1382 |
|
|
max_abs_diff = std::abs(diff);
|
1383 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1384 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1385 |
|
|
{
|
1386 |
|
|
const Tp frac = diff / f0;
|
1387 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1388 |
|
|
max_abs_frac = std::abs(frac);
|
1389 |
|
|
}
|
1390 |
|
|
}
|
1391 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1392 |
|
|
}
|
1393 |
|
|
|
1394 |
|
|
// Test data for k=-0.69999999999999996, nu=0.59999999999999998.
|
1395 |
|
|
testcase_ellint_3<double> data027[] = {
|
1396 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.59999999999999998,
|
1397 |
|
|
0.0000000000000000 },
|
1398 |
|
|
{ 0.17391719464391611, -0.69999999999999996, 0.59999999999999998,
|
1399 |
|
|
0.17453292519943295 },
|
1400 |
|
|
{ 0.34443927423869031, -0.69999999999999996, 0.59999999999999998,
|
1401 |
|
|
0.34906585039886590 },
|
1402 |
|
|
{ 0.50945473266486074, -0.69999999999999996, 0.59999999999999998,
|
1403 |
|
|
0.52359877559829882 },
|
1404 |
|
|
{ 0.66866056326513823, -0.69999999999999996, 0.59999999999999998,
|
1405 |
|
|
0.69813170079773179 },
|
1406 |
|
|
{ 0.82325830002337352, -0.69999999999999996, 0.59999999999999998,
|
1407 |
|
|
0.87266462599716477 },
|
1408 |
|
|
{ 0.97522808245669357, -0.69999999999999996, 0.59999999999999998,
|
1409 |
|
|
1.0471975511965976 },
|
1410 |
|
|
{ 1.1265300613705282, -0.69999999999999996, 0.59999999999999998,
|
1411 |
|
|
1.2217304763960306 },
|
1412 |
|
|
{ 1.2784066076152003, -0.69999999999999996, 0.59999999999999998,
|
1413 |
|
|
1.3962634015954636 },
|
1414 |
|
|
{ 1.4309994736080540, -0.69999999999999996, 0.59999999999999998,
|
1415 |
|
|
1.5707963267948966 },
|
1416 |
|
|
};
|
1417 |
|
|
|
1418 |
|
|
// Test function for k=-0.69999999999999996, nu=0.59999999999999998.
|
1419 |
|
|
template <typename Tp>
|
1420 |
|
|
void test027()
|
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(data027)
|
1426 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1427 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1428 |
|
|
{
|
1429 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data027[i].k), Tp(data027[i].nu),
|
1430 |
|
|
Tp(data027[i].phi));
|
1431 |
|
|
const Tp f0 = data027[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 k=-0.69999999999999996, nu=0.69999999999999996.
|
1447 |
|
|
testcase_ellint_3<double> data028[] = {
|
1448 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.69999999999999996,
|
1449 |
|
|
0.0000000000000000 },
|
1450 |
|
|
{ 0.17374434963995028, -0.69999999999999996, 0.69999999999999996,
|
1451 |
|
|
0.17453292519943295 },
|
1452 |
|
|
{ 0.34315091562900674, -0.69999999999999996, 0.69999999999999996,
|
1453 |
|
|
0.34906585039886590 },
|
1454 |
|
|
{ 0.50554262375653358, -0.69999999999999996, 0.69999999999999996,
|
1455 |
|
|
0.52359877559829882 },
|
1456 |
|
|
{ 0.66050025406305812, -0.69999999999999996, 0.69999999999999996,
|
1457 |
|
|
0.69813170079773179 },
|
1458 |
|
|
{ 0.80938620118847404, -0.69999999999999996, 0.69999999999999996,
|
1459 |
|
|
0.87266462599716477 },
|
1460 |
|
|
{ 0.95443223855852144, -0.69999999999999996, 0.69999999999999996,
|
1461 |
|
|
1.0471975511965976 },
|
1462 |
|
|
{ 1.0978573207128302, -0.69999999999999996, 0.69999999999999996,
|
1463 |
|
|
1.2217304763960306 },
|
1464 |
|
|
{ 1.2411754575007123, -0.69999999999999996, 0.69999999999999996,
|
1465 |
|
|
1.3962634015954636 },
|
1466 |
|
|
{ 1.3848459188329196, -0.69999999999999996, 0.69999999999999996,
|
1467 |
|
|
1.5707963267948966 },
|
1468 |
|
|
};
|
1469 |
|
|
|
1470 |
|
|
// Test function for k=-0.69999999999999996, nu=0.69999999999999996.
|
1471 |
|
|
template <typename Tp>
|
1472 |
|
|
void test028()
|
1473 |
|
|
{
|
1474 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1475 |
|
|
Tp max_abs_diff = -Tp(1);
|
1476 |
|
|
Tp max_abs_frac = -Tp(1);
|
1477 |
|
|
unsigned int num_datum = sizeof(data028)
|
1478 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1479 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1480 |
|
|
{
|
1481 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data028[i].k), Tp(data028[i].nu),
|
1482 |
|
|
Tp(data028[i].phi));
|
1483 |
|
|
const Tp f0 = data028[i].f0;
|
1484 |
|
|
const Tp diff = f - f0;
|
1485 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1486 |
|
|
max_abs_diff = std::abs(diff);
|
1487 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1488 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1489 |
|
|
{
|
1490 |
|
|
const Tp frac = diff / f0;
|
1491 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1492 |
|
|
max_abs_frac = std::abs(frac);
|
1493 |
|
|
}
|
1494 |
|
|
}
|
1495 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1496 |
|
|
}
|
1497 |
|
|
|
1498 |
|
|
// Test data for k=-0.69999999999999996, nu=0.80000000000000004.
|
1499 |
|
|
testcase_ellint_3<double> data029[] = {
|
1500 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.80000000000000004,
|
1501 |
|
|
0.0000000000000000 },
|
1502 |
|
|
{ 0.17357211837335737, -0.69999999999999996, 0.80000000000000004,
|
1503 |
|
|
0.17453292519943295 },
|
1504 |
|
|
{ 0.34187941416012108, -0.69999999999999996, 0.80000000000000004,
|
1505 |
|
|
0.34906585039886590 },
|
1506 |
|
|
{ 0.50173239465478270, -0.69999999999999996, 0.80000000000000004,
|
1507 |
|
|
0.52359877559829882 },
|
1508 |
|
|
{ 0.65266550725988315, -0.69999999999999996, 0.80000000000000004,
|
1509 |
|
|
0.69813170079773179 },
|
1510 |
|
|
{ 0.79624879865249298, -0.69999999999999996, 0.80000000000000004,
|
1511 |
|
|
0.87266462599716477 },
|
1512 |
|
|
{ 0.93497577043296920, -0.69999999999999996, 0.80000000000000004,
|
1513 |
|
|
1.0471975511965976 },
|
1514 |
|
|
{ 1.0713041566930748, -0.69999999999999996, 0.80000000000000004,
|
1515 |
|
|
1.2217304763960306 },
|
1516 |
|
|
{ 1.2069772023255652, -0.69999999999999996, 0.80000000000000004,
|
1517 |
|
|
1.3962634015954636 },
|
1518 |
|
|
{ 1.3427110650397533, -0.69999999999999996, 0.80000000000000004,
|
1519 |
|
|
1.5707963267948966 },
|
1520 |
|
|
};
|
1521 |
|
|
|
1522 |
|
|
// Test function for k=-0.69999999999999996, nu=0.80000000000000004.
|
1523 |
|
|
template <typename Tp>
|
1524 |
|
|
void test029()
|
1525 |
|
|
{
|
1526 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1527 |
|
|
Tp max_abs_diff = -Tp(1);
|
1528 |
|
|
Tp max_abs_frac = -Tp(1);
|
1529 |
|
|
unsigned int num_datum = sizeof(data029)
|
1530 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1531 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1532 |
|
|
{
|
1533 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data029[i].k), Tp(data029[i].nu),
|
1534 |
|
|
Tp(data029[i].phi));
|
1535 |
|
|
const Tp f0 = data029[i].f0;
|
1536 |
|
|
const Tp diff = f - f0;
|
1537 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1538 |
|
|
max_abs_diff = std::abs(diff);
|
1539 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1540 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1541 |
|
|
{
|
1542 |
|
|
const Tp frac = diff / f0;
|
1543 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1544 |
|
|
max_abs_frac = std::abs(frac);
|
1545 |
|
|
}
|
1546 |
|
|
}
|
1547 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1548 |
|
|
}
|
1549 |
|
|
|
1550 |
|
|
// Test data for k=-0.69999999999999996, nu=0.90000000000000002.
|
1551 |
|
|
testcase_ellint_3<double> data030[] = {
|
1552 |
|
|
{ -0.0000000000000000, -0.69999999999999996, 0.90000000000000002,
|
1553 |
|
|
0.0000000000000000 },
|
1554 |
|
|
{ 0.17340049697003634, -0.69999999999999996, 0.90000000000000002,
|
1555 |
|
|
0.17453292519943295 },
|
1556 |
|
|
{ 0.34062438249741556, -0.69999999999999996, 0.90000000000000002,
|
1557 |
|
|
0.34906585039886590 },
|
1558 |
|
|
{ 0.49801946510076878, -0.69999999999999996, 0.90000000000000002,
|
1559 |
|
|
0.52359877559829882 },
|
1560 |
|
|
{ 0.64513432604750487, -0.69999999999999996, 0.90000000000000002,
|
1561 |
|
|
0.69813170079773179 },
|
1562 |
|
|
{ 0.78378145487573758, -0.69999999999999996, 0.90000000000000002,
|
1563 |
|
|
0.87266462599716477 },
|
1564 |
|
|
{ 0.91671799500854634, -0.69999999999999996, 0.90000000000000002,
|
1565 |
|
|
1.0471975511965976 },
|
1566 |
|
|
{ 1.0466193579463123, -0.69999999999999996, 0.90000000000000002,
|
1567 |
|
|
1.2217304763960306 },
|
1568 |
|
|
{ 1.1754218079199146, -0.69999999999999996, 0.90000000000000002,
|
1569 |
|
|
1.3962634015954636 },
|
1570 |
|
|
{ 1.3040500499695911, -0.69999999999999996, 0.90000000000000002,
|
1571 |
|
|
1.5707963267948966 },
|
1572 |
|
|
};
|
1573 |
|
|
|
1574 |
|
|
// Test function for k=-0.69999999999999996, nu=0.90000000000000002.
|
1575 |
|
|
template <typename Tp>
|
1576 |
|
|
void test030()
|
1577 |
|
|
{
|
1578 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1579 |
|
|
Tp max_abs_diff = -Tp(1);
|
1580 |
|
|
Tp max_abs_frac = -Tp(1);
|
1581 |
|
|
unsigned int num_datum = sizeof(data030)
|
1582 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1583 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1584 |
|
|
{
|
1585 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data030[i].k), Tp(data030[i].nu),
|
1586 |
|
|
Tp(data030[i].phi));
|
1587 |
|
|
const Tp f0 = data030[i].f0;
|
1588 |
|
|
const Tp diff = f - f0;
|
1589 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1590 |
|
|
max_abs_diff = std::abs(diff);
|
1591 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1592 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1593 |
|
|
{
|
1594 |
|
|
const Tp frac = diff / f0;
|
1595 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1596 |
|
|
max_abs_frac = std::abs(frac);
|
1597 |
|
|
}
|
1598 |
|
|
}
|
1599 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1600 |
|
|
}
|
1601 |
|
|
|
1602 |
|
|
// Test data for k=-0.59999999999999998, nu=0.0000000000000000.
|
1603 |
|
|
testcase_ellint_3<double> data031[] = {
|
1604 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.0000000000000000,
|
1605 |
|
|
0.0000000000000000 },
|
1606 |
|
|
{ 0.17485154362988362, -0.59999999999999998, 0.0000000000000000,
|
1607 |
|
|
0.17453292519943295 },
|
1608 |
|
|
{ 0.35160509865544326, -0.59999999999999998, 0.0000000000000000,
|
1609 |
|
|
0.34906585039886590 },
|
1610 |
|
|
{ 0.53210652578446160, -0.59999999999999998, 0.0000000000000000,
|
1611 |
|
|
0.52359877559829882 },
|
1612 |
|
|
{ 0.71805304664485670, -0.59999999999999998, 0.0000000000000000,
|
1613 |
|
|
0.69813170079773179 },
|
1614 |
|
|
{ 0.91082759030195970, -0.59999999999999998, 0.0000000000000000,
|
1615 |
|
|
0.87266462599716477 },
|
1616 |
|
|
{ 1.1112333229323361, -0.59999999999999998, 0.0000000000000000,
|
1617 |
|
|
1.0471975511965976 },
|
1618 |
|
|
{ 1.3191461190365270, -0.59999999999999998, 0.0000000000000000,
|
1619 |
|
|
1.2217304763960306 },
|
1620 |
|
|
{ 1.5332022105084773, -0.59999999999999998, 0.0000000000000000,
|
1621 |
|
|
1.3962634015954636 },
|
1622 |
|
|
{ 1.7507538029157526, -0.59999999999999998, 0.0000000000000000,
|
1623 |
|
|
1.5707963267948966 },
|
1624 |
|
|
};
|
1625 |
|
|
|
1626 |
|
|
// Test function for k=-0.59999999999999998, nu=0.0000000000000000.
|
1627 |
|
|
template <typename Tp>
|
1628 |
|
|
void test031()
|
1629 |
|
|
{
|
1630 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1631 |
|
|
Tp max_abs_diff = -Tp(1);
|
1632 |
|
|
Tp max_abs_frac = -Tp(1);
|
1633 |
|
|
unsigned int num_datum = sizeof(data031)
|
1634 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1635 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1636 |
|
|
{
|
1637 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data031[i].k), Tp(data031[i].nu),
|
1638 |
|
|
Tp(data031[i].phi));
|
1639 |
|
|
const Tp f0 = data031[i].f0;
|
1640 |
|
|
const Tp diff = f - f0;
|
1641 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1642 |
|
|
max_abs_diff = std::abs(diff);
|
1643 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1644 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1645 |
|
|
{
|
1646 |
|
|
const Tp frac = diff / f0;
|
1647 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1648 |
|
|
max_abs_frac = std::abs(frac);
|
1649 |
|
|
}
|
1650 |
|
|
}
|
1651 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1652 |
|
|
}
|
1653 |
|
|
|
1654 |
|
|
// Test data for k=-0.59999999999999998, nu=0.10000000000000001.
|
1655 |
|
|
testcase_ellint_3<double> data032[] = {
|
1656 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.10000000000000001,
|
1657 |
|
|
0.0000000000000000 },
|
1658 |
|
|
{ 0.17467514275022014, -0.59999999999999998, 0.10000000000000001,
|
1659 |
|
|
0.17453292519943295 },
|
1660 |
|
|
{ 0.35021333086258255, -0.59999999999999998, 0.10000000000000001,
|
1661 |
|
|
0.34906585039886590 },
|
1662 |
|
|
{ 0.52751664092962713, -0.59999999999999998, 0.10000000000000001,
|
1663 |
|
|
0.52359877559829882 },
|
1664 |
|
|
{ 0.70752126971957885, -0.59999999999999998, 0.10000000000000001,
|
1665 |
|
|
0.69813170079773179 },
|
1666 |
|
|
{ 0.89111058756112871, -0.59999999999999998, 0.10000000000000001,
|
1667 |
|
|
0.87266462599716477 },
|
1668 |
|
|
{ 1.0789241202877768, -0.59999999999999998, 0.10000000000000001,
|
1669 |
|
|
1.0471975511965976 },
|
1670 |
|
|
{ 1.2710800210399946, -0.59999999999999998, 0.10000000000000001,
|
1671 |
|
|
1.2217304763960306 },
|
1672 |
|
|
{ 1.4669060574440276, -0.59999999999999998, 0.10000000000000001,
|
1673 |
|
|
1.3962634015954636 },
|
1674 |
|
|
{ 1.6648615773343014, -0.59999999999999998, 0.10000000000000001,
|
1675 |
|
|
1.5707963267948966 },
|
1676 |
|
|
};
|
1677 |
|
|
|
1678 |
|
|
// Test function for k=-0.59999999999999998, nu=0.10000000000000001.
|
1679 |
|
|
template <typename Tp>
|
1680 |
|
|
void test032()
|
1681 |
|
|
{
|
1682 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1683 |
|
|
Tp max_abs_diff = -Tp(1);
|
1684 |
|
|
Tp max_abs_frac = -Tp(1);
|
1685 |
|
|
unsigned int num_datum = sizeof(data032)
|
1686 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1687 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1688 |
|
|
{
|
1689 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data032[i].k), Tp(data032[i].nu),
|
1690 |
|
|
Tp(data032[i].phi));
|
1691 |
|
|
const Tp f0 = data032[i].f0;
|
1692 |
|
|
const Tp diff = f - f0;
|
1693 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1694 |
|
|
max_abs_diff = std::abs(diff);
|
1695 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1696 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1697 |
|
|
{
|
1698 |
|
|
const Tp frac = diff / f0;
|
1699 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1700 |
|
|
max_abs_frac = std::abs(frac);
|
1701 |
|
|
}
|
1702 |
|
|
}
|
1703 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1704 |
|
|
}
|
1705 |
|
|
|
1706 |
|
|
// Test data for k=-0.59999999999999998, nu=0.20000000000000001.
|
1707 |
|
|
testcase_ellint_3<double> data033[] = {
|
1708 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.20000000000000001,
|
1709 |
|
|
0.0000000000000000 },
|
1710 |
|
|
{ 0.17449937871800653, -0.59999999999999998, 0.20000000000000001,
|
1711 |
|
|
0.17453292519943295 },
|
1712 |
|
|
{ 0.34884093647346553, -0.59999999999999998, 0.20000000000000001,
|
1713 |
|
|
0.34906585039886590 },
|
1714 |
|
|
{ 0.52306221119844110, -0.59999999999999998, 0.20000000000000001,
|
1715 |
|
|
0.52359877559829882 },
|
1716 |
|
|
{ 0.69749955678982223, -0.59999999999999998, 0.20000000000000001,
|
1717 |
|
|
0.69813170079773179 },
|
1718 |
|
|
{ 0.87274610682416853, -0.59999999999999998, 0.20000000000000001,
|
1719 |
|
|
0.87266462599716477 },
|
1720 |
|
|
{ 1.0494620540750792, -0.59999999999999998, 0.20000000000000001,
|
1721 |
|
|
1.0471975511965976 },
|
1722 |
|
|
{ 1.2280847305507339, -0.59999999999999998, 0.20000000000000001,
|
1723 |
|
|
1.2217304763960306 },
|
1724 |
|
|
{ 1.4085436279696886, -0.59999999999999998, 0.20000000000000001,
|
1725 |
|
|
1.3962634015954636 },
|
1726 |
|
|
{ 1.5901418016279374, -0.59999999999999998, 0.20000000000000001,
|
1727 |
|
|
1.5707963267948966 },
|
1728 |
|
|
};
|
1729 |
|
|
|
1730 |
|
|
// Test function for k=-0.59999999999999998, nu=0.20000000000000001.
|
1731 |
|
|
template <typename Tp>
|
1732 |
|
|
void test033()
|
1733 |
|
|
{
|
1734 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1735 |
|
|
Tp max_abs_diff = -Tp(1);
|
1736 |
|
|
Tp max_abs_frac = -Tp(1);
|
1737 |
|
|
unsigned int num_datum = sizeof(data033)
|
1738 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1739 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1740 |
|
|
{
|
1741 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data033[i].k), Tp(data033[i].nu),
|
1742 |
|
|
Tp(data033[i].phi));
|
1743 |
|
|
const Tp f0 = data033[i].f0;
|
1744 |
|
|
const Tp diff = f - f0;
|
1745 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1746 |
|
|
max_abs_diff = std::abs(diff);
|
1747 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1748 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1749 |
|
|
{
|
1750 |
|
|
const Tp frac = diff / f0;
|
1751 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1752 |
|
|
max_abs_frac = std::abs(frac);
|
1753 |
|
|
}
|
1754 |
|
|
}
|
1755 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1756 |
|
|
}
|
1757 |
|
|
|
1758 |
|
|
// Test data for k=-0.59999999999999998, nu=0.29999999999999999.
|
1759 |
|
|
testcase_ellint_3<double> data034[] = {
|
1760 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.29999999999999999,
|
1761 |
|
|
0.0000000000000000 },
|
1762 |
|
|
{ 0.17432424744393935, -0.59999999999999998, 0.29999999999999999,
|
1763 |
|
|
0.17453292519943295 },
|
1764 |
|
|
{ 0.34748744127146447, -0.59999999999999998, 0.29999999999999999,
|
1765 |
|
|
0.34906585039886590 },
|
1766 |
|
|
{ 0.51873632743924847, -0.59999999999999998, 0.29999999999999999,
|
1767 |
|
|
0.52359877559829882 },
|
1768 |
|
|
{ 0.68794610396313127, -0.59999999999999998, 0.29999999999999999,
|
1769 |
|
|
0.69813170079773179 },
|
1770 |
|
|
{ 0.85558070175468726, -0.59999999999999998, 0.29999999999999999,
|
1771 |
|
|
0.87266462599716477 },
|
1772 |
|
|
{ 1.0224416343605653, -0.59999999999999998, 0.29999999999999999,
|
1773 |
|
|
1.0471975511965976 },
|
1774 |
|
|
{ 1.1893144457936788, -0.59999999999999998, 0.29999999999999999,
|
1775 |
|
|
1.2217304763960306 },
|
1776 |
|
|
{ 1.3566435377982575, -0.59999999999999998, 0.29999999999999999,
|
1777 |
|
|
1.3962634015954636 },
|
1778 |
|
|
{ 1.5243814243493585, -0.59999999999999998, 0.29999999999999999,
|
1779 |
|
|
1.5707963267948966 },
|
1780 |
|
|
};
|
1781 |
|
|
|
1782 |
|
|
// Test function for k=-0.59999999999999998, nu=0.29999999999999999.
|
1783 |
|
|
template <typename Tp>
|
1784 |
|
|
void test034()
|
1785 |
|
|
{
|
1786 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1787 |
|
|
Tp max_abs_diff = -Tp(1);
|
1788 |
|
|
Tp max_abs_frac = -Tp(1);
|
1789 |
|
|
unsigned int num_datum = sizeof(data034)
|
1790 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1791 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1792 |
|
|
{
|
1793 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data034[i].k), Tp(data034[i].nu),
|
1794 |
|
|
Tp(data034[i].phi));
|
1795 |
|
|
const Tp f0 = data034[i].f0;
|
1796 |
|
|
const Tp diff = f - f0;
|
1797 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1798 |
|
|
max_abs_diff = std::abs(diff);
|
1799 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1800 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1801 |
|
|
{
|
1802 |
|
|
const Tp frac = diff / f0;
|
1803 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1804 |
|
|
max_abs_frac = std::abs(frac);
|
1805 |
|
|
}
|
1806 |
|
|
}
|
1807 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1808 |
|
|
}
|
1809 |
|
|
|
1810 |
|
|
// Test data for k=-0.59999999999999998, nu=0.40000000000000002.
|
1811 |
|
|
testcase_ellint_3<double> data035[] = {
|
1812 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.40000000000000002,
|
1813 |
|
|
0.0000000000000000 },
|
1814 |
|
|
{ 0.17414974487670720, -0.59999999999999998, 0.40000000000000002,
|
1815 |
|
|
0.17453292519943295 },
|
1816 |
|
|
{ 0.34615238767335027, -0.59999999999999998, 0.40000000000000002,
|
1817 |
|
|
0.34906585039886590 },
|
1818 |
|
|
{ 0.51453257838108579, -0.59999999999999998, 0.40000000000000002,
|
1819 |
|
|
0.52359877559829882 },
|
1820 |
|
|
{ 0.67882386787534410, -0.59999999999999998, 0.40000000000000002,
|
1821 |
|
|
0.69813170079773179 },
|
1822 |
|
|
{ 0.83948470233173578, -0.59999999999999998, 0.40000000000000002,
|
1823 |
|
|
0.87266462599716477 },
|
1824 |
|
|
{ 0.99753496200073977, -0.59999999999999998, 0.40000000000000002,
|
1825 |
|
|
1.0471975511965976 },
|
1826 |
|
|
{ 1.1541101404388487, -0.59999999999999998, 0.40000000000000002,
|
1827 |
|
|
1.2217304763960306 },
|
1828 |
|
|
{ 1.3100911323398814, -0.59999999999999998, 0.40000000000000002,
|
1829 |
|
|
1.3962634015954636 },
|
1830 |
|
|
{ 1.4659345278069984, -0.59999999999999998, 0.40000000000000002,
|
1831 |
|
|
1.5707963267948966 },
|
1832 |
|
|
};
|
1833 |
|
|
|
1834 |
|
|
// Test function for k=-0.59999999999999998, nu=0.40000000000000002.
|
1835 |
|
|
template <typename Tp>
|
1836 |
|
|
void test035()
|
1837 |
|
|
{
|
1838 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1839 |
|
|
Tp max_abs_diff = -Tp(1);
|
1840 |
|
|
Tp max_abs_frac = -Tp(1);
|
1841 |
|
|
unsigned int num_datum = sizeof(data035)
|
1842 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1843 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1844 |
|
|
{
|
1845 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data035[i].k), Tp(data035[i].nu),
|
1846 |
|
|
Tp(data035[i].phi));
|
1847 |
|
|
const Tp f0 = data035[i].f0;
|
1848 |
|
|
const Tp diff = f - f0;
|
1849 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1850 |
|
|
max_abs_diff = std::abs(diff);
|
1851 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1852 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1853 |
|
|
{
|
1854 |
|
|
const Tp frac = diff / f0;
|
1855 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1856 |
|
|
max_abs_frac = std::abs(frac);
|
1857 |
|
|
}
|
1858 |
|
|
}
|
1859 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1860 |
|
|
}
|
1861 |
|
|
|
1862 |
|
|
// Test data for k=-0.59999999999999998, nu=0.50000000000000000.
|
1863 |
|
|
testcase_ellint_3<double> data036[] = {
|
1864 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.50000000000000000,
|
1865 |
|
|
0.0000000000000000 },
|
1866 |
|
|
{ 0.17397586700252810, -0.59999999999999998, 0.50000000000000000,
|
1867 |
|
|
0.17453292519943295 },
|
1868 |
|
|
{ 0.34483533397138516, -0.59999999999999998, 0.50000000000000000,
|
1869 |
|
|
0.34906585039886590 },
|
1870 |
|
|
{ 0.51044500461706499, -0.59999999999999998, 0.50000000000000000,
|
1871 |
|
|
0.52359877559829882 },
|
1872 |
|
|
{ 0.67009988034712675, -0.59999999999999998, 0.50000000000000000,
|
1873 |
|
|
0.69813170079773179 },
|
1874 |
|
|
{ 0.82434762375735193, -0.59999999999999998, 0.50000000000000000,
|
1875 |
|
|
0.87266462599716477 },
|
1876 |
|
|
{ 0.97447346702798998, -0.59999999999999998, 0.50000000000000000,
|
1877 |
|
|
1.0471975511965976 },
|
1878 |
|
|
{ 1.1219494000522143, -0.59999999999999998, 0.50000000000000000,
|
1879 |
|
|
1.2217304763960306 },
|
1880 |
|
|
{ 1.2680242605954486, -0.59999999999999998, 0.50000000000000000,
|
1881 |
|
|
1.3962634015954636 },
|
1882 |
|
|
{ 1.4135484285693078, -0.59999999999999998, 0.50000000000000000,
|
1883 |
|
|
1.5707963267948966 },
|
1884 |
|
|
};
|
1885 |
|
|
|
1886 |
|
|
// Test function for k=-0.59999999999999998, nu=0.50000000000000000.
|
1887 |
|
|
template <typename Tp>
|
1888 |
|
|
void test036()
|
1889 |
|
|
{
|
1890 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1891 |
|
|
Tp max_abs_diff = -Tp(1);
|
1892 |
|
|
Tp max_abs_frac = -Tp(1);
|
1893 |
|
|
unsigned int num_datum = sizeof(data036)
|
1894 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1895 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1896 |
|
|
{
|
1897 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data036[i].k), Tp(data036[i].nu),
|
1898 |
|
|
Tp(data036[i].phi));
|
1899 |
|
|
const Tp f0 = data036[i].f0;
|
1900 |
|
|
const Tp diff = f - f0;
|
1901 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1902 |
|
|
max_abs_diff = std::abs(diff);
|
1903 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1904 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1905 |
|
|
{
|
1906 |
|
|
const Tp frac = diff / f0;
|
1907 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1908 |
|
|
max_abs_frac = std::abs(frac);
|
1909 |
|
|
}
|
1910 |
|
|
}
|
1911 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1912 |
|
|
}
|
1913 |
|
|
|
1914 |
|
|
// Test data for k=-0.59999999999999998, nu=0.59999999999999998.
|
1915 |
|
|
testcase_ellint_3<double> data037[] = {
|
1916 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.59999999999999998,
|
1917 |
|
|
0.0000000000000000 },
|
1918 |
|
|
{ 0.17380260984469356, -0.59999999999999998, 0.59999999999999998,
|
1919 |
|
|
0.17453292519943295 },
|
1920 |
|
|
{ 0.34353585361777839, -0.59999999999999998, 0.59999999999999998,
|
1921 |
|
|
0.34906585039886590 },
|
1922 |
|
|
{ 0.50646805774321402, -0.59999999999999998, 0.59999999999999998,
|
1923 |
|
|
0.52359877559829882 },
|
1924 |
|
|
{ 0.66174468108625517, -0.59999999999999998, 0.59999999999999998,
|
1925 |
|
|
0.69813170079773179 },
|
1926 |
|
|
{ 0.81007462280278408, -0.59999999999999998, 0.59999999999999998,
|
1927 |
|
|
0.87266462599716477 },
|
1928 |
|
|
{ 0.95303466945718729, -0.59999999999999998, 0.59999999999999998,
|
1929 |
|
|
1.0471975511965976 },
|
1930 |
|
|
{ 1.0924118588677503, -0.59999999999999998, 0.59999999999999998,
|
1931 |
|
|
1.2217304763960306 },
|
1932 |
|
|
{ 1.2297640574847937, -0.59999999999999998, 0.59999999999999998,
|
1933 |
|
|
1.3962634015954636 },
|
1934 |
|
|
{ 1.3662507535812816, -0.59999999999999998, 0.59999999999999998,
|
1935 |
|
|
1.5707963267948966 },
|
1936 |
|
|
};
|
1937 |
|
|
|
1938 |
|
|
// Test function for k=-0.59999999999999998, nu=0.59999999999999998.
|
1939 |
|
|
template <typename Tp>
|
1940 |
|
|
void test037()
|
1941 |
|
|
{
|
1942 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1943 |
|
|
Tp max_abs_diff = -Tp(1);
|
1944 |
|
|
Tp max_abs_frac = -Tp(1);
|
1945 |
|
|
unsigned int num_datum = sizeof(data037)
|
1946 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1947 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
1948 |
|
|
{
|
1949 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data037[i].k), Tp(data037[i].nu),
|
1950 |
|
|
Tp(data037[i].phi));
|
1951 |
|
|
const Tp f0 = data037[i].f0;
|
1952 |
|
|
const Tp diff = f - f0;
|
1953 |
|
|
if (std::abs(diff) > max_abs_diff)
|
1954 |
|
|
max_abs_diff = std::abs(diff);
|
1955 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
1956 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
1957 |
|
|
{
|
1958 |
|
|
const Tp frac = diff / f0;
|
1959 |
|
|
if (std::abs(frac) > max_abs_frac)
|
1960 |
|
|
max_abs_frac = std::abs(frac);
|
1961 |
|
|
}
|
1962 |
|
|
}
|
1963 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
1964 |
|
|
}
|
1965 |
|
|
|
1966 |
|
|
// Test data for k=-0.59999999999999998, nu=0.69999999999999996.
|
1967 |
|
|
testcase_ellint_3<double> data038[] = {
|
1968 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.69999999999999996,
|
1969 |
|
|
0.0000000000000000 },
|
1970 |
|
|
{ 0.17362996946312009, -0.59999999999999998, 0.69999999999999996,
|
1971 |
|
|
0.17453292519943295 },
|
1972 |
|
|
{ 0.34225353454870588, -0.59999999999999998, 0.69999999999999996,
|
1973 |
|
|
0.34906585039886590 },
|
1974 |
|
|
{ 0.50259656397799546, -0.59999999999999998, 0.69999999999999996,
|
1975 |
|
|
0.52359877559829882 },
|
1976 |
|
|
{ 0.65373184496628944, -0.59999999999999998, 0.69999999999999996,
|
1977 |
|
|
0.69813170079773179 },
|
1978 |
|
|
{ 0.79658372884056439, -0.59999999999999998, 0.69999999999999996,
|
1979 |
|
|
0.87266462599716477 },
|
1980 |
|
|
{ 0.93303240100245421, -0.59999999999999998, 0.69999999999999996,
|
1981 |
|
|
1.0471975511965976 },
|
1982 |
|
|
{ 1.0651547944716557, -0.59999999999999998, 0.69999999999999996,
|
1983 |
|
|
1.2217304763960306 },
|
1984 |
|
|
{ 1.1947676204853441, -0.59999999999999998, 0.69999999999999996,
|
1985 |
|
|
1.3962634015954636 },
|
1986 |
|
|
{ 1.3232737468822811, -0.59999999999999998, 0.69999999999999996,
|
1987 |
|
|
1.5707963267948966 },
|
1988 |
|
|
};
|
1989 |
|
|
|
1990 |
|
|
// Test function for k=-0.59999999999999998, nu=0.69999999999999996.
|
1991 |
|
|
template <typename Tp>
|
1992 |
|
|
void test038()
|
1993 |
|
|
{
|
1994 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
1995 |
|
|
Tp max_abs_diff = -Tp(1);
|
1996 |
|
|
Tp max_abs_frac = -Tp(1);
|
1997 |
|
|
unsigned int num_datum = sizeof(data038)
|
1998 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
1999 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2000 |
|
|
{
|
2001 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data038[i].k), Tp(data038[i].nu),
|
2002 |
|
|
Tp(data038[i].phi));
|
2003 |
|
|
const Tp f0 = data038[i].f0;
|
2004 |
|
|
const Tp diff = f - f0;
|
2005 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2006 |
|
|
max_abs_diff = std::abs(diff);
|
2007 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2008 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2009 |
|
|
{
|
2010 |
|
|
const Tp frac = diff / f0;
|
2011 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2012 |
|
|
max_abs_frac = std::abs(frac);
|
2013 |
|
|
}
|
2014 |
|
|
}
|
2015 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2016 |
|
|
}
|
2017 |
|
|
|
2018 |
|
|
// Test data for k=-0.59999999999999998, nu=0.80000000000000004.
|
2019 |
|
|
testcase_ellint_3<double> data039[] = {
|
2020 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.80000000000000004,
|
2021 |
|
|
0.0000000000000000 },
|
2022 |
|
|
{ 0.17345794195390687, -0.59999999999999998, 0.80000000000000004,
|
2023 |
|
|
0.17453292519943295 },
|
2024 |
|
|
{ 0.34098797854531027, -0.59999999999999998, 0.80000000000000004,
|
2025 |
|
|
0.34906585039886590 },
|
2026 |
|
|
{ 0.49882569168826230, -0.59999999999999998, 0.80000000000000004,
|
2027 |
|
|
0.52359877559829882 },
|
2028 |
|
|
{ 0.64603758566475511, -0.59999999999999998, 0.80000000000000004,
|
2029 |
|
|
0.69813170079773179 },
|
2030 |
|
|
{ 0.78380365594769730, -0.59999999999999998, 0.80000000000000004,
|
2031 |
|
|
0.87266462599716477 },
|
2032 |
|
|
{ 0.91430946255611190, -0.59999999999999998, 0.80000000000000004,
|
2033 |
|
|
1.0471975511965976 },
|
2034 |
|
|
{ 1.0398955217270607, -0.59999999999999998, 0.80000000000000004,
|
2035 |
|
|
1.2217304763960306 },
|
2036 |
|
|
{ 1.1625948314277676, -0.59999999999999998, 0.80000000000000004,
|
2037 |
|
|
1.3962634015954636 },
|
2038 |
|
|
{ 1.2840021261752192, -0.59999999999999998, 0.80000000000000004,
|
2039 |
|
|
1.5707963267948966 },
|
2040 |
|
|
};
|
2041 |
|
|
|
2042 |
|
|
// Test function for k=-0.59999999999999998, nu=0.80000000000000004.
|
2043 |
|
|
template <typename Tp>
|
2044 |
|
|
void test039()
|
2045 |
|
|
{
|
2046 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2047 |
|
|
Tp max_abs_diff = -Tp(1);
|
2048 |
|
|
Tp max_abs_frac = -Tp(1);
|
2049 |
|
|
unsigned int num_datum = sizeof(data039)
|
2050 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2051 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2052 |
|
|
{
|
2053 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data039[i].k), Tp(data039[i].nu),
|
2054 |
|
|
Tp(data039[i].phi));
|
2055 |
|
|
const Tp f0 = data039[i].f0;
|
2056 |
|
|
const Tp diff = f - f0;
|
2057 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2058 |
|
|
max_abs_diff = std::abs(diff);
|
2059 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2060 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2061 |
|
|
{
|
2062 |
|
|
const Tp frac = diff / f0;
|
2063 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2064 |
|
|
max_abs_frac = std::abs(frac);
|
2065 |
|
|
}
|
2066 |
|
|
}
|
2067 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2068 |
|
|
}
|
2069 |
|
|
|
2070 |
|
|
// Test data for k=-0.59999999999999998, nu=0.90000000000000002.
|
2071 |
|
|
testcase_ellint_3<double> data040[] = {
|
2072 |
|
|
{ -0.0000000000000000, -0.59999999999999998, 0.90000000000000002,
|
2073 |
|
|
0.0000000000000000 },
|
2074 |
|
|
{ 0.17328652344890033, -0.59999999999999998, 0.90000000000000002,
|
2075 |
|
|
0.17453292519943295 },
|
2076 |
|
|
{ 0.33973880062929018, -0.59999999999999998, 0.90000000000000002,
|
2077 |
|
|
0.34906585039886590 },
|
2078 |
|
|
{ 0.49515092233122765, -0.59999999999999998, 0.90000000000000002,
|
2079 |
|
|
0.52359877559829882 },
|
2080 |
|
|
{ 0.63864042139737043, -0.59999999999999998, 0.90000000000000002,
|
2081 |
|
|
0.69813170079773179 },
|
2082 |
|
|
{ 0.77167205646538850, -0.59999999999999998, 0.90000000000000002,
|
2083 |
|
|
0.87266462599716477 },
|
2084 |
|
|
{ 0.89673202848034383, -0.59999999999999998, 0.90000000000000002,
|
2085 |
|
|
1.0471975511965976 },
|
2086 |
|
|
{ 1.0163984492661304, -0.59999999999999998, 0.90000000000000002,
|
2087 |
|
|
1.2217304763960306 },
|
2088 |
|
|
{ 1.1328845785162431, -0.59999999999999998, 0.90000000000000002,
|
2089 |
|
|
1.3962634015954636 },
|
2090 |
|
|
{ 1.2479362973851875, -0.59999999999999998, 0.90000000000000002,
|
2091 |
|
|
1.5707963267948966 },
|
2092 |
|
|
};
|
2093 |
|
|
|
2094 |
|
|
// Test function for k=-0.59999999999999998, nu=0.90000000000000002.
|
2095 |
|
|
template <typename Tp>
|
2096 |
|
|
void test040()
|
2097 |
|
|
{
|
2098 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2099 |
|
|
Tp max_abs_diff = -Tp(1);
|
2100 |
|
|
Tp max_abs_frac = -Tp(1);
|
2101 |
|
|
unsigned int num_datum = sizeof(data040)
|
2102 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2103 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2104 |
|
|
{
|
2105 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data040[i].k), Tp(data040[i].nu),
|
2106 |
|
|
Tp(data040[i].phi));
|
2107 |
|
|
const Tp f0 = data040[i].f0;
|
2108 |
|
|
const Tp diff = f - f0;
|
2109 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2110 |
|
|
max_abs_diff = std::abs(diff);
|
2111 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2112 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2113 |
|
|
{
|
2114 |
|
|
const Tp frac = diff / f0;
|
2115 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2116 |
|
|
max_abs_frac = std::abs(frac);
|
2117 |
|
|
}
|
2118 |
|
|
}
|
2119 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2120 |
|
|
}
|
2121 |
|
|
|
2122 |
|
|
// Test data for k=-0.50000000000000000, nu=0.0000000000000000.
|
2123 |
|
|
testcase_ellint_3<double> data041[] = {
|
2124 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.0000000000000000,
|
2125 |
|
|
0.0000000000000000 },
|
2126 |
|
|
{ 0.17475385514035785, -0.50000000000000000, 0.0000000000000000,
|
2127 |
|
|
0.17453292519943295 },
|
2128 |
|
|
{ 0.35081868470101585, -0.50000000000000000, 0.0000000000000000,
|
2129 |
|
|
0.34906585039886590 },
|
2130 |
|
|
{ 0.52942862705190585, -0.50000000000000000, 0.0000000000000000,
|
2131 |
|
|
0.52359877559829882 },
|
2132 |
|
|
{ 0.71164727562630326, -0.50000000000000000, 0.0000000000000000,
|
2133 |
|
|
0.69813170079773179 },
|
2134 |
|
|
{ 0.89824523594227768, -0.50000000000000000, 0.0000000000000000,
|
2135 |
|
|
0.87266462599716477 },
|
2136 |
|
|
{ 1.0895506700518851, -0.50000000000000000, 0.0000000000000000,
|
2137 |
|
|
1.0471975511965976 },
|
2138 |
|
|
{ 1.2853005857432933, -0.50000000000000000, 0.0000000000000000,
|
2139 |
|
|
1.2217304763960306 },
|
2140 |
|
|
{ 1.4845545520549484, -0.50000000000000000, 0.0000000000000000,
|
2141 |
|
|
1.3962634015954636 },
|
2142 |
|
|
{ 1.6857503548125963, -0.50000000000000000, 0.0000000000000000,
|
2143 |
|
|
1.5707963267948966 },
|
2144 |
|
|
};
|
2145 |
|
|
|
2146 |
|
|
// Test function for k=-0.50000000000000000, nu=0.0000000000000000.
|
2147 |
|
|
template <typename Tp>
|
2148 |
|
|
void test041()
|
2149 |
|
|
{
|
2150 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2151 |
|
|
Tp max_abs_diff = -Tp(1);
|
2152 |
|
|
Tp max_abs_frac = -Tp(1);
|
2153 |
|
|
unsigned int num_datum = sizeof(data041)
|
2154 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2155 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2156 |
|
|
{
|
2157 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data041[i].k), Tp(data041[i].nu),
|
2158 |
|
|
Tp(data041[i].phi));
|
2159 |
|
|
const Tp f0 = data041[i].f0;
|
2160 |
|
|
const Tp diff = f - f0;
|
2161 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2162 |
|
|
max_abs_diff = std::abs(diff);
|
2163 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2164 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2165 |
|
|
{
|
2166 |
|
|
const Tp frac = diff / f0;
|
2167 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2168 |
|
|
max_abs_frac = std::abs(frac);
|
2169 |
|
|
}
|
2170 |
|
|
}
|
2171 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2172 |
|
|
}
|
2173 |
|
|
|
2174 |
|
|
// Test data for k=-0.50000000000000000, nu=0.10000000000000001.
|
2175 |
|
|
testcase_ellint_3<double> data042[] = {
|
2176 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.10000000000000001,
|
2177 |
|
|
0.0000000000000000 },
|
2178 |
|
|
{ 0.17457763120814676, -0.50000000000000000, 0.10000000000000001,
|
2179 |
|
|
0.17453292519943295 },
|
2180 |
|
|
{ 0.34943246340849154, -0.50000000000000000, 0.10000000000000001,
|
2181 |
|
|
0.34906585039886590 },
|
2182 |
|
|
{ 0.52487937869610801, -0.50000000000000000, 0.10000000000000001,
|
2183 |
|
|
0.52359877559829882 },
|
2184 |
|
|
{ 0.70127785096388395, -0.50000000000000000, 0.10000000000000001,
|
2185 |
|
|
0.69813170079773179 },
|
2186 |
|
|
{ 0.87898815988624479, -0.50000000000000000, 0.10000000000000001,
|
2187 |
|
|
0.87266462599716477 },
|
2188 |
|
|
{ 1.0582764576094172, -0.50000000000000000, 0.10000000000000001,
|
2189 |
|
|
1.0471975511965976 },
|
2190 |
|
|
{ 1.2391936844060207, -0.50000000000000000, 0.10000000000000001,
|
2191 |
|
|
1.2217304763960306 },
|
2192 |
|
|
{ 1.4214793542995841, -0.50000000000000000, 0.10000000000000001,
|
2193 |
|
|
1.3962634015954636 },
|
2194 |
|
|
{ 1.6045524936084892, -0.50000000000000000, 0.10000000000000001,
|
2195 |
|
|
1.5707963267948966 },
|
2196 |
|
|
};
|
2197 |
|
|
|
2198 |
|
|
// Test function for k=-0.50000000000000000, nu=0.10000000000000001.
|
2199 |
|
|
template <typename Tp>
|
2200 |
|
|
void test042()
|
2201 |
|
|
{
|
2202 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2203 |
|
|
Tp max_abs_diff = -Tp(1);
|
2204 |
|
|
Tp max_abs_frac = -Tp(1);
|
2205 |
|
|
unsigned int num_datum = sizeof(data042)
|
2206 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2207 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2208 |
|
|
{
|
2209 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data042[i].k), Tp(data042[i].nu),
|
2210 |
|
|
Tp(data042[i].phi));
|
2211 |
|
|
const Tp f0 = data042[i].f0;
|
2212 |
|
|
const Tp diff = f - f0;
|
2213 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2214 |
|
|
max_abs_diff = std::abs(diff);
|
2215 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2216 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2217 |
|
|
{
|
2218 |
|
|
const Tp frac = diff / f0;
|
2219 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2220 |
|
|
max_abs_frac = std::abs(frac);
|
2221 |
|
|
}
|
2222 |
|
|
}
|
2223 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2224 |
|
|
}
|
2225 |
|
|
|
2226 |
|
|
// Test data for k=-0.50000000000000000, nu=0.20000000000000001.
|
2227 |
|
|
testcase_ellint_3<double> data043[] = {
|
2228 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.20000000000000001,
|
2229 |
|
|
0.0000000000000000 },
|
2230 |
|
|
{ 0.17440204336345433, -0.50000000000000000, 0.20000000000000001,
|
2231 |
|
|
0.17453292519943295 },
|
2232 |
|
|
{ 0.34806552388338824, -0.50000000000000000, 0.20000000000000001,
|
2233 |
|
|
0.34906585039886590 },
|
2234 |
|
|
{ 0.52046416757129821, -0.50000000000000000, 0.20000000000000001,
|
2235 |
|
|
0.52359877559829882 },
|
2236 |
|
|
{ 0.69140924550993876, -0.50000000000000000, 0.20000000000000001,
|
2237 |
|
|
0.69813170079773179 },
|
2238 |
|
|
{ 0.86104678636125520, -0.50000000000000000, 0.20000000000000001,
|
2239 |
|
|
0.87266462599716477 },
|
2240 |
|
|
{ 1.0297439459053981, -0.50000000000000000, 0.20000000000000001,
|
2241 |
|
|
1.0471975511965976 },
|
2242 |
|
|
{ 1.1979214112912036, -0.50000000000000000, 0.20000000000000001,
|
2243 |
|
|
1.2217304763960306 },
|
2244 |
|
|
{ 1.3659033858648930, -0.50000000000000000, 0.20000000000000001,
|
2245 |
|
|
1.3962634015954636 },
|
2246 |
|
|
{ 1.5338490483665983, -0.50000000000000000, 0.20000000000000001,
|
2247 |
|
|
1.5707963267948966 },
|
2248 |
|
|
};
|
2249 |
|
|
|
2250 |
|
|
// Test function for k=-0.50000000000000000, nu=0.20000000000000001.
|
2251 |
|
|
template <typename Tp>
|
2252 |
|
|
void test043()
|
2253 |
|
|
{
|
2254 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2255 |
|
|
Tp max_abs_diff = -Tp(1);
|
2256 |
|
|
Tp max_abs_frac = -Tp(1);
|
2257 |
|
|
unsigned int num_datum = sizeof(data043)
|
2258 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2259 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2260 |
|
|
{
|
2261 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data043[i].k), Tp(data043[i].nu),
|
2262 |
|
|
Tp(data043[i].phi));
|
2263 |
|
|
const Tp f0 = data043[i].f0;
|
2264 |
|
|
const Tp diff = f - f0;
|
2265 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2266 |
|
|
max_abs_diff = std::abs(diff);
|
2267 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2268 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2269 |
|
|
{
|
2270 |
|
|
const Tp frac = diff / f0;
|
2271 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2272 |
|
|
max_abs_frac = std::abs(frac);
|
2273 |
|
|
}
|
2274 |
|
|
}
|
2275 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2276 |
|
|
}
|
2277 |
|
|
|
2278 |
|
|
// Test data for k=-0.50000000000000000, nu=0.29999999999999999.
|
2279 |
|
|
testcase_ellint_3<double> data044[] = {
|
2280 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.29999999999999999,
|
2281 |
|
|
0.0000000000000000 },
|
2282 |
|
|
{ 0.17422708752228896, -0.50000000000000000, 0.29999999999999999,
|
2283 |
|
|
0.17453292519943295 },
|
2284 |
|
|
{ 0.34671739434855858, -0.50000000000000000, 0.29999999999999999,
|
2285 |
|
|
0.34906585039886590 },
|
2286 |
|
|
{ 0.51617616305641889, -0.50000000000000000, 0.29999999999999999,
|
2287 |
|
|
0.52359877559829882 },
|
2288 |
|
|
{ 0.68200047612545178, -0.50000000000000000, 0.29999999999999999,
|
2289 |
|
|
0.69813170079773179 },
|
2290 |
|
|
{ 0.84427217869498372, -0.50000000000000000, 0.29999999999999999,
|
2291 |
|
|
0.87266462599716477 },
|
2292 |
|
|
{ 1.0035637821389782, -0.50000000000000000, 0.29999999999999999,
|
2293 |
|
|
1.0471975511965976 },
|
2294 |
|
|
{ 1.1606800483933113, -0.50000000000000000, 0.29999999999999999,
|
2295 |
|
|
1.2217304763960306 },
|
2296 |
|
|
{ 1.3164407134643459, -0.50000000000000000, 0.29999999999999999,
|
2297 |
|
|
1.3962634015954636 },
|
2298 |
|
|
{ 1.4715681939859637, -0.50000000000000000, 0.29999999999999999,
|
2299 |
|
|
1.5707963267948966 },
|
2300 |
|
|
};
|
2301 |
|
|
|
2302 |
|
|
// Test function for k=-0.50000000000000000, nu=0.29999999999999999.
|
2303 |
|
|
template <typename Tp>
|
2304 |
|
|
void test044()
|
2305 |
|
|
{
|
2306 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2307 |
|
|
Tp max_abs_diff = -Tp(1);
|
2308 |
|
|
Tp max_abs_frac = -Tp(1);
|
2309 |
|
|
unsigned int num_datum = sizeof(data044)
|
2310 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2311 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2312 |
|
|
{
|
2313 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data044[i].k), Tp(data044[i].nu),
|
2314 |
|
|
Tp(data044[i].phi));
|
2315 |
|
|
const Tp f0 = data044[i].f0;
|
2316 |
|
|
const Tp diff = f - f0;
|
2317 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2318 |
|
|
max_abs_diff = std::abs(diff);
|
2319 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2320 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2321 |
|
|
{
|
2322 |
|
|
const Tp frac = diff / f0;
|
2323 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2324 |
|
|
max_abs_frac = std::abs(frac);
|
2325 |
|
|
}
|
2326 |
|
|
}
|
2327 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2328 |
|
|
}
|
2329 |
|
|
|
2330 |
|
|
// Test data for k=-0.50000000000000000, nu=0.40000000000000002.
|
2331 |
|
|
testcase_ellint_3<double> data045[] = {
|
2332 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.40000000000000002,
|
2333 |
|
|
0.0000000000000000 },
|
2334 |
|
|
{ 0.17405275963859917, -0.50000000000000000, 0.40000000000000002,
|
2335 |
|
|
0.17453292519943295 },
|
2336 |
|
|
{ 0.34538761957029329, -0.50000000000000000, 0.40000000000000002,
|
2337 |
|
|
0.34906585039886590 },
|
2338 |
|
|
{ 0.51200902646603919, -0.50000000000000000, 0.40000000000000002,
|
2339 |
|
|
0.52359877559829882 },
|
2340 |
|
|
{ 0.67301522212868792, -0.50000000000000000, 0.40000000000000002,
|
2341 |
|
|
0.69813170079773179 },
|
2342 |
|
|
{ 0.82853844466313320, -0.50000000000000000, 0.40000000000000002,
|
2343 |
|
|
0.87266462599716477 },
|
2344 |
|
|
{ 0.97942097862681488, -0.50000000000000000, 0.40000000000000002,
|
2345 |
|
|
1.0471975511965976 },
|
2346 |
|
|
{ 1.1268429801220616, -0.50000000000000000, 0.40000000000000002,
|
2347 |
|
|
1.2217304763960306 },
|
2348 |
|
|
{ 1.2720406704533922, -0.50000000000000000, 0.40000000000000002,
|
2349 |
|
|
1.3962634015954636 },
|
2350 |
|
|
{ 1.4161679518465340, -0.50000000000000000, 0.40000000000000002,
|
2351 |
|
|
1.5707963267948966 },
|
2352 |
|
|
};
|
2353 |
|
|
|
2354 |
|
|
// Test function for k=-0.50000000000000000, nu=0.40000000000000002.
|
2355 |
|
|
template <typename Tp>
|
2356 |
|
|
void test045()
|
2357 |
|
|
{
|
2358 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2359 |
|
|
Tp max_abs_diff = -Tp(1);
|
2360 |
|
|
Tp max_abs_frac = -Tp(1);
|
2361 |
|
|
unsigned int num_datum = sizeof(data045)
|
2362 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2363 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2364 |
|
|
{
|
2365 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data045[i].k), Tp(data045[i].nu),
|
2366 |
|
|
Tp(data045[i].phi));
|
2367 |
|
|
const Tp f0 = data045[i].f0;
|
2368 |
|
|
const Tp diff = f - f0;
|
2369 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2370 |
|
|
max_abs_diff = std::abs(diff);
|
2371 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2372 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2373 |
|
|
{
|
2374 |
|
|
const Tp frac = diff / f0;
|
2375 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2376 |
|
|
max_abs_frac = std::abs(frac);
|
2377 |
|
|
}
|
2378 |
|
|
}
|
2379 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2380 |
|
|
}
|
2381 |
|
|
|
2382 |
|
|
// Test data for k=-0.50000000000000000, nu=0.50000000000000000.
|
2383 |
|
|
testcase_ellint_3<double> data046[] = {
|
2384 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.50000000000000000,
|
2385 |
|
|
0.0000000000000000 },
|
2386 |
|
|
{ 0.17387905570381157, -0.50000000000000000, 0.50000000000000000,
|
2387 |
|
|
0.17453292519943295 },
|
2388 |
|
|
{ 0.34407576010465207, -0.50000000000000000, 0.50000000000000000,
|
2389 |
|
|
0.34906585039886590 },
|
2390 |
|
|
{ 0.50795686560160835, -0.50000000000000000, 0.50000000000000000,
|
2391 |
|
|
0.52359877559829882 },
|
2392 |
|
|
{ 0.66442115453330175, -0.50000000000000000, 0.50000000000000000,
|
2393 |
|
|
0.69813170079773179 },
|
2394 |
|
|
{ 0.81373829119355345, -0.50000000000000000, 0.50000000000000000,
|
2395 |
|
|
0.87266462599716477 },
|
2396 |
|
|
{ 0.95705743313235825, -0.50000000000000000, 0.50000000000000000,
|
2397 |
|
|
1.0471975511965976 },
|
2398 |
|
|
{ 1.0959131991362556, -0.50000000000000000, 0.50000000000000000,
|
2399 |
|
|
1.2217304763960306 },
|
2400 |
|
|
{ 1.2318900529754597, -0.50000000000000000, 0.50000000000000000,
|
2401 |
|
|
1.3962634015954636 },
|
2402 |
|
|
{ 1.3664739530045971, -0.50000000000000000, 0.50000000000000000,
|
2403 |
|
|
1.5707963267948966 },
|
2404 |
|
|
};
|
2405 |
|
|
|
2406 |
|
|
// Test function for k=-0.50000000000000000, nu=0.50000000000000000.
|
2407 |
|
|
template <typename Tp>
|
2408 |
|
|
void test046()
|
2409 |
|
|
{
|
2410 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2411 |
|
|
Tp max_abs_diff = -Tp(1);
|
2412 |
|
|
Tp max_abs_frac = -Tp(1);
|
2413 |
|
|
unsigned int num_datum = sizeof(data046)
|
2414 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2415 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2416 |
|
|
{
|
2417 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data046[i].k), Tp(data046[i].nu),
|
2418 |
|
|
Tp(data046[i].phi));
|
2419 |
|
|
const Tp f0 = data046[i].f0;
|
2420 |
|
|
const Tp diff = f - f0;
|
2421 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2422 |
|
|
max_abs_diff = std::abs(diff);
|
2423 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2424 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2425 |
|
|
{
|
2426 |
|
|
const Tp frac = diff / f0;
|
2427 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2428 |
|
|
max_abs_frac = std::abs(frac);
|
2429 |
|
|
}
|
2430 |
|
|
}
|
2431 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2432 |
|
|
}
|
2433 |
|
|
|
2434 |
|
|
// Test data for k=-0.50000000000000000, nu=0.59999999999999998.
|
2435 |
|
|
testcase_ellint_3<double> data047[] = {
|
2436 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.59999999999999998,
|
2437 |
|
|
0.0000000000000000 },
|
2438 |
|
|
{ 0.17370597174637581, -0.50000000000000000, 0.59999999999999998,
|
2439 |
|
|
0.17453292519943295 },
|
2440 |
|
|
{ 0.34278139158591414, -0.50000000000000000, 0.59999999999999998,
|
2441 |
|
|
0.34906585039886590 },
|
2442 |
|
|
{ 0.50401419439302719, -0.50000000000000000, 0.59999999999999998,
|
2443 |
|
|
0.52359877559829882 },
|
2444 |
|
|
{ 0.65618938076167221, -0.50000000000000000, 0.59999999999999998,
|
2445 |
|
|
0.69813170079773179 },
|
2446 |
|
|
{ 0.79977959248855424, -0.50000000000000000, 0.59999999999999998,
|
2447 |
|
|
0.87266462599716477 },
|
2448 |
|
|
{ 0.93625925190753545, -0.50000000000000000, 0.59999999999999998,
|
2449 |
|
|
1.0471975511965976 },
|
2450 |
|
|
{ 1.0674905658379710, -0.50000000000000000, 0.59999999999999998,
|
2451 |
|
|
1.2217304763960306 },
|
2452 |
|
|
{ 1.1953481298023048, -0.50000000000000000, 0.59999999999999998,
|
2453 |
|
|
1.3962634015954636 },
|
2454 |
|
|
{ 1.3215740290190876, -0.50000000000000000, 0.59999999999999998,
|
2455 |
|
|
1.5707963267948966 },
|
2456 |
|
|
};
|
2457 |
|
|
|
2458 |
|
|
// Test function for k=-0.50000000000000000, nu=0.59999999999999998.
|
2459 |
|
|
template <typename Tp>
|
2460 |
|
|
void test047()
|
2461 |
|
|
{
|
2462 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2463 |
|
|
Tp max_abs_diff = -Tp(1);
|
2464 |
|
|
Tp max_abs_frac = -Tp(1);
|
2465 |
|
|
unsigned int num_datum = sizeof(data047)
|
2466 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2467 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2468 |
|
|
{
|
2469 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data047[i].k), Tp(data047[i].nu),
|
2470 |
|
|
Tp(data047[i].phi));
|
2471 |
|
|
const Tp f0 = data047[i].f0;
|
2472 |
|
|
const Tp diff = f - f0;
|
2473 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2474 |
|
|
max_abs_diff = std::abs(diff);
|
2475 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2476 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2477 |
|
|
{
|
2478 |
|
|
const Tp frac = diff / f0;
|
2479 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2480 |
|
|
max_abs_frac = std::abs(frac);
|
2481 |
|
|
}
|
2482 |
|
|
}
|
2483 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2484 |
|
|
}
|
2485 |
|
|
|
2486 |
|
|
// Test data for k=-0.50000000000000000, nu=0.69999999999999996.
|
2487 |
|
|
testcase_ellint_3<double> data048[] = {
|
2488 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.69999999999999996,
|
2489 |
|
|
0.0000000000000000 },
|
2490 |
|
|
{ 0.17353350383131641, -0.50000000000000000, 0.69999999999999996,
|
2491 |
|
|
0.17453292519943295 },
|
2492 |
|
|
{ 0.34150410405436771, -0.50000000000000000, 0.69999999999999996,
|
2493 |
|
|
0.34906585039886590 },
|
2494 |
|
|
{ 0.50017589696443487, -0.50000000000000000, 0.69999999999999996,
|
2495 |
|
|
0.52359877559829882 },
|
2496 |
|
|
{ 0.64829398188419962, -0.50000000000000000, 0.69999999999999996,
|
2497 |
|
|
0.69813170079773179 },
|
2498 |
|
|
{ 0.78658270782402073, -0.50000000000000000, 0.69999999999999996,
|
2499 |
|
|
0.87266462599716477 },
|
2500 |
|
|
{ 0.91684738336675053, -0.50000000000000000, 0.69999999999999996,
|
2501 |
|
|
1.0471975511965976 },
|
2502 |
|
|
{ 1.0412486789555937, -0.50000000000000000, 0.69999999999999996,
|
2503 |
|
|
1.2217304763960306 },
|
2504 |
|
|
{ 1.1619021847612001, -0.50000000000000000, 0.69999999999999996,
|
2505 |
|
|
1.3962634015954636 },
|
2506 |
|
|
{ 1.2807475181182502, -0.50000000000000000, 0.69999999999999996,
|
2507 |
|
|
1.5707963267948966 },
|
2508 |
|
|
};
|
2509 |
|
|
|
2510 |
|
|
// Test function for k=-0.50000000000000000, nu=0.69999999999999996.
|
2511 |
|
|
template <typename Tp>
|
2512 |
|
|
void test048()
|
2513 |
|
|
{
|
2514 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2515 |
|
|
Tp max_abs_diff = -Tp(1);
|
2516 |
|
|
Tp max_abs_frac = -Tp(1);
|
2517 |
|
|
unsigned int num_datum = sizeof(data048)
|
2518 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2519 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2520 |
|
|
{
|
2521 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data048[i].k), Tp(data048[i].nu),
|
2522 |
|
|
Tp(data048[i].phi));
|
2523 |
|
|
const Tp f0 = data048[i].f0;
|
2524 |
|
|
const Tp diff = f - f0;
|
2525 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2526 |
|
|
max_abs_diff = std::abs(diff);
|
2527 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2528 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2529 |
|
|
{
|
2530 |
|
|
const Tp frac = diff / f0;
|
2531 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2532 |
|
|
max_abs_frac = std::abs(frac);
|
2533 |
|
|
}
|
2534 |
|
|
}
|
2535 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2536 |
|
|
}
|
2537 |
|
|
|
2538 |
|
|
// Test data for k=-0.50000000000000000, nu=0.80000000000000004.
|
2539 |
|
|
testcase_ellint_3<double> data049[] = {
|
2540 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.80000000000000004,
|
2541 |
|
|
0.0000000000000000 },
|
2542 |
|
|
{ 0.17336164805979126, -0.50000000000000000, 0.80000000000000004,
|
2543 |
|
|
0.17453292519943295 },
|
2544 |
|
|
{ 0.34024350132086773, -0.50000000000000000, 0.80000000000000004,
|
2545 |
|
|
0.34906585039886590 },
|
2546 |
|
|
{ 0.49643719555734084, -0.50000000000000000, 0.80000000000000004,
|
2547 |
|
|
0.52359877559829882 },
|
2548 |
|
|
{ 0.64071162456976150, -0.50000000000000000, 0.80000000000000004,
|
2549 |
|
|
0.69813170079773179 },
|
2550 |
|
|
{ 0.77407836177211908, -0.50000000000000000, 0.80000000000000004,
|
2551 |
|
|
0.87266462599716477 },
|
2552 |
|
|
{ 0.89867058251905652, -0.50000000000000000, 0.80000000000000004,
|
2553 |
|
|
1.0471975511965976 },
|
2554 |
|
|
{ 1.0169181822134912, -0.50000000000000000, 0.80000000000000004,
|
2555 |
|
|
1.2217304763960306 },
|
2556 |
|
|
{ 1.1311363312779448, -0.50000000000000000, 0.80000000000000004,
|
2557 |
|
|
1.3962634015954636 },
|
2558 |
|
|
{ 1.2434165408189539, -0.50000000000000000, 0.80000000000000004,
|
2559 |
|
|
1.5707963267948966 },
|
2560 |
|
|
};
|
2561 |
|
|
|
2562 |
|
|
// Test function for k=-0.50000000000000000, nu=0.80000000000000004.
|
2563 |
|
|
template <typename Tp>
|
2564 |
|
|
void test049()
|
2565 |
|
|
{
|
2566 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2567 |
|
|
Tp max_abs_diff = -Tp(1);
|
2568 |
|
|
Tp max_abs_frac = -Tp(1);
|
2569 |
|
|
unsigned int num_datum = sizeof(data049)
|
2570 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2571 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2572 |
|
|
{
|
2573 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data049[i].k), Tp(data049[i].nu),
|
2574 |
|
|
Tp(data049[i].phi));
|
2575 |
|
|
const Tp f0 = data049[i].f0;
|
2576 |
|
|
const Tp diff = f - f0;
|
2577 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2578 |
|
|
max_abs_diff = std::abs(diff);
|
2579 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2580 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2581 |
|
|
{
|
2582 |
|
|
const Tp frac = diff / f0;
|
2583 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2584 |
|
|
max_abs_frac = std::abs(frac);
|
2585 |
|
|
}
|
2586 |
|
|
}
|
2587 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2588 |
|
|
}
|
2589 |
|
|
|
2590 |
|
|
// Test data for k=-0.50000000000000000, nu=0.90000000000000002.
|
2591 |
|
|
testcase_ellint_3<double> data050[] = {
|
2592 |
|
|
{ -0.0000000000000000, -0.50000000000000000, 0.90000000000000002,
|
2593 |
|
|
0.0000000000000000 },
|
2594 |
|
|
{ 0.17319040056865681, -0.50000000000000000, 0.90000000000000002,
|
2595 |
|
|
0.17453292519943295 },
|
2596 |
|
|
{ 0.33899920036578557, -0.50000000000000000, 0.90000000000000002,
|
2597 |
|
|
0.34906585039886590 },
|
2598 |
|
|
{ 0.49279362182695186, -0.50000000000000000, 0.90000000000000002,
|
2599 |
|
|
0.52359877559829882 },
|
2600 |
|
|
{ 0.63342123379746151, -0.50000000000000000, 0.90000000000000002,
|
2601 |
|
|
0.69813170079773179 },
|
2602 |
|
|
{ 0.76220595179550321, -0.50000000000000000, 0.90000000000000002,
|
2603 |
|
|
0.87266462599716477 },
|
2604 |
|
|
{ 0.88160004743532294, -0.50000000000000000, 0.90000000000000002,
|
2605 |
|
|
1.0471975511965976 },
|
2606 |
|
|
{ 0.99427448642310134, -0.50000000000000000, 0.90000000000000002,
|
2607 |
|
|
1.2217304763960306 },
|
2608 |
|
|
{ 1.1027091512470093, -0.50000000000000000, 0.90000000000000002,
|
2609 |
|
|
1.3962634015954636 },
|
2610 |
|
|
{ 1.2091116095504744, -0.50000000000000000, 0.90000000000000002,
|
2611 |
|
|
1.5707963267948966 },
|
2612 |
|
|
};
|
2613 |
|
|
|
2614 |
|
|
// Test function for k=-0.50000000000000000, nu=0.90000000000000002.
|
2615 |
|
|
template <typename Tp>
|
2616 |
|
|
void test050()
|
2617 |
|
|
{
|
2618 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2619 |
|
|
Tp max_abs_diff = -Tp(1);
|
2620 |
|
|
Tp max_abs_frac = -Tp(1);
|
2621 |
|
|
unsigned int num_datum = sizeof(data050)
|
2622 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2623 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2624 |
|
|
{
|
2625 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data050[i].k), Tp(data050[i].nu),
|
2626 |
|
|
Tp(data050[i].phi));
|
2627 |
|
|
const Tp f0 = data050[i].f0;
|
2628 |
|
|
const Tp diff = f - f0;
|
2629 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2630 |
|
|
max_abs_diff = std::abs(diff);
|
2631 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2632 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2633 |
|
|
{
|
2634 |
|
|
const Tp frac = diff / f0;
|
2635 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2636 |
|
|
max_abs_frac = std::abs(frac);
|
2637 |
|
|
}
|
2638 |
|
|
}
|
2639 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2640 |
|
|
}
|
2641 |
|
|
|
2642 |
|
|
// Test data for k=-0.40000000000000002, nu=0.0000000000000000.
|
2643 |
|
|
testcase_ellint_3<double> data051[] = {
|
2644 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.0000000000000000,
|
2645 |
|
|
0.0000000000000000 },
|
2646 |
|
|
{ 0.17467414669441531, -0.40000000000000002, 0.0000000000000000,
|
2647 |
|
|
0.17453292519943295 },
|
2648 |
|
|
{ 0.35018222772483443, -0.40000000000000002, 0.0000000000000000,
|
2649 |
|
|
0.34906585039886590 },
|
2650 |
|
|
{ 0.52729015917508748, -0.40000000000000002, 0.0000000000000000,
|
2651 |
|
|
0.52359877559829882 },
|
2652 |
|
|
{ 0.70662374407341255, -0.40000000000000002, 0.0000000000000000,
|
2653 |
|
|
0.69813170079773179 },
|
2654 |
|
|
{ 0.88859210497602170, -0.40000000000000002, 0.0000000000000000,
|
2655 |
|
|
0.87266462599716477 },
|
2656 |
|
|
{ 1.0733136290471379, -0.40000000000000002, 0.0000000000000000,
|
2657 |
|
|
1.0471975511965976 },
|
2658 |
|
|
{ 1.2605612170157061, -0.40000000000000002, 0.0000000000000000,
|
2659 |
|
|
1.2217304763960306 },
|
2660 |
|
|
{ 1.4497513956433437, -0.40000000000000002, 0.0000000000000000,
|
2661 |
|
|
1.3962634015954636 },
|
2662 |
|
|
{ 1.6399998658645112, -0.40000000000000002, 0.0000000000000000,
|
2663 |
|
|
1.5707963267948966 },
|
2664 |
|
|
};
|
2665 |
|
|
|
2666 |
|
|
// Test function for k=-0.40000000000000002, nu=0.0000000000000000.
|
2667 |
|
|
template <typename Tp>
|
2668 |
|
|
void test051()
|
2669 |
|
|
{
|
2670 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2671 |
|
|
Tp max_abs_diff = -Tp(1);
|
2672 |
|
|
Tp max_abs_frac = -Tp(1);
|
2673 |
|
|
unsigned int num_datum = sizeof(data051)
|
2674 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2675 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2676 |
|
|
{
|
2677 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data051[i].k), Tp(data051[i].nu),
|
2678 |
|
|
Tp(data051[i].phi));
|
2679 |
|
|
const Tp f0 = data051[i].f0;
|
2680 |
|
|
const Tp diff = f - f0;
|
2681 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2682 |
|
|
max_abs_diff = std::abs(diff);
|
2683 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2684 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2685 |
|
|
{
|
2686 |
|
|
const Tp frac = diff / f0;
|
2687 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2688 |
|
|
max_abs_frac = std::abs(frac);
|
2689 |
|
|
}
|
2690 |
|
|
}
|
2691 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2692 |
|
|
}
|
2693 |
|
|
|
2694 |
|
|
// Test data for k=-0.40000000000000002, nu=0.10000000000000001.
|
2695 |
|
|
testcase_ellint_3<double> data052[] = {
|
2696 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.10000000000000001,
|
2697 |
|
|
0.0000000000000000 },
|
2698 |
|
|
{ 0.17449806706684673, -0.40000000000000002, 0.10000000000000001,
|
2699 |
|
|
0.17453292519943295 },
|
2700 |
|
|
{ 0.34880048623856075, -0.40000000000000002, 0.10000000000000001,
|
2701 |
|
|
0.34906585039886590 },
|
2702 |
|
|
{ 0.52277322065757403, -0.40000000000000002, 0.10000000000000001,
|
2703 |
|
|
0.52359877559829882 },
|
2704 |
|
|
{ 0.69638072056918376, -0.40000000000000002, 0.10000000000000001,
|
2705 |
|
|
0.69813170079773179 },
|
2706 |
|
|
{ 0.86968426619831540, -0.40000000000000002, 0.10000000000000001,
|
2707 |
|
|
0.87266462599716477 },
|
2708 |
|
|
{ 1.0428044206578095, -0.40000000000000002, 0.10000000000000001,
|
2709 |
|
|
1.0471975511965976 },
|
2710 |
|
|
{ 1.2158651158274378, -0.40000000000000002, 0.10000000000000001,
|
2711 |
|
|
1.2217304763960306 },
|
2712 |
|
|
{ 1.3889447129893322, -0.40000000000000002, 0.10000000000000001,
|
2713 |
|
|
1.3962634015954636 },
|
2714 |
|
|
{ 1.5620566886683604, -0.40000000000000002, 0.10000000000000001,
|
2715 |
|
|
1.5707963267948966 },
|
2716 |
|
|
};
|
2717 |
|
|
|
2718 |
|
|
// Test function for k=-0.40000000000000002, nu=0.10000000000000001.
|
2719 |
|
|
template <typename Tp>
|
2720 |
|
|
void test052()
|
2721 |
|
|
{
|
2722 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2723 |
|
|
Tp max_abs_diff = -Tp(1);
|
2724 |
|
|
Tp max_abs_frac = -Tp(1);
|
2725 |
|
|
unsigned int num_datum = sizeof(data052)
|
2726 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2727 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2728 |
|
|
{
|
2729 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data052[i].k), Tp(data052[i].nu),
|
2730 |
|
|
Tp(data052[i].phi));
|
2731 |
|
|
const Tp f0 = data052[i].f0;
|
2732 |
|
|
const Tp diff = f - f0;
|
2733 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2734 |
|
|
max_abs_diff = std::abs(diff);
|
2735 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2736 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2737 |
|
|
{
|
2738 |
|
|
const Tp frac = diff / f0;
|
2739 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2740 |
|
|
max_abs_frac = std::abs(frac);
|
2741 |
|
|
}
|
2742 |
|
|
}
|
2743 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2744 |
|
|
}
|
2745 |
|
|
|
2746 |
|
|
// Test data for k=-0.40000000000000002, nu=0.20000000000000001.
|
2747 |
|
|
testcase_ellint_3<double> data053[] = {
|
2748 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.20000000000000001,
|
2749 |
|
|
0.0000000000000000 },
|
2750 |
|
|
{ 0.17432262290723399, -0.40000000000000002, 0.20000000000000001,
|
2751 |
|
|
0.17453292519943295 },
|
2752 |
|
|
{ 0.34743795258968596, -0.40000000000000002, 0.20000000000000001,
|
2753 |
|
|
0.34906585039886590 },
|
2754 |
|
|
{ 0.51838919472805123, -0.40000000000000002, 0.20000000000000001,
|
2755 |
|
|
0.52359877559829882 },
|
2756 |
|
|
{ 0.68663134739057918, -0.40000000000000002, 0.20000000000000001,
|
2757 |
|
|
0.69813170079773179 },
|
2758 |
|
|
{ 0.85206432981833979, -0.40000000000000002, 0.20000000000000001,
|
2759 |
|
|
0.87266462599716477 },
|
2760 |
|
|
{ 1.0149595349004430, -0.40000000000000002, 0.20000000000000001,
|
2761 |
|
|
1.0471975511965976 },
|
2762 |
|
|
{ 1.1758349405464676, -0.40000000000000002, 0.20000000000000001,
|
2763 |
|
|
1.2217304763960306 },
|
2764 |
|
|
{ 1.3353337673882635, -0.40000000000000002, 0.20000000000000001,
|
2765 |
|
|
1.3962634015954636 },
|
2766 |
|
|
{ 1.4941414344266770, -0.40000000000000002, 0.20000000000000001,
|
2767 |
|
|
1.5707963267948966 },
|
2768 |
|
|
};
|
2769 |
|
|
|
2770 |
|
|
// Test function for k=-0.40000000000000002, nu=0.20000000000000001.
|
2771 |
|
|
template <typename Tp>
|
2772 |
|
|
void test053()
|
2773 |
|
|
{
|
2774 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2775 |
|
|
Tp max_abs_diff = -Tp(1);
|
2776 |
|
|
Tp max_abs_frac = -Tp(1);
|
2777 |
|
|
unsigned int num_datum = sizeof(data053)
|
2778 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2779 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2780 |
|
|
{
|
2781 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data053[i].k), Tp(data053[i].nu),
|
2782 |
|
|
Tp(data053[i].phi));
|
2783 |
|
|
const Tp f0 = data053[i].f0;
|
2784 |
|
|
const Tp diff = f - f0;
|
2785 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2786 |
|
|
max_abs_diff = std::abs(diff);
|
2787 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2788 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2789 |
|
|
{
|
2790 |
|
|
const Tp frac = diff / f0;
|
2791 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2792 |
|
|
max_abs_frac = std::abs(frac);
|
2793 |
|
|
}
|
2794 |
|
|
}
|
2795 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2796 |
|
|
}
|
2797 |
|
|
|
2798 |
|
|
// Test data for k=-0.40000000000000002, nu=0.29999999999999999.
|
2799 |
|
|
testcase_ellint_3<double> data054[] = {
|
2800 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.29999999999999999,
|
2801 |
|
|
0.0000000000000000 },
|
2802 |
|
|
{ 0.17414781013591543, -0.40000000000000002, 0.29999999999999999,
|
2803 |
|
|
0.17453292519943295 },
|
2804 |
|
|
{ 0.34609415696777285, -0.40000000000000002, 0.29999999999999999,
|
2805 |
|
|
0.34906585039886590 },
|
2806 |
|
|
{ 0.51413131295862546, -0.40000000000000002, 0.29999999999999999,
|
2807 |
|
|
0.52359877559829882 },
|
2808 |
|
|
{ 0.67733527622935630, -0.40000000000000002, 0.29999999999999999,
|
2809 |
|
|
0.69813170079773179 },
|
2810 |
|
|
{ 0.83558675182733266, -0.40000000000000002, 0.29999999999999999,
|
2811 |
|
|
0.87266462599716477 },
|
2812 |
|
|
{ 0.98940140808865906, -0.40000000000000002, 0.29999999999999999,
|
2813 |
|
|
1.0471975511965976 },
|
2814 |
|
|
{ 1.1396968797728058, -0.40000000000000002, 0.29999999999999999,
|
2815 |
|
|
1.2217304763960306 },
|
2816 |
|
|
{ 1.2875920037865087, -0.40000000000000002, 0.29999999999999999,
|
2817 |
|
|
1.3962634015954636 },
|
2818 |
|
|
{ 1.4342789859950078, -0.40000000000000002, 0.29999999999999999,
|
2819 |
|
|
1.5707963267948966 },
|
2820 |
|
|
};
|
2821 |
|
|
|
2822 |
|
|
// Test function for k=-0.40000000000000002, nu=0.29999999999999999.
|
2823 |
|
|
template <typename Tp>
|
2824 |
|
|
void test054()
|
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(data054)
|
2830 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2831 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2832 |
|
|
{
|
2833 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data054[i].k), Tp(data054[i].nu),
|
2834 |
|
|
Tp(data054[i].phi));
|
2835 |
|
|
const Tp f0 = data054[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 k=-0.40000000000000002, nu=0.40000000000000002.
|
2851 |
|
|
testcase_ellint_3<double> data055[] = {
|
2852 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.40000000000000002,
|
2853 |
|
|
0.0000000000000000 },
|
2854 |
|
|
{ 0.17397362471112710, -0.40000000000000002, 0.40000000000000002,
|
2855 |
|
|
0.17453292519943295 },
|
2856 |
|
|
{ 0.34476864603333196, -0.40000000000000002, 0.40000000000000002,
|
2857 |
|
|
0.34906585039886590 },
|
2858 |
|
|
{ 0.50999329415379357, -0.40000000000000002, 0.40000000000000002,
|
2859 |
|
|
0.52359877559829882 },
|
2860 |
|
|
{ 0.66845674551396017, -0.40000000000000002, 0.40000000000000002,
|
2861 |
|
|
0.69813170079773179 },
|
2862 |
|
|
{ 0.82012848346231748, -0.40000000000000002, 0.40000000000000002,
|
2863 |
|
|
0.87266462599716477 },
|
2864 |
|
|
{ 0.96582449258349057, -0.40000000000000002, 0.40000000000000002,
|
2865 |
|
|
1.0471975511965976 },
|
2866 |
|
|
{ 1.1068473749476286, -0.40000000000000002, 0.40000000000000002,
|
2867 |
|
|
1.2217304763960306 },
|
2868 |
|
|
{ 1.2447132729159986, -0.40000000000000002, 0.40000000000000002,
|
2869 |
|
|
1.3962634015954636 },
|
2870 |
|
|
{ 1.3809986210732901, -0.40000000000000002, 0.40000000000000002,
|
2871 |
|
|
1.5707963267948966 },
|
2872 |
|
|
};
|
2873 |
|
|
|
2874 |
|
|
// Test function for k=-0.40000000000000002, nu=0.40000000000000002.
|
2875 |
|
|
template <typename Tp>
|
2876 |
|
|
void test055()
|
2877 |
|
|
{
|
2878 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2879 |
|
|
Tp max_abs_diff = -Tp(1);
|
2880 |
|
|
Tp max_abs_frac = -Tp(1);
|
2881 |
|
|
unsigned int num_datum = sizeof(data055)
|
2882 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2883 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2884 |
|
|
{
|
2885 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data055[i].k), Tp(data055[i].nu),
|
2886 |
|
|
Tp(data055[i].phi));
|
2887 |
|
|
const Tp f0 = data055[i].f0;
|
2888 |
|
|
const Tp diff = f - f0;
|
2889 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2890 |
|
|
max_abs_diff = std::abs(diff);
|
2891 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2892 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2893 |
|
|
{
|
2894 |
|
|
const Tp frac = diff / f0;
|
2895 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2896 |
|
|
max_abs_frac = std::abs(frac);
|
2897 |
|
|
}
|
2898 |
|
|
}
|
2899 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2900 |
|
|
}
|
2901 |
|
|
|
2902 |
|
|
// Test data for k=-0.40000000000000002, nu=0.50000000000000000.
|
2903 |
|
|
testcase_ellint_3<double> data056[] = {
|
2904 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.50000000000000000,
|
2905 |
|
|
0.0000000000000000 },
|
2906 |
|
|
{ 0.17380006262854139, -0.40000000000000002, 0.50000000000000000,
|
2907 |
|
|
0.17453292519943295 },
|
2908 |
|
|
{ 0.34346098216756610, -0.40000000000000002, 0.50000000000000000,
|
2909 |
|
|
0.34906585039886590 },
|
2910 |
|
|
{ 0.50596929935059420, -0.40000000000000002, 0.50000000000000000,
|
2911 |
|
|
0.52359877559829882 },
|
2912 |
|
|
{ 0.65996392089131262, -0.40000000000000002, 0.50000000000000000,
|
2913 |
|
|
0.69813170079773179 },
|
2914 |
|
|
{ 0.80558463511364786, -0.40000000000000002, 0.50000000000000000,
|
2915 |
|
|
0.87266462599716477 },
|
2916 |
|
|
{ 0.94397834522857704, -0.40000000000000002, 0.50000000000000000,
|
2917 |
|
|
1.0471975511965976 },
|
2918 |
|
|
{ 1.0768075114108115, -0.40000000000000002, 0.50000000000000000,
|
2919 |
|
|
1.2217304763960306 },
|
2920 |
|
|
{ 1.2059184624251329, -0.40000000000000002, 0.50000000000000000,
|
2921 |
|
|
1.3962634015954636 },
|
2922 |
|
|
{ 1.3331797176377398, -0.40000000000000002, 0.50000000000000000,
|
2923 |
|
|
1.5707963267948966 },
|
2924 |
|
|
};
|
2925 |
|
|
|
2926 |
|
|
// Test function for k=-0.40000000000000002, nu=0.50000000000000000.
|
2927 |
|
|
template <typename Tp>
|
2928 |
|
|
void test056()
|
2929 |
|
|
{
|
2930 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2931 |
|
|
Tp max_abs_diff = -Tp(1);
|
2932 |
|
|
Tp max_abs_frac = -Tp(1);
|
2933 |
|
|
unsigned int num_datum = sizeof(data056)
|
2934 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2935 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2936 |
|
|
{
|
2937 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data056[i].k), Tp(data056[i].nu),
|
2938 |
|
|
Tp(data056[i].phi));
|
2939 |
|
|
const Tp f0 = data056[i].f0;
|
2940 |
|
|
const Tp diff = f - f0;
|
2941 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2942 |
|
|
max_abs_diff = std::abs(diff);
|
2943 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2944 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2945 |
|
|
{
|
2946 |
|
|
const Tp frac = diff / f0;
|
2947 |
|
|
if (std::abs(frac) > max_abs_frac)
|
2948 |
|
|
max_abs_frac = std::abs(frac);
|
2949 |
|
|
}
|
2950 |
|
|
}
|
2951 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
2952 |
|
|
}
|
2953 |
|
|
|
2954 |
|
|
// Test data for k=-0.40000000000000002, nu=0.59999999999999998.
|
2955 |
|
|
testcase_ellint_3<double> data057[] = {
|
2956 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.59999999999999998,
|
2957 |
|
|
0.0000000000000000 },
|
2958 |
|
|
{ 0.17362711992081248, -0.40000000000000002, 0.59999999999999998,
|
2959 |
|
|
0.17453292519943295 },
|
2960 |
|
|
{ 0.34217074276403953, -0.40000000000000002, 0.59999999999999998,
|
2961 |
|
|
0.34906585039886590 },
|
2962 |
|
|
{ 0.50205389185761617, -0.40000000000000002, 0.59999999999999998,
|
2963 |
|
|
0.52359877559829882 },
|
2964 |
|
|
{ 0.65182834920372745, -0.40000000000000002, 0.59999999999999998,
|
2965 |
|
|
0.69813170079773179 },
|
2966 |
|
|
{ 0.79186512820565136, -0.40000000000000002, 0.59999999999999998,
|
2967 |
|
|
0.87266462599716477 },
|
2968 |
|
|
{ 0.92365535916287134, -0.40000000000000002, 0.59999999999999998,
|
2969 |
|
|
1.0471975511965976 },
|
2970 |
|
|
{ 1.0491915663957907, -0.40000000000000002, 0.59999999999999998,
|
2971 |
|
|
1.2217304763960306 },
|
2972 |
|
|
{ 1.1705934291745104, -0.40000000000000002, 0.59999999999999998,
|
2973 |
|
|
1.3962634015954636 },
|
2974 |
|
|
{ 1.2899514672527024, -0.40000000000000002, 0.59999999999999998,
|
2975 |
|
|
1.5707963267948966 },
|
2976 |
|
|
};
|
2977 |
|
|
|
2978 |
|
|
// Test function for k=-0.40000000000000002, nu=0.59999999999999998.
|
2979 |
|
|
template <typename Tp>
|
2980 |
|
|
void test057()
|
2981 |
|
|
{
|
2982 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
2983 |
|
|
Tp max_abs_diff = -Tp(1);
|
2984 |
|
|
Tp max_abs_frac = -Tp(1);
|
2985 |
|
|
unsigned int num_datum = sizeof(data057)
|
2986 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
2987 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
2988 |
|
|
{
|
2989 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data057[i].k), Tp(data057[i].nu),
|
2990 |
|
|
Tp(data057[i].phi));
|
2991 |
|
|
const Tp f0 = data057[i].f0;
|
2992 |
|
|
const Tp diff = f - f0;
|
2993 |
|
|
if (std::abs(diff) > max_abs_diff)
|
2994 |
|
|
max_abs_diff = std::abs(diff);
|
2995 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
2996 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
2997 |
|
|
{
|
2998 |
|
|
const Tp frac = diff / f0;
|
2999 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3000 |
|
|
max_abs_frac = std::abs(frac);
|
3001 |
|
|
}
|
3002 |
|
|
}
|
3003 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3004 |
|
|
}
|
3005 |
|
|
|
3006 |
|
|
// Test data for k=-0.40000000000000002, nu=0.69999999999999996.
|
3007 |
|
|
testcase_ellint_3<double> data058[] = {
|
3008 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.69999999999999996,
|
3009 |
|
|
0.0000000000000000 },
|
3010 |
|
|
{ 0.17345479265712871, -0.40000000000000002, 0.69999999999999996,
|
3011 |
|
|
0.17453292519943295 },
|
3012 |
|
|
{ 0.34089751955950354, -0.40000000000000002, 0.69999999999999996,
|
3013 |
|
|
0.34906585039886590 },
|
3014 |
|
|
{ 0.49824200167361343, -0.40000000000000002, 0.69999999999999996,
|
3015 |
|
|
0.52359877559829882 },
|
3016 |
|
|
{ 0.64402450341199413, -0.40000000000000002, 0.69999999999999996,
|
3017 |
|
|
0.69813170079773179 },
|
3018 |
|
|
{ 0.77889207804122873, -0.40000000000000002, 0.69999999999999996,
|
3019 |
|
|
0.87266462599716477 },
|
3020 |
|
|
{ 0.90468169720957992, -0.40000000000000002, 0.69999999999999996,
|
3021 |
|
|
1.0471975511965976 },
|
3022 |
|
|
{ 1.0236847823692916, -0.40000000000000002, 0.69999999999999996,
|
3023 |
|
|
1.2217304763960306 },
|
3024 |
|
|
{ 1.1382465247425164, -0.40000000000000002, 0.69999999999999996,
|
3025 |
|
|
1.3962634015954636 },
|
3026 |
|
|
{ 1.2506255923253344, -0.40000000000000002, 0.69999999999999996,
|
3027 |
|
|
1.5707963267948966 },
|
3028 |
|
|
};
|
3029 |
|
|
|
3030 |
|
|
// Test function for k=-0.40000000000000002, nu=0.69999999999999996.
|
3031 |
|
|
template <typename Tp>
|
3032 |
|
|
void test058()
|
3033 |
|
|
{
|
3034 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3035 |
|
|
Tp max_abs_diff = -Tp(1);
|
3036 |
|
|
Tp max_abs_frac = -Tp(1);
|
3037 |
|
|
unsigned int num_datum = sizeof(data058)
|
3038 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3039 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3040 |
|
|
{
|
3041 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data058[i].k), Tp(data058[i].nu),
|
3042 |
|
|
Tp(data058[i].phi));
|
3043 |
|
|
const Tp f0 = data058[i].f0;
|
3044 |
|
|
const Tp diff = f - f0;
|
3045 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3046 |
|
|
max_abs_diff = std::abs(diff);
|
3047 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3048 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3049 |
|
|
{
|
3050 |
|
|
const Tp frac = diff / f0;
|
3051 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3052 |
|
|
max_abs_frac = std::abs(frac);
|
3053 |
|
|
}
|
3054 |
|
|
}
|
3055 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3056 |
|
|
}
|
3057 |
|
|
|
3058 |
|
|
// Test data for k=-0.40000000000000002, nu=0.80000000000000004.
|
3059 |
|
|
testcase_ellint_3<double> data059[] = {
|
3060 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.80000000000000004,
|
3061 |
|
|
0.0000000000000000 },
|
3062 |
|
|
{ 0.17328307694277156, -0.40000000000000002, 0.80000000000000004,
|
3063 |
|
|
0.17453292519943295 },
|
3064 |
|
|
{ 0.33964091800132007, -0.40000000000000002, 0.80000000000000004,
|
3065 |
|
|
0.34906585039886590 },
|
3066 |
|
|
{ 0.49452889372467451, -0.40000000000000002, 0.80000000000000004,
|
3067 |
|
|
0.52359877559829882 },
|
3068 |
|
|
{ 0.63652940095937327, -0.40000000000000002, 0.80000000000000004,
|
3069 |
|
|
0.69813170079773179 },
|
3070 |
|
|
{ 0.76659772511159097, -0.40000000000000002, 0.80000000000000004,
|
3071 |
|
|
0.87266462599716477 },
|
3072 |
|
|
{ 0.88691047977338111, -0.40000000000000002, 0.80000000000000004,
|
3073 |
|
|
1.0471975511965976 },
|
3074 |
|
|
{ 1.0000273200611638, -0.40000000000000002, 0.80000000000000004,
|
3075 |
|
|
1.2217304763960306 },
|
3076 |
|
|
{ 1.1084787902188007, -0.40000000000000002, 0.80000000000000004,
|
3077 |
|
|
1.3962634015954636 },
|
3078 |
|
|
{ 1.2146499565727209, -0.40000000000000002, 0.80000000000000004,
|
3079 |
|
|
1.5707963267948966 },
|
3080 |
|
|
};
|
3081 |
|
|
|
3082 |
|
|
// Test function for k=-0.40000000000000002, nu=0.80000000000000004.
|
3083 |
|
|
template <typename Tp>
|
3084 |
|
|
void test059()
|
3085 |
|
|
{
|
3086 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3087 |
|
|
Tp max_abs_diff = -Tp(1);
|
3088 |
|
|
Tp max_abs_frac = -Tp(1);
|
3089 |
|
|
unsigned int num_datum = sizeof(data059)
|
3090 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3091 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3092 |
|
|
{
|
3093 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data059[i].k), Tp(data059[i].nu),
|
3094 |
|
|
Tp(data059[i].phi));
|
3095 |
|
|
const Tp f0 = data059[i].f0;
|
3096 |
|
|
const Tp diff = f - f0;
|
3097 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3098 |
|
|
max_abs_diff = std::abs(diff);
|
3099 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3100 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3101 |
|
|
{
|
3102 |
|
|
const Tp frac = diff / f0;
|
3103 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3104 |
|
|
max_abs_frac = std::abs(frac);
|
3105 |
|
|
}
|
3106 |
|
|
}
|
3107 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3108 |
|
|
}
|
3109 |
|
|
|
3110 |
|
|
// Test data for k=-0.40000000000000002, nu=0.90000000000000002.
|
3111 |
|
|
testcase_ellint_3<double> data060[] = {
|
3112 |
|
|
{ -0.0000000000000000, -0.40000000000000002, 0.90000000000000002,
|
3113 |
|
|
0.0000000000000000 },
|
3114 |
|
|
{ 0.17311196891868130, -0.40000000000000002, 0.90000000000000002,
|
3115 |
|
|
0.17453292519943295 },
|
3116 |
|
|
{ 0.33840055664911906, -0.40000000000000002, 0.90000000000000002,
|
3117 |
|
|
0.34906585039886590 },
|
3118 |
|
|
{ 0.49091013944075340, -0.40000000000000002, 0.90000000000000002,
|
3119 |
|
|
0.52359877559829882 },
|
3120 |
|
|
{ 0.62932228186809591, -0.40000000000000002, 0.90000000000000002,
|
3121 |
|
|
0.69813170079773179 },
|
3122 |
|
|
{ 0.75492278323019801, -0.40000000000000002, 0.90000000000000002,
|
3123 |
|
|
0.87266462599716477 },
|
3124 |
|
|
{ 0.87021659043854294, -0.40000000000000002, 0.90000000000000002,
|
3125 |
|
|
1.0471975511965976 },
|
3126 |
|
|
{ 0.97800245228239246, -0.40000000000000002, 0.90000000000000002,
|
3127 |
|
|
1.2217304763960306 },
|
3128 |
|
|
{ 1.0809625773173694, -0.40000000000000002, 0.90000000000000002,
|
3129 |
|
|
1.3962634015954636 },
|
3130 |
|
|
{ 1.1815758115929846, -0.40000000000000002, 0.90000000000000002,
|
3131 |
|
|
1.5707963267948966 },
|
3132 |
|
|
};
|
3133 |
|
|
|
3134 |
|
|
// Test function for k=-0.40000000000000002, nu=0.90000000000000002.
|
3135 |
|
|
template <typename Tp>
|
3136 |
|
|
void test060()
|
3137 |
|
|
{
|
3138 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3139 |
|
|
Tp max_abs_diff = -Tp(1);
|
3140 |
|
|
Tp max_abs_frac = -Tp(1);
|
3141 |
|
|
unsigned int num_datum = sizeof(data060)
|
3142 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3143 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3144 |
|
|
{
|
3145 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data060[i].k), Tp(data060[i].nu),
|
3146 |
|
|
Tp(data060[i].phi));
|
3147 |
|
|
const Tp f0 = data060[i].f0;
|
3148 |
|
|
const Tp diff = f - f0;
|
3149 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3150 |
|
|
max_abs_diff = std::abs(diff);
|
3151 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3152 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3153 |
|
|
{
|
3154 |
|
|
const Tp frac = diff / f0;
|
3155 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3156 |
|
|
max_abs_frac = std::abs(frac);
|
3157 |
|
|
}
|
3158 |
|
|
}
|
3159 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3160 |
|
|
}
|
3161 |
|
|
|
3162 |
|
|
// Test data for k=-0.30000000000000004, nu=0.0000000000000000.
|
3163 |
|
|
testcase_ellint_3<double> data061[] = {
|
3164 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.0000000000000000,
|
3165 |
|
|
0.0000000000000000 },
|
3166 |
|
|
{ 0.17461228653000102, -0.30000000000000004, 0.0000000000000000,
|
3167 |
|
|
0.17453292519943295 },
|
3168 |
|
|
{ 0.34969146102798415, -0.30000000000000004, 0.0000000000000000,
|
3169 |
|
|
0.34906585039886590 },
|
3170 |
|
|
{ 0.52565822873726320, -0.30000000000000004, 0.0000000000000000,
|
3171 |
|
|
0.52359877559829882 },
|
3172 |
|
|
{ 0.70284226512408532, -0.30000000000000004, 0.0000000000000000,
|
3173 |
|
|
0.69813170079773179 },
|
3174 |
|
|
{ 0.88144139195111182, -0.30000000000000004, 0.0000000000000000,
|
3175 |
|
|
0.87266462599716477 },
|
3176 |
|
|
{ 1.0614897067260523, -0.30000000000000004, 0.0000000000000000,
|
3177 |
|
|
1.0471975511965976 },
|
3178 |
|
|
{ 1.2428416824174218, -0.30000000000000004, 0.0000000000000000,
|
3179 |
|
|
1.2217304763960306 },
|
3180 |
|
|
{ 1.4251795877015925, -0.30000000000000004, 0.0000000000000000,
|
3181 |
|
|
1.3962634015954636 },
|
3182 |
|
|
{ 1.6080486199305126, -0.30000000000000004, 0.0000000000000000,
|
3183 |
|
|
1.5707963267948966 },
|
3184 |
|
|
};
|
3185 |
|
|
|
3186 |
|
|
// Test function for k=-0.30000000000000004, nu=0.0000000000000000.
|
3187 |
|
|
template <typename Tp>
|
3188 |
|
|
void test061()
|
3189 |
|
|
{
|
3190 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3191 |
|
|
Tp max_abs_diff = -Tp(1);
|
3192 |
|
|
Tp max_abs_frac = -Tp(1);
|
3193 |
|
|
unsigned int num_datum = sizeof(data061)
|
3194 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3195 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3196 |
|
|
{
|
3197 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data061[i].k), Tp(data061[i].nu),
|
3198 |
|
|
Tp(data061[i].phi));
|
3199 |
|
|
const Tp f0 = data061[i].f0;
|
3200 |
|
|
const Tp diff = f - f0;
|
3201 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3202 |
|
|
max_abs_diff = std::abs(diff);
|
3203 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3204 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3205 |
|
|
{
|
3206 |
|
|
const Tp frac = diff / f0;
|
3207 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3208 |
|
|
max_abs_frac = std::abs(frac);
|
3209 |
|
|
}
|
3210 |
|
|
}
|
3211 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3212 |
|
|
}
|
3213 |
|
|
|
3214 |
|
|
// Test data for k=-0.30000000000000004, nu=0.10000000000000001.
|
3215 |
|
|
testcase_ellint_3<double> data062[] = {
|
3216 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.10000000000000001,
|
3217 |
|
|
0.0000000000000000 },
|
3218 |
|
|
{ 0.17443631884814378, -0.30000000000000004, 0.10000000000000001,
|
3219 |
|
|
0.17453292519943295 },
|
3220 |
|
|
{ 0.34831316835124926, -0.30000000000000004, 0.10000000000000001,
|
3221 |
|
|
0.34906585039886590 },
|
3222 |
|
|
{ 0.52116586276523857, -0.30000000000000004, 0.10000000000000001,
|
3223 |
|
|
0.52359877559829882 },
|
3224 |
|
|
{ 0.69269385837910036, -0.30000000000000004, 0.10000000000000001,
|
3225 |
|
|
0.69813170079773179 },
|
3226 |
|
|
{ 0.86279023163070856, -0.30000000000000004, 0.10000000000000001,
|
3227 |
|
|
0.87266462599716477 },
|
3228 |
|
|
{ 1.0315321461438265, -0.30000000000000004, 0.10000000000000001,
|
3229 |
|
|
1.0471975511965976 },
|
3230 |
|
|
{ 1.1991449111869024, -0.30000000000000004, 0.10000000000000001,
|
3231 |
|
|
1.2217304763960306 },
|
3232 |
|
|
{ 1.3659561780923211, -0.30000000000000004, 0.10000000000000001,
|
3233 |
|
|
1.3962634015954636 },
|
3234 |
|
|
{ 1.5323534693557526, -0.30000000000000004, 0.10000000000000001,
|
3235 |
|
|
1.5707963267948966 },
|
3236 |
|
|
};
|
3237 |
|
|
|
3238 |
|
|
// Test function for k=-0.30000000000000004, nu=0.10000000000000001.
|
3239 |
|
|
template <typename Tp>
|
3240 |
|
|
void test062()
|
3241 |
|
|
{
|
3242 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3243 |
|
|
Tp max_abs_diff = -Tp(1);
|
3244 |
|
|
Tp max_abs_frac = -Tp(1);
|
3245 |
|
|
unsigned int num_datum = sizeof(data062)
|
3246 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3247 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3248 |
|
|
{
|
3249 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data062[i].k), Tp(data062[i].nu),
|
3250 |
|
|
Tp(data062[i].phi));
|
3251 |
|
|
const Tp f0 = data062[i].f0;
|
3252 |
|
|
const Tp diff = f - f0;
|
3253 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3254 |
|
|
max_abs_diff = std::abs(diff);
|
3255 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3256 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3257 |
|
|
{
|
3258 |
|
|
const Tp frac = diff / f0;
|
3259 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3260 |
|
|
max_abs_frac = std::abs(frac);
|
3261 |
|
|
}
|
3262 |
|
|
}
|
3263 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3264 |
|
|
}
|
3265 |
|
|
|
3266 |
|
|
// Test data for k=-0.30000000000000004, nu=0.20000000000000001.
|
3267 |
|
|
testcase_ellint_3<double> data063[] = {
|
3268 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.20000000000000001,
|
3269 |
|
|
0.0000000000000000 },
|
3270 |
|
|
{ 0.17426098615372090, -0.30000000000000004, 0.20000000000000001,
|
3271 |
|
|
0.17453292519943295 },
|
3272 |
|
|
{ 0.34695402664689923, -0.30000000000000004, 0.20000000000000001,
|
3273 |
|
|
0.34906585039886590 },
|
3274 |
|
|
{ 0.51680555567038933, -0.30000000000000004, 0.20000000000000001,
|
3275 |
|
|
0.52359877559829882 },
|
3276 |
|
|
{ 0.68303375225260210, -0.30000000000000004, 0.20000000000000001,
|
3277 |
|
|
0.69813170079773179 },
|
3278 |
|
|
{ 0.84540662891295026, -0.30000000000000004, 0.20000000000000001,
|
3279 |
|
|
0.87266462599716477 },
|
3280 |
|
|
{ 1.0041834051646927, -0.30000000000000004, 0.20000000000000001,
|
3281 |
|
|
1.0471975511965976 },
|
3282 |
|
|
{ 1.1599952702345711, -0.30000000000000004, 0.20000000000000001,
|
3283 |
|
|
1.2217304763960306 },
|
3284 |
|
|
{ 1.3137179520499163, -0.30000000000000004, 0.20000000000000001,
|
3285 |
|
|
1.3962634015954636 },
|
3286 |
|
|
{ 1.4663658145259875, -0.30000000000000004, 0.20000000000000001,
|
3287 |
|
|
1.5707963267948966 },
|
3288 |
|
|
};
|
3289 |
|
|
|
3290 |
|
|
// Test function for k=-0.30000000000000004, nu=0.20000000000000001.
|
3291 |
|
|
template <typename Tp>
|
3292 |
|
|
void test063()
|
3293 |
|
|
{
|
3294 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3295 |
|
|
Tp max_abs_diff = -Tp(1);
|
3296 |
|
|
Tp max_abs_frac = -Tp(1);
|
3297 |
|
|
unsigned int num_datum = sizeof(data063)
|
3298 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3299 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3300 |
|
|
{
|
3301 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data063[i].k), Tp(data063[i].nu),
|
3302 |
|
|
Tp(data063[i].phi));
|
3303 |
|
|
const Tp f0 = data063[i].f0;
|
3304 |
|
|
const Tp diff = f - f0;
|
3305 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3306 |
|
|
max_abs_diff = std::abs(diff);
|
3307 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3308 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3309 |
|
|
{
|
3310 |
|
|
const Tp frac = diff / f0;
|
3311 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3312 |
|
|
max_abs_frac = std::abs(frac);
|
3313 |
|
|
}
|
3314 |
|
|
}
|
3315 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3316 |
|
|
}
|
3317 |
|
|
|
3318 |
|
|
// Test data for k=-0.30000000000000004, nu=0.29999999999999999.
|
3319 |
|
|
testcase_ellint_3<double> data064[] = {
|
3320 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.29999999999999999,
|
3321 |
|
|
0.0000000000000000 },
|
3322 |
|
|
{ 0.17408628437042845, -0.30000000000000004, 0.29999999999999999,
|
3323 |
|
|
0.17453292519943295 },
|
3324 |
|
|
{ 0.34561356761638401, -0.30000000000000004, 0.29999999999999999,
|
3325 |
|
|
0.34906585039886590 },
|
3326 |
|
|
{ 0.51257058617875850, -0.30000000000000004, 0.29999999999999999,
|
3327 |
|
|
0.52359877559829882 },
|
3328 |
|
|
{ 0.67382207124602866, -0.30000000000000004, 0.29999999999999999,
|
3329 |
|
|
0.69813170079773179 },
|
3330 |
|
|
{ 0.82914751587825131, -0.30000000000000004, 0.29999999999999999,
|
3331 |
|
|
0.87266462599716477 },
|
3332 |
|
|
{ 0.97907434814374950, -0.30000000000000004, 0.29999999999999999,
|
3333 |
|
|
1.0471975511965976 },
|
3334 |
|
|
{ 1.1246399297351584, -0.30000000000000004, 0.29999999999999999,
|
3335 |
|
|
1.2217304763960306 },
|
3336 |
|
|
{ 1.2671793970398146, -0.30000000000000004, 0.29999999999999999,
|
3337 |
|
|
1.3962634015954636 },
|
3338 |
|
|
{ 1.4081767433479089, -0.30000000000000004, 0.29999999999999999,
|
3339 |
|
|
1.5707963267948966 },
|
3340 |
|
|
};
|
3341 |
|
|
|
3342 |
|
|
// Test function for k=-0.30000000000000004, nu=0.29999999999999999.
|
3343 |
|
|
template <typename Tp>
|
3344 |
|
|
void test064()
|
3345 |
|
|
{
|
3346 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3347 |
|
|
Tp max_abs_diff = -Tp(1);
|
3348 |
|
|
Tp max_abs_frac = -Tp(1);
|
3349 |
|
|
unsigned int num_datum = sizeof(data064)
|
3350 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3351 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3352 |
|
|
{
|
3353 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data064[i].k), Tp(data064[i].nu),
|
3354 |
|
|
Tp(data064[i].phi));
|
3355 |
|
|
const Tp f0 = data064[i].f0;
|
3356 |
|
|
const Tp diff = f - f0;
|
3357 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3358 |
|
|
max_abs_diff = std::abs(diff);
|
3359 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3360 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3361 |
|
|
{
|
3362 |
|
|
const Tp frac = diff / f0;
|
3363 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3364 |
|
|
max_abs_frac = std::abs(frac);
|
3365 |
|
|
}
|
3366 |
|
|
}
|
3367 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3368 |
|
|
}
|
3369 |
|
|
|
3370 |
|
|
// Test data for k=-0.30000000000000004, nu=0.40000000000000002.
|
3371 |
|
|
testcase_ellint_3<double> data065[] = {
|
3372 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.40000000000000002,
|
3373 |
|
|
0.0000000000000000 },
|
3374 |
|
|
{ 0.17391220945982730, -0.30000000000000004, 0.40000000000000002,
|
3375 |
|
|
0.17453292519943295 },
|
3376 |
|
|
{ 0.34429133937639689, -0.30000000000000004, 0.40000000000000002,
|
3377 |
|
|
0.34906585039886590 },
|
3378 |
|
|
{ 0.50845471668581632, -0.30000000000000004, 0.40000000000000002,
|
3379 |
|
|
0.52359877559829882 },
|
3380 |
|
|
{ 0.66502347027873854, -0.30000000000000004, 0.40000000000000002,
|
3381 |
|
|
0.69813170079773179 },
|
3382 |
|
|
{ 0.81389191978012254, -0.30000000000000004, 0.40000000000000002,
|
3383 |
|
|
0.87266462599716477 },
|
3384 |
|
|
{ 0.95590618002140593, -0.30000000000000004, 0.40000000000000002,
|
3385 |
|
|
1.0471975511965976 },
|
3386 |
|
|
{ 1.0924915195213121, -0.30000000000000004, 0.40000000000000002,
|
3387 |
|
|
1.2217304763960306 },
|
3388 |
|
|
{ 1.2253651604038058, -0.30000000000000004, 0.40000000000000002,
|
3389 |
|
|
1.3962634015954636 },
|
3390 |
|
|
{ 1.3563643538969761, -0.30000000000000004, 0.40000000000000002,
|
3391 |
|
|
1.5707963267948966 },
|
3392 |
|
|
};
|
3393 |
|
|
|
3394 |
|
|
// Test function for k=-0.30000000000000004, nu=0.40000000000000002.
|
3395 |
|
|
template <typename Tp>
|
3396 |
|
|
void test065()
|
3397 |
|
|
{
|
3398 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3399 |
|
|
Tp max_abs_diff = -Tp(1);
|
3400 |
|
|
Tp max_abs_frac = -Tp(1);
|
3401 |
|
|
unsigned int num_datum = sizeof(data065)
|
3402 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3403 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3404 |
|
|
{
|
3405 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data065[i].k), Tp(data065[i].nu),
|
3406 |
|
|
Tp(data065[i].phi));
|
3407 |
|
|
const Tp f0 = data065[i].f0;
|
3408 |
|
|
const Tp diff = f - f0;
|
3409 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3410 |
|
|
max_abs_diff = std::abs(diff);
|
3411 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3412 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3413 |
|
|
{
|
3414 |
|
|
const Tp frac = diff / f0;
|
3415 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3416 |
|
|
max_abs_frac = std::abs(frac);
|
3417 |
|
|
}
|
3418 |
|
|
}
|
3419 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3420 |
|
|
}
|
3421 |
|
|
|
3422 |
|
|
// Test data for k=-0.30000000000000004, nu=0.50000000000000000.
|
3423 |
|
|
testcase_ellint_3<double> data066[] = {
|
3424 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.50000000000000000,
|
3425 |
|
|
0.0000000000000000 },
|
3426 |
|
|
{ 0.17373875742088235, -0.30000000000000004, 0.50000000000000000,
|
3427 |
|
|
0.17453292519943295 },
|
3428 |
|
|
{ 0.34298690571124157, -0.30000000000000004, 0.50000000000000000,
|
3429 |
|
|
0.34906585039886590 },
|
3430 |
|
|
{ 0.50445214859646936, -0.30000000000000004, 0.50000000000000000,
|
3431 |
|
|
0.52359877559829882 },
|
3432 |
|
|
{ 0.65660648352418516, -0.30000000000000004, 0.50000000000000000,
|
3433 |
|
|
0.69813170079773179 },
|
3434 |
|
|
{ 0.79953670639287289, -0.30000000000000004, 0.50000000000000000,
|
3435 |
|
|
0.87266462599716477 },
|
3436 |
|
|
{ 0.93443393926588558, -0.30000000000000004, 0.50000000000000000,
|
3437 |
|
|
1.0471975511965976 },
|
3438 |
|
|
{ 1.0630838369016911, -0.30000000000000004, 0.50000000000000000,
|
3439 |
|
|
1.2217304763960306 },
|
3440 |
|
|
{ 1.1875197325653026, -0.30000000000000004, 0.50000000000000000,
|
3441 |
|
|
1.3962634015954636 },
|
3442 |
|
|
{ 1.3098448759814960, -0.30000000000000004, 0.50000000000000000,
|
3443 |
|
|
1.5707963267948966 },
|
3444 |
|
|
};
|
3445 |
|
|
|
3446 |
|
|
// Test function for k=-0.30000000000000004, nu=0.50000000000000000.
|
3447 |
|
|
template <typename Tp>
|
3448 |
|
|
void test066()
|
3449 |
|
|
{
|
3450 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3451 |
|
|
Tp max_abs_diff = -Tp(1);
|
3452 |
|
|
Tp max_abs_frac = -Tp(1);
|
3453 |
|
|
unsigned int num_datum = sizeof(data066)
|
3454 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3455 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3456 |
|
|
{
|
3457 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data066[i].k), Tp(data066[i].nu),
|
3458 |
|
|
Tp(data066[i].phi));
|
3459 |
|
|
const Tp f0 = data066[i].f0;
|
3460 |
|
|
const Tp diff = f - f0;
|
3461 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3462 |
|
|
max_abs_diff = std::abs(diff);
|
3463 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3464 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3465 |
|
|
{
|
3466 |
|
|
const Tp frac = diff / f0;
|
3467 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3468 |
|
|
max_abs_frac = std::abs(frac);
|
3469 |
|
|
}
|
3470 |
|
|
}
|
3471 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3472 |
|
|
}
|
3473 |
|
|
|
3474 |
|
|
// Test data for k=-0.30000000000000004, nu=0.59999999999999998.
|
3475 |
|
|
testcase_ellint_3<double> data067[] = {
|
3476 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.59999999999999998,
|
3477 |
|
|
0.0000000000000000 },
|
3478 |
|
|
{ 0.17356592428950826, -0.30000000000000004, 0.59999999999999998,
|
3479 |
|
|
0.17453292519943295 },
|
3480 |
|
|
{ 0.34169984536697379, -0.30000000000000004, 0.59999999999999998,
|
3481 |
|
|
0.34906585039886590 },
|
3482 |
|
|
{ 0.50055748266498457, -0.30000000000000004, 0.59999999999999998,
|
3483 |
|
|
0.52359877559829882 },
|
3484 |
|
|
{ 0.64854298527106768, -0.30000000000000004, 0.59999999999999998,
|
3485 |
|
|
0.69813170079773179 },
|
3486 |
|
|
{ 0.78599329284207431, -0.30000000000000004, 0.59999999999999998,
|
3487 |
|
|
0.87266462599716477 },
|
3488 |
|
|
{ 0.91445452089128221, -0.30000000000000004, 0.59999999999999998,
|
3489 |
|
|
1.0471975511965976 },
|
3490 |
|
|
{ 1.0360412952290587, -0.30000000000000004, 0.59999999999999998,
|
3491 |
|
|
1.2217304763960306 },
|
3492 |
|
|
{ 1.1530473919778639, -0.30000000000000004, 0.59999999999999998,
|
3493 |
|
|
1.3962634015954636 },
|
3494 |
|
|
{ 1.2677758800420666, -0.30000000000000004, 0.59999999999999998,
|
3495 |
|
|
1.5707963267948966 },
|
3496 |
|
|
};
|
3497 |
|
|
|
3498 |
|
|
// Test function for k=-0.30000000000000004, nu=0.59999999999999998.
|
3499 |
|
|
template <typename Tp>
|
3500 |
|
|
void test067()
|
3501 |
|
|
{
|
3502 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3503 |
|
|
Tp max_abs_diff = -Tp(1);
|
3504 |
|
|
Tp max_abs_frac = -Tp(1);
|
3505 |
|
|
unsigned int num_datum = sizeof(data067)
|
3506 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3507 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3508 |
|
|
{
|
3509 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data067[i].k), Tp(data067[i].nu),
|
3510 |
|
|
Tp(data067[i].phi));
|
3511 |
|
|
const Tp f0 = data067[i].f0;
|
3512 |
|
|
const Tp diff = f - f0;
|
3513 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3514 |
|
|
max_abs_diff = std::abs(diff);
|
3515 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3516 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3517 |
|
|
{
|
3518 |
|
|
const Tp frac = diff / f0;
|
3519 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3520 |
|
|
max_abs_frac = std::abs(frac);
|
3521 |
|
|
}
|
3522 |
|
|
}
|
3523 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3524 |
|
|
}
|
3525 |
|
|
|
3526 |
|
|
// Test data for k=-0.30000000000000004, nu=0.69999999999999996.
|
3527 |
|
|
testcase_ellint_3<double> data068[] = {
|
3528 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.69999999999999996,
|
3529 |
|
|
0.0000000000000000 },
|
3530 |
|
|
{ 0.17339370613812227, -0.30000000000000004, 0.69999999999999996,
|
3531 |
|
|
0.17453292519943295 },
|
3532 |
|
|
{ 0.34042975138455933, -0.30000000000000004, 0.69999999999999996,
|
3533 |
|
|
0.34906585039886590 },
|
3534 |
|
|
{ 0.49676568368075985, -0.30000000000000004, 0.69999999999999996,
|
3535 |
|
|
0.52359877559829882 },
|
3536 |
|
|
{ 0.64080774055753720, -0.30000000000000004, 0.69999999999999996,
|
3537 |
|
|
0.69813170079773179 },
|
3538 |
|
|
{ 0.77318507779667278, -0.30000000000000004, 0.69999999999999996,
|
3539 |
|
|
0.87266462599716477 },
|
3540 |
|
|
{ 0.89579782346548631, -0.30000000000000004, 0.69999999999999996,
|
3541 |
|
|
1.0471975511965976 },
|
3542 |
|
|
{ 1.0110573286052202, -0.30000000000000004, 0.69999999999999996,
|
3543 |
|
|
1.2217304763960306 },
|
3544 |
|
|
{ 1.1214710972949633, -0.30000000000000004, 0.69999999999999996,
|
3545 |
|
|
1.3962634015954636 },
|
3546 |
|
|
{ 1.2294913236274980, -0.30000000000000004, 0.69999999999999996,
|
3547 |
|
|
1.5707963267948966 },
|
3548 |
|
|
};
|
3549 |
|
|
|
3550 |
|
|
// Test function for k=-0.30000000000000004, nu=0.69999999999999996.
|
3551 |
|
|
template <typename Tp>
|
3552 |
|
|
void test068()
|
3553 |
|
|
{
|
3554 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3555 |
|
|
Tp max_abs_diff = -Tp(1);
|
3556 |
|
|
Tp max_abs_frac = -Tp(1);
|
3557 |
|
|
unsigned int num_datum = sizeof(data068)
|
3558 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3559 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3560 |
|
|
{
|
3561 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data068[i].k), Tp(data068[i].nu),
|
3562 |
|
|
Tp(data068[i].phi));
|
3563 |
|
|
const Tp f0 = data068[i].f0;
|
3564 |
|
|
const Tp diff = f - f0;
|
3565 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3566 |
|
|
max_abs_diff = std::abs(diff);
|
3567 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3568 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3569 |
|
|
{
|
3570 |
|
|
const Tp frac = diff / f0;
|
3571 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3572 |
|
|
max_abs_frac = std::abs(frac);
|
3573 |
|
|
}
|
3574 |
|
|
}
|
3575 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3576 |
|
|
}
|
3577 |
|
|
|
3578 |
|
|
// Test data for k=-0.30000000000000004, nu=0.80000000000000004.
|
3579 |
|
|
testcase_ellint_3<double> data069[] = {
|
3580 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.80000000000000004,
|
3581 |
|
|
0.0000000000000000 },
|
3582 |
|
|
{ 0.17322209907520361, -0.30000000000000004, 0.80000000000000004,
|
3583 |
|
|
0.17453292519943295 },
|
3584 |
|
|
{ 0.33917623046949996, -0.30000000000000004, 0.80000000000000004,
|
3585 |
|
|
0.34906585039886590 },
|
3586 |
|
|
{ 0.49307204894329176, -0.30000000000000004, 0.80000000000000004,
|
3587 |
|
|
0.52359877559829882 },
|
3588 |
|
|
{ 0.63337802830291723, -0.30000000000000004, 0.80000000000000004,
|
3589 |
|
|
0.69813170079773179 },
|
3590 |
|
|
{ 0.76104540997689407, -0.30000000000000004, 0.80000000000000004,
|
3591 |
|
|
0.87266462599716477 },
|
3592 |
|
|
{ 0.87832009635450736, -0.30000000000000004, 0.80000000000000004,
|
3593 |
|
|
1.0471975511965976 },
|
3594 |
|
|
{ 0.98787879723171790, -0.30000000000000004, 0.80000000000000004,
|
3595 |
|
|
1.2217304763960306 },
|
3596 |
|
|
{ 1.0924036340069336, -0.30000000000000004, 0.80000000000000004,
|
3597 |
|
|
1.3962634015954636 },
|
3598 |
|
|
{ 1.1944567571590046, -0.30000000000000004, 0.80000000000000004,
|
3599 |
|
|
1.5707963267948966 },
|
3600 |
|
|
};
|
3601 |
|
|
|
3602 |
|
|
// Test function for k=-0.30000000000000004, nu=0.80000000000000004.
|
3603 |
|
|
template <typename Tp>
|
3604 |
|
|
void test069()
|
3605 |
|
|
{
|
3606 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3607 |
|
|
Tp max_abs_diff = -Tp(1);
|
3608 |
|
|
Tp max_abs_frac = -Tp(1);
|
3609 |
|
|
unsigned int num_datum = sizeof(data069)
|
3610 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3611 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3612 |
|
|
{
|
3613 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data069[i].k), Tp(data069[i].nu),
|
3614 |
|
|
Tp(data069[i].phi));
|
3615 |
|
|
const Tp f0 = data069[i].f0;
|
3616 |
|
|
const Tp diff = f - f0;
|
3617 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3618 |
|
|
max_abs_diff = std::abs(diff);
|
3619 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3620 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3621 |
|
|
{
|
3622 |
|
|
const Tp frac = diff / f0;
|
3623 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3624 |
|
|
max_abs_frac = std::abs(frac);
|
3625 |
|
|
}
|
3626 |
|
|
}
|
3627 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3628 |
|
|
}
|
3629 |
|
|
|
3630 |
|
|
// Test data for k=-0.30000000000000004, nu=0.90000000000000002.
|
3631 |
|
|
testcase_ellint_3<double> data070[] = {
|
3632 |
|
|
{ -0.0000000000000000, -0.30000000000000004, 0.90000000000000002,
|
3633 |
|
|
0.0000000000000000 },
|
3634 |
|
|
{ 0.17305109924485948, -0.30000000000000004, 0.90000000000000002,
|
3635 |
|
|
0.17453292519943295 },
|
3636 |
|
|
{ 0.33793890239556984, -0.30000000000000004, 0.90000000000000002,
|
3637 |
|
|
0.34906585039886590 },
|
3638 |
|
|
{ 0.48947218005089738, -0.30000000000000004, 0.90000000000000002,
|
3639 |
|
|
0.52359877559829882 },
|
3640 |
|
|
{ 0.62623332340775151, -0.30000000000000004, 0.90000000000000002,
|
3641 |
|
|
0.69813170079773179 },
|
3642 |
|
|
{ 0.74951596581511148, -0.30000000000000004, 0.90000000000000002,
|
3643 |
|
|
0.87266462599716477 },
|
3644 |
|
|
{ 0.86189886597756005, -0.30000000000000004, 0.90000000000000002,
|
3645 |
|
|
1.0471975511965976 },
|
3646 |
|
|
{ 0.96629451153092005, -0.30000000000000004, 0.90000000000000002,
|
3647 |
|
|
1.2217304763960306 },
|
3648 |
|
|
{ 1.0655269133492680, -0.30000000000000004, 0.90000000000000002,
|
3649 |
|
|
1.3962634015954636 },
|
3650 |
|
|
{ 1.1622376896064912, -0.30000000000000004, 0.90000000000000002,
|
3651 |
|
|
1.5707963267948966 },
|
3652 |
|
|
};
|
3653 |
|
|
|
3654 |
|
|
// Test function for k=-0.30000000000000004, nu=0.90000000000000002.
|
3655 |
|
|
template <typename Tp>
|
3656 |
|
|
void test070()
|
3657 |
|
|
{
|
3658 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3659 |
|
|
Tp max_abs_diff = -Tp(1);
|
3660 |
|
|
Tp max_abs_frac = -Tp(1);
|
3661 |
|
|
unsigned int num_datum = sizeof(data070)
|
3662 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3663 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3664 |
|
|
{
|
3665 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data070[i].k), Tp(data070[i].nu),
|
3666 |
|
|
Tp(data070[i].phi));
|
3667 |
|
|
const Tp f0 = data070[i].f0;
|
3668 |
|
|
const Tp diff = f - f0;
|
3669 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3670 |
|
|
max_abs_diff = std::abs(diff);
|
3671 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3672 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3673 |
|
|
{
|
3674 |
|
|
const Tp frac = diff / f0;
|
3675 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3676 |
|
|
max_abs_frac = std::abs(frac);
|
3677 |
|
|
}
|
3678 |
|
|
}
|
3679 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3680 |
|
|
}
|
3681 |
|
|
|
3682 |
|
|
// Test data for k=-0.19999999999999996, nu=0.0000000000000000.
|
3683 |
|
|
testcase_ellint_3<double> data071[] = {
|
3684 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.0000000000000000,
|
3685 |
|
|
0.0000000000000000 },
|
3686 |
|
|
{ 0.17456817290292811, -0.19999999999999996, 0.0000000000000000,
|
3687 |
|
|
0.17453292519943295 },
|
3688 |
|
|
{ 0.34934315932086801, -0.19999999999999996, 0.0000000000000000,
|
3689 |
|
|
0.34906585039886590 },
|
3690 |
|
|
{ 0.52450880529443988, -0.19999999999999996, 0.0000000000000000,
|
3691 |
|
|
0.52359877559829882 },
|
3692 |
|
|
{ 0.70020491009844910, -0.19999999999999996, 0.0000000000000000,
|
3693 |
|
|
0.69813170079773179 },
|
3694 |
|
|
{ 0.87651006649967955, -0.19999999999999996, 0.0000000000000000,
|
3695 |
|
|
0.87266462599716477 },
|
3696 |
|
|
{ 1.0534305870298994, -0.19999999999999996, 0.0000000000000000,
|
3697 |
|
|
1.0471975511965976 },
|
3698 |
|
|
{ 1.2308975521670784, -0.19999999999999996, 0.0000000000000000,
|
3699 |
|
|
1.2217304763960306 },
|
3700 |
|
|
{ 1.4087733584990738, -0.19999999999999996, 0.0000000000000000,
|
3701 |
|
|
1.3962634015954636 },
|
3702 |
|
|
{ 1.5868678474541664, -0.19999999999999996, 0.0000000000000000,
|
3703 |
|
|
1.5707963267948966 },
|
3704 |
|
|
};
|
3705 |
|
|
|
3706 |
|
|
// Test function for k=-0.19999999999999996, nu=0.0000000000000000.
|
3707 |
|
|
template <typename Tp>
|
3708 |
|
|
void test071()
|
3709 |
|
|
{
|
3710 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3711 |
|
|
Tp max_abs_diff = -Tp(1);
|
3712 |
|
|
Tp max_abs_frac = -Tp(1);
|
3713 |
|
|
unsigned int num_datum = sizeof(data071)
|
3714 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3715 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3716 |
|
|
{
|
3717 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data071[i].k), Tp(data071[i].nu),
|
3718 |
|
|
Tp(data071[i].phi));
|
3719 |
|
|
const Tp f0 = data071[i].f0;
|
3720 |
|
|
const Tp diff = f - f0;
|
3721 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3722 |
|
|
max_abs_diff = std::abs(diff);
|
3723 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3724 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3725 |
|
|
{
|
3726 |
|
|
const Tp frac = diff / f0;
|
3727 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3728 |
|
|
max_abs_frac = std::abs(frac);
|
3729 |
|
|
}
|
3730 |
|
|
}
|
3731 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3732 |
|
|
}
|
3733 |
|
|
|
3734 |
|
|
// Test data for k=-0.19999999999999996, nu=0.10000000000000001.
|
3735 |
|
|
testcase_ellint_3<double> data072[] = {
|
3736 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.10000000000000001,
|
3737 |
|
|
0.0000000000000000 },
|
3738 |
|
|
{ 0.17439228502691750, -0.19999999999999996, 0.10000000000000001,
|
3739 |
|
|
0.17453292519943295 },
|
3740 |
|
|
{ 0.34796731137565740, -0.19999999999999996, 0.10000000000000001,
|
3741 |
|
|
0.34906585039886590 },
|
3742 |
|
|
{ 0.52003370294544848, -0.19999999999999996, 0.10000000000000001,
|
3743 |
|
|
0.52359877559829882 },
|
3744 |
|
|
{ 0.69012222258631495, -0.19999999999999996, 0.10000000000000001,
|
3745 |
|
|
0.69813170079773179 },
|
3746 |
|
|
{ 0.85803491465566772, -0.19999999999999996, 0.10000000000000001,
|
3747 |
|
|
0.87266462599716477 },
|
3748 |
|
|
{ 1.0238463961099364, -0.19999999999999996, 0.10000000000000001,
|
3749 |
|
|
1.0471975511965976 },
|
3750 |
|
|
{ 1.1878691059202153, -0.19999999999999996, 0.10000000000000001,
|
3751 |
|
|
1.2217304763960306 },
|
3752 |
|
|
{ 1.3505985031831940, -0.19999999999999996, 0.10000000000000001,
|
3753 |
|
|
1.3962634015954636 },
|
3754 |
|
|
{ 1.5126513474261092, -0.19999999999999996, 0.10000000000000001,
|
3755 |
|
|
1.5707963267948966 },
|
3756 |
|
|
};
|
3757 |
|
|
|
3758 |
|
|
// Test function for k=-0.19999999999999996, nu=0.10000000000000001.
|
3759 |
|
|
template <typename Tp>
|
3760 |
|
|
void test072()
|
3761 |
|
|
{
|
3762 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3763 |
|
|
Tp max_abs_diff = -Tp(1);
|
3764 |
|
|
Tp max_abs_frac = -Tp(1);
|
3765 |
|
|
unsigned int num_datum = sizeof(data072)
|
3766 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3767 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3768 |
|
|
{
|
3769 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data072[i].k), Tp(data072[i].nu),
|
3770 |
|
|
Tp(data072[i].phi));
|
3771 |
|
|
const Tp f0 = data072[i].f0;
|
3772 |
|
|
const Tp diff = f - f0;
|
3773 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3774 |
|
|
max_abs_diff = std::abs(diff);
|
3775 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3776 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3777 |
|
|
{
|
3778 |
|
|
const Tp frac = diff / f0;
|
3779 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3780 |
|
|
max_abs_frac = std::abs(frac);
|
3781 |
|
|
}
|
3782 |
|
|
}
|
3783 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3784 |
|
|
}
|
3785 |
|
|
|
3786 |
|
|
// Test data for k=-0.19999999999999996, nu=0.20000000000000001.
|
3787 |
|
|
testcase_ellint_3<double> data073[] = {
|
3788 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.20000000000000001,
|
3789 |
|
|
0.0000000000000000 },
|
3790 |
|
|
{ 0.17421703179583750, -0.19999999999999996, 0.20000000000000001,
|
3791 |
|
|
0.17453292519943295 },
|
3792 |
|
|
{ 0.34661057411998791, -0.19999999999999996, 0.20000000000000001,
|
3793 |
|
|
0.34906585039886590 },
|
3794 |
|
|
{ 0.51569006052647393, -0.19999999999999996, 0.20000000000000001,
|
3795 |
|
|
0.52359877559829882 },
|
3796 |
|
|
{ 0.68052412821107278, -0.19999999999999996, 0.20000000000000001,
|
3797 |
|
|
0.69813170079773179 },
|
3798 |
|
|
{ 0.84081341263313825, -0.19999999999999996, 0.20000000000000001,
|
3799 |
|
|
0.87266462599716477 },
|
3800 |
|
|
{ 0.99683359988842890, -0.19999999999999996, 0.20000000000000001,
|
3801 |
|
|
1.0471975511965976 },
|
3802 |
|
|
{ 1.1493086715118852, -0.19999999999999996, 0.20000000000000001,
|
3803 |
|
|
1.2217304763960306 },
|
3804 |
|
|
{ 1.2992699693957541, -0.19999999999999996, 0.20000000000000001,
|
3805 |
|
|
1.3962634015954636 },
|
3806 |
|
|
{ 1.4479323932249568, -0.19999999999999996, 0.20000000000000001,
|
3807 |
|
|
1.5707963267948966 },
|
3808 |
|
|
};
|
3809 |
|
|
|
3810 |
|
|
// Test function for k=-0.19999999999999996, nu=0.20000000000000001.
|
3811 |
|
|
template <typename Tp>
|
3812 |
|
|
void test073()
|
3813 |
|
|
{
|
3814 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3815 |
|
|
Tp max_abs_diff = -Tp(1);
|
3816 |
|
|
Tp max_abs_frac = -Tp(1);
|
3817 |
|
|
unsigned int num_datum = sizeof(data073)
|
3818 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3819 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3820 |
|
|
{
|
3821 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data073[i].k), Tp(data073[i].nu),
|
3822 |
|
|
Tp(data073[i].phi));
|
3823 |
|
|
const Tp f0 = data073[i].f0;
|
3824 |
|
|
const Tp diff = f - f0;
|
3825 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3826 |
|
|
max_abs_diff = std::abs(diff);
|
3827 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3828 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3829 |
|
|
{
|
3830 |
|
|
const Tp frac = diff / f0;
|
3831 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3832 |
|
|
max_abs_frac = std::abs(frac);
|
3833 |
|
|
}
|
3834 |
|
|
}
|
3835 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3836 |
|
|
}
|
3837 |
|
|
|
3838 |
|
|
// Test data for k=-0.19999999999999996, nu=0.29999999999999999.
|
3839 |
|
|
testcase_ellint_3<double> data074[] = {
|
3840 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.29999999999999999,
|
3841 |
|
|
0.0000000000000000 },
|
3842 |
|
|
{ 0.17404240913577707, -0.19999999999999996, 0.29999999999999999,
|
3843 |
|
|
0.17453292519943295 },
|
3844 |
|
|
{ 0.34527248032587193, -0.19999999999999996, 0.29999999999999999,
|
3845 |
|
|
0.34906585039886590 },
|
3846 |
|
|
{ 0.51147118981668416, -0.19999999999999996, 0.29999999999999999,
|
3847 |
|
|
0.52359877559829882 },
|
3848 |
|
|
{ 0.67137107867777635, -0.19999999999999996, 0.29999999999999999,
|
3849 |
|
|
0.69813170079773179 },
|
3850 |
|
|
{ 0.82470418188668893, -0.19999999999999996, 0.29999999999999999,
|
3851 |
|
|
0.87266462599716477 },
|
3852 |
|
|
{ 0.97202873223594299, -0.19999999999999996, 0.29999999999999999,
|
3853 |
|
|
1.0471975511965976 },
|
3854 |
|
|
{ 1.1144773569375266, -0.19999999999999996, 0.29999999999999999,
|
3855 |
|
|
1.2217304763960306 },
|
3856 |
|
|
{ 1.2535292433701000, -0.19999999999999996, 0.29999999999999999,
|
3857 |
|
|
1.3962634015954636 },
|
3858 |
|
|
{ 1.3908453514752481, -0.19999999999999996, 0.29999999999999999,
|
3859 |
|
|
1.5707963267948966 },
|
3860 |
|
|
};
|
3861 |
|
|
|
3862 |
|
|
// Test function for k=-0.19999999999999996, nu=0.29999999999999999.
|
3863 |
|
|
template <typename Tp>
|
3864 |
|
|
void test074()
|
3865 |
|
|
{
|
3866 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3867 |
|
|
Tp max_abs_diff = -Tp(1);
|
3868 |
|
|
Tp max_abs_frac = -Tp(1);
|
3869 |
|
|
unsigned int num_datum = sizeof(data074)
|
3870 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3871 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3872 |
|
|
{
|
3873 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data074[i].k), Tp(data074[i].nu),
|
3874 |
|
|
Tp(data074[i].phi));
|
3875 |
|
|
const Tp f0 = data074[i].f0;
|
3876 |
|
|
const Tp diff = f - f0;
|
3877 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3878 |
|
|
max_abs_diff = std::abs(diff);
|
3879 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3880 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3881 |
|
|
{
|
3882 |
|
|
const Tp frac = diff / f0;
|
3883 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3884 |
|
|
max_abs_frac = std::abs(frac);
|
3885 |
|
|
}
|
3886 |
|
|
}
|
3887 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3888 |
|
|
}
|
3889 |
|
|
|
3890 |
|
|
// Test data for k=-0.19999999999999996, nu=0.40000000000000002.
|
3891 |
|
|
testcase_ellint_3<double> data075[] = {
|
3892 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.40000000000000002,
|
3893 |
|
|
0.0000000000000000 },
|
3894 |
|
|
{ 0.17386841301066677, -0.19999999999999996, 0.40000000000000002,
|
3895 |
|
|
0.17453292519943295 },
|
3896 |
|
|
{ 0.34395257914113253, -0.19999999999999996, 0.40000000000000002,
|
3897 |
|
|
0.34906585039886590 },
|
3898 |
|
|
{ 0.50737088376869466, -0.19999999999999996, 0.40000000000000002,
|
3899 |
|
|
0.52359877559829882 },
|
3900 |
|
|
{ 0.66262801717277664, -0.19999999999999996, 0.40000000000000002,
|
3901 |
|
|
0.69813170079773179 },
|
3902 |
|
|
{ 0.80958766645079094, -0.19999999999999996, 0.40000000000000002,
|
3903 |
|
|
0.87266462599716477 },
|
3904 |
|
|
{ 0.94913754236162040, -0.19999999999999996, 0.40000000000000002,
|
3905 |
|
|
1.0471975511965976 },
|
3906 |
|
|
{ 1.0827985514223000, -0.19999999999999996, 0.40000000000000002,
|
3907 |
|
|
1.2217304763960306 },
|
3908 |
|
|
{ 1.2124212429050478, -0.19999999999999996, 0.40000000000000002,
|
3909 |
|
|
1.3962634015954636 },
|
3910 |
|
|
{ 1.3400002519661010, -0.19999999999999996, 0.40000000000000002,
|
3911 |
|
|
1.5707963267948966 },
|
3912 |
|
|
};
|
3913 |
|
|
|
3914 |
|
|
// Test function for k=-0.19999999999999996, nu=0.40000000000000002.
|
3915 |
|
|
template <typename Tp>
|
3916 |
|
|
void test075()
|
3917 |
|
|
{
|
3918 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3919 |
|
|
Tp max_abs_diff = -Tp(1);
|
3920 |
|
|
Tp max_abs_frac = -Tp(1);
|
3921 |
|
|
unsigned int num_datum = sizeof(data075)
|
3922 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3923 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3924 |
|
|
{
|
3925 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data075[i].k), Tp(data075[i].nu),
|
3926 |
|
|
Tp(data075[i].phi));
|
3927 |
|
|
const Tp f0 = data075[i].f0;
|
3928 |
|
|
const Tp diff = f - f0;
|
3929 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3930 |
|
|
max_abs_diff = std::abs(diff);
|
3931 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3932 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3933 |
|
|
{
|
3934 |
|
|
const Tp frac = diff / f0;
|
3935 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3936 |
|
|
max_abs_frac = std::abs(frac);
|
3937 |
|
|
}
|
3938 |
|
|
}
|
3939 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3940 |
|
|
}
|
3941 |
|
|
|
3942 |
|
|
// Test data for k=-0.19999999999999996, nu=0.50000000000000000.
|
3943 |
|
|
testcase_ellint_3<double> data076[] = {
|
3944 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.50000000000000000,
|
3945 |
|
|
0.0000000000000000 },
|
3946 |
|
|
{ 0.17369503942181802, -0.19999999999999996, 0.50000000000000000,
|
3947 |
|
|
0.17453292519943295 },
|
3948 |
|
|
{ 0.34265043534362660, -0.19999999999999996, 0.50000000000000000,
|
3949 |
|
|
0.34906585039886590 },
|
3950 |
|
|
{ 0.50338337208655415, -0.19999999999999996, 0.50000000000000000,
|
3951 |
|
|
0.52359877559829882 },
|
3952 |
|
|
{ 0.65426373297163642, -0.19999999999999996, 0.50000000000000000,
|
3953 |
|
|
0.69813170079773179 },
|
3954 |
|
|
{ 0.79536193036145808, -0.19999999999999996, 0.50000000000000000,
|
3955 |
|
|
0.87266462599716477 },
|
3956 |
|
|
{ 0.92791875910061605, -0.19999999999999996, 0.50000000000000000,
|
3957 |
|
|
1.0471975511965976 },
|
3958 |
|
|
{ 1.0538145052725829, -0.19999999999999996, 0.50000000000000000,
|
3959 |
|
|
1.2217304763960306 },
|
3960 |
|
|
{ 1.1752060022875899, -0.19999999999999996, 0.50000000000000000,
|
3961 |
|
|
1.3962634015954636 },
|
3962 |
|
|
{ 1.2943374404397376, -0.19999999999999996, 0.50000000000000000,
|
3963 |
|
|
1.5707963267948966 },
|
3964 |
|
|
};
|
3965 |
|
|
|
3966 |
|
|
// Test function for k=-0.19999999999999996, nu=0.50000000000000000.
|
3967 |
|
|
template <typename Tp>
|
3968 |
|
|
void test076()
|
3969 |
|
|
{
|
3970 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
3971 |
|
|
Tp max_abs_diff = -Tp(1);
|
3972 |
|
|
Tp max_abs_frac = -Tp(1);
|
3973 |
|
|
unsigned int num_datum = sizeof(data076)
|
3974 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
3975 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
3976 |
|
|
{
|
3977 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data076[i].k), Tp(data076[i].nu),
|
3978 |
|
|
Tp(data076[i].phi));
|
3979 |
|
|
const Tp f0 = data076[i].f0;
|
3980 |
|
|
const Tp diff = f - f0;
|
3981 |
|
|
if (std::abs(diff) > max_abs_diff)
|
3982 |
|
|
max_abs_diff = std::abs(diff);
|
3983 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
3984 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
3985 |
|
|
{
|
3986 |
|
|
const Tp frac = diff / f0;
|
3987 |
|
|
if (std::abs(frac) > max_abs_frac)
|
3988 |
|
|
max_abs_frac = std::abs(frac);
|
3989 |
|
|
}
|
3990 |
|
|
}
|
3991 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
3992 |
|
|
}
|
3993 |
|
|
|
3994 |
|
|
// Test data for k=-0.19999999999999996, nu=0.59999999999999998.
|
3995 |
|
|
testcase_ellint_3<double> data077[] = {
|
3996 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.59999999999999998,
|
3997 |
|
|
0.0000000000000000 },
|
3998 |
|
|
{ 0.17352228440746928, -0.19999999999999996, 0.59999999999999998,
|
3999 |
|
|
0.17453292519943295 },
|
4000 |
|
|
{ 0.34136562863713626, -0.19999999999999996, 0.59999999999999998,
|
4001 |
|
|
0.34906585039886590 },
|
4002 |
|
|
{ 0.49950328177638481, -0.19999999999999996, 0.59999999999999998,
|
4003 |
|
|
0.52359877559829882 },
|
4004 |
|
|
{ 0.64625032705690832, -0.19999999999999996, 0.59999999999999998,
|
4005 |
|
|
0.69813170079773179 },
|
4006 |
|
|
{ 0.78193941198403094, -0.19999999999999996, 0.59999999999999998,
|
4007 |
|
|
0.87266462599716477 },
|
4008 |
|
|
{ 0.90817230934317128, -0.19999999999999996, 0.59999999999999998,
|
4009 |
|
|
1.0471975511965976 },
|
4010 |
|
|
{ 1.0271563751276462, -0.19999999999999996, 0.59999999999999998,
|
4011 |
|
|
1.2217304763960306 },
|
4012 |
|
|
{ 1.1412999379040518, -0.19999999999999996, 0.59999999999999998,
|
4013 |
|
|
1.3962634015954636 },
|
4014 |
|
|
{ 1.2530330675914561, -0.19999999999999996, 0.59999999999999998,
|
4015 |
|
|
1.5707963267948966 },
|
4016 |
|
|
};
|
4017 |
|
|
|
4018 |
|
|
// Test function for k=-0.19999999999999996, nu=0.59999999999999998.
|
4019 |
|
|
template <typename Tp>
|
4020 |
|
|
void test077()
|
4021 |
|
|
{
|
4022 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4023 |
|
|
Tp max_abs_diff = -Tp(1);
|
4024 |
|
|
Tp max_abs_frac = -Tp(1);
|
4025 |
|
|
unsigned int num_datum = sizeof(data077)
|
4026 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4027 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4028 |
|
|
{
|
4029 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data077[i].k), Tp(data077[i].nu),
|
4030 |
|
|
Tp(data077[i].phi));
|
4031 |
|
|
const Tp f0 = data077[i].f0;
|
4032 |
|
|
const Tp diff = f - f0;
|
4033 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4034 |
|
|
max_abs_diff = std::abs(diff);
|
4035 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4036 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4037 |
|
|
{
|
4038 |
|
|
const Tp frac = diff / f0;
|
4039 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4040 |
|
|
max_abs_frac = std::abs(frac);
|
4041 |
|
|
}
|
4042 |
|
|
}
|
4043 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4044 |
|
|
}
|
4045 |
|
|
|
4046 |
|
|
// Test data for k=-0.19999999999999996, nu=0.69999999999999996.
|
4047 |
|
|
testcase_ellint_3<double> data078[] = {
|
4048 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.69999999999999996,
|
4049 |
|
|
0.0000000000000000 },
|
4050 |
|
|
{ 0.17335014404233898, -0.19999999999999996, 0.69999999999999996,
|
4051 |
|
|
0.17453292519943295 },
|
4052 |
|
|
{ 0.34009775298617811, -0.19999999999999996, 0.69999999999999996,
|
4053 |
|
|
0.34906585039886590 },
|
4054 |
|
|
{ 0.49572560201923810, -0.19999999999999996, 0.69999999999999996,
|
4055 |
|
|
0.52359877559829882 },
|
4056 |
|
|
{ 0.63856276669886525, -0.19999999999999996, 0.69999999999999996,
|
4057 |
|
|
0.69813170079773179 },
|
4058 |
|
|
{ 0.76924438644867565, -0.19999999999999996, 0.69999999999999996,
|
4059 |
|
|
0.87266462599716477 },
|
4060 |
|
|
{ 0.88973060843856466, -0.19999999999999996, 0.69999999999999996,
|
4061 |
|
|
1.0471975511965976 },
|
4062 |
|
|
{ 1.0025230471636377, -0.19999999999999996, 0.69999999999999996,
|
4063 |
|
|
1.2217304763960306 },
|
4064 |
|
|
{ 1.1102356376093103, -0.19999999999999996, 0.69999999999999996,
|
4065 |
|
|
1.3962634015954636 },
|
4066 |
|
|
{ 1.2154356555075867, -0.19999999999999996, 0.69999999999999996,
|
4067 |
|
|
1.5707963267948966 },
|
4068 |
|
|
};
|
4069 |
|
|
|
4070 |
|
|
// Test function for k=-0.19999999999999996, nu=0.69999999999999996.
|
4071 |
|
|
template <typename Tp>
|
4072 |
|
|
void test078()
|
4073 |
|
|
{
|
4074 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4075 |
|
|
Tp max_abs_diff = -Tp(1);
|
4076 |
|
|
Tp max_abs_frac = -Tp(1);
|
4077 |
|
|
unsigned int num_datum = sizeof(data078)
|
4078 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4079 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4080 |
|
|
{
|
4081 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data078[i].k), Tp(data078[i].nu),
|
4082 |
|
|
Tp(data078[i].phi));
|
4083 |
|
|
const Tp f0 = data078[i].f0;
|
4084 |
|
|
const Tp diff = f - f0;
|
4085 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4086 |
|
|
max_abs_diff = std::abs(diff);
|
4087 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4088 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4089 |
|
|
{
|
4090 |
|
|
const Tp frac = diff / f0;
|
4091 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4092 |
|
|
max_abs_frac = std::abs(frac);
|
4093 |
|
|
}
|
4094 |
|
|
}
|
4095 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4096 |
|
|
}
|
4097 |
|
|
|
4098 |
|
|
// Test data for k=-0.19999999999999996, nu=0.80000000000000004.
|
4099 |
|
|
testcase_ellint_3<double> data079[] = {
|
4100 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.80000000000000004,
|
4101 |
|
|
0.0000000000000000 },
|
4102 |
|
|
{ 0.17317861443718541, -0.19999999999999996, 0.80000000000000004,
|
4103 |
|
|
0.17453292519943295 },
|
4104 |
|
|
{ 0.33884641598718701, -0.19999999999999996, 0.80000000000000004,
|
4105 |
|
|
0.34906585039886590 },
|
4106 |
|
|
{ 0.49204565281259494, -0.19999999999999996, 0.80000000000000004,
|
4107 |
|
|
0.52359877559829882 },
|
4108 |
|
|
{ 0.63117851188220353, -0.19999999999999996, 0.80000000000000004,
|
4109 |
|
|
0.69813170079773179 },
|
4110 |
|
|
{ 0.75721095949544170, -0.19999999999999996, 0.80000000000000004,
|
4111 |
|
|
0.87266462599716477 },
|
4112 |
|
|
{ 0.87245201443919118, -0.19999999999999996, 0.80000000000000004,
|
4113 |
|
|
1.0471975511965976 },
|
4114 |
|
|
{ 0.97966584238831089, -0.19999999999999996, 0.80000000000000004,
|
4115 |
|
|
1.2217304763960306 },
|
4116 |
|
|
{ 1.0816336325174360, -0.19999999999999996, 0.80000000000000004,
|
4117 |
|
|
1.3962634015954636 },
|
4118 |
|
|
{ 1.1810223448909913, -0.19999999999999996, 0.80000000000000004,
|
4119 |
|
|
1.5707963267948966 },
|
4120 |
|
|
};
|
4121 |
|
|
|
4122 |
|
|
// Test function for k=-0.19999999999999996, nu=0.80000000000000004.
|
4123 |
|
|
template <typename Tp>
|
4124 |
|
|
void test079()
|
4125 |
|
|
{
|
4126 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4127 |
|
|
Tp max_abs_diff = -Tp(1);
|
4128 |
|
|
Tp max_abs_frac = -Tp(1);
|
4129 |
|
|
unsigned int num_datum = sizeof(data079)
|
4130 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4131 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4132 |
|
|
{
|
4133 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data079[i].k), Tp(data079[i].nu),
|
4134 |
|
|
Tp(data079[i].phi));
|
4135 |
|
|
const Tp f0 = data079[i].f0;
|
4136 |
|
|
const Tp diff = f - f0;
|
4137 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4138 |
|
|
max_abs_diff = std::abs(diff);
|
4139 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4140 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4141 |
|
|
{
|
4142 |
|
|
const Tp frac = diff / f0;
|
4143 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4144 |
|
|
max_abs_frac = std::abs(frac);
|
4145 |
|
|
}
|
4146 |
|
|
}
|
4147 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4148 |
|
|
}
|
4149 |
|
|
|
4150 |
|
|
// Test data for k=-0.19999999999999996, nu=0.90000000000000002.
|
4151 |
|
|
testcase_ellint_3<double> data080[] = {
|
4152 |
|
|
{ -0.0000000000000000, -0.19999999999999996, 0.90000000000000002,
|
4153 |
|
|
0.0000000000000000 },
|
4154 |
|
|
{ 0.17300769173837280, -0.19999999999999996, 0.90000000000000002,
|
4155 |
|
|
0.17453292519943295 },
|
4156 |
|
|
{ 0.33761123827372508, -0.19999999999999996, 0.90000000000000002,
|
4157 |
|
|
0.34906585039886590 },
|
4158 |
|
|
{ 0.48845905690769426, -0.19999999999999996, 0.90000000000000002,
|
4159 |
|
|
0.52359877559829882 },
|
4160 |
|
|
{ 0.62407720017324986, -0.19999999999999996, 0.90000000000000002,
|
4161 |
|
|
0.69813170079773179 },
|
4162 |
|
|
{ 0.74578146525124289, -0.19999999999999996, 0.90000000000000002,
|
4163 |
|
|
0.87266462599716477 },
|
4164 |
|
|
{ 0.85621583540073076, -0.19999999999999996, 0.90000000000000002,
|
4165 |
|
|
1.0471975511965976 },
|
4166 |
|
|
{ 0.95837725988001199, -0.19999999999999996, 0.90000000000000002,
|
4167 |
|
|
1.2217304763960306 },
|
4168 |
|
|
{ 1.0551821412633928, -0.19999999999999996, 0.90000000000000002,
|
4169 |
|
|
1.3962634015954636 },
|
4170 |
|
|
{ 1.1493679916141863, -0.19999999999999996, 0.90000000000000002,
|
4171 |
|
|
1.5707963267948966 },
|
4172 |
|
|
};
|
4173 |
|
|
|
4174 |
|
|
// Test function for k=-0.19999999999999996, nu=0.90000000000000002.
|
4175 |
|
|
template <typename Tp>
|
4176 |
|
|
void test080()
|
4177 |
|
|
{
|
4178 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4179 |
|
|
Tp max_abs_diff = -Tp(1);
|
4180 |
|
|
Tp max_abs_frac = -Tp(1);
|
4181 |
|
|
unsigned int num_datum = sizeof(data080)
|
4182 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4183 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4184 |
|
|
{
|
4185 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data080[i].k), Tp(data080[i].nu),
|
4186 |
|
|
Tp(data080[i].phi));
|
4187 |
|
|
const Tp f0 = data080[i].f0;
|
4188 |
|
|
const Tp diff = f - f0;
|
4189 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4190 |
|
|
max_abs_diff = std::abs(diff);
|
4191 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4192 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4193 |
|
|
{
|
4194 |
|
|
const Tp frac = diff / f0;
|
4195 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4196 |
|
|
max_abs_frac = std::abs(frac);
|
4197 |
|
|
}
|
4198 |
|
|
}
|
4199 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4200 |
|
|
}
|
4201 |
|
|
|
4202 |
|
|
// Test data for k=-0.099999999999999978, nu=0.0000000000000000.
|
4203 |
|
|
testcase_ellint_3<double> data081[] = {
|
4204 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.0000000000000000,
|
4205 |
|
|
0.0000000000000000 },
|
4206 |
|
|
{ 0.17454173353063665, -0.099999999999999978, 0.0000000000000000,
|
4207 |
|
|
0.17453292519943295 },
|
4208 |
|
|
{ 0.34913506721468085, -0.099999999999999978, 0.0000000000000000,
|
4209 |
|
|
0.34906585039886590 },
|
4210 |
|
|
{ 0.52382550016538953, -0.099999999999999978, 0.0000000000000000,
|
4211 |
|
|
0.52359877559829882 },
|
4212 |
|
|
{ 0.69864700854177031, -0.099999999999999978, 0.0000000000000000,
|
4213 |
|
|
0.69813170079773179 },
|
4214 |
|
|
{ 0.87361792586964870, -0.099999999999999978, 0.0000000000000000,
|
4215 |
|
|
0.87266462599716477 },
|
4216 |
|
|
{ 1.0487386319621685, -0.099999999999999978, 0.0000000000000000,
|
4217 |
|
|
1.0471975511965976 },
|
4218 |
|
|
{ 1.2239913752078757, -0.099999999999999978, 0.0000000000000000,
|
4219 |
|
|
1.2217304763960306 },
|
4220 |
|
|
{ 1.3993423113684049, -0.099999999999999978, 0.0000000000000000,
|
4221 |
|
|
1.3962634015954636 },
|
4222 |
|
|
{ 1.5747455615173562, -0.099999999999999978, 0.0000000000000000,
|
4223 |
|
|
1.5707963267948966 },
|
4224 |
|
|
};
|
4225 |
|
|
|
4226 |
|
|
// Test function for k=-0.099999999999999978, nu=0.0000000000000000.
|
4227 |
|
|
template <typename Tp>
|
4228 |
|
|
void test081()
|
4229 |
|
|
{
|
4230 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4231 |
|
|
Tp max_abs_diff = -Tp(1);
|
4232 |
|
|
Tp max_abs_frac = -Tp(1);
|
4233 |
|
|
unsigned int num_datum = sizeof(data081)
|
4234 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4235 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4236 |
|
|
{
|
4237 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data081[i].k), Tp(data081[i].nu),
|
4238 |
|
|
Tp(data081[i].phi));
|
4239 |
|
|
const Tp f0 = data081[i].f0;
|
4240 |
|
|
const Tp diff = f - f0;
|
4241 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4242 |
|
|
max_abs_diff = std::abs(diff);
|
4243 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4244 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4245 |
|
|
{
|
4246 |
|
|
const Tp frac = diff / f0;
|
4247 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4248 |
|
|
max_abs_frac = std::abs(frac);
|
4249 |
|
|
}
|
4250 |
|
|
}
|
4251 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4252 |
|
|
}
|
4253 |
|
|
|
4254 |
|
|
// Test data for k=-0.099999999999999978, nu=0.10000000000000001.
|
4255 |
|
|
testcase_ellint_3<double> data082[] = {
|
4256 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.10000000000000001,
|
4257 |
|
|
0.0000000000000000 },
|
4258 |
|
|
{ 0.17436589347616618, -0.099999999999999978, 0.10000000000000001,
|
4259 |
|
|
0.17453292519943295 },
|
4260 |
|
|
{ 0.34776067871237354, -0.099999999999999978, 0.10000000000000001,
|
4261 |
|
|
0.34906585039886590 },
|
4262 |
|
|
{ 0.51936064354727807, -0.099999999999999978, 0.10000000000000001,
|
4263 |
|
|
0.52359877559829882 },
|
4264 |
|
|
{ 0.68860303749364360, -0.099999999999999978, 0.10000000000000001,
|
4265 |
|
|
0.69813170079773179 },
|
4266 |
|
|
{ 0.85524561882332051, -0.099999999999999978, 0.10000000000000001,
|
4267 |
|
|
0.87266462599716477 },
|
4268 |
|
|
{ 1.0193708301908337, -0.099999999999999978, 0.10000000000000001,
|
4269 |
|
|
1.0471975511965976 },
|
4270 |
|
|
{ 1.1813474067123044, -0.099999999999999978, 0.10000000000000001,
|
4271 |
|
|
1.2217304763960306 },
|
4272 |
|
|
{ 1.3417670770424983, -0.099999999999999978, 0.10000000000000001,
|
4273 |
|
|
1.3962634015954636 },
|
4274 |
|
|
{ 1.5013711111199950, -0.099999999999999978, 0.10000000000000001,
|
4275 |
|
|
1.5707963267948966 },
|
4276 |
|
|
};
|
4277 |
|
|
|
4278 |
|
|
// Test function for k=-0.099999999999999978, nu=0.10000000000000001.
|
4279 |
|
|
template <typename Tp>
|
4280 |
|
|
void test082()
|
4281 |
|
|
{
|
4282 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4283 |
|
|
Tp max_abs_diff = -Tp(1);
|
4284 |
|
|
Tp max_abs_frac = -Tp(1);
|
4285 |
|
|
unsigned int num_datum = sizeof(data082)
|
4286 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4287 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4288 |
|
|
{
|
4289 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data082[i].k), Tp(data082[i].nu),
|
4290 |
|
|
Tp(data082[i].phi));
|
4291 |
|
|
const Tp f0 = data082[i].f0;
|
4292 |
|
|
const Tp diff = f - f0;
|
4293 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4294 |
|
|
max_abs_diff = std::abs(diff);
|
4295 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4296 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4297 |
|
|
{
|
4298 |
|
|
const Tp frac = diff / f0;
|
4299 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4300 |
|
|
max_abs_frac = std::abs(frac);
|
4301 |
|
|
}
|
4302 |
|
|
}
|
4303 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4304 |
|
|
}
|
4305 |
|
|
|
4306 |
|
|
// Test data for k=-0.099999999999999978, nu=0.20000000000000001.
|
4307 |
|
|
testcase_ellint_3<double> data083[] = {
|
4308 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.20000000000000001,
|
4309 |
|
|
0.0000000000000000 },
|
4310 |
|
|
{ 0.17419068786141345, -0.099999999999999978, 0.20000000000000001,
|
4311 |
|
|
0.17453292519943295 },
|
4312 |
|
|
{ 0.34640537686230127, -0.099999999999999978, 0.20000000000000001,
|
4313 |
|
|
0.34906585039886590 },
|
4314 |
|
|
{ 0.51502689171753957, -0.099999999999999978, 0.20000000000000001,
|
4315 |
|
|
0.52359877559829882 },
|
4316 |
|
|
{ 0.67904147863672726, -0.099999999999999978, 0.20000000000000001,
|
4317 |
|
|
0.69813170079773179 },
|
4318 |
|
|
{ 0.83811885126105179, -0.099999999999999978, 0.20000000000000001,
|
4319 |
|
|
0.87266462599716477 },
|
4320 |
|
|
{ 0.99255278555742810, -0.099999999999999978, 0.20000000000000001,
|
4321 |
|
|
1.0471975511965976 },
|
4322 |
|
|
{ 1.1431260546194930, -0.099999999999999978, 0.20000000000000001,
|
4323 |
|
|
1.2217304763960306 },
|
4324 |
|
|
{ 1.2909589656532101, -0.099999999999999978, 0.20000000000000001,
|
4325 |
|
|
1.3962634015954636 },
|
4326 |
|
|
{ 1.4373749386463430, -0.099999999999999978, 0.20000000000000001,
|
4327 |
|
|
1.5707963267948966 },
|
4328 |
|
|
};
|
4329 |
|
|
|
4330 |
|
|
// Test function for k=-0.099999999999999978, nu=0.20000000000000001.
|
4331 |
|
|
template <typename Tp>
|
4332 |
|
|
void test083()
|
4333 |
|
|
{
|
4334 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4335 |
|
|
Tp max_abs_diff = -Tp(1);
|
4336 |
|
|
Tp max_abs_frac = -Tp(1);
|
4337 |
|
|
unsigned int num_datum = sizeof(data083)
|
4338 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4339 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4340 |
|
|
{
|
4341 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data083[i].k), Tp(data083[i].nu),
|
4342 |
|
|
Tp(data083[i].phi));
|
4343 |
|
|
const Tp f0 = data083[i].f0;
|
4344 |
|
|
const Tp diff = f - f0;
|
4345 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4346 |
|
|
max_abs_diff = std::abs(diff);
|
4347 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4348 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4349 |
|
|
{
|
4350 |
|
|
const Tp frac = diff / f0;
|
4351 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4352 |
|
|
max_abs_frac = std::abs(frac);
|
4353 |
|
|
}
|
4354 |
|
|
}
|
4355 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4356 |
|
|
}
|
4357 |
|
|
|
4358 |
|
|
// Test data for k=-0.099999999999999978, nu=0.29999999999999999.
|
4359 |
|
|
testcase_ellint_3<double> data084[] = {
|
4360 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.29999999999999999,
|
4361 |
|
|
0.0000000000000000 },
|
4362 |
|
|
{ 0.17401611261390110, -0.099999999999999978, 0.29999999999999999,
|
4363 |
|
|
0.17453292519943295 },
|
4364 |
|
|
{ 0.34506869507511767, -0.099999999999999978, 0.29999999999999999,
|
4365 |
|
|
0.34906585039886590 },
|
4366 |
|
|
{ 0.51081757604259870, -0.099999999999999978, 0.29999999999999999,
|
4367 |
|
|
0.52359877559829882 },
|
4368 |
|
|
{ 0.66992297597712303, -0.099999999999999978, 0.29999999999999999,
|
4369 |
|
|
0.69813170079773179 },
|
4370 |
|
|
{ 0.82209722856174228, -0.099999999999999978, 0.29999999999999999,
|
4371 |
|
|
0.87266462599716477 },
|
4372 |
|
|
{ 0.96792430487669612, -0.099999999999999978, 0.29999999999999999,
|
4373 |
|
|
1.0471975511965976 },
|
4374 |
|
|
{ 1.1085964108954092, -0.099999999999999978, 0.29999999999999999,
|
4375 |
|
|
1.2217304763960306 },
|
4376 |
|
|
{ 1.2456748370836999, -0.099999999999999978, 0.29999999999999999,
|
4377 |
|
|
1.3962634015954636 },
|
4378 |
|
|
{ 1.3809159606704959, -0.099999999999999978, 0.29999999999999999,
|
4379 |
|
|
1.5707963267948966 },
|
4380 |
|
|
};
|
4381 |
|
|
|
4382 |
|
|
// Test function for k=-0.099999999999999978, nu=0.29999999999999999.
|
4383 |
|
|
template <typename Tp>
|
4384 |
|
|
void test084()
|
4385 |
|
|
{
|
4386 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4387 |
|
|
Tp max_abs_diff = -Tp(1);
|
4388 |
|
|
Tp max_abs_frac = -Tp(1);
|
4389 |
|
|
unsigned int num_datum = sizeof(data084)
|
4390 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4391 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4392 |
|
|
{
|
4393 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data084[i].k), Tp(data084[i].nu),
|
4394 |
|
|
Tp(data084[i].phi));
|
4395 |
|
|
const Tp f0 = data084[i].f0;
|
4396 |
|
|
const Tp diff = f - f0;
|
4397 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4398 |
|
|
max_abs_diff = std::abs(diff);
|
4399 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4400 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4401 |
|
|
{
|
4402 |
|
|
const Tp frac = diff / f0;
|
4403 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4404 |
|
|
max_abs_frac = std::abs(frac);
|
4405 |
|
|
}
|
4406 |
|
|
}
|
4407 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4408 |
|
|
}
|
4409 |
|
|
|
4410 |
|
|
// Test data for k=-0.099999999999999978, nu=0.40000000000000002.
|
4411 |
|
|
testcase_ellint_3<double> data085[] = {
|
4412 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.40000000000000002,
|
4413 |
|
|
0.0000000000000000 },
|
4414 |
|
|
{ 0.17384216369897937, -0.099999999999999978, 0.40000000000000002,
|
4415 |
|
|
0.17453292519943295 },
|
4416 |
|
|
{ 0.34375018311376782, -0.099999999999999978, 0.40000000000000002,
|
4417 |
|
|
0.34906585039886590 },
|
4418 |
|
|
{ 0.50672650758380455, -0.099999999999999978, 0.40000000000000002,
|
4419 |
|
|
0.52359877559829882 },
|
4420 |
|
|
{ 0.66121264213337616, -0.099999999999999978, 0.40000000000000002,
|
4421 |
|
|
0.69813170079773179 },
|
4422 |
|
|
{ 0.80706202005774441, -0.099999999999999978, 0.40000000000000002,
|
4423 |
|
|
0.87266462599716477 },
|
4424 |
|
|
{ 0.94519376138245892, -0.099999999999999978, 0.40000000000000002,
|
4425 |
|
|
1.0471975511965976 },
|
4426 |
|
|
{ 1.0771880300759584, -0.099999999999999978, 0.40000000000000002,
|
4427 |
|
|
1.2217304763960306 },
|
4428 |
|
|
{ 1.2049711557188272, -0.099999999999999978, 0.40000000000000002,
|
4429 |
|
|
1.3962634015954636 },
|
4430 |
|
|
{ 1.3306223265207477, -0.099999999999999978, 0.40000000000000002,
|
4431 |
|
|
1.5707963267948966 },
|
4432 |
|
|
};
|
4433 |
|
|
|
4434 |
|
|
// Test function for k=-0.099999999999999978, nu=0.40000000000000002.
|
4435 |
|
|
template <typename Tp>
|
4436 |
|
|
void test085()
|
4437 |
|
|
{
|
4438 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4439 |
|
|
Tp max_abs_diff = -Tp(1);
|
4440 |
|
|
Tp max_abs_frac = -Tp(1);
|
4441 |
|
|
unsigned int num_datum = sizeof(data085)
|
4442 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4443 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4444 |
|
|
{
|
4445 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data085[i].k), Tp(data085[i].nu),
|
4446 |
|
|
Tp(data085[i].phi));
|
4447 |
|
|
const Tp f0 = data085[i].f0;
|
4448 |
|
|
const Tp diff = f - f0;
|
4449 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4450 |
|
|
max_abs_diff = std::abs(diff);
|
4451 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4452 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4453 |
|
|
{
|
4454 |
|
|
const Tp frac = diff / f0;
|
4455 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4456 |
|
|
max_abs_frac = std::abs(frac);
|
4457 |
|
|
}
|
4458 |
|
|
}
|
4459 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4460 |
|
|
}
|
4461 |
|
|
|
4462 |
|
|
// Test data for k=-0.099999999999999978, nu=0.50000000000000000.
|
4463 |
|
|
testcase_ellint_3<double> data086[] = {
|
4464 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.50000000000000000,
|
4465 |
|
|
0.0000000000000000 },
|
4466 |
|
|
{ 0.17366883711936554, -0.099999999999999978, 0.50000000000000000,
|
4467 |
|
|
0.17453292519943295 },
|
4468 |
|
|
{ 0.34244940634881876, -0.099999999999999978, 0.50000000000000000,
|
4469 |
|
|
0.34906585039886590 },
|
4470 |
|
|
{ 0.50274793281634378, -0.099999999999999978, 0.50000000000000000,
|
4471 |
|
|
0.52359877559829882 },
|
4472 |
|
|
{ 0.65287941633275093, -0.099999999999999978, 0.50000000000000000,
|
4473 |
|
|
0.69813170079773179 },
|
4474 |
|
|
{ 0.79291198790315398, -0.099999999999999978, 0.50000000000000000,
|
4475 |
|
|
0.87266462599716477 },
|
4476 |
|
|
{ 0.92412201537880345, -0.099999999999999978, 0.50000000000000000,
|
4477 |
|
|
1.0471975511965976 },
|
4478 |
|
|
{ 1.0484480076799370, -0.099999999999999978, 0.50000000000000000,
|
4479 |
|
|
1.2217304763960306 },
|
4480 |
|
|
{ 1.1681168130475206, -0.099999999999999978, 0.50000000000000000,
|
4481 |
|
|
1.3962634015954636 },
|
4482 |
|
|
{ 1.2854480708580160, -0.099999999999999978, 0.50000000000000000,
|
4483 |
|
|
1.5707963267948966 },
|
4484 |
|
|
};
|
4485 |
|
|
|
4486 |
|
|
// Test function for k=-0.099999999999999978, nu=0.50000000000000000.
|
4487 |
|
|
template <typename Tp>
|
4488 |
|
|
void test086()
|
4489 |
|
|
{
|
4490 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4491 |
|
|
Tp max_abs_diff = -Tp(1);
|
4492 |
|
|
Tp max_abs_frac = -Tp(1);
|
4493 |
|
|
unsigned int num_datum = sizeof(data086)
|
4494 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4495 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4496 |
|
|
{
|
4497 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data086[i].k), Tp(data086[i].nu),
|
4498 |
|
|
Tp(data086[i].phi));
|
4499 |
|
|
const Tp f0 = data086[i].f0;
|
4500 |
|
|
const Tp diff = f - f0;
|
4501 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4502 |
|
|
max_abs_diff = std::abs(diff);
|
4503 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4504 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4505 |
|
|
{
|
4506 |
|
|
const Tp frac = diff / f0;
|
4507 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4508 |
|
|
max_abs_frac = std::abs(frac);
|
4509 |
|
|
}
|
4510 |
|
|
}
|
4511 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4512 |
|
|
}
|
4513 |
|
|
|
4514 |
|
|
// Test data for k=-0.099999999999999978, nu=0.59999999999999998.
|
4515 |
|
|
testcase_ellint_3<double> data087[] = {
|
4516 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.59999999999999998,
|
4517 |
|
|
0.0000000000000000 },
|
4518 |
|
|
{ 0.17349612891469018, -0.099999999999999978, 0.59999999999999998,
|
4519 |
|
|
0.17453292519943295 },
|
4520 |
|
|
{ 0.34116594505539438, -0.099999999999999978, 0.59999999999999998,
|
4521 |
|
|
0.34906585039886590 },
|
4522 |
|
|
{ 0.49887649430466685, -0.099999999999999978, 0.59999999999999998,
|
4523 |
|
|
0.52359877559829882 },
|
4524 |
|
|
{ 0.64489553282165157, -0.099999999999999978, 0.59999999999999998,
|
4525 |
|
|
0.69813170079773179 },
|
4526 |
|
|
{ 0.77956016553782437, -0.099999999999999978, 0.59999999999999998,
|
4527 |
|
|
0.87266462599716477 },
|
4528 |
|
|
{ 0.90451074530096309, -0.099999999999999978, 0.59999999999999998,
|
4529 |
|
|
1.0471975511965976 },
|
4530 |
|
|
{ 1.0220113666961632, -0.099999999999999978, 0.59999999999999998,
|
4531 |
|
|
1.2217304763960306 },
|
4532 |
|
|
{ 1.1345351441065563, -0.099999999999999978, 0.59999999999999998,
|
4533 |
|
|
1.3962634015954636 },
|
4534 |
|
|
{ 1.2445798942989255, -0.099999999999999978, 0.59999999999999998,
|
4535 |
|
|
1.5707963267948966 },
|
4536 |
|
|
};
|
4537 |
|
|
|
4538 |
|
|
// Test function for k=-0.099999999999999978, nu=0.59999999999999998.
|
4539 |
|
|
template <typename Tp>
|
4540 |
|
|
void test087()
|
4541 |
|
|
{
|
4542 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4543 |
|
|
Tp max_abs_diff = -Tp(1);
|
4544 |
|
|
Tp max_abs_frac = -Tp(1);
|
4545 |
|
|
unsigned int num_datum = sizeof(data087)
|
4546 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4547 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4548 |
|
|
{
|
4549 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data087[i].k), Tp(data087[i].nu),
|
4550 |
|
|
Tp(data087[i].phi));
|
4551 |
|
|
const Tp f0 = data087[i].f0;
|
4552 |
|
|
const Tp diff = f - f0;
|
4553 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4554 |
|
|
max_abs_diff = std::abs(diff);
|
4555 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4556 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4557 |
|
|
{
|
4558 |
|
|
const Tp frac = diff / f0;
|
4559 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4560 |
|
|
max_abs_frac = std::abs(frac);
|
4561 |
|
|
}
|
4562 |
|
|
}
|
4563 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4564 |
|
|
}
|
4565 |
|
|
|
4566 |
|
|
// Test data for k=-0.099999999999999978, nu=0.69999999999999996.
|
4567 |
|
|
testcase_ellint_3<double> data088[] = {
|
4568 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.69999999999999996,
|
4569 |
|
|
0.0000000000000000 },
|
4570 |
|
|
{ 0.17332403516105052, -0.099999999999999978, 0.69999999999999996,
|
4571 |
|
|
0.17453292519943295 },
|
4572 |
|
|
{ 0.33989939374896877, -0.099999999999999978, 0.69999999999999996,
|
4573 |
|
|
0.34906585039886590 },
|
4574 |
|
|
{ 0.49510719568614081, -0.099999999999999978, 0.69999999999999996,
|
4575 |
|
|
0.52359877559829882 },
|
4576 |
|
|
{ 0.63723607776354974, -0.099999999999999978, 0.69999999999999996,
|
4577 |
|
|
0.69813170079773179 },
|
4578 |
|
|
{ 0.76693133887935327, -0.099999999999999978, 0.69999999999999996,
|
4579 |
|
|
0.87266462599716477 },
|
4580 |
|
|
{ 0.88619382078823827, -0.099999999999999978, 0.69999999999999996,
|
4581 |
|
|
1.0471975511965976 },
|
4582 |
|
|
{ 0.99758012018676490, -0.099999999999999978, 0.69999999999999996,
|
4583 |
|
|
1.2217304763960306 },
|
4584 |
|
|
{ 1.1037642270814410, -0.099999999999999978, 0.69999999999999996,
|
4585 |
|
|
1.3962634015954636 },
|
4586 |
|
|
{ 1.2073745911083187, -0.099999999999999978, 0.69999999999999996,
|
4587 |
|
|
1.5707963267948966 },
|
4588 |
|
|
};
|
4589 |
|
|
|
4590 |
|
|
// Test function for k=-0.099999999999999978, nu=0.69999999999999996.
|
4591 |
|
|
template <typename Tp>
|
4592 |
|
|
void test088()
|
4593 |
|
|
{
|
4594 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4595 |
|
|
Tp max_abs_diff = -Tp(1);
|
4596 |
|
|
Tp max_abs_frac = -Tp(1);
|
4597 |
|
|
unsigned int num_datum = sizeof(data088)
|
4598 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4599 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4600 |
|
|
{
|
4601 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data088[i].k), Tp(data088[i].nu),
|
4602 |
|
|
Tp(data088[i].phi));
|
4603 |
|
|
const Tp f0 = data088[i].f0;
|
4604 |
|
|
const Tp diff = f - f0;
|
4605 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4606 |
|
|
max_abs_diff = std::abs(diff);
|
4607 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4608 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4609 |
|
|
{
|
4610 |
|
|
const Tp frac = diff / f0;
|
4611 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4612 |
|
|
max_abs_frac = std::abs(frac);
|
4613 |
|
|
}
|
4614 |
|
|
}
|
4615 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4616 |
|
|
}
|
4617 |
|
|
|
4618 |
|
|
// Test data for k=-0.099999999999999978, nu=0.80000000000000004.
|
4619 |
|
|
testcase_ellint_3<double> data089[] = {
|
4620 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.80000000000000004,
|
4621 |
|
|
0.0000000000000000 },
|
4622 |
|
|
{ 0.17315255197057020, -0.099999999999999978, 0.80000000000000004,
|
4623 |
|
|
0.17453292519943295 },
|
4624 |
|
|
{ 0.33864936055747985, -0.099999999999999978, 0.80000000000000004,
|
4625 |
|
|
0.34906585039886590 },
|
4626 |
|
|
{ 0.49143537041117619, -0.099999999999999978, 0.80000000000000004,
|
4627 |
|
|
0.52359877559829882 },
|
4628 |
|
|
{ 0.62987861760047492, -0.099999999999999978, 0.80000000000000004,
|
4629 |
|
|
0.69813170079773179 },
|
4630 |
|
|
{ 0.75496005490917517, -0.099999999999999978, 0.80000000000000004,
|
4631 |
|
|
0.87266462599716477 },
|
4632 |
|
|
{ 0.86903081862701903, -0.099999999999999978, 0.80000000000000004,
|
4633 |
|
|
1.0471975511965976 },
|
4634 |
|
|
{ 0.97490814820725591, -0.099999999999999978, 0.80000000000000004,
|
4635 |
|
|
1.2217304763960306 },
|
4636 |
|
|
{ 1.0754290107171083, -0.099999999999999978, 0.80000000000000004,
|
4637 |
|
|
1.3962634015954636 },
|
4638 |
|
|
{ 1.1733158866987732, -0.099999999999999978, 0.80000000000000004,
|
4639 |
|
|
1.5707963267948966 },
|
4640 |
|
|
};
|
4641 |
|
|
|
4642 |
|
|
// Test function for k=-0.099999999999999978, nu=0.80000000000000004.
|
4643 |
|
|
template <typename Tp>
|
4644 |
|
|
void test089()
|
4645 |
|
|
{
|
4646 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4647 |
|
|
Tp max_abs_diff = -Tp(1);
|
4648 |
|
|
Tp max_abs_frac = -Tp(1);
|
4649 |
|
|
unsigned int num_datum = sizeof(data089)
|
4650 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4651 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4652 |
|
|
{
|
4653 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data089[i].k), Tp(data089[i].nu),
|
4654 |
|
|
Tp(data089[i].phi));
|
4655 |
|
|
const Tp f0 = data089[i].f0;
|
4656 |
|
|
const Tp diff = f - f0;
|
4657 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4658 |
|
|
max_abs_diff = std::abs(diff);
|
4659 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4660 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4661 |
|
|
{
|
4662 |
|
|
const Tp frac = diff / f0;
|
4663 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4664 |
|
|
max_abs_frac = std::abs(frac);
|
4665 |
|
|
}
|
4666 |
|
|
}
|
4667 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4668 |
|
|
}
|
4669 |
|
|
|
4670 |
|
|
// Test data for k=-0.099999999999999978, nu=0.90000000000000002.
|
4671 |
|
|
testcase_ellint_3<double> data090[] = {
|
4672 |
|
|
{ -0.0000000000000000, -0.099999999999999978, 0.90000000000000002,
|
4673 |
|
|
0.0000000000000000 },
|
4674 |
|
|
{ 0.17298167549096569, -0.099999999999999978, 0.90000000000000002,
|
4675 |
|
|
0.17453292519943295 },
|
4676 |
|
|
{ 0.33741546662741584, -0.099999999999999978, 0.90000000000000002,
|
4677 |
|
|
0.34906585039886590 },
|
4678 |
|
|
{ 0.48785665376856879, -0.099999999999999978, 0.90000000000000002,
|
4679 |
|
|
0.52359877559829882 },
|
4680 |
|
|
{ 0.62280288554518959, -0.099999999999999978, 0.90000000000000002,
|
4681 |
|
|
0.69813170079773179 },
|
4682 |
|
|
{ 0.74358903115455199, -0.099999999999999978, 0.90000000000000002,
|
4683 |
|
|
0.87266462599716477 },
|
4684 |
|
|
{ 0.85290207679298358, -0.099999999999999978, 0.90000000000000002,
|
4685 |
|
|
1.0471975511965976 },
|
4686 |
|
|
{ 0.95379006645397379, -0.099999999999999978, 0.90000000000000002,
|
4687 |
|
|
1.2217304763960306 },
|
4688 |
|
|
{ 1.0492213119872327, -0.099999999999999978, 0.90000000000000002,
|
4689 |
|
|
1.3962634015954636 },
|
4690 |
|
|
{ 1.1419839485283374, -0.099999999999999978, 0.90000000000000002,
|
4691 |
|
|
1.5707963267948966 },
|
4692 |
|
|
};
|
4693 |
|
|
|
4694 |
|
|
// Test function for k=-0.099999999999999978, nu=0.90000000000000002.
|
4695 |
|
|
template <typename Tp>
|
4696 |
|
|
void test090()
|
4697 |
|
|
{
|
4698 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4699 |
|
|
Tp max_abs_diff = -Tp(1);
|
4700 |
|
|
Tp max_abs_frac = -Tp(1);
|
4701 |
|
|
unsigned int num_datum = sizeof(data090)
|
4702 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4703 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4704 |
|
|
{
|
4705 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data090[i].k), Tp(data090[i].nu),
|
4706 |
|
|
Tp(data090[i].phi));
|
4707 |
|
|
const Tp f0 = data090[i].f0;
|
4708 |
|
|
const Tp diff = f - f0;
|
4709 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4710 |
|
|
max_abs_diff = std::abs(diff);
|
4711 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4712 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4713 |
|
|
{
|
4714 |
|
|
const Tp frac = diff / f0;
|
4715 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4716 |
|
|
max_abs_frac = std::abs(frac);
|
4717 |
|
|
}
|
4718 |
|
|
}
|
4719 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4720 |
|
|
}
|
4721 |
|
|
|
4722 |
|
|
// Test data for k=0.0000000000000000, nu=0.0000000000000000.
|
4723 |
|
|
testcase_ellint_3<double> data091[] = {
|
4724 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.0000000000000000,
|
4725 |
|
|
0.0000000000000000 },
|
4726 |
|
|
{ 0.17453292519943295, 0.0000000000000000, 0.0000000000000000,
|
4727 |
|
|
0.17453292519943295 },
|
4728 |
|
|
{ 0.34906585039886584, 0.0000000000000000, 0.0000000000000000,
|
4729 |
|
|
0.34906585039886590 },
|
4730 |
|
|
{ 0.52359877559829882, 0.0000000000000000, 0.0000000000000000,
|
4731 |
|
|
0.52359877559829882 },
|
4732 |
|
|
{ 0.69813170079773179, 0.0000000000000000, 0.0000000000000000,
|
4733 |
|
|
0.69813170079773179 },
|
4734 |
|
|
{ 0.87266462599716477, 0.0000000000000000, 0.0000000000000000,
|
4735 |
|
|
0.87266462599716477 },
|
4736 |
|
|
{ 1.0471975511965976, 0.0000000000000000, 0.0000000000000000,
|
4737 |
|
|
1.0471975511965976 },
|
4738 |
|
|
{ 1.2217304763960304, 0.0000000000000000, 0.0000000000000000,
|
4739 |
|
|
1.2217304763960306 },
|
4740 |
|
|
{ 1.3962634015954631, 0.0000000000000000, 0.0000000000000000,
|
4741 |
|
|
1.3962634015954636 },
|
4742 |
|
|
{ 1.5707963267948966, 0.0000000000000000, 0.0000000000000000,
|
4743 |
|
|
1.5707963267948966 },
|
4744 |
|
|
};
|
4745 |
|
|
|
4746 |
|
|
// Test function for k=0.0000000000000000, nu=0.0000000000000000.
|
4747 |
|
|
template <typename Tp>
|
4748 |
|
|
void test091()
|
4749 |
|
|
{
|
4750 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4751 |
|
|
Tp max_abs_diff = -Tp(1);
|
4752 |
|
|
Tp max_abs_frac = -Tp(1);
|
4753 |
|
|
unsigned int num_datum = sizeof(data091)
|
4754 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4755 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4756 |
|
|
{
|
4757 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data091[i].k), Tp(data091[i].nu),
|
4758 |
|
|
Tp(data091[i].phi));
|
4759 |
|
|
const Tp f0 = data091[i].f0;
|
4760 |
|
|
const Tp diff = f - f0;
|
4761 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4762 |
|
|
max_abs_diff = std::abs(diff);
|
4763 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4764 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4765 |
|
|
{
|
4766 |
|
|
const Tp frac = diff / f0;
|
4767 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4768 |
|
|
max_abs_frac = std::abs(frac);
|
4769 |
|
|
}
|
4770 |
|
|
}
|
4771 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4772 |
|
|
}
|
4773 |
|
|
|
4774 |
|
|
// Test data for k=0.0000000000000000, nu=0.10000000000000001.
|
4775 |
|
|
testcase_ellint_3<double> data092[] = {
|
4776 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.10000000000000001,
|
4777 |
|
|
0.0000000000000000 },
|
4778 |
|
|
{ 0.17435710107516608, 0.0000000000000000, 0.10000000000000001,
|
4779 |
|
|
0.17453292519943295 },
|
4780 |
|
|
{ 0.34769194715329604, 0.0000000000000000, 0.10000000000000001,
|
4781 |
|
|
0.34906585039886590 },
|
4782 |
|
|
{ 0.51913731575866118, 0.0000000000000000, 0.10000000000000001,
|
4783 |
|
|
0.52359877559829882 },
|
4784 |
|
|
{ 0.68810051897078461, 0.0000000000000000, 0.10000000000000001,
|
4785 |
|
|
0.69813170079773179 },
|
4786 |
|
|
{ 0.85432615661706823, 0.0000000000000000, 0.10000000000000001,
|
4787 |
|
|
0.87266462599716477 },
|
4788 |
|
|
{ 1.0179006647340796, 0.0000000000000000, 0.10000000000000001,
|
4789 |
|
|
1.0471975511965976 },
|
4790 |
|
|
{ 1.1792120640746322, 0.0000000000000000, 0.10000000000000001,
|
4791 |
|
|
1.2217304763960306 },
|
4792 |
|
|
{ 1.3388834245070498, 0.0000000000000000, 0.10000000000000001,
|
4793 |
|
|
1.3962634015954636 },
|
4794 |
|
|
{ 1.4976955329233277, 0.0000000000000000, 0.10000000000000001,
|
4795 |
|
|
1.5707963267948966 },
|
4796 |
|
|
};
|
4797 |
|
|
|
4798 |
|
|
// Test function for k=0.0000000000000000, nu=0.10000000000000001.
|
4799 |
|
|
template <typename Tp>
|
4800 |
|
|
void test092()
|
4801 |
|
|
{
|
4802 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4803 |
|
|
Tp max_abs_diff = -Tp(1);
|
4804 |
|
|
Tp max_abs_frac = -Tp(1);
|
4805 |
|
|
unsigned int num_datum = sizeof(data092)
|
4806 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4807 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4808 |
|
|
{
|
4809 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data092[i].k), Tp(data092[i].nu),
|
4810 |
|
|
Tp(data092[i].phi));
|
4811 |
|
|
const Tp f0 = data092[i].f0;
|
4812 |
|
|
const Tp diff = f - f0;
|
4813 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4814 |
|
|
max_abs_diff = std::abs(diff);
|
4815 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4816 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4817 |
|
|
{
|
4818 |
|
|
const Tp frac = diff / f0;
|
4819 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4820 |
|
|
max_abs_frac = std::abs(frac);
|
4821 |
|
|
}
|
4822 |
|
|
}
|
4823 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4824 |
|
|
}
|
4825 |
|
|
|
4826 |
|
|
// Test data for k=0.0000000000000000, nu=0.20000000000000001.
|
4827 |
|
|
testcase_ellint_3<double> data093[] = {
|
4828 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.20000000000000001,
|
4829 |
|
|
0.0000000000000000 },
|
4830 |
|
|
{ 0.17418191132226077, 0.0000000000000000, 0.20000000000000001,
|
4831 |
|
|
0.17453292519943295 },
|
4832 |
|
|
{ 0.34633712256943405, 0.0000000000000000, 0.20000000000000001,
|
4833 |
|
|
0.34906585039886590 },
|
4834 |
|
|
{ 0.51480684302043711, 0.0000000000000000, 0.20000000000000001,
|
4835 |
|
|
0.52359877559829882 },
|
4836 |
|
|
{ 0.67855102942481949, 0.0000000000000000, 0.20000000000000001,
|
4837 |
|
|
0.69813170079773179 },
|
4838 |
|
|
{ 0.83723056090326253, 0.0000000000000000, 0.20000000000000001,
|
4839 |
|
|
0.87266462599716477 },
|
4840 |
|
|
{ 0.99114645269578183, 0.0000000000000000, 0.20000000000000001,
|
4841 |
|
|
1.0471975511965976 },
|
4842 |
|
|
{ 1.1411014627915537, 0.0000000000000000, 0.20000000000000001,
|
4843 |
|
|
1.2217304763960306 },
|
4844 |
|
|
{ 1.2882448138013969, 0.0000000000000000, 0.20000000000000001,
|
4845 |
|
|
1.3962634015954636 },
|
4846 |
|
|
{ 1.4339343023863691, 0.0000000000000000, 0.20000000000000001,
|
4847 |
|
|
1.5707963267948966 },
|
4848 |
|
|
};
|
4849 |
|
|
|
4850 |
|
|
// Test function for k=0.0000000000000000, nu=0.20000000000000001.
|
4851 |
|
|
template <typename Tp>
|
4852 |
|
|
void test093()
|
4853 |
|
|
{
|
4854 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4855 |
|
|
Tp max_abs_diff = -Tp(1);
|
4856 |
|
|
Tp max_abs_frac = -Tp(1);
|
4857 |
|
|
unsigned int num_datum = sizeof(data093)
|
4858 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4859 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4860 |
|
|
{
|
4861 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data093[i].k), Tp(data093[i].nu),
|
4862 |
|
|
Tp(data093[i].phi));
|
4863 |
|
|
const Tp f0 = data093[i].f0;
|
4864 |
|
|
const Tp diff = f - f0;
|
4865 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4866 |
|
|
max_abs_diff = std::abs(diff);
|
4867 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4868 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4869 |
|
|
{
|
4870 |
|
|
const Tp frac = diff / f0;
|
4871 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4872 |
|
|
max_abs_frac = std::abs(frac);
|
4873 |
|
|
}
|
4874 |
|
|
}
|
4875 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4876 |
|
|
}
|
4877 |
|
|
|
4878 |
|
|
// Test data for k=0.0000000000000000, nu=0.29999999999999999.
|
4879 |
|
|
testcase_ellint_3<double> data094[] = {
|
4880 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.29999999999999999,
|
4881 |
|
|
0.0000000000000000 },
|
4882 |
|
|
{ 0.17400735186871727, 0.0000000000000000, 0.29999999999999999,
|
4883 |
|
|
0.17453292519943295 },
|
4884 |
|
|
{ 0.34500091027020219, 0.0000000000000000, 0.29999999999999999,
|
4885 |
|
|
0.34906585039886590 },
|
4886 |
|
|
{ 0.51060069523901541, 0.0000000000000000, 0.29999999999999999,
|
4887 |
|
|
0.52359877559829882 },
|
4888 |
|
|
{ 0.66944393961375459, 0.0000000000000000, 0.29999999999999999,
|
4889 |
|
|
0.69813170079773179 },
|
4890 |
|
|
{ 0.82123776744538157, 0.0000000000000000, 0.29999999999999999,
|
4891 |
|
|
0.87266462599716477 },
|
4892 |
|
|
{ 0.96657579245516523, 0.0000000000000000, 0.29999999999999999,
|
4893 |
|
|
1.0471975511965976 },
|
4894 |
|
|
{ 1.1066703663542414, 0.0000000000000000, 0.29999999999999999,
|
4895 |
|
|
1.2217304763960306 },
|
4896 |
|
|
{ 1.2431094251944901, 0.0000000000000000, 0.29999999999999999,
|
4897 |
|
|
1.3962634015954636 },
|
4898 |
|
|
{ 1.3776795151134889, 0.0000000000000000, 0.29999999999999999,
|
4899 |
|
|
1.5707963267948966 },
|
4900 |
|
|
};
|
4901 |
|
|
|
4902 |
|
|
// Test function for k=0.0000000000000000, nu=0.29999999999999999.
|
4903 |
|
|
template <typename Tp>
|
4904 |
|
|
void test094()
|
4905 |
|
|
{
|
4906 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4907 |
|
|
Tp max_abs_diff = -Tp(1);
|
4908 |
|
|
Tp max_abs_frac = -Tp(1);
|
4909 |
|
|
unsigned int num_datum = sizeof(data094)
|
4910 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4911 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4912 |
|
|
{
|
4913 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data094[i].k), Tp(data094[i].nu),
|
4914 |
|
|
Tp(data094[i].phi));
|
4915 |
|
|
const Tp f0 = data094[i].f0;
|
4916 |
|
|
const Tp diff = f - f0;
|
4917 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4918 |
|
|
max_abs_diff = std::abs(diff);
|
4919 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4920 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4921 |
|
|
{
|
4922 |
|
|
const Tp frac = diff / f0;
|
4923 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4924 |
|
|
max_abs_frac = std::abs(frac);
|
4925 |
|
|
}
|
4926 |
|
|
}
|
4927 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4928 |
|
|
}
|
4929 |
|
|
|
4930 |
|
|
// Test data for k=0.0000000000000000, nu=0.40000000000000002.
|
4931 |
|
|
testcase_ellint_3<double> data095[] = {
|
4932 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.40000000000000002,
|
4933 |
|
|
0.0000000000000000 },
|
4934 |
|
|
{ 0.17383341868035865, 0.0000000000000000, 0.40000000000000002,
|
4935 |
|
|
0.17453292519943295 },
|
4936 |
|
|
{ 0.34368286022299821, 0.0000000000000000, 0.40000000000000002,
|
4937 |
|
|
0.34906585039886590 },
|
4938 |
|
|
{ 0.50651268947499406, 0.0000000000000000, 0.40000000000000002,
|
4939 |
|
|
0.52359877559829882 },
|
4940 |
|
|
{ 0.66074441806097550, 0.0000000000000000, 0.40000000000000002,
|
4941 |
|
|
0.69813170079773179 },
|
4942 |
|
|
{ 0.80622931670113485, 0.0000000000000000, 0.40000000000000002,
|
4943 |
|
|
0.87266462599716477 },
|
4944 |
|
|
{ 0.94389791565435233, 0.0000000000000000, 0.40000000000000002,
|
4945 |
|
|
1.0471975511965976 },
|
4946 |
|
|
{ 1.0753503387899728, 0.0000000000000000, 0.40000000000000002,
|
4947 |
|
|
1.2217304763960306 },
|
4948 |
|
|
{ 1.2025374759127518, 0.0000000000000000, 0.40000000000000002,
|
4949 |
|
|
1.3962634015954636 },
|
4950 |
|
|
{ 1.3275651989026322, 0.0000000000000000, 0.40000000000000002,
|
4951 |
|
|
1.5707963267948966 },
|
4952 |
|
|
};
|
4953 |
|
|
|
4954 |
|
|
// Test function for k=0.0000000000000000, nu=0.40000000000000002.
|
4955 |
|
|
template <typename Tp>
|
4956 |
|
|
void test095()
|
4957 |
|
|
{
|
4958 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
4959 |
|
|
Tp max_abs_diff = -Tp(1);
|
4960 |
|
|
Tp max_abs_frac = -Tp(1);
|
4961 |
|
|
unsigned int num_datum = sizeof(data095)
|
4962 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
4963 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
4964 |
|
|
{
|
4965 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data095[i].k), Tp(data095[i].nu),
|
4966 |
|
|
Tp(data095[i].phi));
|
4967 |
|
|
const Tp f0 = data095[i].f0;
|
4968 |
|
|
const Tp diff = f - f0;
|
4969 |
|
|
if (std::abs(diff) > max_abs_diff)
|
4970 |
|
|
max_abs_diff = std::abs(diff);
|
4971 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
4972 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
4973 |
|
|
{
|
4974 |
|
|
const Tp frac = diff / f0;
|
4975 |
|
|
if (std::abs(frac) > max_abs_frac)
|
4976 |
|
|
max_abs_frac = std::abs(frac);
|
4977 |
|
|
}
|
4978 |
|
|
}
|
4979 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
4980 |
|
|
}
|
4981 |
|
|
|
4982 |
|
|
// Test data for k=0.0000000000000000, nu=0.50000000000000000.
|
4983 |
|
|
testcase_ellint_3<double> data096[] = {
|
4984 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.50000000000000000,
|
4985 |
|
|
0.0000000000000000 },
|
4986 |
|
|
{ 0.17366010776037047, 0.0000000000000000, 0.50000000000000000,
|
4987 |
|
|
0.17453292519943295 },
|
4988 |
|
|
{ 0.34238253799539309, 0.0000000000000000, 0.50000000000000000,
|
4989 |
|
|
0.34906585039886590 },
|
4990 |
|
|
{ 0.50253707775976408, 0.0000000000000000, 0.50000000000000000,
|
4991 |
|
|
0.52359877559829882 },
|
4992 |
|
|
{ 0.65242145347295766, 0.0000000000000000, 0.50000000000000000,
|
4993 |
|
|
0.69813170079773179 },
|
4994 |
|
|
{ 0.79210420018698058, 0.0000000000000000, 0.50000000000000000,
|
4995 |
|
|
0.87266462599716477 },
|
4996 |
|
|
{ 0.92287437995632193, 0.0000000000000000, 0.50000000000000000,
|
4997 |
|
|
1.0471975511965976 },
|
4998 |
|
|
{ 1.0466900550798661, 0.0000000000000000, 0.50000000000000000,
|
4999 |
|
|
1.2217304763960306 },
|
5000 |
|
|
{ 1.1658007366618623, 0.0000000000000000, 0.50000000000000000,
|
5001 |
|
|
1.3962634015954636 },
|
5002 |
|
|
{ 1.2825498301618641, 0.0000000000000000, 0.50000000000000000,
|
5003 |
|
|
1.5707963267948966 },
|
5004 |
|
|
};
|
5005 |
|
|
|
5006 |
|
|
// Test function for k=0.0000000000000000, nu=0.50000000000000000.
|
5007 |
|
|
template <typename Tp>
|
5008 |
|
|
void test096()
|
5009 |
|
|
{
|
5010 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5011 |
|
|
Tp max_abs_diff = -Tp(1);
|
5012 |
|
|
Tp max_abs_frac = -Tp(1);
|
5013 |
|
|
unsigned int num_datum = sizeof(data096)
|
5014 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5015 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5016 |
|
|
{
|
5017 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data096[i].k), Tp(data096[i].nu),
|
5018 |
|
|
Tp(data096[i].phi));
|
5019 |
|
|
const Tp f0 = data096[i].f0;
|
5020 |
|
|
const Tp diff = f - f0;
|
5021 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5022 |
|
|
max_abs_diff = std::abs(diff);
|
5023 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5024 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5025 |
|
|
{
|
5026 |
|
|
const Tp frac = diff / f0;
|
5027 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5028 |
|
|
max_abs_frac = std::abs(frac);
|
5029 |
|
|
}
|
5030 |
|
|
}
|
5031 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5032 |
|
|
}
|
5033 |
|
|
|
5034 |
|
|
// Test data for k=0.0000000000000000, nu=0.59999999999999998.
|
5035 |
|
|
testcase_ellint_3<double> data097[] = {
|
5036 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.59999999999999998,
|
5037 |
|
|
0.0000000000000000 },
|
5038 |
|
|
{ 0.17348741514884702, 0.0000000000000000, 0.59999999999999998,
|
5039 |
|
|
0.17453292519943295 },
|
5040 |
|
|
{ 0.34109952405241289, 0.0000000000000000, 0.59999999999999998,
|
5041 |
|
|
0.34906585039886590 },
|
5042 |
|
|
{ 0.49866850781226296, 0.0000000000000000, 0.59999999999999998,
|
5043 |
|
|
0.52359877559829882 },
|
5044 |
|
|
{ 0.64444732407062510, 0.0000000000000000, 0.59999999999999998,
|
5045 |
|
|
0.69813170079773179 },
|
5046 |
|
|
{ 0.77877564686544720, 0.0000000000000000, 0.59999999999999998,
|
5047 |
|
|
0.87266462599716477 },
|
5048 |
|
|
{ 0.90330743691883497, 0.0000000000000000, 0.59999999999999998,
|
5049 |
|
|
1.0471975511965976 },
|
5050 |
|
|
{ 1.0203257987604104, 0.0000000000000000, 0.59999999999999998,
|
5051 |
|
|
1.2217304763960306 },
|
5052 |
|
|
{ 1.1323247918768631, 0.0000000000000000, 0.59999999999999998,
|
5053 |
|
|
1.3962634015954636 },
|
5054 |
|
|
{ 1.2418235332245127, 0.0000000000000000, 0.59999999999999998,
|
5055 |
|
|
1.5707963267948966 },
|
5056 |
|
|
};
|
5057 |
|
|
|
5058 |
|
|
// Test function for k=0.0000000000000000, nu=0.59999999999999998.
|
5059 |
|
|
template <typename Tp>
|
5060 |
|
|
void test097()
|
5061 |
|
|
{
|
5062 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5063 |
|
|
Tp max_abs_diff = -Tp(1);
|
5064 |
|
|
Tp max_abs_frac = -Tp(1);
|
5065 |
|
|
unsigned int num_datum = sizeof(data097)
|
5066 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5067 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5068 |
|
|
{
|
5069 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data097[i].k), Tp(data097[i].nu),
|
5070 |
|
|
Tp(data097[i].phi));
|
5071 |
|
|
const Tp f0 = data097[i].f0;
|
5072 |
|
|
const Tp diff = f - f0;
|
5073 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5074 |
|
|
max_abs_diff = std::abs(diff);
|
5075 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5076 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5077 |
|
|
{
|
5078 |
|
|
const Tp frac = diff / f0;
|
5079 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5080 |
|
|
max_abs_frac = std::abs(frac);
|
5081 |
|
|
}
|
5082 |
|
|
}
|
5083 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5084 |
|
|
}
|
5085 |
|
|
|
5086 |
|
|
// Test data for k=0.0000000000000000, nu=0.69999999999999996.
|
5087 |
|
|
testcase_ellint_3<double> data098[] = {
|
5088 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.69999999999999996,
|
5089 |
|
|
0.0000000000000000 },
|
5090 |
|
|
{ 0.17331533692234477, 0.0000000000000000, 0.69999999999999996,
|
5091 |
|
|
0.17453292519943295 },
|
5092 |
|
|
{ 0.33983341309265941, 0.0000000000000000, 0.69999999999999996,
|
5093 |
|
|
0.34906585039886590 },
|
5094 |
|
|
{ 0.49490198805931990, 0.0000000000000000, 0.69999999999999996,
|
5095 |
|
|
0.52359877559829882 },
|
5096 |
|
|
{ 0.63679715525145308, 0.0000000000000000, 0.69999999999999996,
|
5097 |
|
|
0.69813170079773179 },
|
5098 |
|
|
{ 0.76616861049481944, 0.0000000000000000, 0.69999999999999996,
|
5099 |
|
|
0.87266462599716477 },
|
5100 |
|
|
{ 0.88503143209004220, 0.0000000000000000, 0.69999999999999996,
|
5101 |
|
|
1.0471975511965976 },
|
5102 |
|
|
{ 0.99596060249112173, 0.0000000000000000, 0.69999999999999996,
|
5103 |
|
|
1.2217304763960306 },
|
5104 |
|
|
{ 1.1016495050260424, 0.0000000000000000, 0.69999999999999996,
|
5105 |
|
|
1.3962634015954636 },
|
5106 |
|
|
{ 1.2047457872617382, 0.0000000000000000, 0.69999999999999996,
|
5107 |
|
|
1.5707963267948966 },
|
5108 |
|
|
};
|
5109 |
|
|
|
5110 |
|
|
// Test function for k=0.0000000000000000, nu=0.69999999999999996.
|
5111 |
|
|
template <typename Tp>
|
5112 |
|
|
void test098()
|
5113 |
|
|
{
|
5114 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5115 |
|
|
Tp max_abs_diff = -Tp(1);
|
5116 |
|
|
Tp max_abs_frac = -Tp(1);
|
5117 |
|
|
unsigned int num_datum = sizeof(data098)
|
5118 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5119 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5120 |
|
|
{
|
5121 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data098[i].k), Tp(data098[i].nu),
|
5122 |
|
|
Tp(data098[i].phi));
|
5123 |
|
|
const Tp f0 = data098[i].f0;
|
5124 |
|
|
const Tp diff = f - f0;
|
5125 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5126 |
|
|
max_abs_diff = std::abs(diff);
|
5127 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5128 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5129 |
|
|
{
|
5130 |
|
|
const Tp frac = diff / f0;
|
5131 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5132 |
|
|
max_abs_frac = std::abs(frac);
|
5133 |
|
|
}
|
5134 |
|
|
}
|
5135 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5136 |
|
|
}
|
5137 |
|
|
|
5138 |
|
|
// Test data for k=0.0000000000000000, nu=0.80000000000000004.
|
5139 |
|
|
testcase_ellint_3<double> data099[] = {
|
5140 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.80000000000000004,
|
5141 |
|
|
0.0000000000000000 },
|
5142 |
|
|
{ 0.17314386919344213, 0.0000000000000000, 0.80000000000000004,
|
5143 |
|
|
0.17453292519943295 },
|
5144 |
|
|
{ 0.33858381342073240, 0.0000000000000000, 0.80000000000000004,
|
5145 |
|
|
0.34906585039886590 },
|
5146 |
|
|
{ 0.49123285640844738, 0.0000000000000000, 0.80000000000000004,
|
5147 |
|
|
0.52359877559829882 },
|
5148 |
|
|
{ 0.62944854858904520, 0.0000000000000000, 0.80000000000000004,
|
5149 |
|
|
0.69813170079773179 },
|
5150 |
|
|
{ 0.75421778305499343, 0.0000000000000000, 0.80000000000000004,
|
5151 |
|
|
0.87266462599716477 },
|
5152 |
|
|
{ 0.86790634112156639, 0.0000000000000000, 0.80000000000000004,
|
5153 |
|
|
1.0471975511965976 },
|
5154 |
|
|
{ 0.97334918087427558, 0.0000000000000000, 0.80000000000000004,
|
5155 |
|
|
1.2217304763960306 },
|
5156 |
|
|
{ 1.0734012615283985, 0.0000000000000000, 0.80000000000000004,
|
5157 |
|
|
1.3962634015954636 },
|
5158 |
|
|
{ 1.1708024551734544, 0.0000000000000000, 0.80000000000000004,
|
5159 |
|
|
1.5707963267948966 },
|
5160 |
|
|
};
|
5161 |
|
|
|
5162 |
|
|
// Test function for k=0.0000000000000000, nu=0.80000000000000004.
|
5163 |
|
|
template <typename Tp>
|
5164 |
|
|
void test099()
|
5165 |
|
|
{
|
5166 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5167 |
|
|
Tp max_abs_diff = -Tp(1);
|
5168 |
|
|
Tp max_abs_frac = -Tp(1);
|
5169 |
|
|
unsigned int num_datum = sizeof(data099)
|
5170 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5171 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5172 |
|
|
{
|
5173 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data099[i].k), Tp(data099[i].nu),
|
5174 |
|
|
Tp(data099[i].phi));
|
5175 |
|
|
const Tp f0 = data099[i].f0;
|
5176 |
|
|
const Tp diff = f - f0;
|
5177 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5178 |
|
|
max_abs_diff = std::abs(diff);
|
5179 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5180 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5181 |
|
|
{
|
5182 |
|
|
const Tp frac = diff / f0;
|
5183 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5184 |
|
|
max_abs_frac = std::abs(frac);
|
5185 |
|
|
}
|
5186 |
|
|
}
|
5187 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5188 |
|
|
}
|
5189 |
|
|
|
5190 |
|
|
// Test data for k=0.0000000000000000, nu=0.90000000000000002.
|
5191 |
|
|
testcase_ellint_3<double> data100[] = {
|
5192 |
|
|
{ -0.0000000000000000, 0.0000000000000000, 0.90000000000000002,
|
5193 |
|
|
0.0000000000000000 },
|
5194 |
|
|
{ 0.17297300811030600, 0.0000000000000000, 0.90000000000000002,
|
5195 |
|
|
0.17453292519943295 },
|
5196 |
|
|
{ 0.33735034635360817, 0.0000000000000000, 0.90000000000000002,
|
5197 |
|
|
0.34906585039886590 },
|
5198 |
|
|
{ 0.48765675230233141, 0.0000000000000000, 0.90000000000000002,
|
5199 |
|
|
0.52359877559829882 },
|
5200 |
|
|
{ 0.62238126886123568, 0.0000000000000000, 0.90000000000000002,
|
5201 |
|
|
0.69813170079773179 },
|
5202 |
|
|
{ 0.74286600807269243, 0.0000000000000000, 0.90000000000000002,
|
5203 |
|
|
0.87266462599716477 },
|
5204 |
|
|
{ 0.85181283909264971, 0.0000000000000000, 0.90000000000000002,
|
5205 |
|
|
1.0471975511965976 },
|
5206 |
|
|
{ 0.95228683995371122, 0.0000000000000000, 0.90000000000000002,
|
5207 |
|
|
1.2217304763960306 },
|
5208 |
|
|
{ 1.0472730487412552, 0.0000000000000000, 0.90000000000000002,
|
5209 |
|
|
1.3962634015954636 },
|
5210 |
|
|
{ 1.1395754288497419, 0.0000000000000000, 0.90000000000000002,
|
5211 |
|
|
1.5707963267948966 },
|
5212 |
|
|
};
|
5213 |
|
|
|
5214 |
|
|
// Test function for k=0.0000000000000000, nu=0.90000000000000002.
|
5215 |
|
|
template <typename Tp>
|
5216 |
|
|
void test100()
|
5217 |
|
|
{
|
5218 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5219 |
|
|
Tp max_abs_diff = -Tp(1);
|
5220 |
|
|
Tp max_abs_frac = -Tp(1);
|
5221 |
|
|
unsigned int num_datum = sizeof(data100)
|
5222 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5223 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5224 |
|
|
{
|
5225 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data100[i].k), Tp(data100[i].nu),
|
5226 |
|
|
Tp(data100[i].phi));
|
5227 |
|
|
const Tp f0 = data100[i].f0;
|
5228 |
|
|
const Tp diff = f - f0;
|
5229 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5230 |
|
|
max_abs_diff = std::abs(diff);
|
5231 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5232 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5233 |
|
|
{
|
5234 |
|
|
const Tp frac = diff / f0;
|
5235 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5236 |
|
|
max_abs_frac = std::abs(frac);
|
5237 |
|
|
}
|
5238 |
|
|
}
|
5239 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5240 |
|
|
}
|
5241 |
|
|
|
5242 |
|
|
// Test data for k=0.10000000000000009, nu=0.0000000000000000.
|
5243 |
|
|
testcase_ellint_3<double> data101[] = {
|
5244 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.0000000000000000,
|
5245 |
|
|
0.0000000000000000 },
|
5246 |
|
|
{ 0.17454173353063665, 0.10000000000000009, 0.0000000000000000,
|
5247 |
|
|
0.17453292519943295 },
|
5248 |
|
|
{ 0.34913506721468085, 0.10000000000000009, 0.0000000000000000,
|
5249 |
|
|
0.34906585039886590 },
|
5250 |
|
|
{ 0.52382550016538953, 0.10000000000000009, 0.0000000000000000,
|
5251 |
|
|
0.52359877559829882 },
|
5252 |
|
|
{ 0.69864700854177031, 0.10000000000000009, 0.0000000000000000,
|
5253 |
|
|
0.69813170079773179 },
|
5254 |
|
|
{ 0.87361792586964870, 0.10000000000000009, 0.0000000000000000,
|
5255 |
|
|
0.87266462599716477 },
|
5256 |
|
|
{ 1.0487386319621685, 0.10000000000000009, 0.0000000000000000,
|
5257 |
|
|
1.0471975511965976 },
|
5258 |
|
|
{ 1.2239913752078757, 0.10000000000000009, 0.0000000000000000,
|
5259 |
|
|
1.2217304763960306 },
|
5260 |
|
|
{ 1.3993423113684049, 0.10000000000000009, 0.0000000000000000,
|
5261 |
|
|
1.3962634015954636 },
|
5262 |
|
|
{ 1.5747455615173562, 0.10000000000000009, 0.0000000000000000,
|
5263 |
|
|
1.5707963267948966 },
|
5264 |
|
|
};
|
5265 |
|
|
|
5266 |
|
|
// Test function for k=0.10000000000000009, nu=0.0000000000000000.
|
5267 |
|
|
template <typename Tp>
|
5268 |
|
|
void test101()
|
5269 |
|
|
{
|
5270 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5271 |
|
|
Tp max_abs_diff = -Tp(1);
|
5272 |
|
|
Tp max_abs_frac = -Tp(1);
|
5273 |
|
|
unsigned int num_datum = sizeof(data101)
|
5274 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5275 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5276 |
|
|
{
|
5277 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data101[i].k), Tp(data101[i].nu),
|
5278 |
|
|
Tp(data101[i].phi));
|
5279 |
|
|
const Tp f0 = data101[i].f0;
|
5280 |
|
|
const Tp diff = f - f0;
|
5281 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5282 |
|
|
max_abs_diff = std::abs(diff);
|
5283 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5284 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5285 |
|
|
{
|
5286 |
|
|
const Tp frac = diff / f0;
|
5287 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5288 |
|
|
max_abs_frac = std::abs(frac);
|
5289 |
|
|
}
|
5290 |
|
|
}
|
5291 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5292 |
|
|
}
|
5293 |
|
|
|
5294 |
|
|
// Test data for k=0.10000000000000009, nu=0.10000000000000001.
|
5295 |
|
|
testcase_ellint_3<double> data102[] = {
|
5296 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.10000000000000001,
|
5297 |
|
|
0.0000000000000000 },
|
5298 |
|
|
{ 0.17436589347616618, 0.10000000000000009, 0.10000000000000001,
|
5299 |
|
|
0.17453292519943295 },
|
5300 |
|
|
{ 0.34776067871237354, 0.10000000000000009, 0.10000000000000001,
|
5301 |
|
|
0.34906585039886590 },
|
5302 |
|
|
{ 0.51936064354727807, 0.10000000000000009, 0.10000000000000001,
|
5303 |
|
|
0.52359877559829882 },
|
5304 |
|
|
{ 0.68860303749364360, 0.10000000000000009, 0.10000000000000001,
|
5305 |
|
|
0.69813170079773179 },
|
5306 |
|
|
{ 0.85524561882332051, 0.10000000000000009, 0.10000000000000001,
|
5307 |
|
|
0.87266462599716477 },
|
5308 |
|
|
{ 1.0193708301908337, 0.10000000000000009, 0.10000000000000001,
|
5309 |
|
|
1.0471975511965976 },
|
5310 |
|
|
{ 1.1813474067123044, 0.10000000000000009, 0.10000000000000001,
|
5311 |
|
|
1.2217304763960306 },
|
5312 |
|
|
{ 1.3417670770424983, 0.10000000000000009, 0.10000000000000001,
|
5313 |
|
|
1.3962634015954636 },
|
5314 |
|
|
{ 1.5013711111199950, 0.10000000000000009, 0.10000000000000001,
|
5315 |
|
|
1.5707963267948966 },
|
5316 |
|
|
};
|
5317 |
|
|
|
5318 |
|
|
// Test function for k=0.10000000000000009, nu=0.10000000000000001.
|
5319 |
|
|
template <typename Tp>
|
5320 |
|
|
void test102()
|
5321 |
|
|
{
|
5322 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5323 |
|
|
Tp max_abs_diff = -Tp(1);
|
5324 |
|
|
Tp max_abs_frac = -Tp(1);
|
5325 |
|
|
unsigned int num_datum = sizeof(data102)
|
5326 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5327 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5328 |
|
|
{
|
5329 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data102[i].k), Tp(data102[i].nu),
|
5330 |
|
|
Tp(data102[i].phi));
|
5331 |
|
|
const Tp f0 = data102[i].f0;
|
5332 |
|
|
const Tp diff = f - f0;
|
5333 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5334 |
|
|
max_abs_diff = std::abs(diff);
|
5335 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5336 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5337 |
|
|
{
|
5338 |
|
|
const Tp frac = diff / f0;
|
5339 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5340 |
|
|
max_abs_frac = std::abs(frac);
|
5341 |
|
|
}
|
5342 |
|
|
}
|
5343 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5344 |
|
|
}
|
5345 |
|
|
|
5346 |
|
|
// Test data for k=0.10000000000000009, nu=0.20000000000000001.
|
5347 |
|
|
testcase_ellint_3<double> data103[] = {
|
5348 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.20000000000000001,
|
5349 |
|
|
0.0000000000000000 },
|
5350 |
|
|
{ 0.17419068786141345, 0.10000000000000009, 0.20000000000000001,
|
5351 |
|
|
0.17453292519943295 },
|
5352 |
|
|
{ 0.34640537686230127, 0.10000000000000009, 0.20000000000000001,
|
5353 |
|
|
0.34906585039886590 },
|
5354 |
|
|
{ 0.51502689171753957, 0.10000000000000009, 0.20000000000000001,
|
5355 |
|
|
0.52359877559829882 },
|
5356 |
|
|
{ 0.67904147863672726, 0.10000000000000009, 0.20000000000000001,
|
5357 |
|
|
0.69813170079773179 },
|
5358 |
|
|
{ 0.83811885126105179, 0.10000000000000009, 0.20000000000000001,
|
5359 |
|
|
0.87266462599716477 },
|
5360 |
|
|
{ 0.99255278555742810, 0.10000000000000009, 0.20000000000000001,
|
5361 |
|
|
1.0471975511965976 },
|
5362 |
|
|
{ 1.1431260546194930, 0.10000000000000009, 0.20000000000000001,
|
5363 |
|
|
1.2217304763960306 },
|
5364 |
|
|
{ 1.2909589656532101, 0.10000000000000009, 0.20000000000000001,
|
5365 |
|
|
1.3962634015954636 },
|
5366 |
|
|
{ 1.4373749386463430, 0.10000000000000009, 0.20000000000000001,
|
5367 |
|
|
1.5707963267948966 },
|
5368 |
|
|
};
|
5369 |
|
|
|
5370 |
|
|
// Test function for k=0.10000000000000009, nu=0.20000000000000001.
|
5371 |
|
|
template <typename Tp>
|
5372 |
|
|
void test103()
|
5373 |
|
|
{
|
5374 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5375 |
|
|
Tp max_abs_diff = -Tp(1);
|
5376 |
|
|
Tp max_abs_frac = -Tp(1);
|
5377 |
|
|
unsigned int num_datum = sizeof(data103)
|
5378 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5379 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5380 |
|
|
{
|
5381 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data103[i].k), Tp(data103[i].nu),
|
5382 |
|
|
Tp(data103[i].phi));
|
5383 |
|
|
const Tp f0 = data103[i].f0;
|
5384 |
|
|
const Tp diff = f - f0;
|
5385 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5386 |
|
|
max_abs_diff = std::abs(diff);
|
5387 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5388 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5389 |
|
|
{
|
5390 |
|
|
const Tp frac = diff / f0;
|
5391 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5392 |
|
|
max_abs_frac = std::abs(frac);
|
5393 |
|
|
}
|
5394 |
|
|
}
|
5395 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5396 |
|
|
}
|
5397 |
|
|
|
5398 |
|
|
// Test data for k=0.10000000000000009, nu=0.29999999999999999.
|
5399 |
|
|
testcase_ellint_3<double> data104[] = {
|
5400 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.29999999999999999,
|
5401 |
|
|
0.0000000000000000 },
|
5402 |
|
|
{ 0.17401611261390110, 0.10000000000000009, 0.29999999999999999,
|
5403 |
|
|
0.17453292519943295 },
|
5404 |
|
|
{ 0.34506869507511767, 0.10000000000000009, 0.29999999999999999,
|
5405 |
|
|
0.34906585039886590 },
|
5406 |
|
|
{ 0.51081757604259870, 0.10000000000000009, 0.29999999999999999,
|
5407 |
|
|
0.52359877559829882 },
|
5408 |
|
|
{ 0.66992297597712303, 0.10000000000000009, 0.29999999999999999,
|
5409 |
|
|
0.69813170079773179 },
|
5410 |
|
|
{ 0.82209722856174228, 0.10000000000000009, 0.29999999999999999,
|
5411 |
|
|
0.87266462599716477 },
|
5412 |
|
|
{ 0.96792430487669612, 0.10000000000000009, 0.29999999999999999,
|
5413 |
|
|
1.0471975511965976 },
|
5414 |
|
|
{ 1.1085964108954092, 0.10000000000000009, 0.29999999999999999,
|
5415 |
|
|
1.2217304763960306 },
|
5416 |
|
|
{ 1.2456748370836999, 0.10000000000000009, 0.29999999999999999,
|
5417 |
|
|
1.3962634015954636 },
|
5418 |
|
|
{ 1.3809159606704959, 0.10000000000000009, 0.29999999999999999,
|
5419 |
|
|
1.5707963267948966 },
|
5420 |
|
|
};
|
5421 |
|
|
|
5422 |
|
|
// Test function for k=0.10000000000000009, nu=0.29999999999999999.
|
5423 |
|
|
template <typename Tp>
|
5424 |
|
|
void test104()
|
5425 |
|
|
{
|
5426 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5427 |
|
|
Tp max_abs_diff = -Tp(1);
|
5428 |
|
|
Tp max_abs_frac = -Tp(1);
|
5429 |
|
|
unsigned int num_datum = sizeof(data104)
|
5430 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5431 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5432 |
|
|
{
|
5433 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data104[i].k), Tp(data104[i].nu),
|
5434 |
|
|
Tp(data104[i].phi));
|
5435 |
|
|
const Tp f0 = data104[i].f0;
|
5436 |
|
|
const Tp diff = f - f0;
|
5437 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5438 |
|
|
max_abs_diff = std::abs(diff);
|
5439 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5440 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5441 |
|
|
{
|
5442 |
|
|
const Tp frac = diff / f0;
|
5443 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5444 |
|
|
max_abs_frac = std::abs(frac);
|
5445 |
|
|
}
|
5446 |
|
|
}
|
5447 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5448 |
|
|
}
|
5449 |
|
|
|
5450 |
|
|
// Test data for k=0.10000000000000009, nu=0.40000000000000002.
|
5451 |
|
|
testcase_ellint_3<double> data105[] = {
|
5452 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.40000000000000002,
|
5453 |
|
|
0.0000000000000000 },
|
5454 |
|
|
{ 0.17384216369897937, 0.10000000000000009, 0.40000000000000002,
|
5455 |
|
|
0.17453292519943295 },
|
5456 |
|
|
{ 0.34375018311376782, 0.10000000000000009, 0.40000000000000002,
|
5457 |
|
|
0.34906585039886590 },
|
5458 |
|
|
{ 0.50672650758380455, 0.10000000000000009, 0.40000000000000002,
|
5459 |
|
|
0.52359877559829882 },
|
5460 |
|
|
{ 0.66121264213337616, 0.10000000000000009, 0.40000000000000002,
|
5461 |
|
|
0.69813170079773179 },
|
5462 |
|
|
{ 0.80706202005774441, 0.10000000000000009, 0.40000000000000002,
|
5463 |
|
|
0.87266462599716477 },
|
5464 |
|
|
{ 0.94519376138245892, 0.10000000000000009, 0.40000000000000002,
|
5465 |
|
|
1.0471975511965976 },
|
5466 |
|
|
{ 1.0771880300759584, 0.10000000000000009, 0.40000000000000002,
|
5467 |
|
|
1.2217304763960306 },
|
5468 |
|
|
{ 1.2049711557188272, 0.10000000000000009, 0.40000000000000002,
|
5469 |
|
|
1.3962634015954636 },
|
5470 |
|
|
{ 1.3306223265207477, 0.10000000000000009, 0.40000000000000002,
|
5471 |
|
|
1.5707963267948966 },
|
5472 |
|
|
};
|
5473 |
|
|
|
5474 |
|
|
// Test function for k=0.10000000000000009, nu=0.40000000000000002.
|
5475 |
|
|
template <typename Tp>
|
5476 |
|
|
void test105()
|
5477 |
|
|
{
|
5478 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5479 |
|
|
Tp max_abs_diff = -Tp(1);
|
5480 |
|
|
Tp max_abs_frac = -Tp(1);
|
5481 |
|
|
unsigned int num_datum = sizeof(data105)
|
5482 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5483 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5484 |
|
|
{
|
5485 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data105[i].k), Tp(data105[i].nu),
|
5486 |
|
|
Tp(data105[i].phi));
|
5487 |
|
|
const Tp f0 = data105[i].f0;
|
5488 |
|
|
const Tp diff = f - f0;
|
5489 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5490 |
|
|
max_abs_diff = std::abs(diff);
|
5491 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5492 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5493 |
|
|
{
|
5494 |
|
|
const Tp frac = diff / f0;
|
5495 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5496 |
|
|
max_abs_frac = std::abs(frac);
|
5497 |
|
|
}
|
5498 |
|
|
}
|
5499 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5500 |
|
|
}
|
5501 |
|
|
|
5502 |
|
|
// Test data for k=0.10000000000000009, nu=0.50000000000000000.
|
5503 |
|
|
testcase_ellint_3<double> data106[] = {
|
5504 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.50000000000000000,
|
5505 |
|
|
0.0000000000000000 },
|
5506 |
|
|
{ 0.17366883711936554, 0.10000000000000009, 0.50000000000000000,
|
5507 |
|
|
0.17453292519943295 },
|
5508 |
|
|
{ 0.34244940634881876, 0.10000000000000009, 0.50000000000000000,
|
5509 |
|
|
0.34906585039886590 },
|
5510 |
|
|
{ 0.50274793281634378, 0.10000000000000009, 0.50000000000000000,
|
5511 |
|
|
0.52359877559829882 },
|
5512 |
|
|
{ 0.65287941633275093, 0.10000000000000009, 0.50000000000000000,
|
5513 |
|
|
0.69813170079773179 },
|
5514 |
|
|
{ 0.79291198790315398, 0.10000000000000009, 0.50000000000000000,
|
5515 |
|
|
0.87266462599716477 },
|
5516 |
|
|
{ 0.92412201537880345, 0.10000000000000009, 0.50000000000000000,
|
5517 |
|
|
1.0471975511965976 },
|
5518 |
|
|
{ 1.0484480076799370, 0.10000000000000009, 0.50000000000000000,
|
5519 |
|
|
1.2217304763960306 },
|
5520 |
|
|
{ 1.1681168130475206, 0.10000000000000009, 0.50000000000000000,
|
5521 |
|
|
1.3962634015954636 },
|
5522 |
|
|
{ 1.2854480708580160, 0.10000000000000009, 0.50000000000000000,
|
5523 |
|
|
1.5707963267948966 },
|
5524 |
|
|
};
|
5525 |
|
|
|
5526 |
|
|
// Test function for k=0.10000000000000009, nu=0.50000000000000000.
|
5527 |
|
|
template <typename Tp>
|
5528 |
|
|
void test106()
|
5529 |
|
|
{
|
5530 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5531 |
|
|
Tp max_abs_diff = -Tp(1);
|
5532 |
|
|
Tp max_abs_frac = -Tp(1);
|
5533 |
|
|
unsigned int num_datum = sizeof(data106)
|
5534 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5535 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5536 |
|
|
{
|
5537 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data106[i].k), Tp(data106[i].nu),
|
5538 |
|
|
Tp(data106[i].phi));
|
5539 |
|
|
const Tp f0 = data106[i].f0;
|
5540 |
|
|
const Tp diff = f - f0;
|
5541 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5542 |
|
|
max_abs_diff = std::abs(diff);
|
5543 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5544 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5545 |
|
|
{
|
5546 |
|
|
const Tp frac = diff / f0;
|
5547 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5548 |
|
|
max_abs_frac = std::abs(frac);
|
5549 |
|
|
}
|
5550 |
|
|
}
|
5551 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5552 |
|
|
}
|
5553 |
|
|
|
5554 |
|
|
// Test data for k=0.10000000000000009, nu=0.59999999999999998.
|
5555 |
|
|
testcase_ellint_3<double> data107[] = {
|
5556 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.59999999999999998,
|
5557 |
|
|
0.0000000000000000 },
|
5558 |
|
|
{ 0.17349612891469018, 0.10000000000000009, 0.59999999999999998,
|
5559 |
|
|
0.17453292519943295 },
|
5560 |
|
|
{ 0.34116594505539438, 0.10000000000000009, 0.59999999999999998,
|
5561 |
|
|
0.34906585039886590 },
|
5562 |
|
|
{ 0.49887649430466685, 0.10000000000000009, 0.59999999999999998,
|
5563 |
|
|
0.52359877559829882 },
|
5564 |
|
|
{ 0.64489553282165157, 0.10000000000000009, 0.59999999999999998,
|
5565 |
|
|
0.69813170079773179 },
|
5566 |
|
|
{ 0.77956016553782437, 0.10000000000000009, 0.59999999999999998,
|
5567 |
|
|
0.87266462599716477 },
|
5568 |
|
|
{ 0.90451074530096309, 0.10000000000000009, 0.59999999999999998,
|
5569 |
|
|
1.0471975511965976 },
|
5570 |
|
|
{ 1.0220113666961632, 0.10000000000000009, 0.59999999999999998,
|
5571 |
|
|
1.2217304763960306 },
|
5572 |
|
|
{ 1.1345351441065563, 0.10000000000000009, 0.59999999999999998,
|
5573 |
|
|
1.3962634015954636 },
|
5574 |
|
|
{ 1.2445798942989255, 0.10000000000000009, 0.59999999999999998,
|
5575 |
|
|
1.5707963267948966 },
|
5576 |
|
|
};
|
5577 |
|
|
|
5578 |
|
|
// Test function for k=0.10000000000000009, nu=0.59999999999999998.
|
5579 |
|
|
template <typename Tp>
|
5580 |
|
|
void test107()
|
5581 |
|
|
{
|
5582 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5583 |
|
|
Tp max_abs_diff = -Tp(1);
|
5584 |
|
|
Tp max_abs_frac = -Tp(1);
|
5585 |
|
|
unsigned int num_datum = sizeof(data107)
|
5586 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5587 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5588 |
|
|
{
|
5589 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data107[i].k), Tp(data107[i].nu),
|
5590 |
|
|
Tp(data107[i].phi));
|
5591 |
|
|
const Tp f0 = data107[i].f0;
|
5592 |
|
|
const Tp diff = f - f0;
|
5593 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5594 |
|
|
max_abs_diff = std::abs(diff);
|
5595 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5596 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5597 |
|
|
{
|
5598 |
|
|
const Tp frac = diff / f0;
|
5599 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5600 |
|
|
max_abs_frac = std::abs(frac);
|
5601 |
|
|
}
|
5602 |
|
|
}
|
5603 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5604 |
|
|
}
|
5605 |
|
|
|
5606 |
|
|
// Test data for k=0.10000000000000009, nu=0.69999999999999996.
|
5607 |
|
|
testcase_ellint_3<double> data108[] = {
|
5608 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.69999999999999996,
|
5609 |
|
|
0.0000000000000000 },
|
5610 |
|
|
{ 0.17332403516105052, 0.10000000000000009, 0.69999999999999996,
|
5611 |
|
|
0.17453292519943295 },
|
5612 |
|
|
{ 0.33989939374896877, 0.10000000000000009, 0.69999999999999996,
|
5613 |
|
|
0.34906585039886590 },
|
5614 |
|
|
{ 0.49510719568614081, 0.10000000000000009, 0.69999999999999996,
|
5615 |
|
|
0.52359877559829882 },
|
5616 |
|
|
{ 0.63723607776354974, 0.10000000000000009, 0.69999999999999996,
|
5617 |
|
|
0.69813170079773179 },
|
5618 |
|
|
{ 0.76693133887935327, 0.10000000000000009, 0.69999999999999996,
|
5619 |
|
|
0.87266462599716477 },
|
5620 |
|
|
{ 0.88619382078823827, 0.10000000000000009, 0.69999999999999996,
|
5621 |
|
|
1.0471975511965976 },
|
5622 |
|
|
{ 0.99758012018676490, 0.10000000000000009, 0.69999999999999996,
|
5623 |
|
|
1.2217304763960306 },
|
5624 |
|
|
{ 1.1037642270814410, 0.10000000000000009, 0.69999999999999996,
|
5625 |
|
|
1.3962634015954636 },
|
5626 |
|
|
{ 1.2073745911083187, 0.10000000000000009, 0.69999999999999996,
|
5627 |
|
|
1.5707963267948966 },
|
5628 |
|
|
};
|
5629 |
|
|
|
5630 |
|
|
// Test function for k=0.10000000000000009, nu=0.69999999999999996.
|
5631 |
|
|
template <typename Tp>
|
5632 |
|
|
void test108()
|
5633 |
|
|
{
|
5634 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5635 |
|
|
Tp max_abs_diff = -Tp(1);
|
5636 |
|
|
Tp max_abs_frac = -Tp(1);
|
5637 |
|
|
unsigned int num_datum = sizeof(data108)
|
5638 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5639 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5640 |
|
|
{
|
5641 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data108[i].k), Tp(data108[i].nu),
|
5642 |
|
|
Tp(data108[i].phi));
|
5643 |
|
|
const Tp f0 = data108[i].f0;
|
5644 |
|
|
const Tp diff = f - f0;
|
5645 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5646 |
|
|
max_abs_diff = std::abs(diff);
|
5647 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5648 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5649 |
|
|
{
|
5650 |
|
|
const Tp frac = diff / f0;
|
5651 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5652 |
|
|
max_abs_frac = std::abs(frac);
|
5653 |
|
|
}
|
5654 |
|
|
}
|
5655 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5656 |
|
|
}
|
5657 |
|
|
|
5658 |
|
|
// Test data for k=0.10000000000000009, nu=0.80000000000000004.
|
5659 |
|
|
testcase_ellint_3<double> data109[] = {
|
5660 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.80000000000000004,
|
5661 |
|
|
0.0000000000000000 },
|
5662 |
|
|
{ 0.17315255197057020, 0.10000000000000009, 0.80000000000000004,
|
5663 |
|
|
0.17453292519943295 },
|
5664 |
|
|
{ 0.33864936055747985, 0.10000000000000009, 0.80000000000000004,
|
5665 |
|
|
0.34906585039886590 },
|
5666 |
|
|
{ 0.49143537041117619, 0.10000000000000009, 0.80000000000000004,
|
5667 |
|
|
0.52359877559829882 },
|
5668 |
|
|
{ 0.62987861760047492, 0.10000000000000009, 0.80000000000000004,
|
5669 |
|
|
0.69813170079773179 },
|
5670 |
|
|
{ 0.75496005490917517, 0.10000000000000009, 0.80000000000000004,
|
5671 |
|
|
0.87266462599716477 },
|
5672 |
|
|
{ 0.86903081862701903, 0.10000000000000009, 0.80000000000000004,
|
5673 |
|
|
1.0471975511965976 },
|
5674 |
|
|
{ 0.97490814820725591, 0.10000000000000009, 0.80000000000000004,
|
5675 |
|
|
1.2217304763960306 },
|
5676 |
|
|
{ 1.0754290107171083, 0.10000000000000009, 0.80000000000000004,
|
5677 |
|
|
1.3962634015954636 },
|
5678 |
|
|
{ 1.1733158866987732, 0.10000000000000009, 0.80000000000000004,
|
5679 |
|
|
1.5707963267948966 },
|
5680 |
|
|
};
|
5681 |
|
|
|
5682 |
|
|
// Test function for k=0.10000000000000009, nu=0.80000000000000004.
|
5683 |
|
|
template <typename Tp>
|
5684 |
|
|
void test109()
|
5685 |
|
|
{
|
5686 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5687 |
|
|
Tp max_abs_diff = -Tp(1);
|
5688 |
|
|
Tp max_abs_frac = -Tp(1);
|
5689 |
|
|
unsigned int num_datum = sizeof(data109)
|
5690 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5691 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5692 |
|
|
{
|
5693 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data109[i].k), Tp(data109[i].nu),
|
5694 |
|
|
Tp(data109[i].phi));
|
5695 |
|
|
const Tp f0 = data109[i].f0;
|
5696 |
|
|
const Tp diff = f - f0;
|
5697 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5698 |
|
|
max_abs_diff = std::abs(diff);
|
5699 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5700 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5701 |
|
|
{
|
5702 |
|
|
const Tp frac = diff / f0;
|
5703 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5704 |
|
|
max_abs_frac = std::abs(frac);
|
5705 |
|
|
}
|
5706 |
|
|
}
|
5707 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5708 |
|
|
}
|
5709 |
|
|
|
5710 |
|
|
// Test data for k=0.10000000000000009, nu=0.90000000000000002.
|
5711 |
|
|
testcase_ellint_3<double> data110[] = {
|
5712 |
|
|
{ -0.0000000000000000, 0.10000000000000009, 0.90000000000000002,
|
5713 |
|
|
0.0000000000000000 },
|
5714 |
|
|
{ 0.17298167549096569, 0.10000000000000009, 0.90000000000000002,
|
5715 |
|
|
0.17453292519943295 },
|
5716 |
|
|
{ 0.33741546662741584, 0.10000000000000009, 0.90000000000000002,
|
5717 |
|
|
0.34906585039886590 },
|
5718 |
|
|
{ 0.48785665376856879, 0.10000000000000009, 0.90000000000000002,
|
5719 |
|
|
0.52359877559829882 },
|
5720 |
|
|
{ 0.62280288554518959, 0.10000000000000009, 0.90000000000000002,
|
5721 |
|
|
0.69813170079773179 },
|
5722 |
|
|
{ 0.74358903115455199, 0.10000000000000009, 0.90000000000000002,
|
5723 |
|
|
0.87266462599716477 },
|
5724 |
|
|
{ 0.85290207679298358, 0.10000000000000009, 0.90000000000000002,
|
5725 |
|
|
1.0471975511965976 },
|
5726 |
|
|
{ 0.95379006645397379, 0.10000000000000009, 0.90000000000000002,
|
5727 |
|
|
1.2217304763960306 },
|
5728 |
|
|
{ 1.0492213119872327, 0.10000000000000009, 0.90000000000000002,
|
5729 |
|
|
1.3962634015954636 },
|
5730 |
|
|
{ 1.1419839485283374, 0.10000000000000009, 0.90000000000000002,
|
5731 |
|
|
1.5707963267948966 },
|
5732 |
|
|
};
|
5733 |
|
|
|
5734 |
|
|
// Test function for k=0.10000000000000009, nu=0.90000000000000002.
|
5735 |
|
|
template <typename Tp>
|
5736 |
|
|
void test110()
|
5737 |
|
|
{
|
5738 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5739 |
|
|
Tp max_abs_diff = -Tp(1);
|
5740 |
|
|
Tp max_abs_frac = -Tp(1);
|
5741 |
|
|
unsigned int num_datum = sizeof(data110)
|
5742 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5743 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5744 |
|
|
{
|
5745 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data110[i].k), Tp(data110[i].nu),
|
5746 |
|
|
Tp(data110[i].phi));
|
5747 |
|
|
const Tp f0 = data110[i].f0;
|
5748 |
|
|
const Tp diff = f - f0;
|
5749 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5750 |
|
|
max_abs_diff = std::abs(diff);
|
5751 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5752 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5753 |
|
|
{
|
5754 |
|
|
const Tp frac = diff / f0;
|
5755 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5756 |
|
|
max_abs_frac = std::abs(frac);
|
5757 |
|
|
}
|
5758 |
|
|
}
|
5759 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5760 |
|
|
}
|
5761 |
|
|
|
5762 |
|
|
// Test data for k=0.19999999999999996, nu=0.0000000000000000.
|
5763 |
|
|
testcase_ellint_3<double> data111[] = {
|
5764 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.0000000000000000,
|
5765 |
|
|
0.0000000000000000 },
|
5766 |
|
|
{ 0.17456817290292811, 0.19999999999999996, 0.0000000000000000,
|
5767 |
|
|
0.17453292519943295 },
|
5768 |
|
|
{ 0.34934315932086801, 0.19999999999999996, 0.0000000000000000,
|
5769 |
|
|
0.34906585039886590 },
|
5770 |
|
|
{ 0.52450880529443988, 0.19999999999999996, 0.0000000000000000,
|
5771 |
|
|
0.52359877559829882 },
|
5772 |
|
|
{ 0.70020491009844910, 0.19999999999999996, 0.0000000000000000,
|
5773 |
|
|
0.69813170079773179 },
|
5774 |
|
|
{ 0.87651006649967955, 0.19999999999999996, 0.0000000000000000,
|
5775 |
|
|
0.87266462599716477 },
|
5776 |
|
|
{ 1.0534305870298994, 0.19999999999999996, 0.0000000000000000,
|
5777 |
|
|
1.0471975511965976 },
|
5778 |
|
|
{ 1.2308975521670784, 0.19999999999999996, 0.0000000000000000,
|
5779 |
|
|
1.2217304763960306 },
|
5780 |
|
|
{ 1.4087733584990738, 0.19999999999999996, 0.0000000000000000,
|
5781 |
|
|
1.3962634015954636 },
|
5782 |
|
|
{ 1.5868678474541664, 0.19999999999999996, 0.0000000000000000,
|
5783 |
|
|
1.5707963267948966 },
|
5784 |
|
|
};
|
5785 |
|
|
|
5786 |
|
|
// Test function for k=0.19999999999999996, nu=0.0000000000000000.
|
5787 |
|
|
template <typename Tp>
|
5788 |
|
|
void test111()
|
5789 |
|
|
{
|
5790 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5791 |
|
|
Tp max_abs_diff = -Tp(1);
|
5792 |
|
|
Tp max_abs_frac = -Tp(1);
|
5793 |
|
|
unsigned int num_datum = sizeof(data111)
|
5794 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5795 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5796 |
|
|
{
|
5797 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data111[i].k), Tp(data111[i].nu),
|
5798 |
|
|
Tp(data111[i].phi));
|
5799 |
|
|
const Tp f0 = data111[i].f0;
|
5800 |
|
|
const Tp diff = f - f0;
|
5801 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5802 |
|
|
max_abs_diff = std::abs(diff);
|
5803 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5804 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5805 |
|
|
{
|
5806 |
|
|
const Tp frac = diff / f0;
|
5807 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5808 |
|
|
max_abs_frac = std::abs(frac);
|
5809 |
|
|
}
|
5810 |
|
|
}
|
5811 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5812 |
|
|
}
|
5813 |
|
|
|
5814 |
|
|
// Test data for k=0.19999999999999996, nu=0.10000000000000001.
|
5815 |
|
|
testcase_ellint_3<double> data112[] = {
|
5816 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.10000000000000001,
|
5817 |
|
|
0.0000000000000000 },
|
5818 |
|
|
{ 0.17439228502691750, 0.19999999999999996, 0.10000000000000001,
|
5819 |
|
|
0.17453292519943295 },
|
5820 |
|
|
{ 0.34796731137565740, 0.19999999999999996, 0.10000000000000001,
|
5821 |
|
|
0.34906585039886590 },
|
5822 |
|
|
{ 0.52003370294544848, 0.19999999999999996, 0.10000000000000001,
|
5823 |
|
|
0.52359877559829882 },
|
5824 |
|
|
{ 0.69012222258631495, 0.19999999999999996, 0.10000000000000001,
|
5825 |
|
|
0.69813170079773179 },
|
5826 |
|
|
{ 0.85803491465566772, 0.19999999999999996, 0.10000000000000001,
|
5827 |
|
|
0.87266462599716477 },
|
5828 |
|
|
{ 1.0238463961099364, 0.19999999999999996, 0.10000000000000001,
|
5829 |
|
|
1.0471975511965976 },
|
5830 |
|
|
{ 1.1878691059202153, 0.19999999999999996, 0.10000000000000001,
|
5831 |
|
|
1.2217304763960306 },
|
5832 |
|
|
{ 1.3505985031831940, 0.19999999999999996, 0.10000000000000001,
|
5833 |
|
|
1.3962634015954636 },
|
5834 |
|
|
{ 1.5126513474261092, 0.19999999999999996, 0.10000000000000001,
|
5835 |
|
|
1.5707963267948966 },
|
5836 |
|
|
};
|
5837 |
|
|
|
5838 |
|
|
// Test function for k=0.19999999999999996, nu=0.10000000000000001.
|
5839 |
|
|
template <typename Tp>
|
5840 |
|
|
void test112()
|
5841 |
|
|
{
|
5842 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5843 |
|
|
Tp max_abs_diff = -Tp(1);
|
5844 |
|
|
Tp max_abs_frac = -Tp(1);
|
5845 |
|
|
unsigned int num_datum = sizeof(data112)
|
5846 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5847 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5848 |
|
|
{
|
5849 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data112[i].k), Tp(data112[i].nu),
|
5850 |
|
|
Tp(data112[i].phi));
|
5851 |
|
|
const Tp f0 = data112[i].f0;
|
5852 |
|
|
const Tp diff = f - f0;
|
5853 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5854 |
|
|
max_abs_diff = std::abs(diff);
|
5855 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5856 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5857 |
|
|
{
|
5858 |
|
|
const Tp frac = diff / f0;
|
5859 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5860 |
|
|
max_abs_frac = std::abs(frac);
|
5861 |
|
|
}
|
5862 |
|
|
}
|
5863 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5864 |
|
|
}
|
5865 |
|
|
|
5866 |
|
|
// Test data for k=0.19999999999999996, nu=0.20000000000000001.
|
5867 |
|
|
testcase_ellint_3<double> data113[] = {
|
5868 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.20000000000000001,
|
5869 |
|
|
0.0000000000000000 },
|
5870 |
|
|
{ 0.17421703179583750, 0.19999999999999996, 0.20000000000000001,
|
5871 |
|
|
0.17453292519943295 },
|
5872 |
|
|
{ 0.34661057411998791, 0.19999999999999996, 0.20000000000000001,
|
5873 |
|
|
0.34906585039886590 },
|
5874 |
|
|
{ 0.51569006052647393, 0.19999999999999996, 0.20000000000000001,
|
5875 |
|
|
0.52359877559829882 },
|
5876 |
|
|
{ 0.68052412821107278, 0.19999999999999996, 0.20000000000000001,
|
5877 |
|
|
0.69813170079773179 },
|
5878 |
|
|
{ 0.84081341263313825, 0.19999999999999996, 0.20000000000000001,
|
5879 |
|
|
0.87266462599716477 },
|
5880 |
|
|
{ 0.99683359988842890, 0.19999999999999996, 0.20000000000000001,
|
5881 |
|
|
1.0471975511965976 },
|
5882 |
|
|
{ 1.1493086715118852, 0.19999999999999996, 0.20000000000000001,
|
5883 |
|
|
1.2217304763960306 },
|
5884 |
|
|
{ 1.2992699693957541, 0.19999999999999996, 0.20000000000000001,
|
5885 |
|
|
1.3962634015954636 },
|
5886 |
|
|
{ 1.4479323932249568, 0.19999999999999996, 0.20000000000000001,
|
5887 |
|
|
1.5707963267948966 },
|
5888 |
|
|
};
|
5889 |
|
|
|
5890 |
|
|
// Test function for k=0.19999999999999996, nu=0.20000000000000001.
|
5891 |
|
|
template <typename Tp>
|
5892 |
|
|
void test113()
|
5893 |
|
|
{
|
5894 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5895 |
|
|
Tp max_abs_diff = -Tp(1);
|
5896 |
|
|
Tp max_abs_frac = -Tp(1);
|
5897 |
|
|
unsigned int num_datum = sizeof(data113)
|
5898 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5899 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5900 |
|
|
{
|
5901 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data113[i].k), Tp(data113[i].nu),
|
5902 |
|
|
Tp(data113[i].phi));
|
5903 |
|
|
const Tp f0 = data113[i].f0;
|
5904 |
|
|
const Tp diff = f - f0;
|
5905 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5906 |
|
|
max_abs_diff = std::abs(diff);
|
5907 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5908 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5909 |
|
|
{
|
5910 |
|
|
const Tp frac = diff / f0;
|
5911 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5912 |
|
|
max_abs_frac = std::abs(frac);
|
5913 |
|
|
}
|
5914 |
|
|
}
|
5915 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5916 |
|
|
}
|
5917 |
|
|
|
5918 |
|
|
// Test data for k=0.19999999999999996, nu=0.29999999999999999.
|
5919 |
|
|
testcase_ellint_3<double> data114[] = {
|
5920 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.29999999999999999,
|
5921 |
|
|
0.0000000000000000 },
|
5922 |
|
|
{ 0.17404240913577707, 0.19999999999999996, 0.29999999999999999,
|
5923 |
|
|
0.17453292519943295 },
|
5924 |
|
|
{ 0.34527248032587193, 0.19999999999999996, 0.29999999999999999,
|
5925 |
|
|
0.34906585039886590 },
|
5926 |
|
|
{ 0.51147118981668416, 0.19999999999999996, 0.29999999999999999,
|
5927 |
|
|
0.52359877559829882 },
|
5928 |
|
|
{ 0.67137107867777635, 0.19999999999999996, 0.29999999999999999,
|
5929 |
|
|
0.69813170079773179 },
|
5930 |
|
|
{ 0.82470418188668893, 0.19999999999999996, 0.29999999999999999,
|
5931 |
|
|
0.87266462599716477 },
|
5932 |
|
|
{ 0.97202873223594299, 0.19999999999999996, 0.29999999999999999,
|
5933 |
|
|
1.0471975511965976 },
|
5934 |
|
|
{ 1.1144773569375266, 0.19999999999999996, 0.29999999999999999,
|
5935 |
|
|
1.2217304763960306 },
|
5936 |
|
|
{ 1.2535292433701000, 0.19999999999999996, 0.29999999999999999,
|
5937 |
|
|
1.3962634015954636 },
|
5938 |
|
|
{ 1.3908453514752481, 0.19999999999999996, 0.29999999999999999,
|
5939 |
|
|
1.5707963267948966 },
|
5940 |
|
|
};
|
5941 |
|
|
|
5942 |
|
|
// Test function for k=0.19999999999999996, nu=0.29999999999999999.
|
5943 |
|
|
template <typename Tp>
|
5944 |
|
|
void test114()
|
5945 |
|
|
{
|
5946 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5947 |
|
|
Tp max_abs_diff = -Tp(1);
|
5948 |
|
|
Tp max_abs_frac = -Tp(1);
|
5949 |
|
|
unsigned int num_datum = sizeof(data114)
|
5950 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
5951 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
5952 |
|
|
{
|
5953 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data114[i].k), Tp(data114[i].nu),
|
5954 |
|
|
Tp(data114[i].phi));
|
5955 |
|
|
const Tp f0 = data114[i].f0;
|
5956 |
|
|
const Tp diff = f - f0;
|
5957 |
|
|
if (std::abs(diff) > max_abs_diff)
|
5958 |
|
|
max_abs_diff = std::abs(diff);
|
5959 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
5960 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
5961 |
|
|
{
|
5962 |
|
|
const Tp frac = diff / f0;
|
5963 |
|
|
if (std::abs(frac) > max_abs_frac)
|
5964 |
|
|
max_abs_frac = std::abs(frac);
|
5965 |
|
|
}
|
5966 |
|
|
}
|
5967 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
5968 |
|
|
}
|
5969 |
|
|
|
5970 |
|
|
// Test data for k=0.19999999999999996, nu=0.40000000000000002.
|
5971 |
|
|
testcase_ellint_3<double> data115[] = {
|
5972 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.40000000000000002,
|
5973 |
|
|
0.0000000000000000 },
|
5974 |
|
|
{ 0.17386841301066677, 0.19999999999999996, 0.40000000000000002,
|
5975 |
|
|
0.17453292519943295 },
|
5976 |
|
|
{ 0.34395257914113253, 0.19999999999999996, 0.40000000000000002,
|
5977 |
|
|
0.34906585039886590 },
|
5978 |
|
|
{ 0.50737088376869466, 0.19999999999999996, 0.40000000000000002,
|
5979 |
|
|
0.52359877559829882 },
|
5980 |
|
|
{ 0.66262801717277664, 0.19999999999999996, 0.40000000000000002,
|
5981 |
|
|
0.69813170079773179 },
|
5982 |
|
|
{ 0.80958766645079094, 0.19999999999999996, 0.40000000000000002,
|
5983 |
|
|
0.87266462599716477 },
|
5984 |
|
|
{ 0.94913754236162040, 0.19999999999999996, 0.40000000000000002,
|
5985 |
|
|
1.0471975511965976 },
|
5986 |
|
|
{ 1.0827985514223000, 0.19999999999999996, 0.40000000000000002,
|
5987 |
|
|
1.2217304763960306 },
|
5988 |
|
|
{ 1.2124212429050478, 0.19999999999999996, 0.40000000000000002,
|
5989 |
|
|
1.3962634015954636 },
|
5990 |
|
|
{ 1.3400002519661010, 0.19999999999999996, 0.40000000000000002,
|
5991 |
|
|
1.5707963267948966 },
|
5992 |
|
|
};
|
5993 |
|
|
|
5994 |
|
|
// Test function for k=0.19999999999999996, nu=0.40000000000000002.
|
5995 |
|
|
template <typename Tp>
|
5996 |
|
|
void test115()
|
5997 |
|
|
{
|
5998 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
5999 |
|
|
Tp max_abs_diff = -Tp(1);
|
6000 |
|
|
Tp max_abs_frac = -Tp(1);
|
6001 |
|
|
unsigned int num_datum = sizeof(data115)
|
6002 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6003 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6004 |
|
|
{
|
6005 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data115[i].k), Tp(data115[i].nu),
|
6006 |
|
|
Tp(data115[i].phi));
|
6007 |
|
|
const Tp f0 = data115[i].f0;
|
6008 |
|
|
const Tp diff = f - f0;
|
6009 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6010 |
|
|
max_abs_diff = std::abs(diff);
|
6011 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6012 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6013 |
|
|
{
|
6014 |
|
|
const Tp frac = diff / f0;
|
6015 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6016 |
|
|
max_abs_frac = std::abs(frac);
|
6017 |
|
|
}
|
6018 |
|
|
}
|
6019 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6020 |
|
|
}
|
6021 |
|
|
|
6022 |
|
|
// Test data for k=0.19999999999999996, nu=0.50000000000000000.
|
6023 |
|
|
testcase_ellint_3<double> data116[] = {
|
6024 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.50000000000000000,
|
6025 |
|
|
0.0000000000000000 },
|
6026 |
|
|
{ 0.17369503942181802, 0.19999999999999996, 0.50000000000000000,
|
6027 |
|
|
0.17453292519943295 },
|
6028 |
|
|
{ 0.34265043534362660, 0.19999999999999996, 0.50000000000000000,
|
6029 |
|
|
0.34906585039886590 },
|
6030 |
|
|
{ 0.50338337208655415, 0.19999999999999996, 0.50000000000000000,
|
6031 |
|
|
0.52359877559829882 },
|
6032 |
|
|
{ 0.65426373297163642, 0.19999999999999996, 0.50000000000000000,
|
6033 |
|
|
0.69813170079773179 },
|
6034 |
|
|
{ 0.79536193036145808, 0.19999999999999996, 0.50000000000000000,
|
6035 |
|
|
0.87266462599716477 },
|
6036 |
|
|
{ 0.92791875910061605, 0.19999999999999996, 0.50000000000000000,
|
6037 |
|
|
1.0471975511965976 },
|
6038 |
|
|
{ 1.0538145052725829, 0.19999999999999996, 0.50000000000000000,
|
6039 |
|
|
1.2217304763960306 },
|
6040 |
|
|
{ 1.1752060022875899, 0.19999999999999996, 0.50000000000000000,
|
6041 |
|
|
1.3962634015954636 },
|
6042 |
|
|
{ 1.2943374404397376, 0.19999999999999996, 0.50000000000000000,
|
6043 |
|
|
1.5707963267948966 },
|
6044 |
|
|
};
|
6045 |
|
|
|
6046 |
|
|
// Test function for k=0.19999999999999996, nu=0.50000000000000000.
|
6047 |
|
|
template <typename Tp>
|
6048 |
|
|
void test116()
|
6049 |
|
|
{
|
6050 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6051 |
|
|
Tp max_abs_diff = -Tp(1);
|
6052 |
|
|
Tp max_abs_frac = -Tp(1);
|
6053 |
|
|
unsigned int num_datum = sizeof(data116)
|
6054 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6055 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6056 |
|
|
{
|
6057 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data116[i].k), Tp(data116[i].nu),
|
6058 |
|
|
Tp(data116[i].phi));
|
6059 |
|
|
const Tp f0 = data116[i].f0;
|
6060 |
|
|
const Tp diff = f - f0;
|
6061 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6062 |
|
|
max_abs_diff = std::abs(diff);
|
6063 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6064 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6065 |
|
|
{
|
6066 |
|
|
const Tp frac = diff / f0;
|
6067 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6068 |
|
|
max_abs_frac = std::abs(frac);
|
6069 |
|
|
}
|
6070 |
|
|
}
|
6071 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6072 |
|
|
}
|
6073 |
|
|
|
6074 |
|
|
// Test data for k=0.19999999999999996, nu=0.59999999999999998.
|
6075 |
|
|
testcase_ellint_3<double> data117[] = {
|
6076 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.59999999999999998,
|
6077 |
|
|
0.0000000000000000 },
|
6078 |
|
|
{ 0.17352228440746928, 0.19999999999999996, 0.59999999999999998,
|
6079 |
|
|
0.17453292519943295 },
|
6080 |
|
|
{ 0.34136562863713626, 0.19999999999999996, 0.59999999999999998,
|
6081 |
|
|
0.34906585039886590 },
|
6082 |
|
|
{ 0.49950328177638481, 0.19999999999999996, 0.59999999999999998,
|
6083 |
|
|
0.52359877559829882 },
|
6084 |
|
|
{ 0.64625032705690832, 0.19999999999999996, 0.59999999999999998,
|
6085 |
|
|
0.69813170079773179 },
|
6086 |
|
|
{ 0.78193941198403094, 0.19999999999999996, 0.59999999999999998,
|
6087 |
|
|
0.87266462599716477 },
|
6088 |
|
|
{ 0.90817230934317128, 0.19999999999999996, 0.59999999999999998,
|
6089 |
|
|
1.0471975511965976 },
|
6090 |
|
|
{ 1.0271563751276462, 0.19999999999999996, 0.59999999999999998,
|
6091 |
|
|
1.2217304763960306 },
|
6092 |
|
|
{ 1.1412999379040518, 0.19999999999999996, 0.59999999999999998,
|
6093 |
|
|
1.3962634015954636 },
|
6094 |
|
|
{ 1.2530330675914561, 0.19999999999999996, 0.59999999999999998,
|
6095 |
|
|
1.5707963267948966 },
|
6096 |
|
|
};
|
6097 |
|
|
|
6098 |
|
|
// Test function for k=0.19999999999999996, nu=0.59999999999999998.
|
6099 |
|
|
template <typename Tp>
|
6100 |
|
|
void test117()
|
6101 |
|
|
{
|
6102 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6103 |
|
|
Tp max_abs_diff = -Tp(1);
|
6104 |
|
|
Tp max_abs_frac = -Tp(1);
|
6105 |
|
|
unsigned int num_datum = sizeof(data117)
|
6106 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6107 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6108 |
|
|
{
|
6109 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data117[i].k), Tp(data117[i].nu),
|
6110 |
|
|
Tp(data117[i].phi));
|
6111 |
|
|
const Tp f0 = data117[i].f0;
|
6112 |
|
|
const Tp diff = f - f0;
|
6113 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6114 |
|
|
max_abs_diff = std::abs(diff);
|
6115 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6116 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6117 |
|
|
{
|
6118 |
|
|
const Tp frac = diff / f0;
|
6119 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6120 |
|
|
max_abs_frac = std::abs(frac);
|
6121 |
|
|
}
|
6122 |
|
|
}
|
6123 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6124 |
|
|
}
|
6125 |
|
|
|
6126 |
|
|
// Test data for k=0.19999999999999996, nu=0.69999999999999996.
|
6127 |
|
|
testcase_ellint_3<double> data118[] = {
|
6128 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.69999999999999996,
|
6129 |
|
|
0.0000000000000000 },
|
6130 |
|
|
{ 0.17335014404233898, 0.19999999999999996, 0.69999999999999996,
|
6131 |
|
|
0.17453292519943295 },
|
6132 |
|
|
{ 0.34009775298617811, 0.19999999999999996, 0.69999999999999996,
|
6133 |
|
|
0.34906585039886590 },
|
6134 |
|
|
{ 0.49572560201923810, 0.19999999999999996, 0.69999999999999996,
|
6135 |
|
|
0.52359877559829882 },
|
6136 |
|
|
{ 0.63856276669886525, 0.19999999999999996, 0.69999999999999996,
|
6137 |
|
|
0.69813170079773179 },
|
6138 |
|
|
{ 0.76924438644867565, 0.19999999999999996, 0.69999999999999996,
|
6139 |
|
|
0.87266462599716477 },
|
6140 |
|
|
{ 0.88973060843856466, 0.19999999999999996, 0.69999999999999996,
|
6141 |
|
|
1.0471975511965976 },
|
6142 |
|
|
{ 1.0025230471636377, 0.19999999999999996, 0.69999999999999996,
|
6143 |
|
|
1.2217304763960306 },
|
6144 |
|
|
{ 1.1102356376093103, 0.19999999999999996, 0.69999999999999996,
|
6145 |
|
|
1.3962634015954636 },
|
6146 |
|
|
{ 1.2154356555075867, 0.19999999999999996, 0.69999999999999996,
|
6147 |
|
|
1.5707963267948966 },
|
6148 |
|
|
};
|
6149 |
|
|
|
6150 |
|
|
// Test function for k=0.19999999999999996, nu=0.69999999999999996.
|
6151 |
|
|
template <typename Tp>
|
6152 |
|
|
void test118()
|
6153 |
|
|
{
|
6154 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6155 |
|
|
Tp max_abs_diff = -Tp(1);
|
6156 |
|
|
Tp max_abs_frac = -Tp(1);
|
6157 |
|
|
unsigned int num_datum = sizeof(data118)
|
6158 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6159 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6160 |
|
|
{
|
6161 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data118[i].k), Tp(data118[i].nu),
|
6162 |
|
|
Tp(data118[i].phi));
|
6163 |
|
|
const Tp f0 = data118[i].f0;
|
6164 |
|
|
const Tp diff = f - f0;
|
6165 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6166 |
|
|
max_abs_diff = std::abs(diff);
|
6167 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6168 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6169 |
|
|
{
|
6170 |
|
|
const Tp frac = diff / f0;
|
6171 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6172 |
|
|
max_abs_frac = std::abs(frac);
|
6173 |
|
|
}
|
6174 |
|
|
}
|
6175 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6176 |
|
|
}
|
6177 |
|
|
|
6178 |
|
|
// Test data for k=0.19999999999999996, nu=0.80000000000000004.
|
6179 |
|
|
testcase_ellint_3<double> data119[] = {
|
6180 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.80000000000000004,
|
6181 |
|
|
0.0000000000000000 },
|
6182 |
|
|
{ 0.17317861443718541, 0.19999999999999996, 0.80000000000000004,
|
6183 |
|
|
0.17453292519943295 },
|
6184 |
|
|
{ 0.33884641598718701, 0.19999999999999996, 0.80000000000000004,
|
6185 |
|
|
0.34906585039886590 },
|
6186 |
|
|
{ 0.49204565281259494, 0.19999999999999996, 0.80000000000000004,
|
6187 |
|
|
0.52359877559829882 },
|
6188 |
|
|
{ 0.63117851188220353, 0.19999999999999996, 0.80000000000000004,
|
6189 |
|
|
0.69813170079773179 },
|
6190 |
|
|
{ 0.75721095949544170, 0.19999999999999996, 0.80000000000000004,
|
6191 |
|
|
0.87266462599716477 },
|
6192 |
|
|
{ 0.87245201443919118, 0.19999999999999996, 0.80000000000000004,
|
6193 |
|
|
1.0471975511965976 },
|
6194 |
|
|
{ 0.97966584238831089, 0.19999999999999996, 0.80000000000000004,
|
6195 |
|
|
1.2217304763960306 },
|
6196 |
|
|
{ 1.0816336325174360, 0.19999999999999996, 0.80000000000000004,
|
6197 |
|
|
1.3962634015954636 },
|
6198 |
|
|
{ 1.1810223448909913, 0.19999999999999996, 0.80000000000000004,
|
6199 |
|
|
1.5707963267948966 },
|
6200 |
|
|
};
|
6201 |
|
|
|
6202 |
|
|
// Test function for k=0.19999999999999996, nu=0.80000000000000004.
|
6203 |
|
|
template <typename Tp>
|
6204 |
|
|
void test119()
|
6205 |
|
|
{
|
6206 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6207 |
|
|
Tp max_abs_diff = -Tp(1);
|
6208 |
|
|
Tp max_abs_frac = -Tp(1);
|
6209 |
|
|
unsigned int num_datum = sizeof(data119)
|
6210 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6211 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6212 |
|
|
{
|
6213 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data119[i].k), Tp(data119[i].nu),
|
6214 |
|
|
Tp(data119[i].phi));
|
6215 |
|
|
const Tp f0 = data119[i].f0;
|
6216 |
|
|
const Tp diff = f - f0;
|
6217 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6218 |
|
|
max_abs_diff = std::abs(diff);
|
6219 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6220 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6221 |
|
|
{
|
6222 |
|
|
const Tp frac = diff / f0;
|
6223 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6224 |
|
|
max_abs_frac = std::abs(frac);
|
6225 |
|
|
}
|
6226 |
|
|
}
|
6227 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6228 |
|
|
}
|
6229 |
|
|
|
6230 |
|
|
// Test data for k=0.19999999999999996, nu=0.90000000000000002.
|
6231 |
|
|
testcase_ellint_3<double> data120[] = {
|
6232 |
|
|
{ -0.0000000000000000, 0.19999999999999996, 0.90000000000000002,
|
6233 |
|
|
0.0000000000000000 },
|
6234 |
|
|
{ 0.17300769173837280, 0.19999999999999996, 0.90000000000000002,
|
6235 |
|
|
0.17453292519943295 },
|
6236 |
|
|
{ 0.33761123827372508, 0.19999999999999996, 0.90000000000000002,
|
6237 |
|
|
0.34906585039886590 },
|
6238 |
|
|
{ 0.48845905690769426, 0.19999999999999996, 0.90000000000000002,
|
6239 |
|
|
0.52359877559829882 },
|
6240 |
|
|
{ 0.62407720017324986, 0.19999999999999996, 0.90000000000000002,
|
6241 |
|
|
0.69813170079773179 },
|
6242 |
|
|
{ 0.74578146525124289, 0.19999999999999996, 0.90000000000000002,
|
6243 |
|
|
0.87266462599716477 },
|
6244 |
|
|
{ 0.85621583540073076, 0.19999999999999996, 0.90000000000000002,
|
6245 |
|
|
1.0471975511965976 },
|
6246 |
|
|
{ 0.95837725988001199, 0.19999999999999996, 0.90000000000000002,
|
6247 |
|
|
1.2217304763960306 },
|
6248 |
|
|
{ 1.0551821412633928, 0.19999999999999996, 0.90000000000000002,
|
6249 |
|
|
1.3962634015954636 },
|
6250 |
|
|
{ 1.1493679916141863, 0.19999999999999996, 0.90000000000000002,
|
6251 |
|
|
1.5707963267948966 },
|
6252 |
|
|
};
|
6253 |
|
|
|
6254 |
|
|
// Test function for k=0.19999999999999996, nu=0.90000000000000002.
|
6255 |
|
|
template <typename Tp>
|
6256 |
|
|
void test120()
|
6257 |
|
|
{
|
6258 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6259 |
|
|
Tp max_abs_diff = -Tp(1);
|
6260 |
|
|
Tp max_abs_frac = -Tp(1);
|
6261 |
|
|
unsigned int num_datum = sizeof(data120)
|
6262 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6263 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6264 |
|
|
{
|
6265 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data120[i].k), Tp(data120[i].nu),
|
6266 |
|
|
Tp(data120[i].phi));
|
6267 |
|
|
const Tp f0 = data120[i].f0;
|
6268 |
|
|
const Tp diff = f - f0;
|
6269 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6270 |
|
|
max_abs_diff = std::abs(diff);
|
6271 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6272 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6273 |
|
|
{
|
6274 |
|
|
const Tp frac = diff / f0;
|
6275 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6276 |
|
|
max_abs_frac = std::abs(frac);
|
6277 |
|
|
}
|
6278 |
|
|
}
|
6279 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6280 |
|
|
}
|
6281 |
|
|
|
6282 |
|
|
// Test data for k=0.30000000000000004, nu=0.0000000000000000.
|
6283 |
|
|
testcase_ellint_3<double> data121[] = {
|
6284 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.0000000000000000,
|
6285 |
|
|
0.0000000000000000 },
|
6286 |
|
|
{ 0.17461228653000102, 0.30000000000000004, 0.0000000000000000,
|
6287 |
|
|
0.17453292519943295 },
|
6288 |
|
|
{ 0.34969146102798415, 0.30000000000000004, 0.0000000000000000,
|
6289 |
|
|
0.34906585039886590 },
|
6290 |
|
|
{ 0.52565822873726320, 0.30000000000000004, 0.0000000000000000,
|
6291 |
|
|
0.52359877559829882 },
|
6292 |
|
|
{ 0.70284226512408532, 0.30000000000000004, 0.0000000000000000,
|
6293 |
|
|
0.69813170079773179 },
|
6294 |
|
|
{ 0.88144139195111182, 0.30000000000000004, 0.0000000000000000,
|
6295 |
|
|
0.87266462599716477 },
|
6296 |
|
|
{ 1.0614897067260523, 0.30000000000000004, 0.0000000000000000,
|
6297 |
|
|
1.0471975511965976 },
|
6298 |
|
|
{ 1.2428416824174218, 0.30000000000000004, 0.0000000000000000,
|
6299 |
|
|
1.2217304763960306 },
|
6300 |
|
|
{ 1.4251795877015925, 0.30000000000000004, 0.0000000000000000,
|
6301 |
|
|
1.3962634015954636 },
|
6302 |
|
|
{ 1.6080486199305126, 0.30000000000000004, 0.0000000000000000,
|
6303 |
|
|
1.5707963267948966 },
|
6304 |
|
|
};
|
6305 |
|
|
|
6306 |
|
|
// Test function for k=0.30000000000000004, nu=0.0000000000000000.
|
6307 |
|
|
template <typename Tp>
|
6308 |
|
|
void test121()
|
6309 |
|
|
{
|
6310 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6311 |
|
|
Tp max_abs_diff = -Tp(1);
|
6312 |
|
|
Tp max_abs_frac = -Tp(1);
|
6313 |
|
|
unsigned int num_datum = sizeof(data121)
|
6314 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6315 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6316 |
|
|
{
|
6317 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data121[i].k), Tp(data121[i].nu),
|
6318 |
|
|
Tp(data121[i].phi));
|
6319 |
|
|
const Tp f0 = data121[i].f0;
|
6320 |
|
|
const Tp diff = f - f0;
|
6321 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6322 |
|
|
max_abs_diff = std::abs(diff);
|
6323 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6324 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6325 |
|
|
{
|
6326 |
|
|
const Tp frac = diff / f0;
|
6327 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6328 |
|
|
max_abs_frac = std::abs(frac);
|
6329 |
|
|
}
|
6330 |
|
|
}
|
6331 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6332 |
|
|
}
|
6333 |
|
|
|
6334 |
|
|
// Test data for k=0.30000000000000004, nu=0.10000000000000001.
|
6335 |
|
|
testcase_ellint_3<double> data122[] = {
|
6336 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.10000000000000001,
|
6337 |
|
|
0.0000000000000000 },
|
6338 |
|
|
{ 0.17443631884814378, 0.30000000000000004, 0.10000000000000001,
|
6339 |
|
|
0.17453292519943295 },
|
6340 |
|
|
{ 0.34831316835124926, 0.30000000000000004, 0.10000000000000001,
|
6341 |
|
|
0.34906585039886590 },
|
6342 |
|
|
{ 0.52116586276523857, 0.30000000000000004, 0.10000000000000001,
|
6343 |
|
|
0.52359877559829882 },
|
6344 |
|
|
{ 0.69269385837910036, 0.30000000000000004, 0.10000000000000001,
|
6345 |
|
|
0.69813170079773179 },
|
6346 |
|
|
{ 0.86279023163070856, 0.30000000000000004, 0.10000000000000001,
|
6347 |
|
|
0.87266462599716477 },
|
6348 |
|
|
{ 1.0315321461438265, 0.30000000000000004, 0.10000000000000001,
|
6349 |
|
|
1.0471975511965976 },
|
6350 |
|
|
{ 1.1991449111869024, 0.30000000000000004, 0.10000000000000001,
|
6351 |
|
|
1.2217304763960306 },
|
6352 |
|
|
{ 1.3659561780923211, 0.30000000000000004, 0.10000000000000001,
|
6353 |
|
|
1.3962634015954636 },
|
6354 |
|
|
{ 1.5323534693557526, 0.30000000000000004, 0.10000000000000001,
|
6355 |
|
|
1.5707963267948966 },
|
6356 |
|
|
};
|
6357 |
|
|
|
6358 |
|
|
// Test function for k=0.30000000000000004, nu=0.10000000000000001.
|
6359 |
|
|
template <typename Tp>
|
6360 |
|
|
void test122()
|
6361 |
|
|
{
|
6362 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6363 |
|
|
Tp max_abs_diff = -Tp(1);
|
6364 |
|
|
Tp max_abs_frac = -Tp(1);
|
6365 |
|
|
unsigned int num_datum = sizeof(data122)
|
6366 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6367 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6368 |
|
|
{
|
6369 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data122[i].k), Tp(data122[i].nu),
|
6370 |
|
|
Tp(data122[i].phi));
|
6371 |
|
|
const Tp f0 = data122[i].f0;
|
6372 |
|
|
const Tp diff = f - f0;
|
6373 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6374 |
|
|
max_abs_diff = std::abs(diff);
|
6375 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6376 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6377 |
|
|
{
|
6378 |
|
|
const Tp frac = diff / f0;
|
6379 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6380 |
|
|
max_abs_frac = std::abs(frac);
|
6381 |
|
|
}
|
6382 |
|
|
}
|
6383 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6384 |
|
|
}
|
6385 |
|
|
|
6386 |
|
|
// Test data for k=0.30000000000000004, nu=0.20000000000000001.
|
6387 |
|
|
testcase_ellint_3<double> data123[] = {
|
6388 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.20000000000000001,
|
6389 |
|
|
0.0000000000000000 },
|
6390 |
|
|
{ 0.17426098615372090, 0.30000000000000004, 0.20000000000000001,
|
6391 |
|
|
0.17453292519943295 },
|
6392 |
|
|
{ 0.34695402664689923, 0.30000000000000004, 0.20000000000000001,
|
6393 |
|
|
0.34906585039886590 },
|
6394 |
|
|
{ 0.51680555567038933, 0.30000000000000004, 0.20000000000000001,
|
6395 |
|
|
0.52359877559829882 },
|
6396 |
|
|
{ 0.68303375225260210, 0.30000000000000004, 0.20000000000000001,
|
6397 |
|
|
0.69813170079773179 },
|
6398 |
|
|
{ 0.84540662891295026, 0.30000000000000004, 0.20000000000000001,
|
6399 |
|
|
0.87266462599716477 },
|
6400 |
|
|
{ 1.0041834051646927, 0.30000000000000004, 0.20000000000000001,
|
6401 |
|
|
1.0471975511965976 },
|
6402 |
|
|
{ 1.1599952702345711, 0.30000000000000004, 0.20000000000000001,
|
6403 |
|
|
1.2217304763960306 },
|
6404 |
|
|
{ 1.3137179520499163, 0.30000000000000004, 0.20000000000000001,
|
6405 |
|
|
1.3962634015954636 },
|
6406 |
|
|
{ 1.4663658145259875, 0.30000000000000004, 0.20000000000000001,
|
6407 |
|
|
1.5707963267948966 },
|
6408 |
|
|
};
|
6409 |
|
|
|
6410 |
|
|
// Test function for k=0.30000000000000004, nu=0.20000000000000001.
|
6411 |
|
|
template <typename Tp>
|
6412 |
|
|
void test123()
|
6413 |
|
|
{
|
6414 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6415 |
|
|
Tp max_abs_diff = -Tp(1);
|
6416 |
|
|
Tp max_abs_frac = -Tp(1);
|
6417 |
|
|
unsigned int num_datum = sizeof(data123)
|
6418 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6419 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6420 |
|
|
{
|
6421 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data123[i].k), Tp(data123[i].nu),
|
6422 |
|
|
Tp(data123[i].phi));
|
6423 |
|
|
const Tp f0 = data123[i].f0;
|
6424 |
|
|
const Tp diff = f - f0;
|
6425 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6426 |
|
|
max_abs_diff = std::abs(diff);
|
6427 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6428 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6429 |
|
|
{
|
6430 |
|
|
const Tp frac = diff / f0;
|
6431 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6432 |
|
|
max_abs_frac = std::abs(frac);
|
6433 |
|
|
}
|
6434 |
|
|
}
|
6435 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6436 |
|
|
}
|
6437 |
|
|
|
6438 |
|
|
// Test data for k=0.30000000000000004, nu=0.29999999999999999.
|
6439 |
|
|
testcase_ellint_3<double> data124[] = {
|
6440 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.29999999999999999,
|
6441 |
|
|
0.0000000000000000 },
|
6442 |
|
|
{ 0.17408628437042845, 0.30000000000000004, 0.29999999999999999,
|
6443 |
|
|
0.17453292519943295 },
|
6444 |
|
|
{ 0.34561356761638401, 0.30000000000000004, 0.29999999999999999,
|
6445 |
|
|
0.34906585039886590 },
|
6446 |
|
|
{ 0.51257058617875850, 0.30000000000000004, 0.29999999999999999,
|
6447 |
|
|
0.52359877559829882 },
|
6448 |
|
|
{ 0.67382207124602866, 0.30000000000000004, 0.29999999999999999,
|
6449 |
|
|
0.69813170079773179 },
|
6450 |
|
|
{ 0.82914751587825131, 0.30000000000000004, 0.29999999999999999,
|
6451 |
|
|
0.87266462599716477 },
|
6452 |
|
|
{ 0.97907434814374950, 0.30000000000000004, 0.29999999999999999,
|
6453 |
|
|
1.0471975511965976 },
|
6454 |
|
|
{ 1.1246399297351584, 0.30000000000000004, 0.29999999999999999,
|
6455 |
|
|
1.2217304763960306 },
|
6456 |
|
|
{ 1.2671793970398146, 0.30000000000000004, 0.29999999999999999,
|
6457 |
|
|
1.3962634015954636 },
|
6458 |
|
|
{ 1.4081767433479089, 0.30000000000000004, 0.29999999999999999,
|
6459 |
|
|
1.5707963267948966 },
|
6460 |
|
|
};
|
6461 |
|
|
|
6462 |
|
|
// Test function for k=0.30000000000000004, nu=0.29999999999999999.
|
6463 |
|
|
template <typename Tp>
|
6464 |
|
|
void test124()
|
6465 |
|
|
{
|
6466 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6467 |
|
|
Tp max_abs_diff = -Tp(1);
|
6468 |
|
|
Tp max_abs_frac = -Tp(1);
|
6469 |
|
|
unsigned int num_datum = sizeof(data124)
|
6470 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6471 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6472 |
|
|
{
|
6473 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data124[i].k), Tp(data124[i].nu),
|
6474 |
|
|
Tp(data124[i].phi));
|
6475 |
|
|
const Tp f0 = data124[i].f0;
|
6476 |
|
|
const Tp diff = f - f0;
|
6477 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6478 |
|
|
max_abs_diff = std::abs(diff);
|
6479 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6480 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6481 |
|
|
{
|
6482 |
|
|
const Tp frac = diff / f0;
|
6483 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6484 |
|
|
max_abs_frac = std::abs(frac);
|
6485 |
|
|
}
|
6486 |
|
|
}
|
6487 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6488 |
|
|
}
|
6489 |
|
|
|
6490 |
|
|
// Test data for k=0.30000000000000004, nu=0.40000000000000002.
|
6491 |
|
|
testcase_ellint_3<double> data125[] = {
|
6492 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.40000000000000002,
|
6493 |
|
|
0.0000000000000000 },
|
6494 |
|
|
{ 0.17391220945982730, 0.30000000000000004, 0.40000000000000002,
|
6495 |
|
|
0.17453292519943295 },
|
6496 |
|
|
{ 0.34429133937639689, 0.30000000000000004, 0.40000000000000002,
|
6497 |
|
|
0.34906585039886590 },
|
6498 |
|
|
{ 0.50845471668581632, 0.30000000000000004, 0.40000000000000002,
|
6499 |
|
|
0.52359877559829882 },
|
6500 |
|
|
{ 0.66502347027873854, 0.30000000000000004, 0.40000000000000002,
|
6501 |
|
|
0.69813170079773179 },
|
6502 |
|
|
{ 0.81389191978012254, 0.30000000000000004, 0.40000000000000002,
|
6503 |
|
|
0.87266462599716477 },
|
6504 |
|
|
{ 0.95590618002140593, 0.30000000000000004, 0.40000000000000002,
|
6505 |
|
|
1.0471975511965976 },
|
6506 |
|
|
{ 1.0924915195213121, 0.30000000000000004, 0.40000000000000002,
|
6507 |
|
|
1.2217304763960306 },
|
6508 |
|
|
{ 1.2253651604038058, 0.30000000000000004, 0.40000000000000002,
|
6509 |
|
|
1.3962634015954636 },
|
6510 |
|
|
{ 1.3563643538969761, 0.30000000000000004, 0.40000000000000002,
|
6511 |
|
|
1.5707963267948966 },
|
6512 |
|
|
};
|
6513 |
|
|
|
6514 |
|
|
// Test function for k=0.30000000000000004, nu=0.40000000000000002.
|
6515 |
|
|
template <typename Tp>
|
6516 |
|
|
void test125()
|
6517 |
|
|
{
|
6518 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6519 |
|
|
Tp max_abs_diff = -Tp(1);
|
6520 |
|
|
Tp max_abs_frac = -Tp(1);
|
6521 |
|
|
unsigned int num_datum = sizeof(data125)
|
6522 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6523 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6524 |
|
|
{
|
6525 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data125[i].k), Tp(data125[i].nu),
|
6526 |
|
|
Tp(data125[i].phi));
|
6527 |
|
|
const Tp f0 = data125[i].f0;
|
6528 |
|
|
const Tp diff = f - f0;
|
6529 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6530 |
|
|
max_abs_diff = std::abs(diff);
|
6531 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6532 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6533 |
|
|
{
|
6534 |
|
|
const Tp frac = diff / f0;
|
6535 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6536 |
|
|
max_abs_frac = std::abs(frac);
|
6537 |
|
|
}
|
6538 |
|
|
}
|
6539 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6540 |
|
|
}
|
6541 |
|
|
|
6542 |
|
|
// Test data for k=0.30000000000000004, nu=0.50000000000000000.
|
6543 |
|
|
testcase_ellint_3<double> data126[] = {
|
6544 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.50000000000000000,
|
6545 |
|
|
0.0000000000000000 },
|
6546 |
|
|
{ 0.17373875742088235, 0.30000000000000004, 0.50000000000000000,
|
6547 |
|
|
0.17453292519943295 },
|
6548 |
|
|
{ 0.34298690571124157, 0.30000000000000004, 0.50000000000000000,
|
6549 |
|
|
0.34906585039886590 },
|
6550 |
|
|
{ 0.50445214859646936, 0.30000000000000004, 0.50000000000000000,
|
6551 |
|
|
0.52359877559829882 },
|
6552 |
|
|
{ 0.65660648352418516, 0.30000000000000004, 0.50000000000000000,
|
6553 |
|
|
0.69813170079773179 },
|
6554 |
|
|
{ 0.79953670639287289, 0.30000000000000004, 0.50000000000000000,
|
6555 |
|
|
0.87266462599716477 },
|
6556 |
|
|
{ 0.93443393926588558, 0.30000000000000004, 0.50000000000000000,
|
6557 |
|
|
1.0471975511965976 },
|
6558 |
|
|
{ 1.0630838369016911, 0.30000000000000004, 0.50000000000000000,
|
6559 |
|
|
1.2217304763960306 },
|
6560 |
|
|
{ 1.1875197325653026, 0.30000000000000004, 0.50000000000000000,
|
6561 |
|
|
1.3962634015954636 },
|
6562 |
|
|
{ 1.3098448759814960, 0.30000000000000004, 0.50000000000000000,
|
6563 |
|
|
1.5707963267948966 },
|
6564 |
|
|
};
|
6565 |
|
|
|
6566 |
|
|
// Test function for k=0.30000000000000004, nu=0.50000000000000000.
|
6567 |
|
|
template <typename Tp>
|
6568 |
|
|
void test126()
|
6569 |
|
|
{
|
6570 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6571 |
|
|
Tp max_abs_diff = -Tp(1);
|
6572 |
|
|
Tp max_abs_frac = -Tp(1);
|
6573 |
|
|
unsigned int num_datum = sizeof(data126)
|
6574 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6575 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6576 |
|
|
{
|
6577 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data126[i].k), Tp(data126[i].nu),
|
6578 |
|
|
Tp(data126[i].phi));
|
6579 |
|
|
const Tp f0 = data126[i].f0;
|
6580 |
|
|
const Tp diff = f - f0;
|
6581 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6582 |
|
|
max_abs_diff = std::abs(diff);
|
6583 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6584 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6585 |
|
|
{
|
6586 |
|
|
const Tp frac = diff / f0;
|
6587 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6588 |
|
|
max_abs_frac = std::abs(frac);
|
6589 |
|
|
}
|
6590 |
|
|
}
|
6591 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6592 |
|
|
}
|
6593 |
|
|
|
6594 |
|
|
// Test data for k=0.30000000000000004, nu=0.59999999999999998.
|
6595 |
|
|
testcase_ellint_3<double> data127[] = {
|
6596 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.59999999999999998,
|
6597 |
|
|
0.0000000000000000 },
|
6598 |
|
|
{ 0.17356592428950826, 0.30000000000000004, 0.59999999999999998,
|
6599 |
|
|
0.17453292519943295 },
|
6600 |
|
|
{ 0.34169984536697379, 0.30000000000000004, 0.59999999999999998,
|
6601 |
|
|
0.34906585039886590 },
|
6602 |
|
|
{ 0.50055748266498457, 0.30000000000000004, 0.59999999999999998,
|
6603 |
|
|
0.52359877559829882 },
|
6604 |
|
|
{ 0.64854298527106768, 0.30000000000000004, 0.59999999999999998,
|
6605 |
|
|
0.69813170079773179 },
|
6606 |
|
|
{ 0.78599329284207431, 0.30000000000000004, 0.59999999999999998,
|
6607 |
|
|
0.87266462599716477 },
|
6608 |
|
|
{ 0.91445452089128221, 0.30000000000000004, 0.59999999999999998,
|
6609 |
|
|
1.0471975511965976 },
|
6610 |
|
|
{ 1.0360412952290587, 0.30000000000000004, 0.59999999999999998,
|
6611 |
|
|
1.2217304763960306 },
|
6612 |
|
|
{ 1.1530473919778639, 0.30000000000000004, 0.59999999999999998,
|
6613 |
|
|
1.3962634015954636 },
|
6614 |
|
|
{ 1.2677758800420666, 0.30000000000000004, 0.59999999999999998,
|
6615 |
|
|
1.5707963267948966 },
|
6616 |
|
|
};
|
6617 |
|
|
|
6618 |
|
|
// Test function for k=0.30000000000000004, nu=0.59999999999999998.
|
6619 |
|
|
template <typename Tp>
|
6620 |
|
|
void test127()
|
6621 |
|
|
{
|
6622 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6623 |
|
|
Tp max_abs_diff = -Tp(1);
|
6624 |
|
|
Tp max_abs_frac = -Tp(1);
|
6625 |
|
|
unsigned int num_datum = sizeof(data127)
|
6626 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6627 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6628 |
|
|
{
|
6629 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data127[i].k), Tp(data127[i].nu),
|
6630 |
|
|
Tp(data127[i].phi));
|
6631 |
|
|
const Tp f0 = data127[i].f0;
|
6632 |
|
|
const Tp diff = f - f0;
|
6633 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6634 |
|
|
max_abs_diff = std::abs(diff);
|
6635 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6636 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6637 |
|
|
{
|
6638 |
|
|
const Tp frac = diff / f0;
|
6639 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6640 |
|
|
max_abs_frac = std::abs(frac);
|
6641 |
|
|
}
|
6642 |
|
|
}
|
6643 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6644 |
|
|
}
|
6645 |
|
|
|
6646 |
|
|
// Test data for k=0.30000000000000004, nu=0.69999999999999996.
|
6647 |
|
|
testcase_ellint_3<double> data128[] = {
|
6648 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.69999999999999996,
|
6649 |
|
|
0.0000000000000000 },
|
6650 |
|
|
{ 0.17339370613812227, 0.30000000000000004, 0.69999999999999996,
|
6651 |
|
|
0.17453292519943295 },
|
6652 |
|
|
{ 0.34042975138455933, 0.30000000000000004, 0.69999999999999996,
|
6653 |
|
|
0.34906585039886590 },
|
6654 |
|
|
{ 0.49676568368075985, 0.30000000000000004, 0.69999999999999996,
|
6655 |
|
|
0.52359877559829882 },
|
6656 |
|
|
{ 0.64080774055753720, 0.30000000000000004, 0.69999999999999996,
|
6657 |
|
|
0.69813170079773179 },
|
6658 |
|
|
{ 0.77318507779667278, 0.30000000000000004, 0.69999999999999996,
|
6659 |
|
|
0.87266462599716477 },
|
6660 |
|
|
{ 0.89579782346548631, 0.30000000000000004, 0.69999999999999996,
|
6661 |
|
|
1.0471975511965976 },
|
6662 |
|
|
{ 1.0110573286052202, 0.30000000000000004, 0.69999999999999996,
|
6663 |
|
|
1.2217304763960306 },
|
6664 |
|
|
{ 1.1214710972949633, 0.30000000000000004, 0.69999999999999996,
|
6665 |
|
|
1.3962634015954636 },
|
6666 |
|
|
{ 1.2294913236274980, 0.30000000000000004, 0.69999999999999996,
|
6667 |
|
|
1.5707963267948966 },
|
6668 |
|
|
};
|
6669 |
|
|
|
6670 |
|
|
// Test function for k=0.30000000000000004, nu=0.69999999999999996.
|
6671 |
|
|
template <typename Tp>
|
6672 |
|
|
void test128()
|
6673 |
|
|
{
|
6674 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6675 |
|
|
Tp max_abs_diff = -Tp(1);
|
6676 |
|
|
Tp max_abs_frac = -Tp(1);
|
6677 |
|
|
unsigned int num_datum = sizeof(data128)
|
6678 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6679 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6680 |
|
|
{
|
6681 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data128[i].k), Tp(data128[i].nu),
|
6682 |
|
|
Tp(data128[i].phi));
|
6683 |
|
|
const Tp f0 = data128[i].f0;
|
6684 |
|
|
const Tp diff = f - f0;
|
6685 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6686 |
|
|
max_abs_diff = std::abs(diff);
|
6687 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6688 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6689 |
|
|
{
|
6690 |
|
|
const Tp frac = diff / f0;
|
6691 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6692 |
|
|
max_abs_frac = std::abs(frac);
|
6693 |
|
|
}
|
6694 |
|
|
}
|
6695 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6696 |
|
|
}
|
6697 |
|
|
|
6698 |
|
|
// Test data for k=0.30000000000000004, nu=0.80000000000000004.
|
6699 |
|
|
testcase_ellint_3<double> data129[] = {
|
6700 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.80000000000000004,
|
6701 |
|
|
0.0000000000000000 },
|
6702 |
|
|
{ 0.17322209907520361, 0.30000000000000004, 0.80000000000000004,
|
6703 |
|
|
0.17453292519943295 },
|
6704 |
|
|
{ 0.33917623046949996, 0.30000000000000004, 0.80000000000000004,
|
6705 |
|
|
0.34906585039886590 },
|
6706 |
|
|
{ 0.49307204894329176, 0.30000000000000004, 0.80000000000000004,
|
6707 |
|
|
0.52359877559829882 },
|
6708 |
|
|
{ 0.63337802830291723, 0.30000000000000004, 0.80000000000000004,
|
6709 |
|
|
0.69813170079773179 },
|
6710 |
|
|
{ 0.76104540997689407, 0.30000000000000004, 0.80000000000000004,
|
6711 |
|
|
0.87266462599716477 },
|
6712 |
|
|
{ 0.87832009635450736, 0.30000000000000004, 0.80000000000000004,
|
6713 |
|
|
1.0471975511965976 },
|
6714 |
|
|
{ 0.98787879723171790, 0.30000000000000004, 0.80000000000000004,
|
6715 |
|
|
1.2217304763960306 },
|
6716 |
|
|
{ 1.0924036340069336, 0.30000000000000004, 0.80000000000000004,
|
6717 |
|
|
1.3962634015954636 },
|
6718 |
|
|
{ 1.1944567571590046, 0.30000000000000004, 0.80000000000000004,
|
6719 |
|
|
1.5707963267948966 },
|
6720 |
|
|
};
|
6721 |
|
|
|
6722 |
|
|
// Test function for k=0.30000000000000004, nu=0.80000000000000004.
|
6723 |
|
|
template <typename Tp>
|
6724 |
|
|
void test129()
|
6725 |
|
|
{
|
6726 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6727 |
|
|
Tp max_abs_diff = -Tp(1);
|
6728 |
|
|
Tp max_abs_frac = -Tp(1);
|
6729 |
|
|
unsigned int num_datum = sizeof(data129)
|
6730 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6731 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6732 |
|
|
{
|
6733 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data129[i].k), Tp(data129[i].nu),
|
6734 |
|
|
Tp(data129[i].phi));
|
6735 |
|
|
const Tp f0 = data129[i].f0;
|
6736 |
|
|
const Tp diff = f - f0;
|
6737 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6738 |
|
|
max_abs_diff = std::abs(diff);
|
6739 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6740 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6741 |
|
|
{
|
6742 |
|
|
const Tp frac = diff / f0;
|
6743 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6744 |
|
|
max_abs_frac = std::abs(frac);
|
6745 |
|
|
}
|
6746 |
|
|
}
|
6747 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6748 |
|
|
}
|
6749 |
|
|
|
6750 |
|
|
// Test data for k=0.30000000000000004, nu=0.90000000000000002.
|
6751 |
|
|
testcase_ellint_3<double> data130[] = {
|
6752 |
|
|
{ -0.0000000000000000, 0.30000000000000004, 0.90000000000000002,
|
6753 |
|
|
0.0000000000000000 },
|
6754 |
|
|
{ 0.17305109924485948, 0.30000000000000004, 0.90000000000000002,
|
6755 |
|
|
0.17453292519943295 },
|
6756 |
|
|
{ 0.33793890239556984, 0.30000000000000004, 0.90000000000000002,
|
6757 |
|
|
0.34906585039886590 },
|
6758 |
|
|
{ 0.48947218005089738, 0.30000000000000004, 0.90000000000000002,
|
6759 |
|
|
0.52359877559829882 },
|
6760 |
|
|
{ 0.62623332340775151, 0.30000000000000004, 0.90000000000000002,
|
6761 |
|
|
0.69813170079773179 },
|
6762 |
|
|
{ 0.74951596581511148, 0.30000000000000004, 0.90000000000000002,
|
6763 |
|
|
0.87266462599716477 },
|
6764 |
|
|
{ 0.86189886597756005, 0.30000000000000004, 0.90000000000000002,
|
6765 |
|
|
1.0471975511965976 },
|
6766 |
|
|
{ 0.96629451153092005, 0.30000000000000004, 0.90000000000000002,
|
6767 |
|
|
1.2217304763960306 },
|
6768 |
|
|
{ 1.0655269133492680, 0.30000000000000004, 0.90000000000000002,
|
6769 |
|
|
1.3962634015954636 },
|
6770 |
|
|
{ 1.1622376896064912, 0.30000000000000004, 0.90000000000000002,
|
6771 |
|
|
1.5707963267948966 },
|
6772 |
|
|
};
|
6773 |
|
|
|
6774 |
|
|
// Test function for k=0.30000000000000004, nu=0.90000000000000002.
|
6775 |
|
|
template <typename Tp>
|
6776 |
|
|
void test130()
|
6777 |
|
|
{
|
6778 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6779 |
|
|
Tp max_abs_diff = -Tp(1);
|
6780 |
|
|
Tp max_abs_frac = -Tp(1);
|
6781 |
|
|
unsigned int num_datum = sizeof(data130)
|
6782 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6783 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6784 |
|
|
{
|
6785 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data130[i].k), Tp(data130[i].nu),
|
6786 |
|
|
Tp(data130[i].phi));
|
6787 |
|
|
const Tp f0 = data130[i].f0;
|
6788 |
|
|
const Tp diff = f - f0;
|
6789 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6790 |
|
|
max_abs_diff = std::abs(diff);
|
6791 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6792 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6793 |
|
|
{
|
6794 |
|
|
const Tp frac = diff / f0;
|
6795 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6796 |
|
|
max_abs_frac = std::abs(frac);
|
6797 |
|
|
}
|
6798 |
|
|
}
|
6799 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6800 |
|
|
}
|
6801 |
|
|
|
6802 |
|
|
// Test data for k=0.39999999999999991, nu=0.0000000000000000.
|
6803 |
|
|
testcase_ellint_3<double> data131[] = {
|
6804 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.0000000000000000,
|
6805 |
|
|
0.0000000000000000 },
|
6806 |
|
|
{ 0.17467414669441531, 0.39999999999999991, 0.0000000000000000,
|
6807 |
|
|
0.17453292519943295 },
|
6808 |
|
|
{ 0.35018222772483443, 0.39999999999999991, 0.0000000000000000,
|
6809 |
|
|
0.34906585039886590 },
|
6810 |
|
|
{ 0.52729015917508748, 0.39999999999999991, 0.0000000000000000,
|
6811 |
|
|
0.52359877559829882 },
|
6812 |
|
|
{ 0.70662374407341255, 0.39999999999999991, 0.0000000000000000,
|
6813 |
|
|
0.69813170079773179 },
|
6814 |
|
|
{ 0.88859210497602170, 0.39999999999999991, 0.0000000000000000,
|
6815 |
|
|
0.87266462599716477 },
|
6816 |
|
|
{ 1.0733136290471379, 0.39999999999999991, 0.0000000000000000,
|
6817 |
|
|
1.0471975511965976 },
|
6818 |
|
|
{ 1.2605612170157061, 0.39999999999999991, 0.0000000000000000,
|
6819 |
|
|
1.2217304763960306 },
|
6820 |
|
|
{ 1.4497513956433437, 0.39999999999999991, 0.0000000000000000,
|
6821 |
|
|
1.3962634015954636 },
|
6822 |
|
|
{ 1.6399998658645112, 0.39999999999999991, 0.0000000000000000,
|
6823 |
|
|
1.5707963267948966 },
|
6824 |
|
|
};
|
6825 |
|
|
|
6826 |
|
|
// Test function for k=0.39999999999999991, nu=0.0000000000000000.
|
6827 |
|
|
template <typename Tp>
|
6828 |
|
|
void test131()
|
6829 |
|
|
{
|
6830 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6831 |
|
|
Tp max_abs_diff = -Tp(1);
|
6832 |
|
|
Tp max_abs_frac = -Tp(1);
|
6833 |
|
|
unsigned int num_datum = sizeof(data131)
|
6834 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6835 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6836 |
|
|
{
|
6837 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data131[i].k), Tp(data131[i].nu),
|
6838 |
|
|
Tp(data131[i].phi));
|
6839 |
|
|
const Tp f0 = data131[i].f0;
|
6840 |
|
|
const Tp diff = f - f0;
|
6841 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6842 |
|
|
max_abs_diff = std::abs(diff);
|
6843 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6844 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6845 |
|
|
{
|
6846 |
|
|
const Tp frac = diff / f0;
|
6847 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6848 |
|
|
max_abs_frac = std::abs(frac);
|
6849 |
|
|
}
|
6850 |
|
|
}
|
6851 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6852 |
|
|
}
|
6853 |
|
|
|
6854 |
|
|
// Test data for k=0.39999999999999991, nu=0.10000000000000001.
|
6855 |
|
|
testcase_ellint_3<double> data132[] = {
|
6856 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.10000000000000001,
|
6857 |
|
|
0.0000000000000000 },
|
6858 |
|
|
{ 0.17449806706684673, 0.39999999999999991, 0.10000000000000001,
|
6859 |
|
|
0.17453292519943295 },
|
6860 |
|
|
{ 0.34880048623856075, 0.39999999999999991, 0.10000000000000001,
|
6861 |
|
|
0.34906585039886590 },
|
6862 |
|
|
{ 0.52277322065757403, 0.39999999999999991, 0.10000000000000001,
|
6863 |
|
|
0.52359877559829882 },
|
6864 |
|
|
{ 0.69638072056918376, 0.39999999999999991, 0.10000000000000001,
|
6865 |
|
|
0.69813170079773179 },
|
6866 |
|
|
{ 0.86968426619831540, 0.39999999999999991, 0.10000000000000001,
|
6867 |
|
|
0.87266462599716477 },
|
6868 |
|
|
{ 1.0428044206578095, 0.39999999999999991, 0.10000000000000001,
|
6869 |
|
|
1.0471975511965976 },
|
6870 |
|
|
{ 1.2158651158274378, 0.39999999999999991, 0.10000000000000001,
|
6871 |
|
|
1.2217304763960306 },
|
6872 |
|
|
{ 1.3889447129893322, 0.39999999999999991, 0.10000000000000001,
|
6873 |
|
|
1.3962634015954636 },
|
6874 |
|
|
{ 1.5620566886683604, 0.39999999999999991, 0.10000000000000001,
|
6875 |
|
|
1.5707963267948966 },
|
6876 |
|
|
};
|
6877 |
|
|
|
6878 |
|
|
// Test function for k=0.39999999999999991, nu=0.10000000000000001.
|
6879 |
|
|
template <typename Tp>
|
6880 |
|
|
void test132()
|
6881 |
|
|
{
|
6882 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6883 |
|
|
Tp max_abs_diff = -Tp(1);
|
6884 |
|
|
Tp max_abs_frac = -Tp(1);
|
6885 |
|
|
unsigned int num_datum = sizeof(data132)
|
6886 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6887 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6888 |
|
|
{
|
6889 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data132[i].k), Tp(data132[i].nu),
|
6890 |
|
|
Tp(data132[i].phi));
|
6891 |
|
|
const Tp f0 = data132[i].f0;
|
6892 |
|
|
const Tp diff = f - f0;
|
6893 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6894 |
|
|
max_abs_diff = std::abs(diff);
|
6895 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6896 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6897 |
|
|
{
|
6898 |
|
|
const Tp frac = diff / f0;
|
6899 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6900 |
|
|
max_abs_frac = std::abs(frac);
|
6901 |
|
|
}
|
6902 |
|
|
}
|
6903 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6904 |
|
|
}
|
6905 |
|
|
|
6906 |
|
|
// Test data for k=0.39999999999999991, nu=0.20000000000000001.
|
6907 |
|
|
testcase_ellint_3<double> data133[] = {
|
6908 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.20000000000000001,
|
6909 |
|
|
0.0000000000000000 },
|
6910 |
|
|
{ 0.17432262290723399, 0.39999999999999991, 0.20000000000000001,
|
6911 |
|
|
0.17453292519943295 },
|
6912 |
|
|
{ 0.34743795258968596, 0.39999999999999991, 0.20000000000000001,
|
6913 |
|
|
0.34906585039886590 },
|
6914 |
|
|
{ 0.51838919472805123, 0.39999999999999991, 0.20000000000000001,
|
6915 |
|
|
0.52359877559829882 },
|
6916 |
|
|
{ 0.68663134739057918, 0.39999999999999991, 0.20000000000000001,
|
6917 |
|
|
0.69813170079773179 },
|
6918 |
|
|
{ 0.85206432981833979, 0.39999999999999991, 0.20000000000000001,
|
6919 |
|
|
0.87266462599716477 },
|
6920 |
|
|
{ 1.0149595349004430, 0.39999999999999991, 0.20000000000000001,
|
6921 |
|
|
1.0471975511965976 },
|
6922 |
|
|
{ 1.1758349405464676, 0.39999999999999991, 0.20000000000000001,
|
6923 |
|
|
1.2217304763960306 },
|
6924 |
|
|
{ 1.3353337673882635, 0.39999999999999991, 0.20000000000000001,
|
6925 |
|
|
1.3962634015954636 },
|
6926 |
|
|
{ 1.4941414344266770, 0.39999999999999991, 0.20000000000000001,
|
6927 |
|
|
1.5707963267948966 },
|
6928 |
|
|
};
|
6929 |
|
|
|
6930 |
|
|
// Test function for k=0.39999999999999991, nu=0.20000000000000001.
|
6931 |
|
|
template <typename Tp>
|
6932 |
|
|
void test133()
|
6933 |
|
|
{
|
6934 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6935 |
|
|
Tp max_abs_diff = -Tp(1);
|
6936 |
|
|
Tp max_abs_frac = -Tp(1);
|
6937 |
|
|
unsigned int num_datum = sizeof(data133)
|
6938 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6939 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6940 |
|
|
{
|
6941 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data133[i].k), Tp(data133[i].nu),
|
6942 |
|
|
Tp(data133[i].phi));
|
6943 |
|
|
const Tp f0 = data133[i].f0;
|
6944 |
|
|
const Tp diff = f - f0;
|
6945 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6946 |
|
|
max_abs_diff = std::abs(diff);
|
6947 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
6948 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
6949 |
|
|
{
|
6950 |
|
|
const Tp frac = diff / f0;
|
6951 |
|
|
if (std::abs(frac) > max_abs_frac)
|
6952 |
|
|
max_abs_frac = std::abs(frac);
|
6953 |
|
|
}
|
6954 |
|
|
}
|
6955 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
6956 |
|
|
}
|
6957 |
|
|
|
6958 |
|
|
// Test data for k=0.39999999999999991, nu=0.29999999999999999.
|
6959 |
|
|
testcase_ellint_3<double> data134[] = {
|
6960 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.29999999999999999,
|
6961 |
|
|
0.0000000000000000 },
|
6962 |
|
|
{ 0.17414781013591543, 0.39999999999999991, 0.29999999999999999,
|
6963 |
|
|
0.17453292519943295 },
|
6964 |
|
|
{ 0.34609415696777285, 0.39999999999999991, 0.29999999999999999,
|
6965 |
|
|
0.34906585039886590 },
|
6966 |
|
|
{ 0.51413131295862546, 0.39999999999999991, 0.29999999999999999,
|
6967 |
|
|
0.52359877559829882 },
|
6968 |
|
|
{ 0.67733527622935630, 0.39999999999999991, 0.29999999999999999,
|
6969 |
|
|
0.69813170079773179 },
|
6970 |
|
|
{ 0.83558675182733266, 0.39999999999999991, 0.29999999999999999,
|
6971 |
|
|
0.87266462599716477 },
|
6972 |
|
|
{ 0.98940140808865906, 0.39999999999999991, 0.29999999999999999,
|
6973 |
|
|
1.0471975511965976 },
|
6974 |
|
|
{ 1.1396968797728058, 0.39999999999999991, 0.29999999999999999,
|
6975 |
|
|
1.2217304763960306 },
|
6976 |
|
|
{ 1.2875920037865087, 0.39999999999999991, 0.29999999999999999,
|
6977 |
|
|
1.3962634015954636 },
|
6978 |
|
|
{ 1.4342789859950078, 0.39999999999999991, 0.29999999999999999,
|
6979 |
|
|
1.5707963267948966 },
|
6980 |
|
|
};
|
6981 |
|
|
|
6982 |
|
|
// Test function for k=0.39999999999999991, nu=0.29999999999999999.
|
6983 |
|
|
template <typename Tp>
|
6984 |
|
|
void test134()
|
6985 |
|
|
{
|
6986 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
6987 |
|
|
Tp max_abs_diff = -Tp(1);
|
6988 |
|
|
Tp max_abs_frac = -Tp(1);
|
6989 |
|
|
unsigned int num_datum = sizeof(data134)
|
6990 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
6991 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
6992 |
|
|
{
|
6993 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data134[i].k), Tp(data134[i].nu),
|
6994 |
|
|
Tp(data134[i].phi));
|
6995 |
|
|
const Tp f0 = data134[i].f0;
|
6996 |
|
|
const Tp diff = f - f0;
|
6997 |
|
|
if (std::abs(diff) > max_abs_diff)
|
6998 |
|
|
max_abs_diff = std::abs(diff);
|
6999 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7000 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7001 |
|
|
{
|
7002 |
|
|
const Tp frac = diff / f0;
|
7003 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7004 |
|
|
max_abs_frac = std::abs(frac);
|
7005 |
|
|
}
|
7006 |
|
|
}
|
7007 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7008 |
|
|
}
|
7009 |
|
|
|
7010 |
|
|
// Test data for k=0.39999999999999991, nu=0.40000000000000002.
|
7011 |
|
|
testcase_ellint_3<double> data135[] = {
|
7012 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.40000000000000002,
|
7013 |
|
|
0.0000000000000000 },
|
7014 |
|
|
{ 0.17397362471112710, 0.39999999999999991, 0.40000000000000002,
|
7015 |
|
|
0.17453292519943295 },
|
7016 |
|
|
{ 0.34476864603333196, 0.39999999999999991, 0.40000000000000002,
|
7017 |
|
|
0.34906585039886590 },
|
7018 |
|
|
{ 0.50999329415379357, 0.39999999999999991, 0.40000000000000002,
|
7019 |
|
|
0.52359877559829882 },
|
7020 |
|
|
{ 0.66845674551396017, 0.39999999999999991, 0.40000000000000002,
|
7021 |
|
|
0.69813170079773179 },
|
7022 |
|
|
{ 0.82012848346231748, 0.39999999999999991, 0.40000000000000002,
|
7023 |
|
|
0.87266462599716477 },
|
7024 |
|
|
{ 0.96582449258349057, 0.39999999999999991, 0.40000000000000002,
|
7025 |
|
|
1.0471975511965976 },
|
7026 |
|
|
{ 1.1068473749476286, 0.39999999999999991, 0.40000000000000002,
|
7027 |
|
|
1.2217304763960306 },
|
7028 |
|
|
{ 1.2447132729159986, 0.39999999999999991, 0.40000000000000002,
|
7029 |
|
|
1.3962634015954636 },
|
7030 |
|
|
{ 1.3809986210732901, 0.39999999999999991, 0.40000000000000002,
|
7031 |
|
|
1.5707963267948966 },
|
7032 |
|
|
};
|
7033 |
|
|
|
7034 |
|
|
// Test function for k=0.39999999999999991, nu=0.40000000000000002.
|
7035 |
|
|
template <typename Tp>
|
7036 |
|
|
void test135()
|
7037 |
|
|
{
|
7038 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7039 |
|
|
Tp max_abs_diff = -Tp(1);
|
7040 |
|
|
Tp max_abs_frac = -Tp(1);
|
7041 |
|
|
unsigned int num_datum = sizeof(data135)
|
7042 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7043 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7044 |
|
|
{
|
7045 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data135[i].k), Tp(data135[i].nu),
|
7046 |
|
|
Tp(data135[i].phi));
|
7047 |
|
|
const Tp f0 = data135[i].f0;
|
7048 |
|
|
const Tp diff = f - f0;
|
7049 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7050 |
|
|
max_abs_diff = std::abs(diff);
|
7051 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7052 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7053 |
|
|
{
|
7054 |
|
|
const Tp frac = diff / f0;
|
7055 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7056 |
|
|
max_abs_frac = std::abs(frac);
|
7057 |
|
|
}
|
7058 |
|
|
}
|
7059 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7060 |
|
|
}
|
7061 |
|
|
|
7062 |
|
|
// Test data for k=0.39999999999999991, nu=0.50000000000000000.
|
7063 |
|
|
testcase_ellint_3<double> data136[] = {
|
7064 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.50000000000000000,
|
7065 |
|
|
0.0000000000000000 },
|
7066 |
|
|
{ 0.17380006262854139, 0.39999999999999991, 0.50000000000000000,
|
7067 |
|
|
0.17453292519943295 },
|
7068 |
|
|
{ 0.34346098216756610, 0.39999999999999991, 0.50000000000000000,
|
7069 |
|
|
0.34906585039886590 },
|
7070 |
|
|
{ 0.50596929935059420, 0.39999999999999991, 0.50000000000000000,
|
7071 |
|
|
0.52359877559829882 },
|
7072 |
|
|
{ 0.65996392089131262, 0.39999999999999991, 0.50000000000000000,
|
7073 |
|
|
0.69813170079773179 },
|
7074 |
|
|
{ 0.80558463511364786, 0.39999999999999991, 0.50000000000000000,
|
7075 |
|
|
0.87266462599716477 },
|
7076 |
|
|
{ 0.94397834522857704, 0.39999999999999991, 0.50000000000000000,
|
7077 |
|
|
1.0471975511965976 },
|
7078 |
|
|
{ 1.0768075114108115, 0.39999999999999991, 0.50000000000000000,
|
7079 |
|
|
1.2217304763960306 },
|
7080 |
|
|
{ 1.2059184624251329, 0.39999999999999991, 0.50000000000000000,
|
7081 |
|
|
1.3962634015954636 },
|
7082 |
|
|
{ 1.3331797176377398, 0.39999999999999991, 0.50000000000000000,
|
7083 |
|
|
1.5707963267948966 },
|
7084 |
|
|
};
|
7085 |
|
|
|
7086 |
|
|
// Test function for k=0.39999999999999991, nu=0.50000000000000000.
|
7087 |
|
|
template <typename Tp>
|
7088 |
|
|
void test136()
|
7089 |
|
|
{
|
7090 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7091 |
|
|
Tp max_abs_diff = -Tp(1);
|
7092 |
|
|
Tp max_abs_frac = -Tp(1);
|
7093 |
|
|
unsigned int num_datum = sizeof(data136)
|
7094 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7095 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7096 |
|
|
{
|
7097 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data136[i].k), Tp(data136[i].nu),
|
7098 |
|
|
Tp(data136[i].phi));
|
7099 |
|
|
const Tp f0 = data136[i].f0;
|
7100 |
|
|
const Tp diff = f - f0;
|
7101 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7102 |
|
|
max_abs_diff = std::abs(diff);
|
7103 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7104 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7105 |
|
|
{
|
7106 |
|
|
const Tp frac = diff / f0;
|
7107 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7108 |
|
|
max_abs_frac = std::abs(frac);
|
7109 |
|
|
}
|
7110 |
|
|
}
|
7111 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7112 |
|
|
}
|
7113 |
|
|
|
7114 |
|
|
// Test data for k=0.39999999999999991, nu=0.59999999999999998.
|
7115 |
|
|
testcase_ellint_3<double> data137[] = {
|
7116 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.59999999999999998,
|
7117 |
|
|
0.0000000000000000 },
|
7118 |
|
|
{ 0.17362711992081248, 0.39999999999999991, 0.59999999999999998,
|
7119 |
|
|
0.17453292519943295 },
|
7120 |
|
|
{ 0.34217074276403953, 0.39999999999999991, 0.59999999999999998,
|
7121 |
|
|
0.34906585039886590 },
|
7122 |
|
|
{ 0.50205389185761617, 0.39999999999999991, 0.59999999999999998,
|
7123 |
|
|
0.52359877559829882 },
|
7124 |
|
|
{ 0.65182834920372745, 0.39999999999999991, 0.59999999999999998,
|
7125 |
|
|
0.69813170079773179 },
|
7126 |
|
|
{ 0.79186512820565136, 0.39999999999999991, 0.59999999999999998,
|
7127 |
|
|
0.87266462599716477 },
|
7128 |
|
|
{ 0.92365535916287134, 0.39999999999999991, 0.59999999999999998,
|
7129 |
|
|
1.0471975511965976 },
|
7130 |
|
|
{ 1.0491915663957907, 0.39999999999999991, 0.59999999999999998,
|
7131 |
|
|
1.2217304763960306 },
|
7132 |
|
|
{ 1.1705934291745104, 0.39999999999999991, 0.59999999999999998,
|
7133 |
|
|
1.3962634015954636 },
|
7134 |
|
|
{ 1.2899514672527024, 0.39999999999999991, 0.59999999999999998,
|
7135 |
|
|
1.5707963267948966 },
|
7136 |
|
|
};
|
7137 |
|
|
|
7138 |
|
|
// Test function for k=0.39999999999999991, nu=0.59999999999999998.
|
7139 |
|
|
template <typename Tp>
|
7140 |
|
|
void test137()
|
7141 |
|
|
{
|
7142 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7143 |
|
|
Tp max_abs_diff = -Tp(1);
|
7144 |
|
|
Tp max_abs_frac = -Tp(1);
|
7145 |
|
|
unsigned int num_datum = sizeof(data137)
|
7146 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7147 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7148 |
|
|
{
|
7149 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data137[i].k), Tp(data137[i].nu),
|
7150 |
|
|
Tp(data137[i].phi));
|
7151 |
|
|
const Tp f0 = data137[i].f0;
|
7152 |
|
|
const Tp diff = f - f0;
|
7153 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7154 |
|
|
max_abs_diff = std::abs(diff);
|
7155 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7156 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7157 |
|
|
{
|
7158 |
|
|
const Tp frac = diff / f0;
|
7159 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7160 |
|
|
max_abs_frac = std::abs(frac);
|
7161 |
|
|
}
|
7162 |
|
|
}
|
7163 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7164 |
|
|
}
|
7165 |
|
|
|
7166 |
|
|
// Test data for k=0.39999999999999991, nu=0.69999999999999996.
|
7167 |
|
|
testcase_ellint_3<double> data138[] = {
|
7168 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.69999999999999996,
|
7169 |
|
|
0.0000000000000000 },
|
7170 |
|
|
{ 0.17345479265712871, 0.39999999999999991, 0.69999999999999996,
|
7171 |
|
|
0.17453292519943295 },
|
7172 |
|
|
{ 0.34089751955950354, 0.39999999999999991, 0.69999999999999996,
|
7173 |
|
|
0.34906585039886590 },
|
7174 |
|
|
{ 0.49824200167361343, 0.39999999999999991, 0.69999999999999996,
|
7175 |
|
|
0.52359877559829882 },
|
7176 |
|
|
{ 0.64402450341199413, 0.39999999999999991, 0.69999999999999996,
|
7177 |
|
|
0.69813170079773179 },
|
7178 |
|
|
{ 0.77889207804122873, 0.39999999999999991, 0.69999999999999996,
|
7179 |
|
|
0.87266462599716477 },
|
7180 |
|
|
{ 0.90468169720957992, 0.39999999999999991, 0.69999999999999996,
|
7181 |
|
|
1.0471975511965976 },
|
7182 |
|
|
{ 1.0236847823692916, 0.39999999999999991, 0.69999999999999996,
|
7183 |
|
|
1.2217304763960306 },
|
7184 |
|
|
{ 1.1382465247425164, 0.39999999999999991, 0.69999999999999996,
|
7185 |
|
|
1.3962634015954636 },
|
7186 |
|
|
{ 1.2506255923253344, 0.39999999999999991, 0.69999999999999996,
|
7187 |
|
|
1.5707963267948966 },
|
7188 |
|
|
};
|
7189 |
|
|
|
7190 |
|
|
// Test function for k=0.39999999999999991, nu=0.69999999999999996.
|
7191 |
|
|
template <typename Tp>
|
7192 |
|
|
void test138()
|
7193 |
|
|
{
|
7194 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7195 |
|
|
Tp max_abs_diff = -Tp(1);
|
7196 |
|
|
Tp max_abs_frac = -Tp(1);
|
7197 |
|
|
unsigned int num_datum = sizeof(data138)
|
7198 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7199 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7200 |
|
|
{
|
7201 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data138[i].k), Tp(data138[i].nu),
|
7202 |
|
|
Tp(data138[i].phi));
|
7203 |
|
|
const Tp f0 = data138[i].f0;
|
7204 |
|
|
const Tp diff = f - f0;
|
7205 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7206 |
|
|
max_abs_diff = std::abs(diff);
|
7207 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7208 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7209 |
|
|
{
|
7210 |
|
|
const Tp frac = diff / f0;
|
7211 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7212 |
|
|
max_abs_frac = std::abs(frac);
|
7213 |
|
|
}
|
7214 |
|
|
}
|
7215 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7216 |
|
|
}
|
7217 |
|
|
|
7218 |
|
|
// Test data for k=0.39999999999999991, nu=0.80000000000000004.
|
7219 |
|
|
testcase_ellint_3<double> data139[] = {
|
7220 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.80000000000000004,
|
7221 |
|
|
0.0000000000000000 },
|
7222 |
|
|
{ 0.17328307694277156, 0.39999999999999991, 0.80000000000000004,
|
7223 |
|
|
0.17453292519943295 },
|
7224 |
|
|
{ 0.33964091800132007, 0.39999999999999991, 0.80000000000000004,
|
7225 |
|
|
0.34906585039886590 },
|
7226 |
|
|
{ 0.49452889372467451, 0.39999999999999991, 0.80000000000000004,
|
7227 |
|
|
0.52359877559829882 },
|
7228 |
|
|
{ 0.63652940095937327, 0.39999999999999991, 0.80000000000000004,
|
7229 |
|
|
0.69813170079773179 },
|
7230 |
|
|
{ 0.76659772511159097, 0.39999999999999991, 0.80000000000000004,
|
7231 |
|
|
0.87266462599716477 },
|
7232 |
|
|
{ 0.88691047977338111, 0.39999999999999991, 0.80000000000000004,
|
7233 |
|
|
1.0471975511965976 },
|
7234 |
|
|
{ 1.0000273200611640, 0.39999999999999991, 0.80000000000000004,
|
7235 |
|
|
1.2217304763960306 },
|
7236 |
|
|
{ 1.1084787902188007, 0.39999999999999991, 0.80000000000000004,
|
7237 |
|
|
1.3962634015954636 },
|
7238 |
|
|
{ 1.2146499565727209, 0.39999999999999991, 0.80000000000000004,
|
7239 |
|
|
1.5707963267948966 },
|
7240 |
|
|
};
|
7241 |
|
|
|
7242 |
|
|
// Test function for k=0.39999999999999991, nu=0.80000000000000004.
|
7243 |
|
|
template <typename Tp>
|
7244 |
|
|
void test139()
|
7245 |
|
|
{
|
7246 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7247 |
|
|
Tp max_abs_diff = -Tp(1);
|
7248 |
|
|
Tp max_abs_frac = -Tp(1);
|
7249 |
|
|
unsigned int num_datum = sizeof(data139)
|
7250 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7251 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7252 |
|
|
{
|
7253 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data139[i].k), Tp(data139[i].nu),
|
7254 |
|
|
Tp(data139[i].phi));
|
7255 |
|
|
const Tp f0 = data139[i].f0;
|
7256 |
|
|
const Tp diff = f - f0;
|
7257 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7258 |
|
|
max_abs_diff = std::abs(diff);
|
7259 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7260 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7261 |
|
|
{
|
7262 |
|
|
const Tp frac = diff / f0;
|
7263 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7264 |
|
|
max_abs_frac = std::abs(frac);
|
7265 |
|
|
}
|
7266 |
|
|
}
|
7267 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7268 |
|
|
}
|
7269 |
|
|
|
7270 |
|
|
// Test data for k=0.39999999999999991, nu=0.90000000000000002.
|
7271 |
|
|
testcase_ellint_3<double> data140[] = {
|
7272 |
|
|
{ -0.0000000000000000, 0.39999999999999991, 0.90000000000000002,
|
7273 |
|
|
0.0000000000000000 },
|
7274 |
|
|
{ 0.17311196891868130, 0.39999999999999991, 0.90000000000000002,
|
7275 |
|
|
0.17453292519943295 },
|
7276 |
|
|
{ 0.33840055664911906, 0.39999999999999991, 0.90000000000000002,
|
7277 |
|
|
0.34906585039886590 },
|
7278 |
|
|
{ 0.49091013944075340, 0.39999999999999991, 0.90000000000000002,
|
7279 |
|
|
0.52359877559829882 },
|
7280 |
|
|
{ 0.62932228186809591, 0.39999999999999991, 0.90000000000000002,
|
7281 |
|
|
0.69813170079773179 },
|
7282 |
|
|
{ 0.75492278323019801, 0.39999999999999991, 0.90000000000000002,
|
7283 |
|
|
0.87266462599716477 },
|
7284 |
|
|
{ 0.87021659043854294, 0.39999999999999991, 0.90000000000000002,
|
7285 |
|
|
1.0471975511965976 },
|
7286 |
|
|
{ 0.97800245228239246, 0.39999999999999991, 0.90000000000000002,
|
7287 |
|
|
1.2217304763960306 },
|
7288 |
|
|
{ 1.0809625773173694, 0.39999999999999991, 0.90000000000000002,
|
7289 |
|
|
1.3962634015954636 },
|
7290 |
|
|
{ 1.1815758115929846, 0.39999999999999991, 0.90000000000000002,
|
7291 |
|
|
1.5707963267948966 },
|
7292 |
|
|
};
|
7293 |
|
|
|
7294 |
|
|
// Test function for k=0.39999999999999991, nu=0.90000000000000002.
|
7295 |
|
|
template <typename Tp>
|
7296 |
|
|
void test140()
|
7297 |
|
|
{
|
7298 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7299 |
|
|
Tp max_abs_diff = -Tp(1);
|
7300 |
|
|
Tp max_abs_frac = -Tp(1);
|
7301 |
|
|
unsigned int num_datum = sizeof(data140)
|
7302 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7303 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7304 |
|
|
{
|
7305 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data140[i].k), Tp(data140[i].nu),
|
7306 |
|
|
Tp(data140[i].phi));
|
7307 |
|
|
const Tp f0 = data140[i].f0;
|
7308 |
|
|
const Tp diff = f - f0;
|
7309 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7310 |
|
|
max_abs_diff = std::abs(diff);
|
7311 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7312 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7313 |
|
|
{
|
7314 |
|
|
const Tp frac = diff / f0;
|
7315 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7316 |
|
|
max_abs_frac = std::abs(frac);
|
7317 |
|
|
}
|
7318 |
|
|
}
|
7319 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7320 |
|
|
}
|
7321 |
|
|
|
7322 |
|
|
// Test data for k=0.50000000000000000, nu=0.0000000000000000.
|
7323 |
|
|
testcase_ellint_3<double> data141[] = {
|
7324 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.0000000000000000,
|
7325 |
|
|
0.0000000000000000 },
|
7326 |
|
|
{ 0.17475385514035785, 0.50000000000000000, 0.0000000000000000,
|
7327 |
|
|
0.17453292519943295 },
|
7328 |
|
|
{ 0.35081868470101585, 0.50000000000000000, 0.0000000000000000,
|
7329 |
|
|
0.34906585039886590 },
|
7330 |
|
|
{ 0.52942862705190585, 0.50000000000000000, 0.0000000000000000,
|
7331 |
|
|
0.52359877559829882 },
|
7332 |
|
|
{ 0.71164727562630326, 0.50000000000000000, 0.0000000000000000,
|
7333 |
|
|
0.69813170079773179 },
|
7334 |
|
|
{ 0.89824523594227768, 0.50000000000000000, 0.0000000000000000,
|
7335 |
|
|
0.87266462599716477 },
|
7336 |
|
|
{ 1.0895506700518851, 0.50000000000000000, 0.0000000000000000,
|
7337 |
|
|
1.0471975511965976 },
|
7338 |
|
|
{ 1.2853005857432933, 0.50000000000000000, 0.0000000000000000,
|
7339 |
|
|
1.2217304763960306 },
|
7340 |
|
|
{ 1.4845545520549484, 0.50000000000000000, 0.0000000000000000,
|
7341 |
|
|
1.3962634015954636 },
|
7342 |
|
|
{ 1.6857503548125963, 0.50000000000000000, 0.0000000000000000,
|
7343 |
|
|
1.5707963267948966 },
|
7344 |
|
|
};
|
7345 |
|
|
|
7346 |
|
|
// Test function for k=0.50000000000000000, nu=0.0000000000000000.
|
7347 |
|
|
template <typename Tp>
|
7348 |
|
|
void test141()
|
7349 |
|
|
{
|
7350 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7351 |
|
|
Tp max_abs_diff = -Tp(1);
|
7352 |
|
|
Tp max_abs_frac = -Tp(1);
|
7353 |
|
|
unsigned int num_datum = sizeof(data141)
|
7354 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7355 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7356 |
|
|
{
|
7357 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data141[i].k), Tp(data141[i].nu),
|
7358 |
|
|
Tp(data141[i].phi));
|
7359 |
|
|
const Tp f0 = data141[i].f0;
|
7360 |
|
|
const Tp diff = f - f0;
|
7361 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7362 |
|
|
max_abs_diff = std::abs(diff);
|
7363 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7364 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7365 |
|
|
{
|
7366 |
|
|
const Tp frac = diff / f0;
|
7367 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7368 |
|
|
max_abs_frac = std::abs(frac);
|
7369 |
|
|
}
|
7370 |
|
|
}
|
7371 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7372 |
|
|
}
|
7373 |
|
|
|
7374 |
|
|
// Test data for k=0.50000000000000000, nu=0.10000000000000001.
|
7375 |
|
|
testcase_ellint_3<double> data142[] = {
|
7376 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.10000000000000001,
|
7377 |
|
|
0.0000000000000000 },
|
7378 |
|
|
{ 0.17457763120814676, 0.50000000000000000, 0.10000000000000001,
|
7379 |
|
|
0.17453292519943295 },
|
7380 |
|
|
{ 0.34943246340849154, 0.50000000000000000, 0.10000000000000001,
|
7381 |
|
|
0.34906585039886590 },
|
7382 |
|
|
{ 0.52487937869610801, 0.50000000000000000, 0.10000000000000001,
|
7383 |
|
|
0.52359877559829882 },
|
7384 |
|
|
{ 0.70127785096388395, 0.50000000000000000, 0.10000000000000001,
|
7385 |
|
|
0.69813170079773179 },
|
7386 |
|
|
{ 0.87898815988624479, 0.50000000000000000, 0.10000000000000001,
|
7387 |
|
|
0.87266462599716477 },
|
7388 |
|
|
{ 1.0582764576094172, 0.50000000000000000, 0.10000000000000001,
|
7389 |
|
|
1.0471975511965976 },
|
7390 |
|
|
{ 1.2391936844060207, 0.50000000000000000, 0.10000000000000001,
|
7391 |
|
|
1.2217304763960306 },
|
7392 |
|
|
{ 1.4214793542995841, 0.50000000000000000, 0.10000000000000001,
|
7393 |
|
|
1.3962634015954636 },
|
7394 |
|
|
{ 1.6045524936084892, 0.50000000000000000, 0.10000000000000001,
|
7395 |
|
|
1.5707963267948966 },
|
7396 |
|
|
};
|
7397 |
|
|
|
7398 |
|
|
// Test function for k=0.50000000000000000, nu=0.10000000000000001.
|
7399 |
|
|
template <typename Tp>
|
7400 |
|
|
void test142()
|
7401 |
|
|
{
|
7402 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7403 |
|
|
Tp max_abs_diff = -Tp(1);
|
7404 |
|
|
Tp max_abs_frac = -Tp(1);
|
7405 |
|
|
unsigned int num_datum = sizeof(data142)
|
7406 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7407 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7408 |
|
|
{
|
7409 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data142[i].k), Tp(data142[i].nu),
|
7410 |
|
|
Tp(data142[i].phi));
|
7411 |
|
|
const Tp f0 = data142[i].f0;
|
7412 |
|
|
const Tp diff = f - f0;
|
7413 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7414 |
|
|
max_abs_diff = std::abs(diff);
|
7415 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7416 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7417 |
|
|
{
|
7418 |
|
|
const Tp frac = diff / f0;
|
7419 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7420 |
|
|
max_abs_frac = std::abs(frac);
|
7421 |
|
|
}
|
7422 |
|
|
}
|
7423 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7424 |
|
|
}
|
7425 |
|
|
|
7426 |
|
|
// Test data for k=0.50000000000000000, nu=0.20000000000000001.
|
7427 |
|
|
testcase_ellint_3<double> data143[] = {
|
7428 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.20000000000000001,
|
7429 |
|
|
0.0000000000000000 },
|
7430 |
|
|
{ 0.17440204336345433, 0.50000000000000000, 0.20000000000000001,
|
7431 |
|
|
0.17453292519943295 },
|
7432 |
|
|
{ 0.34806552388338824, 0.50000000000000000, 0.20000000000000001,
|
7433 |
|
|
0.34906585039886590 },
|
7434 |
|
|
{ 0.52046416757129821, 0.50000000000000000, 0.20000000000000001,
|
7435 |
|
|
0.52359877559829882 },
|
7436 |
|
|
{ 0.69140924550993876, 0.50000000000000000, 0.20000000000000001,
|
7437 |
|
|
0.69813170079773179 },
|
7438 |
|
|
{ 0.86104678636125520, 0.50000000000000000, 0.20000000000000001,
|
7439 |
|
|
0.87266462599716477 },
|
7440 |
|
|
{ 1.0297439459053981, 0.50000000000000000, 0.20000000000000001,
|
7441 |
|
|
1.0471975511965976 },
|
7442 |
|
|
{ 1.1979214112912036, 0.50000000000000000, 0.20000000000000001,
|
7443 |
|
|
1.2217304763960306 },
|
7444 |
|
|
{ 1.3659033858648930, 0.50000000000000000, 0.20000000000000001,
|
7445 |
|
|
1.3962634015954636 },
|
7446 |
|
|
{ 1.5338490483665983, 0.50000000000000000, 0.20000000000000001,
|
7447 |
|
|
1.5707963267948966 },
|
7448 |
|
|
};
|
7449 |
|
|
|
7450 |
|
|
// Test function for k=0.50000000000000000, nu=0.20000000000000001.
|
7451 |
|
|
template <typename Tp>
|
7452 |
|
|
void test143()
|
7453 |
|
|
{
|
7454 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7455 |
|
|
Tp max_abs_diff = -Tp(1);
|
7456 |
|
|
Tp max_abs_frac = -Tp(1);
|
7457 |
|
|
unsigned int num_datum = sizeof(data143)
|
7458 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7459 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7460 |
|
|
{
|
7461 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data143[i].k), Tp(data143[i].nu),
|
7462 |
|
|
Tp(data143[i].phi));
|
7463 |
|
|
const Tp f0 = data143[i].f0;
|
7464 |
|
|
const Tp diff = f - f0;
|
7465 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7466 |
|
|
max_abs_diff = std::abs(diff);
|
7467 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7468 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7469 |
|
|
{
|
7470 |
|
|
const Tp frac = diff / f0;
|
7471 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7472 |
|
|
max_abs_frac = std::abs(frac);
|
7473 |
|
|
}
|
7474 |
|
|
}
|
7475 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7476 |
|
|
}
|
7477 |
|
|
|
7478 |
|
|
// Test data for k=0.50000000000000000, nu=0.29999999999999999.
|
7479 |
|
|
testcase_ellint_3<double> data144[] = {
|
7480 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.29999999999999999,
|
7481 |
|
|
0.0000000000000000 },
|
7482 |
|
|
{ 0.17422708752228896, 0.50000000000000000, 0.29999999999999999,
|
7483 |
|
|
0.17453292519943295 },
|
7484 |
|
|
{ 0.34671739434855858, 0.50000000000000000, 0.29999999999999999,
|
7485 |
|
|
0.34906585039886590 },
|
7486 |
|
|
{ 0.51617616305641889, 0.50000000000000000, 0.29999999999999999,
|
7487 |
|
|
0.52359877559829882 },
|
7488 |
|
|
{ 0.68200047612545178, 0.50000000000000000, 0.29999999999999999,
|
7489 |
|
|
0.69813170079773179 },
|
7490 |
|
|
{ 0.84427217869498372, 0.50000000000000000, 0.29999999999999999,
|
7491 |
|
|
0.87266462599716477 },
|
7492 |
|
|
{ 1.0035637821389782, 0.50000000000000000, 0.29999999999999999,
|
7493 |
|
|
1.0471975511965976 },
|
7494 |
|
|
{ 1.1606800483933113, 0.50000000000000000, 0.29999999999999999,
|
7495 |
|
|
1.2217304763960306 },
|
7496 |
|
|
{ 1.3164407134643459, 0.50000000000000000, 0.29999999999999999,
|
7497 |
|
|
1.3962634015954636 },
|
7498 |
|
|
{ 1.4715681939859637, 0.50000000000000000, 0.29999999999999999,
|
7499 |
|
|
1.5707963267948966 },
|
7500 |
|
|
};
|
7501 |
|
|
|
7502 |
|
|
// Test function for k=0.50000000000000000, nu=0.29999999999999999.
|
7503 |
|
|
template <typename Tp>
|
7504 |
|
|
void test144()
|
7505 |
|
|
{
|
7506 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7507 |
|
|
Tp max_abs_diff = -Tp(1);
|
7508 |
|
|
Tp max_abs_frac = -Tp(1);
|
7509 |
|
|
unsigned int num_datum = sizeof(data144)
|
7510 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7511 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7512 |
|
|
{
|
7513 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data144[i].k), Tp(data144[i].nu),
|
7514 |
|
|
Tp(data144[i].phi));
|
7515 |
|
|
const Tp f0 = data144[i].f0;
|
7516 |
|
|
const Tp diff = f - f0;
|
7517 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7518 |
|
|
max_abs_diff = std::abs(diff);
|
7519 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7520 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7521 |
|
|
{
|
7522 |
|
|
const Tp frac = diff / f0;
|
7523 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7524 |
|
|
max_abs_frac = std::abs(frac);
|
7525 |
|
|
}
|
7526 |
|
|
}
|
7527 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7528 |
|
|
}
|
7529 |
|
|
|
7530 |
|
|
// Test data for k=0.50000000000000000, nu=0.40000000000000002.
|
7531 |
|
|
testcase_ellint_3<double> data145[] = {
|
7532 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.40000000000000002,
|
7533 |
|
|
0.0000000000000000 },
|
7534 |
|
|
{ 0.17405275963859917, 0.50000000000000000, 0.40000000000000002,
|
7535 |
|
|
0.17453292519943295 },
|
7536 |
|
|
{ 0.34538761957029329, 0.50000000000000000, 0.40000000000000002,
|
7537 |
|
|
0.34906585039886590 },
|
7538 |
|
|
{ 0.51200902646603919, 0.50000000000000000, 0.40000000000000002,
|
7539 |
|
|
0.52359877559829882 },
|
7540 |
|
|
{ 0.67301522212868792, 0.50000000000000000, 0.40000000000000002,
|
7541 |
|
|
0.69813170079773179 },
|
7542 |
|
|
{ 0.82853844466313320, 0.50000000000000000, 0.40000000000000002,
|
7543 |
|
|
0.87266462599716477 },
|
7544 |
|
|
{ 0.97942097862681488, 0.50000000000000000, 0.40000000000000002,
|
7545 |
|
|
1.0471975511965976 },
|
7546 |
|
|
{ 1.1268429801220616, 0.50000000000000000, 0.40000000000000002,
|
7547 |
|
|
1.2217304763960306 },
|
7548 |
|
|
{ 1.2720406704533922, 0.50000000000000000, 0.40000000000000002,
|
7549 |
|
|
1.3962634015954636 },
|
7550 |
|
|
{ 1.4161679518465340, 0.50000000000000000, 0.40000000000000002,
|
7551 |
|
|
1.5707963267948966 },
|
7552 |
|
|
};
|
7553 |
|
|
|
7554 |
|
|
// Test function for k=0.50000000000000000, nu=0.40000000000000002.
|
7555 |
|
|
template <typename Tp>
|
7556 |
|
|
void test145()
|
7557 |
|
|
{
|
7558 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7559 |
|
|
Tp max_abs_diff = -Tp(1);
|
7560 |
|
|
Tp max_abs_frac = -Tp(1);
|
7561 |
|
|
unsigned int num_datum = sizeof(data145)
|
7562 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7563 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7564 |
|
|
{
|
7565 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data145[i].k), Tp(data145[i].nu),
|
7566 |
|
|
Tp(data145[i].phi));
|
7567 |
|
|
const Tp f0 = data145[i].f0;
|
7568 |
|
|
const Tp diff = f - f0;
|
7569 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7570 |
|
|
max_abs_diff = std::abs(diff);
|
7571 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7572 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7573 |
|
|
{
|
7574 |
|
|
const Tp frac = diff / f0;
|
7575 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7576 |
|
|
max_abs_frac = std::abs(frac);
|
7577 |
|
|
}
|
7578 |
|
|
}
|
7579 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7580 |
|
|
}
|
7581 |
|
|
|
7582 |
|
|
// Test data for k=0.50000000000000000, nu=0.50000000000000000.
|
7583 |
|
|
testcase_ellint_3<double> data146[] = {
|
7584 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.50000000000000000,
|
7585 |
|
|
0.0000000000000000 },
|
7586 |
|
|
{ 0.17387905570381157, 0.50000000000000000, 0.50000000000000000,
|
7587 |
|
|
0.17453292519943295 },
|
7588 |
|
|
{ 0.34407576010465207, 0.50000000000000000, 0.50000000000000000,
|
7589 |
|
|
0.34906585039886590 },
|
7590 |
|
|
{ 0.50795686560160835, 0.50000000000000000, 0.50000000000000000,
|
7591 |
|
|
0.52359877559829882 },
|
7592 |
|
|
{ 0.66442115453330175, 0.50000000000000000, 0.50000000000000000,
|
7593 |
|
|
0.69813170079773179 },
|
7594 |
|
|
{ 0.81373829119355345, 0.50000000000000000, 0.50000000000000000,
|
7595 |
|
|
0.87266462599716477 },
|
7596 |
|
|
{ 0.95705743313235825, 0.50000000000000000, 0.50000000000000000,
|
7597 |
|
|
1.0471975511965976 },
|
7598 |
|
|
{ 1.0959131991362556, 0.50000000000000000, 0.50000000000000000,
|
7599 |
|
|
1.2217304763960306 },
|
7600 |
|
|
{ 1.2318900529754597, 0.50000000000000000, 0.50000000000000000,
|
7601 |
|
|
1.3962634015954636 },
|
7602 |
|
|
{ 1.3664739530045971, 0.50000000000000000, 0.50000000000000000,
|
7603 |
|
|
1.5707963267948966 },
|
7604 |
|
|
};
|
7605 |
|
|
|
7606 |
|
|
// Test function for k=0.50000000000000000, nu=0.50000000000000000.
|
7607 |
|
|
template <typename Tp>
|
7608 |
|
|
void test146()
|
7609 |
|
|
{
|
7610 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7611 |
|
|
Tp max_abs_diff = -Tp(1);
|
7612 |
|
|
Tp max_abs_frac = -Tp(1);
|
7613 |
|
|
unsigned int num_datum = sizeof(data146)
|
7614 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7615 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7616 |
|
|
{
|
7617 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data146[i].k), Tp(data146[i].nu),
|
7618 |
|
|
Tp(data146[i].phi));
|
7619 |
|
|
const Tp f0 = data146[i].f0;
|
7620 |
|
|
const Tp diff = f - f0;
|
7621 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7622 |
|
|
max_abs_diff = std::abs(diff);
|
7623 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7624 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7625 |
|
|
{
|
7626 |
|
|
const Tp frac = diff / f0;
|
7627 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7628 |
|
|
max_abs_frac = std::abs(frac);
|
7629 |
|
|
}
|
7630 |
|
|
}
|
7631 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7632 |
|
|
}
|
7633 |
|
|
|
7634 |
|
|
// Test data for k=0.50000000000000000, nu=0.59999999999999998.
|
7635 |
|
|
testcase_ellint_3<double> data147[] = {
|
7636 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.59999999999999998,
|
7637 |
|
|
0.0000000000000000 },
|
7638 |
|
|
{ 0.17370597174637581, 0.50000000000000000, 0.59999999999999998,
|
7639 |
|
|
0.17453292519943295 },
|
7640 |
|
|
{ 0.34278139158591414, 0.50000000000000000, 0.59999999999999998,
|
7641 |
|
|
0.34906585039886590 },
|
7642 |
|
|
{ 0.50401419439302719, 0.50000000000000000, 0.59999999999999998,
|
7643 |
|
|
0.52359877559829882 },
|
7644 |
|
|
{ 0.65618938076167221, 0.50000000000000000, 0.59999999999999998,
|
7645 |
|
|
0.69813170079773179 },
|
7646 |
|
|
{ 0.79977959248855424, 0.50000000000000000, 0.59999999999999998,
|
7647 |
|
|
0.87266462599716477 },
|
7648 |
|
|
{ 0.93625925190753545, 0.50000000000000000, 0.59999999999999998,
|
7649 |
|
|
1.0471975511965976 },
|
7650 |
|
|
{ 1.0674905658379710, 0.50000000000000000, 0.59999999999999998,
|
7651 |
|
|
1.2217304763960306 },
|
7652 |
|
|
{ 1.1953481298023048, 0.50000000000000000, 0.59999999999999998,
|
7653 |
|
|
1.3962634015954636 },
|
7654 |
|
|
{ 1.3215740290190876, 0.50000000000000000, 0.59999999999999998,
|
7655 |
|
|
1.5707963267948966 },
|
7656 |
|
|
};
|
7657 |
|
|
|
7658 |
|
|
// Test function for k=0.50000000000000000, nu=0.59999999999999998.
|
7659 |
|
|
template <typename Tp>
|
7660 |
|
|
void test147()
|
7661 |
|
|
{
|
7662 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7663 |
|
|
Tp max_abs_diff = -Tp(1);
|
7664 |
|
|
Tp max_abs_frac = -Tp(1);
|
7665 |
|
|
unsigned int num_datum = sizeof(data147)
|
7666 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7667 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7668 |
|
|
{
|
7669 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data147[i].k), Tp(data147[i].nu),
|
7670 |
|
|
Tp(data147[i].phi));
|
7671 |
|
|
const Tp f0 = data147[i].f0;
|
7672 |
|
|
const Tp diff = f - f0;
|
7673 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7674 |
|
|
max_abs_diff = std::abs(diff);
|
7675 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7676 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7677 |
|
|
{
|
7678 |
|
|
const Tp frac = diff / f0;
|
7679 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7680 |
|
|
max_abs_frac = std::abs(frac);
|
7681 |
|
|
}
|
7682 |
|
|
}
|
7683 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7684 |
|
|
}
|
7685 |
|
|
|
7686 |
|
|
// Test data for k=0.50000000000000000, nu=0.69999999999999996.
|
7687 |
|
|
testcase_ellint_3<double> data148[] = {
|
7688 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.69999999999999996,
|
7689 |
|
|
0.0000000000000000 },
|
7690 |
|
|
{ 0.17353350383131641, 0.50000000000000000, 0.69999999999999996,
|
7691 |
|
|
0.17453292519943295 },
|
7692 |
|
|
{ 0.34150410405436771, 0.50000000000000000, 0.69999999999999996,
|
7693 |
|
|
0.34906585039886590 },
|
7694 |
|
|
{ 0.50017589696443487, 0.50000000000000000, 0.69999999999999996,
|
7695 |
|
|
0.52359877559829882 },
|
7696 |
|
|
{ 0.64829398188419962, 0.50000000000000000, 0.69999999999999996,
|
7697 |
|
|
0.69813170079773179 },
|
7698 |
|
|
{ 0.78658270782402073, 0.50000000000000000, 0.69999999999999996,
|
7699 |
|
|
0.87266462599716477 },
|
7700 |
|
|
{ 0.91684738336675053, 0.50000000000000000, 0.69999999999999996,
|
7701 |
|
|
1.0471975511965976 },
|
7702 |
|
|
{ 1.0412486789555937, 0.50000000000000000, 0.69999999999999996,
|
7703 |
|
|
1.2217304763960306 },
|
7704 |
|
|
{ 1.1619021847612001, 0.50000000000000000, 0.69999999999999996,
|
7705 |
|
|
1.3962634015954636 },
|
7706 |
|
|
{ 1.2807475181182502, 0.50000000000000000, 0.69999999999999996,
|
7707 |
|
|
1.5707963267948966 },
|
7708 |
|
|
};
|
7709 |
|
|
|
7710 |
|
|
// Test function for k=0.50000000000000000, nu=0.69999999999999996.
|
7711 |
|
|
template <typename Tp>
|
7712 |
|
|
void test148()
|
7713 |
|
|
{
|
7714 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7715 |
|
|
Tp max_abs_diff = -Tp(1);
|
7716 |
|
|
Tp max_abs_frac = -Tp(1);
|
7717 |
|
|
unsigned int num_datum = sizeof(data148)
|
7718 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7719 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7720 |
|
|
{
|
7721 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data148[i].k), Tp(data148[i].nu),
|
7722 |
|
|
Tp(data148[i].phi));
|
7723 |
|
|
const Tp f0 = data148[i].f0;
|
7724 |
|
|
const Tp diff = f - f0;
|
7725 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7726 |
|
|
max_abs_diff = std::abs(diff);
|
7727 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7728 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7729 |
|
|
{
|
7730 |
|
|
const Tp frac = diff / f0;
|
7731 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7732 |
|
|
max_abs_frac = std::abs(frac);
|
7733 |
|
|
}
|
7734 |
|
|
}
|
7735 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7736 |
|
|
}
|
7737 |
|
|
|
7738 |
|
|
// Test data for k=0.50000000000000000, nu=0.80000000000000004.
|
7739 |
|
|
testcase_ellint_3<double> data149[] = {
|
7740 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.80000000000000004,
|
7741 |
|
|
0.0000000000000000 },
|
7742 |
|
|
{ 0.17336164805979126, 0.50000000000000000, 0.80000000000000004,
|
7743 |
|
|
0.17453292519943295 },
|
7744 |
|
|
{ 0.34024350132086773, 0.50000000000000000, 0.80000000000000004,
|
7745 |
|
|
0.34906585039886590 },
|
7746 |
|
|
{ 0.49643719555734084, 0.50000000000000000, 0.80000000000000004,
|
7747 |
|
|
0.52359877559829882 },
|
7748 |
|
|
{ 0.64071162456976150, 0.50000000000000000, 0.80000000000000004,
|
7749 |
|
|
0.69813170079773179 },
|
7750 |
|
|
{ 0.77407836177211908, 0.50000000000000000, 0.80000000000000004,
|
7751 |
|
|
0.87266462599716477 },
|
7752 |
|
|
{ 0.89867058251905652, 0.50000000000000000, 0.80000000000000004,
|
7753 |
|
|
1.0471975511965976 },
|
7754 |
|
|
{ 1.0169181822134912, 0.50000000000000000, 0.80000000000000004,
|
7755 |
|
|
1.2217304763960306 },
|
7756 |
|
|
{ 1.1311363312779448, 0.50000000000000000, 0.80000000000000004,
|
7757 |
|
|
1.3962634015954636 },
|
7758 |
|
|
{ 1.2434165408189539, 0.50000000000000000, 0.80000000000000004,
|
7759 |
|
|
1.5707963267948966 },
|
7760 |
|
|
};
|
7761 |
|
|
|
7762 |
|
|
// Test function for k=0.50000000000000000, nu=0.80000000000000004.
|
7763 |
|
|
template <typename Tp>
|
7764 |
|
|
void test149()
|
7765 |
|
|
{
|
7766 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7767 |
|
|
Tp max_abs_diff = -Tp(1);
|
7768 |
|
|
Tp max_abs_frac = -Tp(1);
|
7769 |
|
|
unsigned int num_datum = sizeof(data149)
|
7770 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7771 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7772 |
|
|
{
|
7773 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data149[i].k), Tp(data149[i].nu),
|
7774 |
|
|
Tp(data149[i].phi));
|
7775 |
|
|
const Tp f0 = data149[i].f0;
|
7776 |
|
|
const Tp diff = f - f0;
|
7777 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7778 |
|
|
max_abs_diff = std::abs(diff);
|
7779 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7780 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7781 |
|
|
{
|
7782 |
|
|
const Tp frac = diff / f0;
|
7783 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7784 |
|
|
max_abs_frac = std::abs(frac);
|
7785 |
|
|
}
|
7786 |
|
|
}
|
7787 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7788 |
|
|
}
|
7789 |
|
|
|
7790 |
|
|
// Test data for k=0.50000000000000000, nu=0.90000000000000002.
|
7791 |
|
|
testcase_ellint_3<double> data150[] = {
|
7792 |
|
|
{ -0.0000000000000000, 0.50000000000000000, 0.90000000000000002,
|
7793 |
|
|
0.0000000000000000 },
|
7794 |
|
|
{ 0.17319040056865681, 0.50000000000000000, 0.90000000000000002,
|
7795 |
|
|
0.17453292519943295 },
|
7796 |
|
|
{ 0.33899920036578557, 0.50000000000000000, 0.90000000000000002,
|
7797 |
|
|
0.34906585039886590 },
|
7798 |
|
|
{ 0.49279362182695186, 0.50000000000000000, 0.90000000000000002,
|
7799 |
|
|
0.52359877559829882 },
|
7800 |
|
|
{ 0.63342123379746151, 0.50000000000000000, 0.90000000000000002,
|
7801 |
|
|
0.69813170079773179 },
|
7802 |
|
|
{ 0.76220595179550321, 0.50000000000000000, 0.90000000000000002,
|
7803 |
|
|
0.87266462599716477 },
|
7804 |
|
|
{ 0.88160004743532294, 0.50000000000000000, 0.90000000000000002,
|
7805 |
|
|
1.0471975511965976 },
|
7806 |
|
|
{ 0.99427448642310134, 0.50000000000000000, 0.90000000000000002,
|
7807 |
|
|
1.2217304763960306 },
|
7808 |
|
|
{ 1.1027091512470093, 0.50000000000000000, 0.90000000000000002,
|
7809 |
|
|
1.3962634015954636 },
|
7810 |
|
|
{ 1.2091116095504744, 0.50000000000000000, 0.90000000000000002,
|
7811 |
|
|
1.5707963267948966 },
|
7812 |
|
|
};
|
7813 |
|
|
|
7814 |
|
|
// Test function for k=0.50000000000000000, nu=0.90000000000000002.
|
7815 |
|
|
template <typename Tp>
|
7816 |
|
|
void test150()
|
7817 |
|
|
{
|
7818 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7819 |
|
|
Tp max_abs_diff = -Tp(1);
|
7820 |
|
|
Tp max_abs_frac = -Tp(1);
|
7821 |
|
|
unsigned int num_datum = sizeof(data150)
|
7822 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7823 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7824 |
|
|
{
|
7825 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data150[i].k), Tp(data150[i].nu),
|
7826 |
|
|
Tp(data150[i].phi));
|
7827 |
|
|
const Tp f0 = data150[i].f0;
|
7828 |
|
|
const Tp diff = f - f0;
|
7829 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7830 |
|
|
max_abs_diff = std::abs(diff);
|
7831 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7832 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7833 |
|
|
{
|
7834 |
|
|
const Tp frac = diff / f0;
|
7835 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7836 |
|
|
max_abs_frac = std::abs(frac);
|
7837 |
|
|
}
|
7838 |
|
|
}
|
7839 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7840 |
|
|
}
|
7841 |
|
|
|
7842 |
|
|
// Test data for k=0.60000000000000009, nu=0.0000000000000000.
|
7843 |
|
|
testcase_ellint_3<double> data151[] = {
|
7844 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.0000000000000000,
|
7845 |
|
|
0.0000000000000000 },
|
7846 |
|
|
{ 0.17485154362988362, 0.60000000000000009, 0.0000000000000000,
|
7847 |
|
|
0.17453292519943295 },
|
7848 |
|
|
{ 0.35160509865544326, 0.60000000000000009, 0.0000000000000000,
|
7849 |
|
|
0.34906585039886590 },
|
7850 |
|
|
{ 0.53210652578446160, 0.60000000000000009, 0.0000000000000000,
|
7851 |
|
|
0.52359877559829882 },
|
7852 |
|
|
{ 0.71805304664485670, 0.60000000000000009, 0.0000000000000000,
|
7853 |
|
|
0.69813170079773179 },
|
7854 |
|
|
{ 0.91082759030195970, 0.60000000000000009, 0.0000000000000000,
|
7855 |
|
|
0.87266462599716477 },
|
7856 |
|
|
{ 1.1112333229323366, 0.60000000000000009, 0.0000000000000000,
|
7857 |
|
|
1.0471975511965976 },
|
7858 |
|
|
{ 1.3191461190365270, 0.60000000000000009, 0.0000000000000000,
|
7859 |
|
|
1.2217304763960306 },
|
7860 |
|
|
{ 1.5332022105084775, 0.60000000000000009, 0.0000000000000000,
|
7861 |
|
|
1.3962634015954636 },
|
7862 |
|
|
{ 1.7507538029157526, 0.60000000000000009, 0.0000000000000000,
|
7863 |
|
|
1.5707963267948966 },
|
7864 |
|
|
};
|
7865 |
|
|
|
7866 |
|
|
// Test function for k=0.60000000000000009, nu=0.0000000000000000.
|
7867 |
|
|
template <typename Tp>
|
7868 |
|
|
void test151()
|
7869 |
|
|
{
|
7870 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7871 |
|
|
Tp max_abs_diff = -Tp(1);
|
7872 |
|
|
Tp max_abs_frac = -Tp(1);
|
7873 |
|
|
unsigned int num_datum = sizeof(data151)
|
7874 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7875 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7876 |
|
|
{
|
7877 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data151[i].k), Tp(data151[i].nu),
|
7878 |
|
|
Tp(data151[i].phi));
|
7879 |
|
|
const Tp f0 = data151[i].f0;
|
7880 |
|
|
const Tp diff = f - f0;
|
7881 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7882 |
|
|
max_abs_diff = std::abs(diff);
|
7883 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7884 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7885 |
|
|
{
|
7886 |
|
|
const Tp frac = diff / f0;
|
7887 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7888 |
|
|
max_abs_frac = std::abs(frac);
|
7889 |
|
|
}
|
7890 |
|
|
}
|
7891 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7892 |
|
|
}
|
7893 |
|
|
|
7894 |
|
|
// Test data for k=0.60000000000000009, nu=0.10000000000000001.
|
7895 |
|
|
testcase_ellint_3<double> data152[] = {
|
7896 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.10000000000000001,
|
7897 |
|
|
0.0000000000000000 },
|
7898 |
|
|
{ 0.17467514275022014, 0.60000000000000009, 0.10000000000000001,
|
7899 |
|
|
0.17453292519943295 },
|
7900 |
|
|
{ 0.35021333086258255, 0.60000000000000009, 0.10000000000000001,
|
7901 |
|
|
0.34906585039886590 },
|
7902 |
|
|
{ 0.52751664092962713, 0.60000000000000009, 0.10000000000000001,
|
7903 |
|
|
0.52359877559829882 },
|
7904 |
|
|
{ 0.70752126971957885, 0.60000000000000009, 0.10000000000000001,
|
7905 |
|
|
0.69813170079773179 },
|
7906 |
|
|
{ 0.89111058756112871, 0.60000000000000009, 0.10000000000000001,
|
7907 |
|
|
0.87266462599716477 },
|
7908 |
|
|
{ 1.0789241202877773, 0.60000000000000009, 0.10000000000000001,
|
7909 |
|
|
1.0471975511965976 },
|
7910 |
|
|
{ 1.2710800210399946, 0.60000000000000009, 0.10000000000000001,
|
7911 |
|
|
1.2217304763960306 },
|
7912 |
|
|
{ 1.4669060574440278, 0.60000000000000009, 0.10000000000000001,
|
7913 |
|
|
1.3962634015954636 },
|
7914 |
|
|
{ 1.6648615773343014, 0.60000000000000009, 0.10000000000000001,
|
7915 |
|
|
1.5707963267948966 },
|
7916 |
|
|
};
|
7917 |
|
|
|
7918 |
|
|
// Test function for k=0.60000000000000009, nu=0.10000000000000001.
|
7919 |
|
|
template <typename Tp>
|
7920 |
|
|
void test152()
|
7921 |
|
|
{
|
7922 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7923 |
|
|
Tp max_abs_diff = -Tp(1);
|
7924 |
|
|
Tp max_abs_frac = -Tp(1);
|
7925 |
|
|
unsigned int num_datum = sizeof(data152)
|
7926 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7927 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7928 |
|
|
{
|
7929 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data152[i].k), Tp(data152[i].nu),
|
7930 |
|
|
Tp(data152[i].phi));
|
7931 |
|
|
const Tp f0 = data152[i].f0;
|
7932 |
|
|
const Tp diff = f - f0;
|
7933 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7934 |
|
|
max_abs_diff = std::abs(diff);
|
7935 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7936 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7937 |
|
|
{
|
7938 |
|
|
const Tp frac = diff / f0;
|
7939 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7940 |
|
|
max_abs_frac = std::abs(frac);
|
7941 |
|
|
}
|
7942 |
|
|
}
|
7943 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7944 |
|
|
}
|
7945 |
|
|
|
7946 |
|
|
// Test data for k=0.60000000000000009, nu=0.20000000000000001.
|
7947 |
|
|
testcase_ellint_3<double> data153[] = {
|
7948 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.20000000000000001,
|
7949 |
|
|
0.0000000000000000 },
|
7950 |
|
|
{ 0.17449937871800653, 0.60000000000000009, 0.20000000000000001,
|
7951 |
|
|
0.17453292519943295 },
|
7952 |
|
|
{ 0.34884093647346553, 0.60000000000000009, 0.20000000000000001,
|
7953 |
|
|
0.34906585039886590 },
|
7954 |
|
|
{ 0.52306221119844110, 0.60000000000000009, 0.20000000000000001,
|
7955 |
|
|
0.52359877559829882 },
|
7956 |
|
|
{ 0.69749955678982223, 0.60000000000000009, 0.20000000000000001,
|
7957 |
|
|
0.69813170079773179 },
|
7958 |
|
|
{ 0.87274610682416853, 0.60000000000000009, 0.20000000000000001,
|
7959 |
|
|
0.87266462599716477 },
|
7960 |
|
|
{ 1.0494620540750796, 0.60000000000000009, 0.20000000000000001,
|
7961 |
|
|
1.0471975511965976 },
|
7962 |
|
|
{ 1.2280847305507339, 0.60000000000000009, 0.20000000000000001,
|
7963 |
|
|
1.2217304763960306 },
|
7964 |
|
|
{ 1.4085436279696888, 0.60000000000000009, 0.20000000000000001,
|
7965 |
|
|
1.3962634015954636 },
|
7966 |
|
|
{ 1.5901418016279374, 0.60000000000000009, 0.20000000000000001,
|
7967 |
|
|
1.5707963267948966 },
|
7968 |
|
|
};
|
7969 |
|
|
|
7970 |
|
|
// Test function for k=0.60000000000000009, nu=0.20000000000000001.
|
7971 |
|
|
template <typename Tp>
|
7972 |
|
|
void test153()
|
7973 |
|
|
{
|
7974 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
7975 |
|
|
Tp max_abs_diff = -Tp(1);
|
7976 |
|
|
Tp max_abs_frac = -Tp(1);
|
7977 |
|
|
unsigned int num_datum = sizeof(data153)
|
7978 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
7979 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
7980 |
|
|
{
|
7981 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data153[i].k), Tp(data153[i].nu),
|
7982 |
|
|
Tp(data153[i].phi));
|
7983 |
|
|
const Tp f0 = data153[i].f0;
|
7984 |
|
|
const Tp diff = f - f0;
|
7985 |
|
|
if (std::abs(diff) > max_abs_diff)
|
7986 |
|
|
max_abs_diff = std::abs(diff);
|
7987 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
7988 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
7989 |
|
|
{
|
7990 |
|
|
const Tp frac = diff / f0;
|
7991 |
|
|
if (std::abs(frac) > max_abs_frac)
|
7992 |
|
|
max_abs_frac = std::abs(frac);
|
7993 |
|
|
}
|
7994 |
|
|
}
|
7995 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
7996 |
|
|
}
|
7997 |
|
|
|
7998 |
|
|
// Test data for k=0.60000000000000009, nu=0.29999999999999999.
|
7999 |
|
|
testcase_ellint_3<double> data154[] = {
|
8000 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.29999999999999999,
|
8001 |
|
|
0.0000000000000000 },
|
8002 |
|
|
{ 0.17432424744393935, 0.60000000000000009, 0.29999999999999999,
|
8003 |
|
|
0.17453292519943295 },
|
8004 |
|
|
{ 0.34748744127146447, 0.60000000000000009, 0.29999999999999999,
|
8005 |
|
|
0.34906585039886590 },
|
8006 |
|
|
{ 0.51873632743924847, 0.60000000000000009, 0.29999999999999999,
|
8007 |
|
|
0.52359877559829882 },
|
8008 |
|
|
{ 0.68794610396313127, 0.60000000000000009, 0.29999999999999999,
|
8009 |
|
|
0.69813170079773179 },
|
8010 |
|
|
{ 0.85558070175468726, 0.60000000000000009, 0.29999999999999999,
|
8011 |
|
|
0.87266462599716477 },
|
8012 |
|
|
{ 1.0224416343605658, 0.60000000000000009, 0.29999999999999999,
|
8013 |
|
|
1.0471975511965976 },
|
8014 |
|
|
{ 1.1893144457936788, 0.60000000000000009, 0.29999999999999999,
|
8015 |
|
|
1.2217304763960306 },
|
8016 |
|
|
{ 1.3566435377982575, 0.60000000000000009, 0.29999999999999999,
|
8017 |
|
|
1.3962634015954636 },
|
8018 |
|
|
{ 1.5243814243493585, 0.60000000000000009, 0.29999999999999999,
|
8019 |
|
|
1.5707963267948966 },
|
8020 |
|
|
};
|
8021 |
|
|
|
8022 |
|
|
// Test function for k=0.60000000000000009, nu=0.29999999999999999.
|
8023 |
|
|
template <typename Tp>
|
8024 |
|
|
void test154()
|
8025 |
|
|
{
|
8026 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8027 |
|
|
Tp max_abs_diff = -Tp(1);
|
8028 |
|
|
Tp max_abs_frac = -Tp(1);
|
8029 |
|
|
unsigned int num_datum = sizeof(data154)
|
8030 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8031 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8032 |
|
|
{
|
8033 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data154[i].k), Tp(data154[i].nu),
|
8034 |
|
|
Tp(data154[i].phi));
|
8035 |
|
|
const Tp f0 = data154[i].f0;
|
8036 |
|
|
const Tp diff = f - f0;
|
8037 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8038 |
|
|
max_abs_diff = std::abs(diff);
|
8039 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8040 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8041 |
|
|
{
|
8042 |
|
|
const Tp frac = diff / f0;
|
8043 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8044 |
|
|
max_abs_frac = std::abs(frac);
|
8045 |
|
|
}
|
8046 |
|
|
}
|
8047 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8048 |
|
|
}
|
8049 |
|
|
|
8050 |
|
|
// Test data for k=0.60000000000000009, nu=0.40000000000000002.
|
8051 |
|
|
testcase_ellint_3<double> data155[] = {
|
8052 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.40000000000000002,
|
8053 |
|
|
0.0000000000000000 },
|
8054 |
|
|
{ 0.17414974487670720, 0.60000000000000009, 0.40000000000000002,
|
8055 |
|
|
0.17453292519943295 },
|
8056 |
|
|
{ 0.34615238767335027, 0.60000000000000009, 0.40000000000000002,
|
8057 |
|
|
0.34906585039886590 },
|
8058 |
|
|
{ 0.51453257838108579, 0.60000000000000009, 0.40000000000000002,
|
8059 |
|
|
0.52359877559829882 },
|
8060 |
|
|
{ 0.67882386787534410, 0.60000000000000009, 0.40000000000000002,
|
8061 |
|
|
0.69813170079773179 },
|
8062 |
|
|
{ 0.83948470233173578, 0.60000000000000009, 0.40000000000000002,
|
8063 |
|
|
0.87266462599716477 },
|
8064 |
|
|
{ 0.99753496200074021, 0.60000000000000009, 0.40000000000000002,
|
8065 |
|
|
1.0471975511965976 },
|
8066 |
|
|
{ 1.1541101404388487, 0.60000000000000009, 0.40000000000000002,
|
8067 |
|
|
1.2217304763960306 },
|
8068 |
|
|
{ 1.3100911323398816, 0.60000000000000009, 0.40000000000000002,
|
8069 |
|
|
1.3962634015954636 },
|
8070 |
|
|
{ 1.4659345278069984, 0.60000000000000009, 0.40000000000000002,
|
8071 |
|
|
1.5707963267948966 },
|
8072 |
|
|
};
|
8073 |
|
|
|
8074 |
|
|
// Test function for k=0.60000000000000009, nu=0.40000000000000002.
|
8075 |
|
|
template <typename Tp>
|
8076 |
|
|
void test155()
|
8077 |
|
|
{
|
8078 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8079 |
|
|
Tp max_abs_diff = -Tp(1);
|
8080 |
|
|
Tp max_abs_frac = -Tp(1);
|
8081 |
|
|
unsigned int num_datum = sizeof(data155)
|
8082 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8083 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8084 |
|
|
{
|
8085 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data155[i].k), Tp(data155[i].nu),
|
8086 |
|
|
Tp(data155[i].phi));
|
8087 |
|
|
const Tp f0 = data155[i].f0;
|
8088 |
|
|
const Tp diff = f - f0;
|
8089 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8090 |
|
|
max_abs_diff = std::abs(diff);
|
8091 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8092 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8093 |
|
|
{
|
8094 |
|
|
const Tp frac = diff / f0;
|
8095 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8096 |
|
|
max_abs_frac = std::abs(frac);
|
8097 |
|
|
}
|
8098 |
|
|
}
|
8099 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8100 |
|
|
}
|
8101 |
|
|
|
8102 |
|
|
// Test data for k=0.60000000000000009, nu=0.50000000000000000.
|
8103 |
|
|
testcase_ellint_3<double> data156[] = {
|
8104 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.50000000000000000,
|
8105 |
|
|
0.0000000000000000 },
|
8106 |
|
|
{ 0.17397586700252810, 0.60000000000000009, 0.50000000000000000,
|
8107 |
|
|
0.17453292519943295 },
|
8108 |
|
|
{ 0.34483533397138516, 0.60000000000000009, 0.50000000000000000,
|
8109 |
|
|
0.34906585039886590 },
|
8110 |
|
|
{ 0.51044500461706499, 0.60000000000000009, 0.50000000000000000,
|
8111 |
|
|
0.52359877559829882 },
|
8112 |
|
|
{ 0.67009988034712675, 0.60000000000000009, 0.50000000000000000,
|
8113 |
|
|
0.69813170079773179 },
|
8114 |
|
|
{ 0.82434762375735193, 0.60000000000000009, 0.50000000000000000,
|
8115 |
|
|
0.87266462599716477 },
|
8116 |
|
|
{ 0.97447346702799043, 0.60000000000000009, 0.50000000000000000,
|
8117 |
|
|
1.0471975511965976 },
|
8118 |
|
|
{ 1.1219494000522143, 0.60000000000000009, 0.50000000000000000,
|
8119 |
|
|
1.2217304763960306 },
|
8120 |
|
|
{ 1.2680242605954488, 0.60000000000000009, 0.50000000000000000,
|
8121 |
|
|
1.3962634015954636 },
|
8122 |
|
|
{ 1.4135484285693078, 0.60000000000000009, 0.50000000000000000,
|
8123 |
|
|
1.5707963267948966 },
|
8124 |
|
|
};
|
8125 |
|
|
|
8126 |
|
|
// Test function for k=0.60000000000000009, nu=0.50000000000000000.
|
8127 |
|
|
template <typename Tp>
|
8128 |
|
|
void test156()
|
8129 |
|
|
{
|
8130 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8131 |
|
|
Tp max_abs_diff = -Tp(1);
|
8132 |
|
|
Tp max_abs_frac = -Tp(1);
|
8133 |
|
|
unsigned int num_datum = sizeof(data156)
|
8134 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8135 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8136 |
|
|
{
|
8137 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data156[i].k), Tp(data156[i].nu),
|
8138 |
|
|
Tp(data156[i].phi));
|
8139 |
|
|
const Tp f0 = data156[i].f0;
|
8140 |
|
|
const Tp diff = f - f0;
|
8141 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8142 |
|
|
max_abs_diff = std::abs(diff);
|
8143 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8144 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8145 |
|
|
{
|
8146 |
|
|
const Tp frac = diff / f0;
|
8147 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8148 |
|
|
max_abs_frac = std::abs(frac);
|
8149 |
|
|
}
|
8150 |
|
|
}
|
8151 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8152 |
|
|
}
|
8153 |
|
|
|
8154 |
|
|
// Test data for k=0.60000000000000009, nu=0.59999999999999998.
|
8155 |
|
|
testcase_ellint_3<double> data157[] = {
|
8156 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.59999999999999998,
|
8157 |
|
|
0.0000000000000000 },
|
8158 |
|
|
{ 0.17380260984469356, 0.60000000000000009, 0.59999999999999998,
|
8159 |
|
|
0.17453292519943295 },
|
8160 |
|
|
{ 0.34353585361777839, 0.60000000000000009, 0.59999999999999998,
|
8161 |
|
|
0.34906585039886590 },
|
8162 |
|
|
{ 0.50646805774321402, 0.60000000000000009, 0.59999999999999998,
|
8163 |
|
|
0.52359877559829882 },
|
8164 |
|
|
{ 0.66174468108625517, 0.60000000000000009, 0.59999999999999998,
|
8165 |
|
|
0.69813170079773179 },
|
8166 |
|
|
{ 0.81007462280278408, 0.60000000000000009, 0.59999999999999998,
|
8167 |
|
|
0.87266462599716477 },
|
8168 |
|
|
{ 0.95303466945718773, 0.60000000000000009, 0.59999999999999998,
|
8169 |
|
|
1.0471975511965976 },
|
8170 |
|
|
{ 1.0924118588677503, 0.60000000000000009, 0.59999999999999998,
|
8171 |
|
|
1.2217304763960306 },
|
8172 |
|
|
{ 1.2297640574847937, 0.60000000000000009, 0.59999999999999998,
|
8173 |
|
|
1.3962634015954636 },
|
8174 |
|
|
{ 1.3662507535812816, 0.60000000000000009, 0.59999999999999998,
|
8175 |
|
|
1.5707963267948966 },
|
8176 |
|
|
};
|
8177 |
|
|
|
8178 |
|
|
// Test function for k=0.60000000000000009, nu=0.59999999999999998.
|
8179 |
|
|
template <typename Tp>
|
8180 |
|
|
void test157()
|
8181 |
|
|
{
|
8182 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8183 |
|
|
Tp max_abs_diff = -Tp(1);
|
8184 |
|
|
Tp max_abs_frac = -Tp(1);
|
8185 |
|
|
unsigned int num_datum = sizeof(data157)
|
8186 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8187 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8188 |
|
|
{
|
8189 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data157[i].k), Tp(data157[i].nu),
|
8190 |
|
|
Tp(data157[i].phi));
|
8191 |
|
|
const Tp f0 = data157[i].f0;
|
8192 |
|
|
const Tp diff = f - f0;
|
8193 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8194 |
|
|
max_abs_diff = std::abs(diff);
|
8195 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8196 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8197 |
|
|
{
|
8198 |
|
|
const Tp frac = diff / f0;
|
8199 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8200 |
|
|
max_abs_frac = std::abs(frac);
|
8201 |
|
|
}
|
8202 |
|
|
}
|
8203 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8204 |
|
|
}
|
8205 |
|
|
|
8206 |
|
|
// Test data for k=0.60000000000000009, nu=0.69999999999999996.
|
8207 |
|
|
testcase_ellint_3<double> data158[] = {
|
8208 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.69999999999999996,
|
8209 |
|
|
0.0000000000000000 },
|
8210 |
|
|
{ 0.17362996946312009, 0.60000000000000009, 0.69999999999999996,
|
8211 |
|
|
0.17453292519943295 },
|
8212 |
|
|
{ 0.34225353454870588, 0.60000000000000009, 0.69999999999999996,
|
8213 |
|
|
0.34906585039886590 },
|
8214 |
|
|
{ 0.50259656397799546, 0.60000000000000009, 0.69999999999999996,
|
8215 |
|
|
0.52359877559829882 },
|
8216 |
|
|
{ 0.65373184496628944, 0.60000000000000009, 0.69999999999999996,
|
8217 |
|
|
0.69813170079773179 },
|
8218 |
|
|
{ 0.79658372884056439, 0.60000000000000009, 0.69999999999999996,
|
8219 |
|
|
0.87266462599716477 },
|
8220 |
|
|
{ 0.93303240100245466, 0.60000000000000009, 0.69999999999999996,
|
8221 |
|
|
1.0471975511965976 },
|
8222 |
|
|
{ 1.0651547944716557, 0.60000000000000009, 0.69999999999999996,
|
8223 |
|
|
1.2217304763960306 },
|
8224 |
|
|
{ 1.1947676204853441, 0.60000000000000009, 0.69999999999999996,
|
8225 |
|
|
1.3962634015954636 },
|
8226 |
|
|
{ 1.3232737468822811, 0.60000000000000009, 0.69999999999999996,
|
8227 |
|
|
1.5707963267948966 },
|
8228 |
|
|
};
|
8229 |
|
|
|
8230 |
|
|
// Test function for k=0.60000000000000009, nu=0.69999999999999996.
|
8231 |
|
|
template <typename Tp>
|
8232 |
|
|
void test158()
|
8233 |
|
|
{
|
8234 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8235 |
|
|
Tp max_abs_diff = -Tp(1);
|
8236 |
|
|
Tp max_abs_frac = -Tp(1);
|
8237 |
|
|
unsigned int num_datum = sizeof(data158)
|
8238 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8239 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8240 |
|
|
{
|
8241 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data158[i].k), Tp(data158[i].nu),
|
8242 |
|
|
Tp(data158[i].phi));
|
8243 |
|
|
const Tp f0 = data158[i].f0;
|
8244 |
|
|
const Tp diff = f - f0;
|
8245 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8246 |
|
|
max_abs_diff = std::abs(diff);
|
8247 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8248 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8249 |
|
|
{
|
8250 |
|
|
const Tp frac = diff / f0;
|
8251 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8252 |
|
|
max_abs_frac = std::abs(frac);
|
8253 |
|
|
}
|
8254 |
|
|
}
|
8255 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8256 |
|
|
}
|
8257 |
|
|
|
8258 |
|
|
// Test data for k=0.60000000000000009, nu=0.80000000000000004.
|
8259 |
|
|
testcase_ellint_3<double> data159[] = {
|
8260 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.80000000000000004,
|
8261 |
|
|
0.0000000000000000 },
|
8262 |
|
|
{ 0.17345794195390687, 0.60000000000000009, 0.80000000000000004,
|
8263 |
|
|
0.17453292519943295 },
|
8264 |
|
|
{ 0.34098797854531027, 0.60000000000000009, 0.80000000000000004,
|
8265 |
|
|
0.34906585039886590 },
|
8266 |
|
|
{ 0.49882569168826230, 0.60000000000000009, 0.80000000000000004,
|
8267 |
|
|
0.52359877559829882 },
|
8268 |
|
|
{ 0.64603758566475511, 0.60000000000000009, 0.80000000000000004,
|
8269 |
|
|
0.69813170079773179 },
|
8270 |
|
|
{ 0.78380365594769730, 0.60000000000000009, 0.80000000000000004,
|
8271 |
|
|
0.87266462599716477 },
|
8272 |
|
|
{ 0.91430946255611223, 0.60000000000000009, 0.80000000000000004,
|
8273 |
|
|
1.0471975511965976 },
|
8274 |
|
|
{ 1.0398955217270607, 0.60000000000000009, 0.80000000000000004,
|
8275 |
|
|
1.2217304763960306 },
|
8276 |
|
|
{ 1.1625948314277679, 0.60000000000000009, 0.80000000000000004,
|
8277 |
|
|
1.3962634015954636 },
|
8278 |
|
|
{ 1.2840021261752192, 0.60000000000000009, 0.80000000000000004,
|
8279 |
|
|
1.5707963267948966 },
|
8280 |
|
|
};
|
8281 |
|
|
|
8282 |
|
|
// Test function for k=0.60000000000000009, nu=0.80000000000000004.
|
8283 |
|
|
template <typename Tp>
|
8284 |
|
|
void test159()
|
8285 |
|
|
{
|
8286 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8287 |
|
|
Tp max_abs_diff = -Tp(1);
|
8288 |
|
|
Tp max_abs_frac = -Tp(1);
|
8289 |
|
|
unsigned int num_datum = sizeof(data159)
|
8290 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8291 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8292 |
|
|
{
|
8293 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data159[i].k), Tp(data159[i].nu),
|
8294 |
|
|
Tp(data159[i].phi));
|
8295 |
|
|
const Tp f0 = data159[i].f0;
|
8296 |
|
|
const Tp diff = f - f0;
|
8297 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8298 |
|
|
max_abs_diff = std::abs(diff);
|
8299 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8300 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8301 |
|
|
{
|
8302 |
|
|
const Tp frac = diff / f0;
|
8303 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8304 |
|
|
max_abs_frac = std::abs(frac);
|
8305 |
|
|
}
|
8306 |
|
|
}
|
8307 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8308 |
|
|
}
|
8309 |
|
|
|
8310 |
|
|
// Test data for k=0.60000000000000009, nu=0.90000000000000002.
|
8311 |
|
|
testcase_ellint_3<double> data160[] = {
|
8312 |
|
|
{ -0.0000000000000000, 0.60000000000000009, 0.90000000000000002,
|
8313 |
|
|
0.0000000000000000 },
|
8314 |
|
|
{ 0.17328652344890033, 0.60000000000000009, 0.90000000000000002,
|
8315 |
|
|
0.17453292519943295 },
|
8316 |
|
|
{ 0.33973880062929018, 0.60000000000000009, 0.90000000000000002,
|
8317 |
|
|
0.34906585039886590 },
|
8318 |
|
|
{ 0.49515092233122765, 0.60000000000000009, 0.90000000000000002,
|
8319 |
|
|
0.52359877559829882 },
|
8320 |
|
|
{ 0.63864042139737043, 0.60000000000000009, 0.90000000000000002,
|
8321 |
|
|
0.69813170079773179 },
|
8322 |
|
|
{ 0.77167205646538850, 0.60000000000000009, 0.90000000000000002,
|
8323 |
|
|
0.87266462599716477 },
|
8324 |
|
|
{ 0.89673202848034428, 0.60000000000000009, 0.90000000000000002,
|
8325 |
|
|
1.0471975511965976 },
|
8326 |
|
|
{ 1.0163984492661304, 0.60000000000000009, 0.90000000000000002,
|
8327 |
|
|
1.2217304763960306 },
|
8328 |
|
|
{ 1.1328845785162431, 0.60000000000000009, 0.90000000000000002,
|
8329 |
|
|
1.3962634015954636 },
|
8330 |
|
|
{ 1.2479362973851875, 0.60000000000000009, 0.90000000000000002,
|
8331 |
|
|
1.5707963267948966 },
|
8332 |
|
|
};
|
8333 |
|
|
|
8334 |
|
|
// Test function for k=0.60000000000000009, nu=0.90000000000000002.
|
8335 |
|
|
template <typename Tp>
|
8336 |
|
|
void test160()
|
8337 |
|
|
{
|
8338 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8339 |
|
|
Tp max_abs_diff = -Tp(1);
|
8340 |
|
|
Tp max_abs_frac = -Tp(1);
|
8341 |
|
|
unsigned int num_datum = sizeof(data160)
|
8342 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8343 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8344 |
|
|
{
|
8345 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data160[i].k), Tp(data160[i].nu),
|
8346 |
|
|
Tp(data160[i].phi));
|
8347 |
|
|
const Tp f0 = data160[i].f0;
|
8348 |
|
|
const Tp diff = f - f0;
|
8349 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8350 |
|
|
max_abs_diff = std::abs(diff);
|
8351 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8352 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8353 |
|
|
{
|
8354 |
|
|
const Tp frac = diff / f0;
|
8355 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8356 |
|
|
max_abs_frac = std::abs(frac);
|
8357 |
|
|
}
|
8358 |
|
|
}
|
8359 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8360 |
|
|
}
|
8361 |
|
|
|
8362 |
|
|
// Test data for k=0.69999999999999996, nu=0.0000000000000000.
|
8363 |
|
|
testcase_ellint_3<double> data161[] = {
|
8364 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.0000000000000000,
|
8365 |
|
|
0.0000000000000000 },
|
8366 |
|
|
{ 0.17496737466916720, 0.69999999999999996, 0.0000000000000000,
|
8367 |
|
|
0.17453292519943295 },
|
8368 |
|
|
{ 0.35254687535677925, 0.69999999999999996, 0.0000000000000000,
|
8369 |
|
|
0.34906585039886590 },
|
8370 |
|
|
{ 0.53536740275997130, 0.69999999999999996, 0.0000000000000000,
|
8371 |
|
|
0.52359877559829882 },
|
8372 |
|
|
{ 0.72603797651684465, 0.69999999999999996, 0.0000000000000000,
|
8373 |
|
|
0.69813170079773179 },
|
8374 |
|
|
{ 0.92698296348313458, 0.69999999999999996, 0.0000000000000000,
|
8375 |
|
|
0.87266462599716477 },
|
8376 |
|
|
{ 1.1400447527693316, 0.69999999999999996, 0.0000000000000000,
|
8377 |
|
|
1.0471975511965976 },
|
8378 |
|
|
{ 1.3657668117194071, 0.69999999999999996, 0.0000000000000000,
|
8379 |
|
|
1.2217304763960306 },
|
8380 |
|
|
{ 1.6024686895959159, 0.69999999999999996, 0.0000000000000000,
|
8381 |
|
|
1.3962634015954636 },
|
8382 |
|
|
{ 1.8456939983747236, 0.69999999999999996, 0.0000000000000000,
|
8383 |
|
|
1.5707963267948966 },
|
8384 |
|
|
};
|
8385 |
|
|
|
8386 |
|
|
// Test function for k=0.69999999999999996, nu=0.0000000000000000.
|
8387 |
|
|
template <typename Tp>
|
8388 |
|
|
void test161()
|
8389 |
|
|
{
|
8390 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8391 |
|
|
Tp max_abs_diff = -Tp(1);
|
8392 |
|
|
Tp max_abs_frac = -Tp(1);
|
8393 |
|
|
unsigned int num_datum = sizeof(data161)
|
8394 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8395 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8396 |
|
|
{
|
8397 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data161[i].k), Tp(data161[i].nu),
|
8398 |
|
|
Tp(data161[i].phi));
|
8399 |
|
|
const Tp f0 = data161[i].f0;
|
8400 |
|
|
const Tp diff = f - f0;
|
8401 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8402 |
|
|
max_abs_diff = std::abs(diff);
|
8403 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8404 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8405 |
|
|
{
|
8406 |
|
|
const Tp frac = diff / f0;
|
8407 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8408 |
|
|
max_abs_frac = std::abs(frac);
|
8409 |
|
|
}
|
8410 |
|
|
}
|
8411 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8412 |
|
|
}
|
8413 |
|
|
|
8414 |
|
|
// Test data for k=0.69999999999999996, nu=0.10000000000000001.
|
8415 |
|
|
testcase_ellint_3<double> data162[] = {
|
8416 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.10000000000000001,
|
8417 |
|
|
0.0000000000000000 },
|
8418 |
|
|
{ 0.17479076384884681, 0.69999999999999996, 0.10000000000000001,
|
8419 |
|
|
0.17453292519943295 },
|
8420 |
|
|
{ 0.35114844900396364, 0.69999999999999996, 0.10000000000000001,
|
8421 |
|
|
0.34906585039886590 },
|
8422 |
|
|
{ 0.53072776947527012, 0.69999999999999996, 0.10000000000000001,
|
8423 |
|
|
0.52359877559829882 },
|
8424 |
|
|
{ 0.71530198262386246, 0.69999999999999996, 0.10000000000000001,
|
8425 |
|
|
0.69813170079773179 },
|
8426 |
|
|
{ 0.90666760677828306, 0.69999999999999996, 0.10000000000000001,
|
8427 |
|
|
0.87266462599716477 },
|
8428 |
|
|
{ 1.1063366517438080, 0.69999999999999996, 0.10000000000000001,
|
8429 |
|
|
1.0471975511965976 },
|
8430 |
|
|
{ 1.3149477243092147, 0.69999999999999996, 0.10000000000000001,
|
8431 |
|
|
1.2217304763960306 },
|
8432 |
|
|
{ 1.5314886725038925, 0.69999999999999996, 0.10000000000000001,
|
8433 |
|
|
1.3962634015954636 },
|
8434 |
|
|
{ 1.7528050171757608, 0.69999999999999996, 0.10000000000000001,
|
8435 |
|
|
1.5707963267948966 },
|
8436 |
|
|
};
|
8437 |
|
|
|
8438 |
|
|
// Test function for k=0.69999999999999996, nu=0.10000000000000001.
|
8439 |
|
|
template <typename Tp>
|
8440 |
|
|
void test162()
|
8441 |
|
|
{
|
8442 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8443 |
|
|
Tp max_abs_diff = -Tp(1);
|
8444 |
|
|
Tp max_abs_frac = -Tp(1);
|
8445 |
|
|
unsigned int num_datum = sizeof(data162)
|
8446 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8447 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8448 |
|
|
{
|
8449 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data162[i].k), Tp(data162[i].nu),
|
8450 |
|
|
Tp(data162[i].phi));
|
8451 |
|
|
const Tp f0 = data162[i].f0;
|
8452 |
|
|
const Tp diff = f - f0;
|
8453 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8454 |
|
|
max_abs_diff = std::abs(diff);
|
8455 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8456 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8457 |
|
|
{
|
8458 |
|
|
const Tp frac = diff / f0;
|
8459 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8460 |
|
|
max_abs_frac = std::abs(frac);
|
8461 |
|
|
}
|
8462 |
|
|
}
|
8463 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8464 |
|
|
}
|
8465 |
|
|
|
8466 |
|
|
// Test data for k=0.69999999999999996, nu=0.20000000000000001.
|
8467 |
|
|
testcase_ellint_3<double> data163[] = {
|
8468 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.20000000000000001,
|
8469 |
|
|
0.0000000000000000 },
|
8470 |
|
|
{ 0.17461479077791472, 0.69999999999999996, 0.20000000000000001,
|
8471 |
|
|
0.17453292519943295 },
|
8472 |
|
|
{ 0.34976950621407538, 0.69999999999999996, 0.20000000000000001,
|
8473 |
|
|
0.34906585039886590 },
|
8474 |
|
|
{ 0.52622533231350188, 0.69999999999999996, 0.20000000000000001,
|
8475 |
|
|
0.52359877559829882 },
|
8476 |
|
|
{ 0.70508774017895226, 0.69999999999999996, 0.20000000000000001,
|
8477 |
|
|
0.69813170079773179 },
|
8478 |
|
|
{ 0.88775302531730294, 0.69999999999999996, 0.20000000000000001,
|
8479 |
|
|
0.87266462599716477 },
|
8480 |
|
|
{ 1.0756195476149006, 0.69999999999999996, 0.20000000000000001,
|
8481 |
|
|
1.0471975511965976 },
|
8482 |
|
|
{ 1.2695349716654372, 0.69999999999999996, 0.20000000000000001,
|
8483 |
|
|
1.2217304763960306 },
|
8484 |
|
|
{ 1.4690814617070540, 0.69999999999999996, 0.20000000000000001,
|
8485 |
|
|
1.3962634015954636 },
|
8486 |
|
|
{ 1.6721098780092147, 0.69999999999999996, 0.20000000000000001,
|
8487 |
|
|
1.5707963267948966 },
|
8488 |
|
|
};
|
8489 |
|
|
|
8490 |
|
|
// Test function for k=0.69999999999999996, nu=0.20000000000000001.
|
8491 |
|
|
template <typename Tp>
|
8492 |
|
|
void test163()
|
8493 |
|
|
{
|
8494 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8495 |
|
|
Tp max_abs_diff = -Tp(1);
|
8496 |
|
|
Tp max_abs_frac = -Tp(1);
|
8497 |
|
|
unsigned int num_datum = sizeof(data163)
|
8498 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8499 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8500 |
|
|
{
|
8501 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data163[i].k), Tp(data163[i].nu),
|
8502 |
|
|
Tp(data163[i].phi));
|
8503 |
|
|
const Tp f0 = data163[i].f0;
|
8504 |
|
|
const Tp diff = f - f0;
|
8505 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8506 |
|
|
max_abs_diff = std::abs(diff);
|
8507 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8508 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8509 |
|
|
{
|
8510 |
|
|
const Tp frac = diff / f0;
|
8511 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8512 |
|
|
max_abs_frac = std::abs(frac);
|
8513 |
|
|
}
|
8514 |
|
|
}
|
8515 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8516 |
|
|
}
|
8517 |
|
|
|
8518 |
|
|
// Test data for k=0.69999999999999996, nu=0.29999999999999999.
|
8519 |
|
|
testcase_ellint_3<double> data164[] = {
|
8520 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.29999999999999999,
|
8521 |
|
|
0.0000000000000000 },
|
8522 |
|
|
{ 0.17443945136076172, 0.69999999999999996, 0.29999999999999999,
|
8523 |
|
|
0.17453292519943295 },
|
8524 |
|
|
{ 0.34840956983535287, 0.69999999999999996, 0.29999999999999999,
|
8525 |
|
|
0.34906585039886590 },
|
8526 |
|
|
{ 0.52185308551329179, 0.69999999999999996, 0.29999999999999999,
|
8527 |
|
|
0.52359877559829882 },
|
8528 |
|
|
{ 0.69535240431168266, 0.69999999999999996, 0.29999999999999999,
|
8529 |
|
|
0.69813170079773179 },
|
8530 |
|
|
{ 0.87007983473964923, 0.69999999999999996, 0.29999999999999999,
|
8531 |
|
|
0.87266462599716477 },
|
8532 |
|
|
{ 1.0474657975577066, 0.69999999999999996, 0.29999999999999999,
|
8533 |
|
|
1.0471975511965976 },
|
8534 |
|
|
{ 1.2286225419931889, 0.69999999999999996, 0.29999999999999999,
|
8535 |
|
|
1.2217304763960306 },
|
8536 |
|
|
{ 1.4136490671013271, 0.69999999999999996, 0.29999999999999999,
|
8537 |
|
|
1.3962634015954636 },
|
8538 |
|
|
{ 1.6011813647733213, 0.69999999999999996, 0.29999999999999999,
|
8539 |
|
|
1.5707963267948966 },
|
8540 |
|
|
};
|
8541 |
|
|
|
8542 |
|
|
// Test function for k=0.69999999999999996, nu=0.29999999999999999.
|
8543 |
|
|
template <typename Tp>
|
8544 |
|
|
void test164()
|
8545 |
|
|
{
|
8546 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8547 |
|
|
Tp max_abs_diff = -Tp(1);
|
8548 |
|
|
Tp max_abs_frac = -Tp(1);
|
8549 |
|
|
unsigned int num_datum = sizeof(data164)
|
8550 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8551 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8552 |
|
|
{
|
8553 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data164[i].k), Tp(data164[i].nu),
|
8554 |
|
|
Tp(data164[i].phi));
|
8555 |
|
|
const Tp f0 = data164[i].f0;
|
8556 |
|
|
const Tp diff = f - f0;
|
8557 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8558 |
|
|
max_abs_diff = std::abs(diff);
|
8559 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8560 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8561 |
|
|
{
|
8562 |
|
|
const Tp frac = diff / f0;
|
8563 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8564 |
|
|
max_abs_frac = std::abs(frac);
|
8565 |
|
|
}
|
8566 |
|
|
}
|
8567 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8568 |
|
|
}
|
8569 |
|
|
|
8570 |
|
|
// Test data for k=0.69999999999999996, nu=0.40000000000000002.
|
8571 |
|
|
testcase_ellint_3<double> data165[] = {
|
8572 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.40000000000000002,
|
8573 |
|
|
0.0000000000000000 },
|
8574 |
|
|
{ 0.17426474153983226, 0.69999999999999996, 0.40000000000000002,
|
8575 |
|
|
0.17453292519943295 },
|
8576 |
|
|
{ 0.34706817945773732, 0.69999999999999996, 0.40000000000000002,
|
8577 |
|
|
0.34906585039886590 },
|
8578 |
|
|
{ 0.51760452851738159, 0.69999999999999996, 0.40000000000000002,
|
8579 |
|
|
0.52359877559829882 },
|
8580 |
|
|
{ 0.68605801534722766, 0.69999999999999996, 0.40000000000000002,
|
8581 |
|
|
0.69813170079773179 },
|
8582 |
|
|
{ 0.85351339387296532, 0.69999999999999996, 0.40000000000000002,
|
8583 |
|
|
0.87266462599716477 },
|
8584 |
|
|
{ 1.0215297967969537, 0.69999999999999996, 0.40000000000000002,
|
8585 |
|
|
1.0471975511965976 },
|
8586 |
|
|
{ 1.1915051074460528, 0.69999999999999996, 0.40000000000000002,
|
8587 |
|
|
1.2217304763960306 },
|
8588 |
|
|
{ 1.3639821911744707, 0.69999999999999996, 0.40000000000000002,
|
8589 |
|
|
1.3962634015954636 },
|
8590 |
|
|
{ 1.5382162002954762, 0.69999999999999996, 0.40000000000000002,
|
8591 |
|
|
1.5707963267948966 },
|
8592 |
|
|
};
|
8593 |
|
|
|
8594 |
|
|
// Test function for k=0.69999999999999996, nu=0.40000000000000002.
|
8595 |
|
|
template <typename Tp>
|
8596 |
|
|
void test165()
|
8597 |
|
|
{
|
8598 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8599 |
|
|
Tp max_abs_diff = -Tp(1);
|
8600 |
|
|
Tp max_abs_frac = -Tp(1);
|
8601 |
|
|
unsigned int num_datum = sizeof(data165)
|
8602 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8603 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8604 |
|
|
{
|
8605 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data165[i].k), Tp(data165[i].nu),
|
8606 |
|
|
Tp(data165[i].phi));
|
8607 |
|
|
const Tp f0 = data165[i].f0;
|
8608 |
|
|
const Tp diff = f - f0;
|
8609 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8610 |
|
|
max_abs_diff = std::abs(diff);
|
8611 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8612 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8613 |
|
|
{
|
8614 |
|
|
const Tp frac = diff / f0;
|
8615 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8616 |
|
|
max_abs_frac = std::abs(frac);
|
8617 |
|
|
}
|
8618 |
|
|
}
|
8619 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8620 |
|
|
}
|
8621 |
|
|
|
8622 |
|
|
// Test data for k=0.69999999999999996, nu=0.50000000000000000.
|
8623 |
|
|
testcase_ellint_3<double> data166[] = {
|
8624 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.50000000000000000,
|
8625 |
|
|
0.0000000000000000 },
|
8626 |
|
|
{ 0.17409065729516093, 0.69999999999999996, 0.50000000000000000,
|
8627 |
|
|
0.17453292519943295 },
|
8628 |
|
|
{ 0.34574489064986091, 0.69999999999999996, 0.50000000000000000,
|
8629 |
|
|
0.34906585039886590 },
|
8630 |
|
|
{ 0.51347361925579793, 0.69999999999999996, 0.50000000000000000,
|
8631 |
|
|
0.52359877559829882 },
|
8632 |
|
|
{ 0.67717079489579290, 0.69999999999999996, 0.50000000000000000,
|
8633 |
|
|
0.69813170079773179 },
|
8634 |
|
|
{ 0.83793902055292280, 0.69999999999999996, 0.50000000000000000,
|
8635 |
|
|
0.87266462599716477 },
|
8636 |
|
|
{ 0.99752863545289705, 0.69999999999999996, 0.50000000000000000,
|
8637 |
|
|
1.0471975511965976 },
|
8638 |
|
|
{ 1.1576240080401499, 0.69999999999999996, 0.50000000000000000,
|
8639 |
|
|
1.2217304763960306 },
|
8640 |
|
|
{ 1.3191464023923762, 0.69999999999999996, 0.50000000000000000,
|
8641 |
|
|
1.3962634015954636 },
|
8642 |
|
|
{ 1.4818433192178544, 0.69999999999999996, 0.50000000000000000,
|
8643 |
|
|
1.5707963267948966 },
|
8644 |
|
|
};
|
8645 |
|
|
|
8646 |
|
|
// Test function for k=0.69999999999999996, nu=0.50000000000000000.
|
8647 |
|
|
template <typename Tp>
|
8648 |
|
|
void test166()
|
8649 |
|
|
{
|
8650 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8651 |
|
|
Tp max_abs_diff = -Tp(1);
|
8652 |
|
|
Tp max_abs_frac = -Tp(1);
|
8653 |
|
|
unsigned int num_datum = sizeof(data166)
|
8654 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8655 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8656 |
|
|
{
|
8657 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data166[i].k), Tp(data166[i].nu),
|
8658 |
|
|
Tp(data166[i].phi));
|
8659 |
|
|
const Tp f0 = data166[i].f0;
|
8660 |
|
|
const Tp diff = f - f0;
|
8661 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8662 |
|
|
max_abs_diff = std::abs(diff);
|
8663 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8664 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8665 |
|
|
{
|
8666 |
|
|
const Tp frac = diff / f0;
|
8667 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8668 |
|
|
max_abs_frac = std::abs(frac);
|
8669 |
|
|
}
|
8670 |
|
|
}
|
8671 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8672 |
|
|
}
|
8673 |
|
|
|
8674 |
|
|
// Test data for k=0.69999999999999996, nu=0.59999999999999998.
|
8675 |
|
|
testcase_ellint_3<double> data167[] = {
|
8676 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.59999999999999998,
|
8677 |
|
|
0.0000000000000000 },
|
8678 |
|
|
{ 0.17391719464391611, 0.69999999999999996, 0.59999999999999998,
|
8679 |
|
|
0.17453292519943295 },
|
8680 |
|
|
{ 0.34443927423869031, 0.69999999999999996, 0.59999999999999998,
|
8681 |
|
|
0.34906585039886590 },
|
8682 |
|
|
{ 0.50945473266486074, 0.69999999999999996, 0.59999999999999998,
|
8683 |
|
|
0.52359877559829882 },
|
8684 |
|
|
{ 0.66866056326513823, 0.69999999999999996, 0.59999999999999998,
|
8685 |
|
|
0.69813170079773179 },
|
8686 |
|
|
{ 0.82325830002337352, 0.69999999999999996, 0.59999999999999998,
|
8687 |
|
|
0.87266462599716477 },
|
8688 |
|
|
{ 0.97522808245669357, 0.69999999999999996, 0.59999999999999998,
|
8689 |
|
|
1.0471975511965976 },
|
8690 |
|
|
{ 1.1265300613705282, 0.69999999999999996, 0.59999999999999998,
|
8691 |
|
|
1.2217304763960306 },
|
8692 |
|
|
{ 1.2784066076152003, 0.69999999999999996, 0.59999999999999998,
|
8693 |
|
|
1.3962634015954636 },
|
8694 |
|
|
{ 1.4309994736080540, 0.69999999999999996, 0.59999999999999998,
|
8695 |
|
|
1.5707963267948966 },
|
8696 |
|
|
};
|
8697 |
|
|
|
8698 |
|
|
// Test function for k=0.69999999999999996, nu=0.59999999999999998.
|
8699 |
|
|
template <typename Tp>
|
8700 |
|
|
void test167()
|
8701 |
|
|
{
|
8702 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8703 |
|
|
Tp max_abs_diff = -Tp(1);
|
8704 |
|
|
Tp max_abs_frac = -Tp(1);
|
8705 |
|
|
unsigned int num_datum = sizeof(data167)
|
8706 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8707 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8708 |
|
|
{
|
8709 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data167[i].k), Tp(data167[i].nu),
|
8710 |
|
|
Tp(data167[i].phi));
|
8711 |
|
|
const Tp f0 = data167[i].f0;
|
8712 |
|
|
const Tp diff = f - f0;
|
8713 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8714 |
|
|
max_abs_diff = std::abs(diff);
|
8715 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8716 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8717 |
|
|
{
|
8718 |
|
|
const Tp frac = diff / f0;
|
8719 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8720 |
|
|
max_abs_frac = std::abs(frac);
|
8721 |
|
|
}
|
8722 |
|
|
}
|
8723 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8724 |
|
|
}
|
8725 |
|
|
|
8726 |
|
|
// Test data for k=0.69999999999999996, nu=0.69999999999999996.
|
8727 |
|
|
testcase_ellint_3<double> data168[] = {
|
8728 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.69999999999999996,
|
8729 |
|
|
0.0000000000000000 },
|
8730 |
|
|
{ 0.17374434963995028, 0.69999999999999996, 0.69999999999999996,
|
8731 |
|
|
0.17453292519943295 },
|
8732 |
|
|
{ 0.34315091562900674, 0.69999999999999996, 0.69999999999999996,
|
8733 |
|
|
0.34906585039886590 },
|
8734 |
|
|
{ 0.50554262375653358, 0.69999999999999996, 0.69999999999999996,
|
8735 |
|
|
0.52359877559829882 },
|
8736 |
|
|
{ 0.66050025406305812, 0.69999999999999996, 0.69999999999999996,
|
8737 |
|
|
0.69813170079773179 },
|
8738 |
|
|
{ 0.80938620118847404, 0.69999999999999996, 0.69999999999999996,
|
8739 |
|
|
0.87266462599716477 },
|
8740 |
|
|
{ 0.95443223855852144, 0.69999999999999996, 0.69999999999999996,
|
8741 |
|
|
1.0471975511965976 },
|
8742 |
|
|
{ 1.0978573207128302, 0.69999999999999996, 0.69999999999999996,
|
8743 |
|
|
1.2217304763960306 },
|
8744 |
|
|
{ 1.2411754575007123, 0.69999999999999996, 0.69999999999999996,
|
8745 |
|
|
1.3962634015954636 },
|
8746 |
|
|
{ 1.3848459188329196, 0.69999999999999996, 0.69999999999999996,
|
8747 |
|
|
1.5707963267948966 },
|
8748 |
|
|
};
|
8749 |
|
|
|
8750 |
|
|
// Test function for k=0.69999999999999996, nu=0.69999999999999996.
|
8751 |
|
|
template <typename Tp>
|
8752 |
|
|
void test168()
|
8753 |
|
|
{
|
8754 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8755 |
|
|
Tp max_abs_diff = -Tp(1);
|
8756 |
|
|
Tp max_abs_frac = -Tp(1);
|
8757 |
|
|
unsigned int num_datum = sizeof(data168)
|
8758 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8759 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8760 |
|
|
{
|
8761 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data168[i].k), Tp(data168[i].nu),
|
8762 |
|
|
Tp(data168[i].phi));
|
8763 |
|
|
const Tp f0 = data168[i].f0;
|
8764 |
|
|
const Tp diff = f - f0;
|
8765 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8766 |
|
|
max_abs_diff = std::abs(diff);
|
8767 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8768 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8769 |
|
|
{
|
8770 |
|
|
const Tp frac = diff / f0;
|
8771 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8772 |
|
|
max_abs_frac = std::abs(frac);
|
8773 |
|
|
}
|
8774 |
|
|
}
|
8775 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8776 |
|
|
}
|
8777 |
|
|
|
8778 |
|
|
// Test data for k=0.69999999999999996, nu=0.80000000000000004.
|
8779 |
|
|
testcase_ellint_3<double> data169[] = {
|
8780 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.80000000000000004,
|
8781 |
|
|
0.0000000000000000 },
|
8782 |
|
|
{ 0.17357211837335737, 0.69999999999999996, 0.80000000000000004,
|
8783 |
|
|
0.17453292519943295 },
|
8784 |
|
|
{ 0.34187941416012108, 0.69999999999999996, 0.80000000000000004,
|
8785 |
|
|
0.34906585039886590 },
|
8786 |
|
|
{ 0.50173239465478270, 0.69999999999999996, 0.80000000000000004,
|
8787 |
|
|
0.52359877559829882 },
|
8788 |
|
|
{ 0.65266550725988315, 0.69999999999999996, 0.80000000000000004,
|
8789 |
|
|
0.69813170079773179 },
|
8790 |
|
|
{ 0.79624879865249298, 0.69999999999999996, 0.80000000000000004,
|
8791 |
|
|
0.87266462599716477 },
|
8792 |
|
|
{ 0.93497577043296920, 0.69999999999999996, 0.80000000000000004,
|
8793 |
|
|
1.0471975511965976 },
|
8794 |
|
|
{ 1.0713041566930748, 0.69999999999999996, 0.80000000000000004,
|
8795 |
|
|
1.2217304763960306 },
|
8796 |
|
|
{ 1.2069772023255652, 0.69999999999999996, 0.80000000000000004,
|
8797 |
|
|
1.3962634015954636 },
|
8798 |
|
|
{ 1.3427110650397533, 0.69999999999999996, 0.80000000000000004,
|
8799 |
|
|
1.5707963267948966 },
|
8800 |
|
|
};
|
8801 |
|
|
|
8802 |
|
|
// Test function for k=0.69999999999999996, nu=0.80000000000000004.
|
8803 |
|
|
template <typename Tp>
|
8804 |
|
|
void test169()
|
8805 |
|
|
{
|
8806 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8807 |
|
|
Tp max_abs_diff = -Tp(1);
|
8808 |
|
|
Tp max_abs_frac = -Tp(1);
|
8809 |
|
|
unsigned int num_datum = sizeof(data169)
|
8810 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8811 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8812 |
|
|
{
|
8813 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data169[i].k), Tp(data169[i].nu),
|
8814 |
|
|
Tp(data169[i].phi));
|
8815 |
|
|
const Tp f0 = data169[i].f0;
|
8816 |
|
|
const Tp diff = f - f0;
|
8817 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8818 |
|
|
max_abs_diff = std::abs(diff);
|
8819 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8820 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8821 |
|
|
{
|
8822 |
|
|
const Tp frac = diff / f0;
|
8823 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8824 |
|
|
max_abs_frac = std::abs(frac);
|
8825 |
|
|
}
|
8826 |
|
|
}
|
8827 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8828 |
|
|
}
|
8829 |
|
|
|
8830 |
|
|
// Test data for k=0.69999999999999996, nu=0.90000000000000002.
|
8831 |
|
|
testcase_ellint_3<double> data170[] = {
|
8832 |
|
|
{ -0.0000000000000000, 0.69999999999999996, 0.90000000000000002,
|
8833 |
|
|
0.0000000000000000 },
|
8834 |
|
|
{ 0.17340049697003634, 0.69999999999999996, 0.90000000000000002,
|
8835 |
|
|
0.17453292519943295 },
|
8836 |
|
|
{ 0.34062438249741556, 0.69999999999999996, 0.90000000000000002,
|
8837 |
|
|
0.34906585039886590 },
|
8838 |
|
|
{ 0.49801946510076878, 0.69999999999999996, 0.90000000000000002,
|
8839 |
|
|
0.52359877559829882 },
|
8840 |
|
|
{ 0.64513432604750487, 0.69999999999999996, 0.90000000000000002,
|
8841 |
|
|
0.69813170079773179 },
|
8842 |
|
|
{ 0.78378145487573758, 0.69999999999999996, 0.90000000000000002,
|
8843 |
|
|
0.87266462599716477 },
|
8844 |
|
|
{ 0.91671799500854634, 0.69999999999999996, 0.90000000000000002,
|
8845 |
|
|
1.0471975511965976 },
|
8846 |
|
|
{ 1.0466193579463123, 0.69999999999999996, 0.90000000000000002,
|
8847 |
|
|
1.2217304763960306 },
|
8848 |
|
|
{ 1.1754218079199146, 0.69999999999999996, 0.90000000000000002,
|
8849 |
|
|
1.3962634015954636 },
|
8850 |
|
|
{ 1.3040500499695911, 0.69999999999999996, 0.90000000000000002,
|
8851 |
|
|
1.5707963267948966 },
|
8852 |
|
|
};
|
8853 |
|
|
|
8854 |
|
|
// Test function for k=0.69999999999999996, nu=0.90000000000000002.
|
8855 |
|
|
template <typename Tp>
|
8856 |
|
|
void test170()
|
8857 |
|
|
{
|
8858 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8859 |
|
|
Tp max_abs_diff = -Tp(1);
|
8860 |
|
|
Tp max_abs_frac = -Tp(1);
|
8861 |
|
|
unsigned int num_datum = sizeof(data170)
|
8862 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8863 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8864 |
|
|
{
|
8865 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data170[i].k), Tp(data170[i].nu),
|
8866 |
|
|
Tp(data170[i].phi));
|
8867 |
|
|
const Tp f0 = data170[i].f0;
|
8868 |
|
|
const Tp diff = f - f0;
|
8869 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8870 |
|
|
max_abs_diff = std::abs(diff);
|
8871 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8872 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8873 |
|
|
{
|
8874 |
|
|
const Tp frac = diff / f0;
|
8875 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8876 |
|
|
max_abs_frac = std::abs(frac);
|
8877 |
|
|
}
|
8878 |
|
|
}
|
8879 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8880 |
|
|
}
|
8881 |
|
|
|
8882 |
|
|
// Test data for k=0.80000000000000004, nu=0.0000000000000000.
|
8883 |
|
|
testcase_ellint_3<double> data171[] = {
|
8884 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.0000000000000000,
|
8885 |
|
|
0.0000000000000000 },
|
8886 |
|
|
{ 0.17510154241338902, 0.80000000000000004, 0.0000000000000000,
|
8887 |
|
|
0.17453292519943295 },
|
8888 |
|
|
{ 0.35365068839779390, 0.80000000000000004, 0.0000000000000000,
|
8889 |
|
|
0.34906585039886590 },
|
8890 |
|
|
{ 0.53926804409084561, 0.80000000000000004, 0.0000000000000000,
|
8891 |
|
|
0.52359877559829882 },
|
8892 |
|
|
{ 0.73587926028070383, 0.80000000000000004, 0.0000000000000000,
|
8893 |
|
|
0.69813170079773179 },
|
8894 |
|
|
{ 0.94770942970071170, 0.80000000000000004, 0.0000000000000000,
|
8895 |
|
|
0.87266462599716477 },
|
8896 |
|
|
{ 1.1789022995388239, 0.80000000000000004, 0.0000000000000000,
|
8897 |
|
|
1.0471975511965976 },
|
8898 |
|
|
{ 1.4323027881876009, 0.80000000000000004, 0.0000000000000000,
|
8899 |
|
|
1.2217304763960306 },
|
8900 |
|
|
{ 1.7069629739121674, 0.80000000000000004, 0.0000000000000000,
|
8901 |
|
|
1.3962634015954636 },
|
8902 |
|
|
{ 1.9953027776647296, 0.80000000000000004, 0.0000000000000000,
|
8903 |
|
|
1.5707963267948966 },
|
8904 |
|
|
};
|
8905 |
|
|
|
8906 |
|
|
// Test function for k=0.80000000000000004, nu=0.0000000000000000.
|
8907 |
|
|
template <typename Tp>
|
8908 |
|
|
void test171()
|
8909 |
|
|
{
|
8910 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8911 |
|
|
Tp max_abs_diff = -Tp(1);
|
8912 |
|
|
Tp max_abs_frac = -Tp(1);
|
8913 |
|
|
unsigned int num_datum = sizeof(data171)
|
8914 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8915 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8916 |
|
|
{
|
8917 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data171[i].k), Tp(data171[i].nu),
|
8918 |
|
|
Tp(data171[i].phi));
|
8919 |
|
|
const Tp f0 = data171[i].f0;
|
8920 |
|
|
const Tp diff = f - f0;
|
8921 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8922 |
|
|
max_abs_diff = std::abs(diff);
|
8923 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8924 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8925 |
|
|
{
|
8926 |
|
|
const Tp frac = diff / f0;
|
8927 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8928 |
|
|
max_abs_frac = std::abs(frac);
|
8929 |
|
|
}
|
8930 |
|
|
}
|
8931 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8932 |
|
|
}
|
8933 |
|
|
|
8934 |
|
|
// Test data for k=0.80000000000000004, nu=0.10000000000000001.
|
8935 |
|
|
testcase_ellint_3<double> data172[] = {
|
8936 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.10000000000000001,
|
8937 |
|
|
0.0000000000000000 },
|
8938 |
|
|
{ 0.17492468824017166, 0.80000000000000004, 0.10000000000000001,
|
8939 |
|
|
0.17453292519943295 },
|
8940 |
|
|
{ 0.35224443521476911, 0.80000000000000004, 0.10000000000000001,
|
8941 |
|
|
0.34906585039886590 },
|
8942 |
|
|
{ 0.53456851853226961, 0.80000000000000004, 0.10000000000000001,
|
8943 |
|
|
0.52359877559829882 },
|
8944 |
|
|
{ 0.72488875602364944, 0.80000000000000004, 0.10000000000000001,
|
8945 |
|
|
0.69813170079773179 },
|
8946 |
|
|
{ 0.92661354274638952, 0.80000000000000004, 0.10000000000000001,
|
8947 |
|
|
0.87266462599716477 },
|
8948 |
|
|
{ 1.1432651144499077, 0.80000000000000004, 0.10000000000000001,
|
8949 |
|
|
1.0471975511965976 },
|
8950 |
|
|
{ 1.3774479927211429, 0.80000000000000004, 0.10000000000000001,
|
8951 |
|
|
1.2217304763960306 },
|
8952 |
|
|
{ 1.6287092337196041, 0.80000000000000004, 0.10000000000000001,
|
8953 |
|
|
1.3962634015954636 },
|
8954 |
|
|
{ 1.8910755418379521, 0.80000000000000004, 0.10000000000000001,
|
8955 |
|
|
1.5707963267948966 },
|
8956 |
|
|
};
|
8957 |
|
|
|
8958 |
|
|
// Test function for k=0.80000000000000004, nu=0.10000000000000001.
|
8959 |
|
|
template <typename Tp>
|
8960 |
|
|
void test172()
|
8961 |
|
|
{
|
8962 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
8963 |
|
|
Tp max_abs_diff = -Tp(1);
|
8964 |
|
|
Tp max_abs_frac = -Tp(1);
|
8965 |
|
|
unsigned int num_datum = sizeof(data172)
|
8966 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
8967 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
8968 |
|
|
{
|
8969 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data172[i].k), Tp(data172[i].nu),
|
8970 |
|
|
Tp(data172[i].phi));
|
8971 |
|
|
const Tp f0 = data172[i].f0;
|
8972 |
|
|
const Tp diff = f - f0;
|
8973 |
|
|
if (std::abs(diff) > max_abs_diff)
|
8974 |
|
|
max_abs_diff = std::abs(diff);
|
8975 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
8976 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
8977 |
|
|
{
|
8978 |
|
|
const Tp frac = diff / f0;
|
8979 |
|
|
if (std::abs(frac) > max_abs_frac)
|
8980 |
|
|
max_abs_frac = std::abs(frac);
|
8981 |
|
|
}
|
8982 |
|
|
}
|
8983 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
8984 |
|
|
}
|
8985 |
|
|
|
8986 |
|
|
// Test data for k=0.80000000000000004, nu=0.20000000000000001.
|
8987 |
|
|
testcase_ellint_3<double> data173[] = {
|
8988 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.20000000000000001,
|
8989 |
|
|
0.0000000000000000 },
|
8990 |
|
|
{ 0.17474847286224943, 0.80000000000000004, 0.20000000000000001,
|
8991 |
|
|
0.17453292519943295 },
|
8992 |
|
|
{ 0.35085779529084682, 0.80000000000000004, 0.20000000000000001,
|
8993 |
|
|
0.34906585039886590 },
|
8994 |
|
|
{ 0.53000829263059157, 0.80000000000000004, 0.20000000000000001,
|
8995 |
|
|
0.52359877559829882 },
|
8996 |
|
|
{ 0.71443466027453406, 0.80000000000000004, 0.20000000000000001,
|
8997 |
|
|
0.69813170079773179 },
|
8998 |
|
|
{ 0.90698196872715420, 0.80000000000000004, 0.20000000000000001,
|
8999 |
|
|
0.87266462599716477 },
|
9000 |
|
|
{ 1.1108198200558581, 0.80000000000000004, 0.20000000000000001,
|
9001 |
|
|
1.0471975511965976 },
|
9002 |
|
|
{ 1.3284988909963957, 0.80000000000000004, 0.20000000000000001,
|
9003 |
|
|
1.2217304763960306 },
|
9004 |
|
|
{ 1.5600369318140328, 0.80000000000000004, 0.20000000000000001,
|
9005 |
|
|
1.3962634015954636 },
|
9006 |
|
|
{ 1.8007226661734588, 0.80000000000000004, 0.20000000000000001,
|
9007 |
|
|
1.5707963267948966 },
|
9008 |
|
|
};
|
9009 |
|
|
|
9010 |
|
|
// Test function for k=0.80000000000000004, nu=0.20000000000000001.
|
9011 |
|
|
template <typename Tp>
|
9012 |
|
|
void test173()
|
9013 |
|
|
{
|
9014 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9015 |
|
|
Tp max_abs_diff = -Tp(1);
|
9016 |
|
|
Tp max_abs_frac = -Tp(1);
|
9017 |
|
|
unsigned int num_datum = sizeof(data173)
|
9018 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9019 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9020 |
|
|
{
|
9021 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data173[i].k), Tp(data173[i].nu),
|
9022 |
|
|
Tp(data173[i].phi));
|
9023 |
|
|
const Tp f0 = data173[i].f0;
|
9024 |
|
|
const Tp diff = f - f0;
|
9025 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9026 |
|
|
max_abs_diff = std::abs(diff);
|
9027 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9028 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9029 |
|
|
{
|
9030 |
|
|
const Tp frac = diff / f0;
|
9031 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9032 |
|
|
max_abs_frac = std::abs(frac);
|
9033 |
|
|
}
|
9034 |
|
|
}
|
9035 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9036 |
|
|
}
|
9037 |
|
|
|
9038 |
|
|
// Test data for k=0.80000000000000004, nu=0.29999999999999999.
|
9039 |
|
|
testcase_ellint_3<double> data174[] = {
|
9040 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.29999999999999999,
|
9041 |
|
|
0.0000000000000000 },
|
9042 |
|
|
{ 0.17457289217669891, 0.80000000000000004, 0.29999999999999999,
|
9043 |
|
|
0.17453292519943295 },
|
9044 |
|
|
{ 0.34949028801501258, 0.80000000000000004, 0.29999999999999999,
|
9045 |
|
|
0.34906585039886590 },
|
9046 |
|
|
{ 0.52558024362769318, 0.80000000000000004, 0.29999999999999999,
|
9047 |
|
|
0.52359877559829882 },
|
9048 |
|
|
{ 0.70447281740094914, 0.80000000000000004, 0.29999999999999999,
|
9049 |
|
|
0.69813170079773179 },
|
9050 |
|
|
{ 0.88864745641528986, 0.80000000000000004, 0.29999999999999999,
|
9051 |
|
|
0.87266462599716477 },
|
9052 |
|
|
{ 1.0811075819341465, 0.80000000000000004, 0.29999999999999999,
|
9053 |
|
|
1.0471975511965976 },
|
9054 |
|
|
{ 1.2844589654082377, 0.80000000000000004, 0.29999999999999999,
|
9055 |
|
|
1.2217304763960306 },
|
9056 |
|
|
{ 1.4991461361277849, 0.80000000000000004, 0.29999999999999999,
|
9057 |
|
|
1.3962634015954636 },
|
9058 |
|
|
{ 1.7214611048717301, 0.80000000000000004, 0.29999999999999999,
|
9059 |
|
|
1.5707963267948966 },
|
9060 |
|
|
};
|
9061 |
|
|
|
9062 |
|
|
// Test function for k=0.80000000000000004, nu=0.29999999999999999.
|
9063 |
|
|
template <typename Tp>
|
9064 |
|
|
void test174()
|
9065 |
|
|
{
|
9066 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9067 |
|
|
Tp max_abs_diff = -Tp(1);
|
9068 |
|
|
Tp max_abs_frac = -Tp(1);
|
9069 |
|
|
unsigned int num_datum = sizeof(data174)
|
9070 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9071 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9072 |
|
|
{
|
9073 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data174[i].k), Tp(data174[i].nu),
|
9074 |
|
|
Tp(data174[i].phi));
|
9075 |
|
|
const Tp f0 = data174[i].f0;
|
9076 |
|
|
const Tp diff = f - f0;
|
9077 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9078 |
|
|
max_abs_diff = std::abs(diff);
|
9079 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9080 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9081 |
|
|
{
|
9082 |
|
|
const Tp frac = diff / f0;
|
9083 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9084 |
|
|
max_abs_frac = std::abs(frac);
|
9085 |
|
|
}
|
9086 |
|
|
}
|
9087 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9088 |
|
|
}
|
9089 |
|
|
|
9090 |
|
|
// Test data for k=0.80000000000000004, nu=0.40000000000000002.
|
9091 |
|
|
testcase_ellint_3<double> data175[] = {
|
9092 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.40000000000000002,
|
9093 |
|
|
0.0000000000000000 },
|
9094 |
|
|
{ 0.17439794211872178, 0.80000000000000004, 0.40000000000000002,
|
9095 |
|
|
0.17453292519943295 },
|
9096 |
|
|
{ 0.34814144964568972, 0.80000000000000004, 0.40000000000000002,
|
9097 |
|
|
0.34906585039886590 },
|
9098 |
|
|
{ 0.52127776285273075, 0.80000000000000004, 0.40000000000000002,
|
9099 |
|
|
0.52359877559829882 },
|
9100 |
|
|
{ 0.69496411438966599, 0.80000000000000004, 0.40000000000000002,
|
9101 |
|
|
0.69813170079773179 },
|
9102 |
|
|
{ 0.87146878427509589, 0.80000000000000004, 0.40000000000000002,
|
9103 |
|
|
0.87266462599716477 },
|
9104 |
|
|
{ 1.0537579024937762, 0.80000000000000004, 0.40000000000000002,
|
9105 |
|
|
1.0471975511965976 },
|
9106 |
|
|
{ 1.2445534387922637, 0.80000000000000004, 0.40000000000000002,
|
9107 |
|
|
1.2217304763960306 },
|
9108 |
|
|
{ 1.4446769766361993, 0.80000000000000004, 0.40000000000000002,
|
9109 |
|
|
1.3962634015954636 },
|
9110 |
|
|
{ 1.6512267838651289, 0.80000000000000004, 0.40000000000000002,
|
9111 |
|
|
1.5707963267948966 },
|
9112 |
|
|
};
|
9113 |
|
|
|
9114 |
|
|
// Test function for k=0.80000000000000004, nu=0.40000000000000002.
|
9115 |
|
|
template <typename Tp>
|
9116 |
|
|
void test175()
|
9117 |
|
|
{
|
9118 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9119 |
|
|
Tp max_abs_diff = -Tp(1);
|
9120 |
|
|
Tp max_abs_frac = -Tp(1);
|
9121 |
|
|
unsigned int num_datum = sizeof(data175)
|
9122 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9123 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9124 |
|
|
{
|
9125 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data175[i].k), Tp(data175[i].nu),
|
9126 |
|
|
Tp(data175[i].phi));
|
9127 |
|
|
const Tp f0 = data175[i].f0;
|
9128 |
|
|
const Tp diff = f - f0;
|
9129 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9130 |
|
|
max_abs_diff = std::abs(diff);
|
9131 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9132 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9133 |
|
|
{
|
9134 |
|
|
const Tp frac = diff / f0;
|
9135 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9136 |
|
|
max_abs_frac = std::abs(frac);
|
9137 |
|
|
}
|
9138 |
|
|
}
|
9139 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9140 |
|
|
}
|
9141 |
|
|
|
9142 |
|
|
// Test data for k=0.80000000000000004, nu=0.50000000000000000.
|
9143 |
|
|
testcase_ellint_3<double> data176[] = {
|
9144 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.50000000000000000,
|
9145 |
|
|
0.0000000000000000 },
|
9146 |
|
|
{ 0.17422361866118047, 0.80000000000000004, 0.50000000000000000,
|
9147 |
|
|
0.17453292519943295 },
|
9148 |
|
|
{ 0.34681083254170475, 0.80000000000000004, 0.50000000000000000,
|
9149 |
|
|
0.34906585039886590 },
|
9150 |
|
|
{ 0.51709470815494440, 0.80000000000000004, 0.50000000000000000,
|
9151 |
|
|
0.52359877559829882 },
|
9152 |
|
|
{ 0.68587375344080259, 0.80000000000000004, 0.50000000000000000,
|
9153 |
|
|
0.69813170079773179 },
|
9154 |
|
|
{ 0.85532571852810624, 0.80000000000000004, 0.50000000000000000,
|
9155 |
|
|
0.87266462599716477 },
|
9156 |
|
|
{ 1.0284677391874906, 0.80000000000000004, 0.50000000000000000,
|
9157 |
|
|
1.0471975511965976 },
|
9158 |
|
|
{ 1.2081693942686225, 0.80000000000000004, 0.50000000000000000,
|
9159 |
|
|
1.2217304763960306 },
|
9160 |
|
|
{ 1.3955803006426311, 0.80000000000000004, 0.50000000000000000,
|
9161 |
|
|
1.3962634015954636 },
|
9162 |
|
|
{ 1.5884528947755532, 0.80000000000000004, 0.50000000000000000,
|
9163 |
|
|
1.5707963267948966 },
|
9164 |
|
|
};
|
9165 |
|
|
|
9166 |
|
|
// Test function for k=0.80000000000000004, nu=0.50000000000000000.
|
9167 |
|
|
template <typename Tp>
|
9168 |
|
|
void test176()
|
9169 |
|
|
{
|
9170 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9171 |
|
|
Tp max_abs_diff = -Tp(1);
|
9172 |
|
|
Tp max_abs_frac = -Tp(1);
|
9173 |
|
|
unsigned int num_datum = sizeof(data176)
|
9174 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9175 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9176 |
|
|
{
|
9177 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data176[i].k), Tp(data176[i].nu),
|
9178 |
|
|
Tp(data176[i].phi));
|
9179 |
|
|
const Tp f0 = data176[i].f0;
|
9180 |
|
|
const Tp diff = f - f0;
|
9181 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9182 |
|
|
max_abs_diff = std::abs(diff);
|
9183 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9184 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9185 |
|
|
{
|
9186 |
|
|
const Tp frac = diff / f0;
|
9187 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9188 |
|
|
max_abs_frac = std::abs(frac);
|
9189 |
|
|
}
|
9190 |
|
|
}
|
9191 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9192 |
|
|
}
|
9193 |
|
|
|
9194 |
|
|
// Test data for k=0.80000000000000004, nu=0.59999999999999998.
|
9195 |
|
|
testcase_ellint_3<double> data177[] = {
|
9196 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.59999999999999998,
|
9197 |
|
|
0.0000000000000000 },
|
9198 |
|
|
{ 0.17404991781414092, 0.80000000000000004, 0.59999999999999998,
|
9199 |
|
|
0.17453292519943295 },
|
9200 |
|
|
{ 0.34549800443625167, 0.80000000000000004, 0.59999999999999998,
|
9201 |
|
|
0.34906585039886590 },
|
9202 |
|
|
{ 0.51302536167001556, 0.80000000000000004, 0.59999999999999998,
|
9203 |
|
|
0.52359877559829882 },
|
9204 |
|
|
{ 0.67717065003912258, 0.80000000000000004, 0.59999999999999998,
|
9205 |
|
|
0.69813170079773179 },
|
9206 |
|
|
{ 0.84011512421134416, 0.80000000000000004, 0.59999999999999998,
|
9207 |
|
|
0.87266462599716477 },
|
9208 |
|
|
{ 1.0049863847088742, 0.80000000000000004, 0.59999999999999998,
|
9209 |
|
|
1.0471975511965976 },
|
9210 |
|
|
{ 1.1748145941898918, 0.80000000000000004, 0.59999999999999998,
|
9211 |
|
|
1.2217304763960306 },
|
9212 |
|
|
{ 1.3510319699755071, 0.80000000000000004, 0.59999999999999998,
|
9213 |
|
|
1.3962634015954636 },
|
9214 |
|
|
{ 1.5319262547427865, 0.80000000000000004, 0.59999999999999998,
|
9215 |
|
|
1.5707963267948966 },
|
9216 |
|
|
};
|
9217 |
|
|
|
9218 |
|
|
// Test function for k=0.80000000000000004, nu=0.59999999999999998.
|
9219 |
|
|
template <typename Tp>
|
9220 |
|
|
void test177()
|
9221 |
|
|
{
|
9222 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9223 |
|
|
Tp max_abs_diff = -Tp(1);
|
9224 |
|
|
Tp max_abs_frac = -Tp(1);
|
9225 |
|
|
unsigned int num_datum = sizeof(data177)
|
9226 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9227 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9228 |
|
|
{
|
9229 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data177[i].k), Tp(data177[i].nu),
|
9230 |
|
|
Tp(data177[i].phi));
|
9231 |
|
|
const Tp f0 = data177[i].f0;
|
9232 |
|
|
const Tp diff = f - f0;
|
9233 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9234 |
|
|
max_abs_diff = std::abs(diff);
|
9235 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9236 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9237 |
|
|
{
|
9238 |
|
|
const Tp frac = diff / f0;
|
9239 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9240 |
|
|
max_abs_frac = std::abs(frac);
|
9241 |
|
|
}
|
9242 |
|
|
}
|
9243 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9244 |
|
|
}
|
9245 |
|
|
|
9246 |
|
|
// Test data for k=0.80000000000000004, nu=0.69999999999999996.
|
9247 |
|
|
testcase_ellint_3<double> data178[] = {
|
9248 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.69999999999999996,
|
9249 |
|
|
0.0000000000000000 },
|
9250 |
|
|
{ 0.17387683562442202, 0.80000000000000004, 0.69999999999999996,
|
9251 |
|
|
0.17453292519943295 },
|
9252 |
|
|
{ 0.34420254775101611, 0.80000000000000004, 0.69999999999999996,
|
9253 |
|
|
0.34906585039886590 },
|
9254 |
|
|
{ 0.50906439222143685, 0.80000000000000004, 0.69999999999999996,
|
9255 |
|
|
0.52359877559829882 },
|
9256 |
|
|
{ 0.66882693152688433, 0.80000000000000004, 0.69999999999999996,
|
9257 |
|
|
0.69813170079773179 },
|
9258 |
|
|
{ 0.82574792844091316, 0.80000000000000004, 0.69999999999999996,
|
9259 |
|
|
0.87266462599716477 },
|
9260 |
|
|
{ 0.98310431309490953, 0.80000000000000004, 0.69999999999999996,
|
9261 |
|
|
1.0471975511965976 },
|
9262 |
|
|
{ 1.1440884535113258, 0.80000000000000004, 0.69999999999999996,
|
9263 |
|
|
1.2217304763960306 },
|
9264 |
|
|
{ 1.3103743938952537, 0.80000000000000004, 0.69999999999999996,
|
9265 |
|
|
1.3962634015954636 },
|
9266 |
|
|
{ 1.4806912324625332, 0.80000000000000004, 0.69999999999999996,
|
9267 |
|
|
1.5707963267948966 },
|
9268 |
|
|
};
|
9269 |
|
|
|
9270 |
|
|
// Test function for k=0.80000000000000004, nu=0.69999999999999996.
|
9271 |
|
|
template <typename Tp>
|
9272 |
|
|
void test178()
|
9273 |
|
|
{
|
9274 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9275 |
|
|
Tp max_abs_diff = -Tp(1);
|
9276 |
|
|
Tp max_abs_frac = -Tp(1);
|
9277 |
|
|
unsigned int num_datum = sizeof(data178)
|
9278 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9279 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9280 |
|
|
{
|
9281 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data178[i].k), Tp(data178[i].nu),
|
9282 |
|
|
Tp(data178[i].phi));
|
9283 |
|
|
const Tp f0 = data178[i].f0;
|
9284 |
|
|
const Tp diff = f - f0;
|
9285 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9286 |
|
|
max_abs_diff = std::abs(diff);
|
9287 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9288 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9289 |
|
|
{
|
9290 |
|
|
const Tp frac = diff / f0;
|
9291 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9292 |
|
|
max_abs_frac = std::abs(frac);
|
9293 |
|
|
}
|
9294 |
|
|
}
|
9295 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9296 |
|
|
}
|
9297 |
|
|
|
9298 |
|
|
// Test data for k=0.80000000000000004, nu=0.80000000000000004.
|
9299 |
|
|
testcase_ellint_3<double> data179[] = {
|
9300 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.80000000000000004,
|
9301 |
|
|
0.0000000000000000 },
|
9302 |
|
|
{ 0.17370436817515206, 0.80000000000000004, 0.80000000000000004,
|
9303 |
|
|
0.17453292519943295 },
|
9304 |
|
|
{ 0.34292405894783395, 0.80000000000000004, 0.80000000000000004,
|
9305 |
|
|
0.34906585039886590 },
|
9306 |
|
|
{ 0.50520682176250087, 0.80000000000000004, 0.80000000000000004,
|
9307 |
|
|
0.52359877559829882 },
|
9308 |
|
|
{ 0.66081751679736189, 0.80000000000000004, 0.80000000000000004,
|
9309 |
|
|
0.69813170079773179 },
|
9310 |
|
|
{ 0.81214672249355102, 0.80000000000000004, 0.80000000000000004,
|
9311 |
|
|
0.87266462599716477 },
|
9312 |
|
|
{ 0.96264481387685574, 0.80000000000000004, 0.80000000000000004,
|
9313 |
|
|
1.0471975511965976 },
|
9314 |
|
|
{ 1.1156611352656258, 0.80000000000000004, 0.80000000000000004,
|
9315 |
|
|
1.2217304763960306 },
|
9316 |
|
|
{ 1.2730756225143889, 0.80000000000000004, 0.80000000000000004,
|
9317 |
|
|
1.3962634015954636 },
|
9318 |
|
|
{ 1.4339837018309474, 0.80000000000000004, 0.80000000000000004,
|
9319 |
|
|
1.5707963267948966 },
|
9320 |
|
|
};
|
9321 |
|
|
|
9322 |
|
|
// Test function for k=0.80000000000000004, nu=0.80000000000000004.
|
9323 |
|
|
template <typename Tp>
|
9324 |
|
|
void test179()
|
9325 |
|
|
{
|
9326 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9327 |
|
|
Tp max_abs_diff = -Tp(1);
|
9328 |
|
|
Tp max_abs_frac = -Tp(1);
|
9329 |
|
|
unsigned int num_datum = sizeof(data179)
|
9330 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9331 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9332 |
|
|
{
|
9333 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data179[i].k), Tp(data179[i].nu),
|
9334 |
|
|
Tp(data179[i].phi));
|
9335 |
|
|
const Tp f0 = data179[i].f0;
|
9336 |
|
|
const Tp diff = f - f0;
|
9337 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9338 |
|
|
max_abs_diff = std::abs(diff);
|
9339 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9340 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9341 |
|
|
{
|
9342 |
|
|
const Tp frac = diff / f0;
|
9343 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9344 |
|
|
max_abs_frac = std::abs(frac);
|
9345 |
|
|
}
|
9346 |
|
|
}
|
9347 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9348 |
|
|
}
|
9349 |
|
|
|
9350 |
|
|
// Test data for k=0.80000000000000004, nu=0.90000000000000002.
|
9351 |
|
|
testcase_ellint_3<double> data180[] = {
|
9352 |
|
|
{ -0.0000000000000000, 0.80000000000000004, 0.90000000000000002,
|
9353 |
|
|
0.0000000000000000 },
|
9354 |
|
|
{ 0.17353251158533153, 0.80000000000000004, 0.90000000000000002,
|
9355 |
|
|
0.17453292519943295 },
|
9356 |
|
|
{ 0.34166214791545768, 0.80000000000000004, 0.90000000000000002,
|
9357 |
|
|
0.34906585039886590 },
|
9358 |
|
|
{ 0.50144799535130580, 0.80000000000000004, 0.90000000000000002,
|
9359 |
|
|
0.52359877559829882 },
|
9360 |
|
|
{ 0.65311976193814447, 0.80000000000000004, 0.90000000000000002,
|
9361 |
|
|
0.69813170079773179 },
|
9362 |
|
|
{ 0.79924384892320866, 0.80000000000000004, 0.90000000000000002,
|
9363 |
|
|
0.87266462599716477 },
|
9364 |
|
|
{ 0.94345762353365625, 0.80000000000000004, 0.90000000000000002,
|
9365 |
|
|
1.0471975511965976 },
|
9366 |
|
|
{ 1.0892582069219159, 0.80000000000000004, 0.90000000000000002,
|
9367 |
|
|
1.2217304763960306 },
|
9368 |
|
|
{ 1.2387000876610268, 0.80000000000000004, 0.90000000000000002,
|
9369 |
|
|
1.3962634015954636 },
|
9370 |
|
|
{ 1.3911845406776222, 0.80000000000000004, 0.90000000000000002,
|
9371 |
|
|
1.5707963267948966 },
|
9372 |
|
|
};
|
9373 |
|
|
|
9374 |
|
|
// Test function for k=0.80000000000000004, nu=0.90000000000000002.
|
9375 |
|
|
template <typename Tp>
|
9376 |
|
|
void test180()
|
9377 |
|
|
{
|
9378 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9379 |
|
|
Tp max_abs_diff = -Tp(1);
|
9380 |
|
|
Tp max_abs_frac = -Tp(1);
|
9381 |
|
|
unsigned int num_datum = sizeof(data180)
|
9382 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9383 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9384 |
|
|
{
|
9385 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data180[i].k), Tp(data180[i].nu),
|
9386 |
|
|
Tp(data180[i].phi));
|
9387 |
|
|
const Tp f0 = data180[i].f0;
|
9388 |
|
|
const Tp diff = f - f0;
|
9389 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9390 |
|
|
max_abs_diff = std::abs(diff);
|
9391 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9392 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9393 |
|
|
{
|
9394 |
|
|
const Tp frac = diff / f0;
|
9395 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9396 |
|
|
max_abs_frac = std::abs(frac);
|
9397 |
|
|
}
|
9398 |
|
|
}
|
9399 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9400 |
|
|
}
|
9401 |
|
|
|
9402 |
|
|
// Test data for k=0.89999999999999991, nu=0.0000000000000000.
|
9403 |
|
|
testcase_ellint_3<double> data181[] = {
|
9404 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.0000000000000000,
|
9405 |
|
|
0.0000000000000000 },
|
9406 |
|
|
{ 0.17525427376115027, 0.89999999999999991, 0.0000000000000000,
|
9407 |
|
|
0.17453292519943295 },
|
9408 |
|
|
{ 0.35492464591297446, 0.89999999999999991, 0.0000000000000000,
|
9409 |
|
|
0.34906585039886590 },
|
9410 |
|
|
{ 0.54388221416157123, 0.89999999999999991, 0.0000000000000000,
|
9411 |
|
|
0.52359877559829882 },
|
9412 |
|
|
{ 0.74797400423532501, 0.89999999999999991, 0.0000000000000000,
|
9413 |
|
|
0.69813170079773179 },
|
9414 |
|
|
{ 0.97463898451966458, 0.89999999999999991, 0.0000000000000000,
|
9415 |
|
|
0.87266462599716477 },
|
9416 |
|
|
{ 1.2334463254523438, 0.89999999999999991, 0.0000000000000000,
|
9417 |
|
|
1.0471975511965976 },
|
9418 |
|
|
{ 1.5355247765594910, 0.89999999999999991, 0.0000000000000000,
|
9419 |
|
|
1.2217304763960306 },
|
9420 |
|
|
{ 1.8882928567775117, 0.89999999999999991, 0.0000000000000000,
|
9421 |
|
|
1.3962634015954636 },
|
9422 |
|
|
{ 2.2805491384227699, 0.89999999999999991, 0.0000000000000000,
|
9423 |
|
|
1.5707963267948966 },
|
9424 |
|
|
};
|
9425 |
|
|
|
9426 |
|
|
// Test function for k=0.89999999999999991, nu=0.0000000000000000.
|
9427 |
|
|
template <typename Tp>
|
9428 |
|
|
void test181()
|
9429 |
|
|
{
|
9430 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9431 |
|
|
Tp max_abs_diff = -Tp(1);
|
9432 |
|
|
Tp max_abs_frac = -Tp(1);
|
9433 |
|
|
unsigned int num_datum = sizeof(data181)
|
9434 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9435 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9436 |
|
|
{
|
9437 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data181[i].k), Tp(data181[i].nu),
|
9438 |
|
|
Tp(data181[i].phi));
|
9439 |
|
|
const Tp f0 = data181[i].f0;
|
9440 |
|
|
const Tp diff = f - f0;
|
9441 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9442 |
|
|
max_abs_diff = std::abs(diff);
|
9443 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9444 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9445 |
|
|
{
|
9446 |
|
|
const Tp frac = diff / f0;
|
9447 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9448 |
|
|
max_abs_frac = std::abs(frac);
|
9449 |
|
|
}
|
9450 |
|
|
}
|
9451 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9452 |
|
|
}
|
9453 |
|
|
|
9454 |
|
|
// Test data for k=0.89999999999999991, nu=0.10000000000000001.
|
9455 |
|
|
testcase_ellint_3<double> data182[] = {
|
9456 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.10000000000000001,
|
9457 |
|
|
0.0000000000000000 },
|
9458 |
|
|
{ 0.17507714233254659, 0.89999999999999991, 0.10000000000000001,
|
9459 |
|
|
0.17453292519943295 },
|
9460 |
|
|
{ 0.35350932904326521, 0.89999999999999991, 0.10000000000000001,
|
9461 |
|
|
0.34906585039886590 },
|
9462 |
|
|
{ 0.53911129989870987, 0.89999999999999991, 0.10000000000000001,
|
9463 |
|
|
0.52359877559829882 },
|
9464 |
|
|
{ 0.73666644254508407, 0.89999999999999991, 0.10000000000000001,
|
9465 |
|
|
0.69813170079773179 },
|
9466 |
|
|
{ 0.95250736612100184, 0.89999999999999991, 0.10000000000000001,
|
9467 |
|
|
0.87266462599716477 },
|
9468 |
|
|
{ 1.1950199550905591, 0.89999999999999991, 0.10000000000000001,
|
9469 |
|
|
1.0471975511965976 },
|
9470 |
|
|
{ 1.4741687286340848, 0.89999999999999991, 0.10000000000000001,
|
9471 |
|
|
1.2217304763960306 },
|
9472 |
|
|
{ 1.7968678183506053, 0.89999999999999991, 0.10000000000000001,
|
9473 |
|
|
1.3962634015954636 },
|
9474 |
|
|
{ 2.1537868513875282, 0.89999999999999991, 0.10000000000000001,
|
9475 |
|
|
1.5707963267948966 },
|
9476 |
|
|
};
|
9477 |
|
|
|
9478 |
|
|
// Test function for k=0.89999999999999991, nu=0.10000000000000001.
|
9479 |
|
|
template <typename Tp>
|
9480 |
|
|
void test182()
|
9481 |
|
|
{
|
9482 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9483 |
|
|
Tp max_abs_diff = -Tp(1);
|
9484 |
|
|
Tp max_abs_frac = -Tp(1);
|
9485 |
|
|
unsigned int num_datum = sizeof(data182)
|
9486 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9487 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9488 |
|
|
{
|
9489 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data182[i].k), Tp(data182[i].nu),
|
9490 |
|
|
Tp(data182[i].phi));
|
9491 |
|
|
const Tp f0 = data182[i].f0;
|
9492 |
|
|
const Tp diff = f - f0;
|
9493 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9494 |
|
|
max_abs_diff = std::abs(diff);
|
9495 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9496 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9497 |
|
|
{
|
9498 |
|
|
const Tp frac = diff / f0;
|
9499 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9500 |
|
|
max_abs_frac = std::abs(frac);
|
9501 |
|
|
}
|
9502 |
|
|
}
|
9503 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9504 |
|
|
}
|
9505 |
|
|
|
9506 |
|
|
// Test data for k=0.89999999999999991, nu=0.20000000000000001.
|
9507 |
|
|
testcase_ellint_3<double> data183[] = {
|
9508 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.20000000000000001,
|
9509 |
|
|
0.0000000000000000 },
|
9510 |
|
|
{ 0.17490065089140930, 0.89999999999999991, 0.20000000000000001,
|
9511 |
|
|
0.17453292519943295 },
|
9512 |
|
|
{ 0.35211377590661436, 0.89999999999999991, 0.20000000000000001,
|
9513 |
|
|
0.34906585039886590 },
|
9514 |
|
|
{ 0.53448220334204111, 0.89999999999999991, 0.20000000000000001,
|
9515 |
|
|
0.52359877559829882 },
|
9516 |
|
|
{ 0.72591368943179591, 0.89999999999999991, 0.20000000000000001,
|
9517 |
|
|
0.69813170079773179 },
|
9518 |
|
|
{ 0.93192539780038763, 0.89999999999999991, 0.20000000000000001,
|
9519 |
|
|
0.87266462599716477 },
|
9520 |
|
|
{ 1.1600809679692681, 0.89999999999999991, 0.20000000000000001,
|
9521 |
|
|
1.0471975511965976 },
|
9522 |
|
|
{ 1.4195407225882508, 0.89999999999999991, 0.20000000000000001,
|
9523 |
|
|
1.2217304763960306 },
|
9524 |
|
|
{ 1.7168966476424521, 0.89999999999999991, 0.20000000000000001,
|
9525 |
|
|
1.3962634015954636 },
|
9526 |
|
|
{ 2.0443194576468890, 0.89999999999999991, 0.20000000000000001,
|
9527 |
|
|
1.5707963267948966 },
|
9528 |
|
|
};
|
9529 |
|
|
|
9530 |
|
|
// Test function for k=0.89999999999999991, nu=0.20000000000000001.
|
9531 |
|
|
template <typename Tp>
|
9532 |
|
|
void test183()
|
9533 |
|
|
{
|
9534 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9535 |
|
|
Tp max_abs_diff = -Tp(1);
|
9536 |
|
|
Tp max_abs_frac = -Tp(1);
|
9537 |
|
|
unsigned int num_datum = sizeof(data183)
|
9538 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9539 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9540 |
|
|
{
|
9541 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data183[i].k), Tp(data183[i].nu),
|
9542 |
|
|
Tp(data183[i].phi));
|
9543 |
|
|
const Tp f0 = data183[i].f0;
|
9544 |
|
|
const Tp diff = f - f0;
|
9545 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9546 |
|
|
max_abs_diff = std::abs(diff);
|
9547 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9548 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9549 |
|
|
{
|
9550 |
|
|
const Tp frac = diff / f0;
|
9551 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9552 |
|
|
max_abs_frac = std::abs(frac);
|
9553 |
|
|
}
|
9554 |
|
|
}
|
9555 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9556 |
|
|
}
|
9557 |
|
|
|
9558 |
|
|
// Test data for k=0.89999999999999991, nu=0.29999999999999999.
|
9559 |
|
|
testcase_ellint_3<double> data184[] = {
|
9560 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.29999999999999999,
|
9561 |
|
|
0.0000000000000000 },
|
9562 |
|
|
{ 0.17472479532647534, 0.89999999999999991, 0.29999999999999999,
|
9563 |
|
|
0.17453292519943295 },
|
9564 |
|
|
{ 0.35073750187374114, 0.89999999999999991, 0.29999999999999999,
|
9565 |
|
|
0.34906585039886590 },
|
9566 |
|
|
{ 0.52998766129466968, 0.89999999999999991, 0.29999999999999999,
|
9567 |
|
|
0.52359877559829882 },
|
9568 |
|
|
{ 0.71566993548699565, 0.89999999999999991, 0.29999999999999999,
|
9569 |
|
|
0.69813170079773179 },
|
9570 |
|
|
{ 0.91271517762560195, 0.89999999999999991, 0.29999999999999999,
|
9571 |
|
|
0.87266462599716477 },
|
9572 |
|
|
{ 1.1281241199843368, 0.89999999999999991, 0.29999999999999999,
|
9573 |
|
|
1.0471975511965976 },
|
9574 |
|
|
{ 1.3704929576917448, 0.89999999999999991, 0.29999999999999999,
|
9575 |
|
|
1.2217304763960306 },
|
9576 |
|
|
{ 1.6461981511487711, 0.89999999999999991, 0.29999999999999999,
|
9577 |
|
|
1.3962634015954636 },
|
9578 |
|
|
{ 1.9486280260314424, 0.89999999999999991, 0.29999999999999999,
|
9579 |
|
|
1.5707963267948966 },
|
9580 |
|
|
};
|
9581 |
|
|
|
9582 |
|
|
// Test function for k=0.89999999999999991, nu=0.29999999999999999.
|
9583 |
|
|
template <typename Tp>
|
9584 |
|
|
void test184()
|
9585 |
|
|
{
|
9586 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9587 |
|
|
Tp max_abs_diff = -Tp(1);
|
9588 |
|
|
Tp max_abs_frac = -Tp(1);
|
9589 |
|
|
unsigned int num_datum = sizeof(data184)
|
9590 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9591 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9592 |
|
|
{
|
9593 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data184[i].k), Tp(data184[i].nu),
|
9594 |
|
|
Tp(data184[i].phi));
|
9595 |
|
|
const Tp f0 = data184[i].f0;
|
9596 |
|
|
const Tp diff = f - f0;
|
9597 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9598 |
|
|
max_abs_diff = std::abs(diff);
|
9599 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9600 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9601 |
|
|
{
|
9602 |
|
|
const Tp frac = diff / f0;
|
9603 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9604 |
|
|
max_abs_frac = std::abs(frac);
|
9605 |
|
|
}
|
9606 |
|
|
}
|
9607 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9608 |
|
|
}
|
9609 |
|
|
|
9610 |
|
|
// Test data for k=0.89999999999999991, nu=0.40000000000000002.
|
9611 |
|
|
testcase_ellint_3<double> data185[] = {
|
9612 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.40000000000000002,
|
9613 |
|
|
0.0000000000000000 },
|
9614 |
|
|
{ 0.17454957156468839, 0.89999999999999991, 0.40000000000000002,
|
9615 |
|
|
0.17453292519943295 },
|
9616 |
|
|
{ 0.34938003933330430, 0.89999999999999991, 0.40000000000000002,
|
9617 |
|
|
0.34906585039886590 },
|
9618 |
|
|
{ 0.52562093533067444, 0.89999999999999991, 0.40000000000000002,
|
9619 |
|
|
0.52359877559829882 },
|
9620 |
|
|
{ 0.70589461324915681, 0.89999999999999991, 0.40000000000000002,
|
9621 |
|
|
0.69813170079773179 },
|
9622 |
|
|
{ 0.89472658511942849, 0.89999999999999991, 0.40000000000000002,
|
9623 |
|
|
0.87266462599716477 },
|
9624 |
|
|
{ 1.0987419542323438, 0.89999999999999991, 0.40000000000000002,
|
9625 |
|
|
1.0471975511965976 },
|
9626 |
|
|
{ 1.3261349565496301, 0.89999999999999991, 0.40000000000000002,
|
9627 |
|
|
1.2217304763960306 },
|
9628 |
|
|
{ 1.5831293909853761, 0.89999999999999991, 0.40000000000000002,
|
9629 |
|
|
1.3962634015954636 },
|
9630 |
|
|
{ 1.8641114227238347, 0.89999999999999991, 0.40000000000000002,
|
9631 |
|
|
1.5707963267948966 },
|
9632 |
|
|
};
|
9633 |
|
|
|
9634 |
|
|
// Test function for k=0.89999999999999991, nu=0.40000000000000002.
|
9635 |
|
|
template <typename Tp>
|
9636 |
|
|
void test185()
|
9637 |
|
|
{
|
9638 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9639 |
|
|
Tp max_abs_diff = -Tp(1);
|
9640 |
|
|
Tp max_abs_frac = -Tp(1);
|
9641 |
|
|
unsigned int num_datum = sizeof(data185)
|
9642 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9643 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9644 |
|
|
{
|
9645 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data185[i].k), Tp(data185[i].nu),
|
9646 |
|
|
Tp(data185[i].phi));
|
9647 |
|
|
const Tp f0 = data185[i].f0;
|
9648 |
|
|
const Tp diff = f - f0;
|
9649 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9650 |
|
|
max_abs_diff = std::abs(diff);
|
9651 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9652 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9653 |
|
|
{
|
9654 |
|
|
const Tp frac = diff / f0;
|
9655 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9656 |
|
|
max_abs_frac = std::abs(frac);
|
9657 |
|
|
}
|
9658 |
|
|
}
|
9659 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9660 |
|
|
}
|
9661 |
|
|
|
9662 |
|
|
// Test data for k=0.89999999999999991, nu=0.50000000000000000.
|
9663 |
|
|
testcase_ellint_3<double> data186[] = {
|
9664 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.50000000000000000,
|
9665 |
|
|
0.0000000000000000 },
|
9666 |
|
|
{ 0.17437497557073336, 0.89999999999999991, 0.50000000000000000,
|
9667 |
|
|
0.17453292519943295 },
|
9668 |
|
|
{ 0.34804093691586013, 0.89999999999999991, 0.50000000000000000,
|
9669 |
|
|
0.34906585039886590 },
|
9670 |
|
|
{ 0.52137576320372903, 0.89999999999999991, 0.50000000000000000,
|
9671 |
|
|
0.52359877559829882 },
|
9672 |
|
|
{ 0.69655163996912262, 0.89999999999999991, 0.50000000000000000,
|
9673 |
|
|
0.69813170079773179 },
|
9674 |
|
|
{ 0.87783188683054236, 0.89999999999999991, 0.50000000000000000,
|
9675 |
|
|
0.87266462599716477 },
|
9676 |
|
|
{ 1.0716015959755183, 0.89999999999999991, 0.50000000000000000,
|
9677 |
|
|
1.0471975511965976 },
|
9678 |
|
|
{ 1.2857636916026749, 0.89999999999999991, 0.50000000000000000,
|
9679 |
|
|
1.2217304763960306 },
|
9680 |
|
|
{ 1.5264263913252358, 0.89999999999999991, 0.50000000000000000,
|
9681 |
|
|
1.3962634015954636 },
|
9682 |
|
|
{ 1.7888013241937859, 0.89999999999999991, 0.50000000000000000,
|
9683 |
|
|
1.5707963267948966 },
|
9684 |
|
|
};
|
9685 |
|
|
|
9686 |
|
|
// Test function for k=0.89999999999999991, nu=0.50000000000000000.
|
9687 |
|
|
template <typename Tp>
|
9688 |
|
|
void test186()
|
9689 |
|
|
{
|
9690 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9691 |
|
|
Tp max_abs_diff = -Tp(1);
|
9692 |
|
|
Tp max_abs_frac = -Tp(1);
|
9693 |
|
|
unsigned int num_datum = sizeof(data186)
|
9694 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9695 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9696 |
|
|
{
|
9697 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data186[i].k), Tp(data186[i].nu),
|
9698 |
|
|
Tp(data186[i].phi));
|
9699 |
|
|
const Tp f0 = data186[i].f0;
|
9700 |
|
|
const Tp diff = f - f0;
|
9701 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9702 |
|
|
max_abs_diff = std::abs(diff);
|
9703 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9704 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9705 |
|
|
{
|
9706 |
|
|
const Tp frac = diff / f0;
|
9707 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9708 |
|
|
max_abs_frac = std::abs(frac);
|
9709 |
|
|
}
|
9710 |
|
|
}
|
9711 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9712 |
|
|
}
|
9713 |
|
|
|
9714 |
|
|
// Test data for k=0.89999999999999991, nu=0.59999999999999998.
|
9715 |
|
|
testcase_ellint_3<double> data187[] = {
|
9716 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.59999999999999998,
|
9717 |
|
|
0.0000000000000000 },
|
9718 |
|
|
{ 0.17420100334657815, 0.89999999999999991, 0.59999999999999998,
|
9719 |
|
|
0.17453292519943295 },
|
9720 |
|
|
{ 0.34671975876122157, 0.89999999999999991, 0.59999999999999998,
|
9721 |
|
|
0.34906585039886590 },
|
9722 |
|
|
{ 0.51724631570707957, 0.89999999999999991, 0.59999999999999998,
|
9723 |
|
|
0.52359877559829882 },
|
9724 |
|
|
{ 0.68760879113743034, 0.89999999999999991, 0.59999999999999998,
|
9725 |
|
|
0.69813170079773179 },
|
9726 |
|
|
{ 0.86192157779698364, 0.89999999999999991, 0.59999999999999998,
|
9727 |
|
|
0.87266462599716477 },
|
9728 |
|
|
{ 1.0464279696166352, 0.89999999999999991, 0.59999999999999998,
|
9729 |
|
|
1.0471975511965976 },
|
9730 |
|
|
{ 1.2488156247094004, 0.89999999999999991, 0.59999999999999998,
|
9731 |
|
|
1.2217304763960306 },
|
9732 |
|
|
{ 1.4750988777188470, 0.89999999999999991, 0.59999999999999998,
|
9733 |
|
|
1.3962634015954636 },
|
9734 |
|
|
{ 1.7211781128919521, 0.89999999999999991, 0.59999999999999998,
|
9735 |
|
|
1.5707963267948966 },
|
9736 |
|
|
};
|
9737 |
|
|
|
9738 |
|
|
// Test function for k=0.89999999999999991, nu=0.59999999999999998.
|
9739 |
|
|
template <typename Tp>
|
9740 |
|
|
void test187()
|
9741 |
|
|
{
|
9742 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9743 |
|
|
Tp max_abs_diff = -Tp(1);
|
9744 |
|
|
Tp max_abs_frac = -Tp(1);
|
9745 |
|
|
unsigned int num_datum = sizeof(data187)
|
9746 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9747 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9748 |
|
|
{
|
9749 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data187[i].k), Tp(data187[i].nu),
|
9750 |
|
|
Tp(data187[i].phi));
|
9751 |
|
|
const Tp f0 = data187[i].f0;
|
9752 |
|
|
const Tp diff = f - f0;
|
9753 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9754 |
|
|
max_abs_diff = std::abs(diff);
|
9755 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9756 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9757 |
|
|
{
|
9758 |
|
|
const Tp frac = diff / f0;
|
9759 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9760 |
|
|
max_abs_frac = std::abs(frac);
|
9761 |
|
|
}
|
9762 |
|
|
}
|
9763 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9764 |
|
|
}
|
9765 |
|
|
|
9766 |
|
|
// Test data for k=0.89999999999999991, nu=0.69999999999999996.
|
9767 |
|
|
testcase_ellint_3<double> data188[] = {
|
9768 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.69999999999999996,
|
9769 |
|
|
0.0000000000000000 },
|
9770 |
|
|
{ 0.17402765093102210, 0.89999999999999991, 0.69999999999999996,
|
9771 |
|
|
0.17453292519943295 },
|
9772 |
|
|
{ 0.34541608382635131, 0.89999999999999991, 0.69999999999999996,
|
9773 |
|
|
0.34906585039886590 },
|
9774 |
|
|
{ 0.51322715827061693, 0.89999999999999991, 0.69999999999999996,
|
9775 |
|
|
0.52359877559829882 },
|
9776 |
|
|
{ 0.67903717872440283, 0.89999999999999991, 0.69999999999999996,
|
9777 |
|
|
0.69813170079773179 },
|
9778 |
|
|
{ 0.84690113601682671, 0.89999999999999991, 0.69999999999999996,
|
9779 |
|
|
0.87266462599716477 },
|
9780 |
|
|
{ 1.0229914311548416, 0.89999999999999991, 0.69999999999999996,
|
9781 |
|
|
1.0471975511965976 },
|
9782 |
|
|
{ 1.2148329639709381, 0.89999999999999991, 0.69999999999999996,
|
9783 |
|
|
1.2217304763960306 },
|
9784 |
|
|
{ 1.4283586501307799, 0.89999999999999991, 0.69999999999999996,
|
9785 |
|
|
1.3962634015954636 },
|
9786 |
|
|
{ 1.6600480747670936, 0.89999999999999991, 0.69999999999999996,
|
9787 |
|
|
1.5707963267948966 },
|
9788 |
|
|
};
|
9789 |
|
|
|
9790 |
|
|
// Test function for k=0.89999999999999991, nu=0.69999999999999996.
|
9791 |
|
|
template <typename Tp>
|
9792 |
|
|
void test188()
|
9793 |
|
|
{
|
9794 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9795 |
|
|
Tp max_abs_diff = -Tp(1);
|
9796 |
|
|
Tp max_abs_frac = -Tp(1);
|
9797 |
|
|
unsigned int num_datum = sizeof(data188)
|
9798 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9799 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9800 |
|
|
{
|
9801 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data188[i].k), Tp(data188[i].nu),
|
9802 |
|
|
Tp(data188[i].phi));
|
9803 |
|
|
const Tp f0 = data188[i].f0;
|
9804 |
|
|
const Tp diff = f - f0;
|
9805 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9806 |
|
|
max_abs_diff = std::abs(diff);
|
9807 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9808 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9809 |
|
|
{
|
9810 |
|
|
const Tp frac = diff / f0;
|
9811 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9812 |
|
|
max_abs_frac = std::abs(frac);
|
9813 |
|
|
}
|
9814 |
|
|
}
|
9815 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9816 |
|
|
}
|
9817 |
|
|
|
9818 |
|
|
// Test data for k=0.89999999999999991, nu=0.80000000000000004.
|
9819 |
|
|
testcase_ellint_3<double> data189[] = {
|
9820 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.80000000000000004,
|
9821 |
|
|
0.0000000000000000 },
|
9822 |
|
|
{ 0.17385491439925149, 0.89999999999999991, 0.80000000000000004,
|
9823 |
|
|
0.17453292519943295 },
|
9824 |
|
|
{ 0.34412950523113928, 0.89999999999999991, 0.80000000000000004,
|
9825 |
|
|
0.34906585039886590 },
|
9826 |
|
|
{ 0.50931321668729601, 0.89999999999999991, 0.80000000000000004,
|
9827 |
|
|
0.52359877559829882 },
|
9828 |
|
|
{ 0.67081081392296327, 0.89999999999999991, 0.80000000000000004,
|
9829 |
|
|
0.69813170079773179 },
|
9830 |
|
|
{ 0.83268846097293259, 0.89999999999999991, 0.80000000000000004,
|
9831 |
|
|
0.87266462599716477 },
|
9832 |
|
|
{ 1.0010985015814025, 0.89999999999999991, 0.80000000000000004,
|
9833 |
|
|
1.0471975511965976 },
|
9834 |
|
|
{ 1.1834394045489678, 0.89999999999999991, 0.80000000000000004,
|
9835 |
|
|
1.2217304763960306 },
|
9836 |
|
|
{ 1.3855695891683182, 0.89999999999999991, 0.80000000000000004,
|
9837 |
|
|
1.3962634015954636 },
|
9838 |
|
|
{ 1.6044591960982200, 0.89999999999999991, 0.80000000000000004,
|
9839 |
|
|
1.5707963267948966 },
|
9840 |
|
|
};
|
9841 |
|
|
|
9842 |
|
|
// Test function for k=0.89999999999999991, nu=0.80000000000000004.
|
9843 |
|
|
template <typename Tp>
|
9844 |
|
|
void test189()
|
9845 |
|
|
{
|
9846 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9847 |
|
|
Tp max_abs_diff = -Tp(1);
|
9848 |
|
|
Tp max_abs_frac = -Tp(1);
|
9849 |
|
|
unsigned int num_datum = sizeof(data189)
|
9850 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9851 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9852 |
|
|
{
|
9853 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data189[i].k), Tp(data189[i].nu),
|
9854 |
|
|
Tp(data189[i].phi));
|
9855 |
|
|
const Tp f0 = data189[i].f0;
|
9856 |
|
|
const Tp diff = f - f0;
|
9857 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9858 |
|
|
max_abs_diff = std::abs(diff);
|
9859 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9860 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9861 |
|
|
{
|
9862 |
|
|
const Tp frac = diff / f0;
|
9863 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9864 |
|
|
max_abs_frac = std::abs(frac);
|
9865 |
|
|
}
|
9866 |
|
|
}
|
9867 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9868 |
|
|
}
|
9869 |
|
|
|
9870 |
|
|
// Test data for k=0.89999999999999991, nu=0.90000000000000002.
|
9871 |
|
|
testcase_ellint_3<double> data190[] = {
|
9872 |
|
|
{ -0.0000000000000000, 0.89999999999999991, 0.90000000000000002,
|
9873 |
|
|
0.0000000000000000 },
|
9874 |
|
|
{ 0.17368278986240138, 0.89999999999999991, 0.90000000000000002,
|
9875 |
|
|
0.17453292519943295 },
|
9876 |
|
|
{ 0.34285962963961397, 0.89999999999999991, 0.90000000000000002,
|
9877 |
|
|
0.34906585039886590 },
|
9878 |
|
|
{ 0.50549974644993312, 0.89999999999999991, 0.90000000000000002,
|
9879 |
|
|
0.52359877559829882 },
|
9880 |
|
|
{ 0.66290623857720876, 0.89999999999999991, 0.90000000000000002,
|
9881 |
|
|
0.69813170079773179 },
|
9882 |
|
|
{ 0.81921183128847164, 0.89999999999999991, 0.90000000000000002,
|
9883 |
|
|
0.87266462599716477 },
|
9884 |
|
|
{ 0.98058481956066368, 0.89999999999999991, 0.90000000000000002,
|
9885 |
|
|
1.0471975511965976 },
|
9886 |
|
|
{ 1.1543223520473569, 0.89999999999999991, 0.90000000000000002,
|
9887 |
|
|
1.2217304763960306 },
|
9888 |
|
|
{ 1.3462119782292934, 0.89999999999999991, 0.90000000000000002,
|
9889 |
|
|
1.3962634015954636 },
|
9890 |
|
|
{ 1.5536420236310944, 0.89999999999999991, 0.90000000000000002,
|
9891 |
|
|
1.5707963267948966 },
|
9892 |
|
|
};
|
9893 |
|
|
|
9894 |
|
|
// Test function for k=0.89999999999999991, nu=0.90000000000000002.
|
9895 |
|
|
template <typename Tp>
|
9896 |
|
|
void test190()
|
9897 |
|
|
{
|
9898 |
|
|
const Tp eps = std::numeric_limits<Tp>::epsilon();
|
9899 |
|
|
Tp max_abs_diff = -Tp(1);
|
9900 |
|
|
Tp max_abs_frac = -Tp(1);
|
9901 |
|
|
unsigned int num_datum = sizeof(data190)
|
9902 |
|
|
/ sizeof(testcase_ellint_3<double>);
|
9903 |
|
|
for (unsigned int i = 0; i < num_datum; ++i)
|
9904 |
|
|
{
|
9905 |
|
|
const Tp f = std::tr1::ellint_3(Tp(data190[i].k), Tp(data190[i].nu),
|
9906 |
|
|
Tp(data190[i].phi));
|
9907 |
|
|
const Tp f0 = data190[i].f0;
|
9908 |
|
|
const Tp diff = f - f0;
|
9909 |
|
|
if (std::abs(diff) > max_abs_diff)
|
9910 |
|
|
max_abs_diff = std::abs(diff);
|
9911 |
|
|
if (std::abs(f0) > Tp(10) * eps
|
9912 |
|
|
&& std::abs(f) > Tp(10) * eps)
|
9913 |
|
|
{
|
9914 |
|
|
const Tp frac = diff / f0;
|
9915 |
|
|
if (std::abs(frac) > max_abs_frac)
|
9916 |
|
|
max_abs_frac = std::abs(frac);
|
9917 |
|
|
}
|
9918 |
|
|
}
|
9919 |
|
|
VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
|
9920 |
|
|
}
|
9921 |
|
|
|
9922 |
|
|
int main(int, char**)
|
9923 |
|
|
{
|
9924 |
|
|
test001<double>();
|
9925 |
|
|
test002<double>();
|
9926 |
|
|
test003<double>();
|
9927 |
|
|
test004<double>();
|
9928 |
|
|
test005<double>();
|
9929 |
|
|
test006<double>();
|
9930 |
|
|
test007<double>();
|
9931 |
|
|
test008<double>();
|
9932 |
|
|
test009<double>();
|
9933 |
|
|
test010<double>();
|
9934 |
|
|
test011<double>();
|
9935 |
|
|
test012<double>();
|
9936 |
|
|
test013<double>();
|
9937 |
|
|
test014<double>();
|
9938 |
|
|
test015<double>();
|
9939 |
|
|
test016<double>();
|
9940 |
|
|
test017<double>();
|
9941 |
|
|
test018<double>();
|
9942 |
|
|
test019<double>();
|
9943 |
|
|
test020<double>();
|
9944 |
|
|
test021<double>();
|
9945 |
|
|
test022<double>();
|
9946 |
|
|
test023<double>();
|
9947 |
|
|
test024<double>();
|
9948 |
|
|
test025<double>();
|
9949 |
|
|
test026<double>();
|
9950 |
|
|
test027<double>();
|
9951 |
|
|
test028<double>();
|
9952 |
|
|
test029<double>();
|
9953 |
|
|
test030<double>();
|
9954 |
|
|
test031<double>();
|
9955 |
|
|
test032<double>();
|
9956 |
|
|
test033<double>();
|
9957 |
|
|
test034<double>();
|
9958 |
|
|
test035<double>();
|
9959 |
|
|
test036<double>();
|
9960 |
|
|
test037<double>();
|
9961 |
|
|
test038<double>();
|
9962 |
|
|
test039<double>();
|
9963 |
|
|
test040<double>();
|
9964 |
|
|
test041<double>();
|
9965 |
|
|
test042<double>();
|
9966 |
|
|
test043<double>();
|
9967 |
|
|
test044<double>();
|
9968 |
|
|
test045<double>();
|
9969 |
|
|
test046<double>();
|
9970 |
|
|
test047<double>();
|
9971 |
|
|
test048<double>();
|
9972 |
|
|
test049<double>();
|
9973 |
|
|
test050<double>();
|
9974 |
|
|
test051<double>();
|
9975 |
|
|
test052<double>();
|
9976 |
|
|
test053<double>();
|
9977 |
|
|
test054<double>();
|
9978 |
|
|
test055<double>();
|
9979 |
|
|
test056<double>();
|
9980 |
|
|
test057<double>();
|
9981 |
|
|
test058<double>();
|
9982 |
|
|
test059<double>();
|
9983 |
|
|
test060<double>();
|
9984 |
|
|
test061<double>();
|
9985 |
|
|
test062<double>();
|
9986 |
|
|
test063<double>();
|
9987 |
|
|
test064<double>();
|
9988 |
|
|
test065<double>();
|
9989 |
|
|
test066<double>();
|
9990 |
|
|
test067<double>();
|
9991 |
|
|
test068<double>();
|
9992 |
|
|
test069<double>();
|
9993 |
|
|
test070<double>();
|
9994 |
|
|
test071<double>();
|
9995 |
|
|
test072<double>();
|
9996 |
|
|
test073<double>();
|
9997 |
|
|
test074<double>();
|
9998 |
|
|
test075<double>();
|
9999 |
|
|
test076<double>();
|
10000 |
|
|
test077<double>();
|
10001 |
|
|
test078<double>();
|
10002 |
|
|
test079<double>();
|
10003 |
|
|
test080<double>();
|
10004 |
|
|
test081<double>();
|
10005 |
|
|
test082<double>();
|
10006 |
|
|
test083<double>();
|
10007 |
|
|
test084<double>();
|
10008 |
|
|
test085<double>();
|
10009 |
|
|
test086<double>();
|
10010 |
|
|
test087<double>();
|
10011 |
|
|
test088<double>();
|
10012 |
|
|
test089<double>();
|
10013 |
|
|
test090<double>();
|
10014 |
|
|
test091<double>();
|
10015 |
|
|
test092<double>();
|
10016 |
|
|
test093<double>();
|
10017 |
|
|
test094<double>();
|
10018 |
|
|
test095<double>();
|
10019 |
|
|
test096<double>();
|
10020 |
|
|
test097<double>();
|
10021 |
|
|
test098<double>();
|
10022 |
|
|
test099<double>();
|
10023 |
|
|
test100<double>();
|
10024 |
|
|
test101<double>();
|
10025 |
|
|
test102<double>();
|
10026 |
|
|
test103<double>();
|
10027 |
|
|
test104<double>();
|
10028 |
|
|
test105<double>();
|
10029 |
|
|
test106<double>();
|
10030 |
|
|
test107<double>();
|
10031 |
|
|
test108<double>();
|
10032 |
|
|
test109<double>();
|
10033 |
|
|
test110<double>();
|
10034 |
|
|
test111<double>();
|
10035 |
|
|
test112<double>();
|
10036 |
|
|
test113<double>();
|
10037 |
|
|
test114<double>();
|
10038 |
|
|
test115<double>();
|
10039 |
|
|
test116<double>();
|
10040 |
|
|
test117<double>();
|
10041 |
|
|
test118<double>();
|
10042 |
|
|
test119<double>();
|
10043 |
|
|
test120<double>();
|
10044 |
|
|
test121<double>();
|
10045 |
|
|
test122<double>();
|
10046 |
|
|
test123<double>();
|
10047 |
|
|
test124<double>();
|
10048 |
|
|
test125<double>();
|
10049 |
|
|
test126<double>();
|
10050 |
|
|
test127<double>();
|
10051 |
|
|
test128<double>();
|
10052 |
|
|
test129<double>();
|
10053 |
|
|
test130<double>();
|
10054 |
|
|
test131<double>();
|
10055 |
|
|
test132<double>();
|
10056 |
|
|
test133<double>();
|
10057 |
|
|
test134<double>();
|
10058 |
|
|
test135<double>();
|
10059 |
|
|
test136<double>();
|
10060 |
|
|
test137<double>();
|
10061 |
|
|
test138<double>();
|
10062 |
|
|
test139<double>();
|
10063 |
|
|
test140<double>();
|
10064 |
|
|
test141<double>();
|
10065 |
|
|
test142<double>();
|
10066 |
|
|
test143<double>();
|
10067 |
|
|
test144<double>();
|
10068 |
|
|
test145<double>();
|
10069 |
|
|
test146<double>();
|
10070 |
|
|
test147<double>();
|
10071 |
|
|
test148<double>();
|
10072 |
|
|
test149<double>();
|
10073 |
|
|
test150<double>();
|
10074 |
|
|
test151<double>();
|
10075 |
|
|
test152<double>();
|
10076 |
|
|
test153<double>();
|
10077 |
|
|
test154<double>();
|
10078 |
|
|
test155<double>();
|
10079 |
|
|
test156<double>();
|
10080 |
|
|
test157<double>();
|
10081 |
|
|
test158<double>();
|
10082 |
|
|
test159<double>();
|
10083 |
|
|
test160<double>();
|
10084 |
|
|
test161<double>();
|
10085 |
|
|
test162<double>();
|
10086 |
|
|
test163<double>();
|
10087 |
|
|
test164<double>();
|
10088 |
|
|
test165<double>();
|
10089 |
|
|
test166<double>();
|
10090 |
|
|
test167<double>();
|
10091 |
|
|
test168<double>();
|
10092 |
|
|
test169<double>();
|
10093 |
|
|
test170<double>();
|
10094 |
|
|
test171<double>();
|
10095 |
|
|
test172<double>();
|
10096 |
|
|
test173<double>();
|
10097 |
|
|
test174<double>();
|
10098 |
|
|
test175<double>();
|
10099 |
|
|
test176<double>();
|
10100 |
|
|
test177<double>();
|
10101 |
|
|
test178<double>();
|
10102 |
|
|
test179<double>();
|
10103 |
|
|
test180<double>();
|
10104 |
|
|
test181<double>();
|
10105 |
|
|
test182<double>();
|
10106 |
|
|
test183<double>();
|
10107 |
|
|
test184<double>();
|
10108 |
|
|
test185<double>();
|
10109 |
|
|
test186<double>();
|
10110 |
|
|
test187<double>();
|
10111 |
|
|
test188<double>();
|
10112 |
|
|
test189<double>();
|
10113 |
|
|
test190<double>();
|
10114 |
|
|
return 0;
|
10115 |
|
|
}
|