Fix ICE on empty FIQ interrupt handler on ARM
[official-gcc.git] / libstdc++-v3 / testsuite / special_functions / 06_comp_ellint_3 / check_value.cc
blob016cf48e62c928cdeed2dfd42491755a671718b8
1 // { dg-do run { target c++11 } }
2 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
3 //
4 // Copyright (C) 2016 Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
21 // comp_ellint_3
22 // Compare against values generated by the GNU Scientific Library.
23 // The GSL can be found on the web: http://www.gnu.org/software/gsl/
24 #include <limits>
25 #include <cmath>
26 #if defined(__TEST_DEBUG)
27 # include <iostream>
28 # define VERIFY(A) \
29 if (!(A)) \
30 { \
31 std::cout << "line " << __LINE__ \
32 << " max_abs_frac = " << max_abs_frac \
33 << std::endl; \
35 #else
36 # include <testsuite_hooks.h>
37 #endif
38 #include <specfun_testcase.h>
41 // Test data for k=-0.90000000000000002.
42 // max(|f - f_GSL|): 4.4408920985006262e-16
43 // max(|f - f_GSL| / |f_GSL|): 2.6751587294384150e-16
44 const testcase_comp_ellint_3<double>
45 data001[10] =
47 { 2.2805491384227703, -0.90000000000000002, 0.0000000000000000 },
48 { 2.1537868513875287, -0.90000000000000002, 0.10000000000000001 },
49 { 2.0443194576468890, -0.90000000000000002, 0.20000000000000001 },
50 { 1.9486280260314426, -0.90000000000000002, 0.29999999999999999 },
51 { 1.8641114227238349, -0.90000000000000002, 0.40000000000000002 },
52 { 1.7888013241937861, -0.90000000000000002, 0.50000000000000000 },
53 { 1.7211781128919523, -0.90000000000000002, 0.59999999999999998 },
54 { 1.6600480747670940, -0.90000000000000002, 0.69999999999999996 },
55 { 1.6044591960982202, -0.90000000000000002, 0.80000000000000004 },
56 { 1.5536420236310946, -0.90000000000000002, 0.90000000000000002 },
58 const double toler001 = 2.5000000000000020e-13;
60 // Test data for k=-0.80000000000000004.
61 // max(|f - f_GSL|): 2.2204460492503131e-16
62 // max(|f - f_GSL| / |f_GSL|): 1.5960830388244336e-16
63 const testcase_comp_ellint_3<double>
64 data002[10] =
66 { 1.9953027776647296, -0.80000000000000004, 0.0000000000000000 },
67 { 1.8910755418379521, -0.80000000000000004, 0.10000000000000001 },
68 { 1.8007226661734588, -0.80000000000000004, 0.20000000000000001 },
69 { 1.7214611048717301, -0.80000000000000004, 0.29999999999999999 },
70 { 1.6512267838651289, -0.80000000000000004, 0.40000000000000002 },
71 { 1.5884528947755532, -0.80000000000000004, 0.50000000000000000 },
72 { 1.5319262547427865, -0.80000000000000004, 0.59999999999999998 },
73 { 1.4806912324625332, -0.80000000000000004, 0.69999999999999996 },
74 { 1.4339837018309471, -0.80000000000000004, 0.80000000000000004 },
75 { 1.3911845406776222, -0.80000000000000004, 0.90000000000000002 },
77 const double toler002 = 2.5000000000000020e-13;
79 // Test data for k=-0.69999999999999996.
80 // max(|f - f_GSL|): 4.4408920985006262e-16
81 // max(|f - f_GSL| / |f_GSL|): 3.3074070916136724e-16
82 const testcase_comp_ellint_3<double>
83 data003[10] =
85 { 1.8456939983747236, -0.69999999999999996, 0.0000000000000000 },
86 { 1.7528050171757608, -0.69999999999999996, 0.10000000000000001 },
87 { 1.6721098780092145, -0.69999999999999996, 0.20000000000000001 },
88 { 1.6011813647733213, -0.69999999999999996, 0.29999999999999999 },
89 { 1.5382162002954762, -0.69999999999999996, 0.40000000000000002 },
90 { 1.4818433192178544, -0.69999999999999996, 0.50000000000000000 },
91 { 1.4309994736080540, -0.69999999999999996, 0.59999999999999998 },
92 { 1.3848459188329196, -0.69999999999999996, 0.69999999999999996 },
93 { 1.3427110650397531, -0.69999999999999996, 0.80000000000000004 },
94 { 1.3040500499695913, -0.69999999999999996, 0.90000000000000002 },
96 const double toler003 = 2.5000000000000020e-13;
98 // Test data for k=-0.59999999999999998.
99 // max(|f - f_GSL|): 6.6613381477509392e-16
100 // max(|f - f_GSL| / |f_GSL|): 4.1891472451898755e-16
101 const testcase_comp_ellint_3<double>
102 data004[10] =
104 { 1.7507538029157526, -0.59999999999999998, 0.0000000000000000 },
105 { 1.6648615773343014, -0.59999999999999998, 0.10000000000000001 },
106 { 1.5901418016279374, -0.59999999999999998, 0.20000000000000001 },
107 { 1.5243814243493585, -0.59999999999999998, 0.29999999999999999 },
108 { 1.4659345278069984, -0.59999999999999998, 0.40000000000000002 },
109 { 1.4135484285693078, -0.59999999999999998, 0.50000000000000000 },
110 { 1.3662507535812816, -0.59999999999999998, 0.59999999999999998 },
111 { 1.3232737468822813, -0.59999999999999998, 0.69999999999999996 },
112 { 1.2840021261752192, -0.59999999999999998, 0.80000000000000004 },
113 { 1.2479362973851875, -0.59999999999999998, 0.90000000000000002 },
115 const double toler004 = 2.5000000000000020e-13;
117 // Test data for k=-0.50000000000000000.
118 // max(|f - f_GSL|): 2.2204460492503131e-16
119 // max(|f - f_GSL| / |f_GSL|): 1.7857620325589816e-16
120 const testcase_comp_ellint_3<double>
121 data005[10] =
123 { 1.6857503548125963, -0.50000000000000000, 0.0000000000000000 },
124 { 1.6045524936084892, -0.50000000000000000, 0.10000000000000001 },
125 { 1.5338490483665983, -0.50000000000000000, 0.20000000000000001 },
126 { 1.4715681939859637, -0.50000000000000000, 0.29999999999999999 },
127 { 1.4161679518465340, -0.50000000000000000, 0.40000000000000002 },
128 { 1.3664739530045971, -0.50000000000000000, 0.50000000000000000 },
129 { 1.3215740290190876, -0.50000000000000000, 0.59999999999999998 },
130 { 1.2807475181182502, -0.50000000000000000, 0.69999999999999996 },
131 { 1.2434165408189539, -0.50000000000000000, 0.80000000000000004 },
132 { 1.2091116095504744, -0.50000000000000000, 0.90000000000000002 },
134 const double toler005 = 2.5000000000000020e-13;
136 // Test data for k=-0.40000000000000002.
137 // max(|f - f_GSL|): 8.8817841970012523e-16
138 // max(|f - f_GSL| / |f_GSL|): 6.1925080711125793e-16
139 const testcase_comp_ellint_3<double>
140 data006[10] =
142 { 1.6399998658645112, -0.40000000000000002, 0.0000000000000000 },
143 { 1.5620566886683604, -0.40000000000000002, 0.10000000000000001 },
144 { 1.4941414344266770, -0.40000000000000002, 0.20000000000000001 },
145 { 1.4342789859950078, -0.40000000000000002, 0.29999999999999999 },
146 { 1.3809986210732901, -0.40000000000000002, 0.40000000000000002 },
147 { 1.3331797176377398, -0.40000000000000002, 0.50000000000000000 },
148 { 1.2899514672527024, -0.40000000000000002, 0.59999999999999998 },
149 { 1.2506255923253344, -0.40000000000000002, 0.69999999999999996 },
150 { 1.2146499565727209, -0.40000000000000002, 0.80000000000000004 },
151 { 1.1815758115929846, -0.40000000000000002, 0.90000000000000002 },
153 const double toler006 = 2.5000000000000020e-13;
155 // Test data for k=-0.30000000000000004.
156 // max(|f - f_GSL|): 4.4408920985006262e-16
157 // max(|f - f_GSL| / |f_GSL|): 3.8209844149902043e-16
158 const testcase_comp_ellint_3<double>
159 data007[10] =
161 { 1.6080486199305128, -0.30000000000000004, 0.0000000000000000 },
162 { 1.5323534693557528, -0.30000000000000004, 0.10000000000000001 },
163 { 1.4663658145259877, -0.30000000000000004, 0.20000000000000001 },
164 { 1.4081767433479091, -0.30000000000000004, 0.29999999999999999 },
165 { 1.3563643538969763, -0.30000000000000004, 0.40000000000000002 },
166 { 1.3098448759814962, -0.30000000000000004, 0.50000000000000000 },
167 { 1.2677758800420669, -0.30000000000000004, 0.59999999999999998 },
168 { 1.2294913236274982, -0.30000000000000004, 0.69999999999999996 },
169 { 1.1944567571590048, -0.30000000000000004, 0.80000000000000004 },
170 { 1.1622376896064914, -0.30000000000000004, 0.90000000000000002 },
172 const double toler007 = 2.5000000000000020e-13;
174 // Test data for k=-0.19999999999999996.
175 // max(|f - f_GSL|): 4.4408920985006262e-16
176 // max(|f - f_GSL| / |f_GSL|): 3.8637687241174905e-16
177 const testcase_comp_ellint_3<double>
178 data008[10] =
180 { 1.5868678474541660, -0.19999999999999996, 0.0000000000000000 },
181 { 1.5126513474261087, -0.19999999999999996, 0.10000000000000001 },
182 { 1.4479323932249564, -0.19999999999999996, 0.20000000000000001 },
183 { 1.3908453514752477, -0.19999999999999996, 0.29999999999999999 },
184 { 1.3400002519661005, -0.19999999999999996, 0.40000000000000002 },
185 { 1.2943374404397372, -0.19999999999999996, 0.50000000000000000 },
186 { 1.2530330675914556, -0.19999999999999996, 0.59999999999999998 },
187 { 1.2154356555075863, -0.19999999999999996, 0.69999999999999996 },
188 { 1.1810223448909909, -0.19999999999999996, 0.80000000000000004 },
189 { 1.1493679916141861, -0.19999999999999996, 0.90000000000000002 },
191 const double toler008 = 2.5000000000000020e-13;
193 // Test data for k=-0.099999999999999978.
194 // max(|f - f_GSL|): 4.4408920985006262e-16
195 // max(|f - f_GSL| / |f_GSL|): 3.8887517676790089e-16
196 const testcase_comp_ellint_3<double>
197 data009[10] =
199 { 1.5747455615173562, -0.099999999999999978, 0.0000000000000000 },
200 { 1.5013711111199950, -0.099999999999999978, 0.10000000000000001 },
201 { 1.4373749386463430, -0.099999999999999978, 0.20000000000000001 },
202 { 1.3809159606704959, -0.099999999999999978, 0.29999999999999999 },
203 { 1.3306223265207477, -0.099999999999999978, 0.40000000000000002 },
204 { 1.2854480708580160, -0.099999999999999978, 0.50000000000000000 },
205 { 1.2445798942989255, -0.099999999999999978, 0.59999999999999998 },
206 { 1.2073745911083185, -0.099999999999999978, 0.69999999999999996 },
207 { 1.1733158866987732, -0.099999999999999978, 0.80000000000000004 },
208 { 1.1419839485283374, -0.099999999999999978, 0.90000000000000002 },
210 const double toler009 = 2.5000000000000020e-13;
212 // Test data for k=0.0000000000000000.
213 // max(|f - f_GSL|): 2.2204460492503131e-16
214 // max(|f - f_GSL| / |f_GSL|): 1.6725702444488137e-16
215 const testcase_comp_ellint_3<double>
216 data010[10] =
218 { 1.5707963267948966, 0.0000000000000000, 0.0000000000000000 },
219 { 1.4976955329233277, 0.0000000000000000, 0.10000000000000001 },
220 { 1.4339343023863691, 0.0000000000000000, 0.20000000000000001 },
221 { 1.3776795151134889, 0.0000000000000000, 0.29999999999999999 },
222 { 1.3275651989026320, 0.0000000000000000, 0.40000000000000002 },
223 { 1.2825498301618641, 0.0000000000000000, 0.50000000000000000 },
224 { 1.2418235332245127, 0.0000000000000000, 0.59999999999999998 },
225 { 1.2047457872617382, 0.0000000000000000, 0.69999999999999996 },
226 { 1.1708024551734544, 0.0000000000000000, 0.80000000000000004 },
227 { 1.1395754288497419, 0.0000000000000000, 0.90000000000000002 },
229 const double toler010 = 2.5000000000000020e-13;
231 // Test data for k=0.10000000000000009.
232 // max(|f - f_GSL|): 4.4408920985006262e-16
233 // max(|f - f_GSL| / |f_GSL|): 3.8887517676790089e-16
234 const testcase_comp_ellint_3<double>
235 data011[10] =
237 { 1.5747455615173562, 0.10000000000000009, 0.0000000000000000 },
238 { 1.5013711111199950, 0.10000000000000009, 0.10000000000000001 },
239 { 1.4373749386463430, 0.10000000000000009, 0.20000000000000001 },
240 { 1.3809159606704959, 0.10000000000000009, 0.29999999999999999 },
241 { 1.3306223265207477, 0.10000000000000009, 0.40000000000000002 },
242 { 1.2854480708580160, 0.10000000000000009, 0.50000000000000000 },
243 { 1.2445798942989255, 0.10000000000000009, 0.59999999999999998 },
244 { 1.2073745911083185, 0.10000000000000009, 0.69999999999999996 },
245 { 1.1733158866987732, 0.10000000000000009, 0.80000000000000004 },
246 { 1.1419839485283374, 0.10000000000000009, 0.90000000000000002 },
248 const double toler011 = 2.5000000000000020e-13;
250 // Test data for k=0.19999999999999996.
251 // max(|f - f_GSL|): 4.4408920985006262e-16
252 // max(|f - f_GSL| / |f_GSL|): 3.8637687241174905e-16
253 const testcase_comp_ellint_3<double>
254 data012[10] =
256 { 1.5868678474541660, 0.19999999999999996, 0.0000000000000000 },
257 { 1.5126513474261087, 0.19999999999999996, 0.10000000000000001 },
258 { 1.4479323932249564, 0.19999999999999996, 0.20000000000000001 },
259 { 1.3908453514752477, 0.19999999999999996, 0.29999999999999999 },
260 { 1.3400002519661005, 0.19999999999999996, 0.40000000000000002 },
261 { 1.2943374404397372, 0.19999999999999996, 0.50000000000000000 },
262 { 1.2530330675914556, 0.19999999999999996, 0.59999999999999998 },
263 { 1.2154356555075863, 0.19999999999999996, 0.69999999999999996 },
264 { 1.1810223448909909, 0.19999999999999996, 0.80000000000000004 },
265 { 1.1493679916141861, 0.19999999999999996, 0.90000000000000002 },
267 const double toler012 = 2.5000000000000020e-13;
269 // Test data for k=0.30000000000000004.
270 // max(|f - f_GSL|): 4.4408920985006262e-16
271 // max(|f - f_GSL| / |f_GSL|): 3.8209844149902043e-16
272 const testcase_comp_ellint_3<double>
273 data013[10] =
275 { 1.6080486199305128, 0.30000000000000004, 0.0000000000000000 },
276 { 1.5323534693557528, 0.30000000000000004, 0.10000000000000001 },
277 { 1.4663658145259877, 0.30000000000000004, 0.20000000000000001 },
278 { 1.4081767433479091, 0.30000000000000004, 0.29999999999999999 },
279 { 1.3563643538969763, 0.30000000000000004, 0.40000000000000002 },
280 { 1.3098448759814962, 0.30000000000000004, 0.50000000000000000 },
281 { 1.2677758800420669, 0.30000000000000004, 0.59999999999999998 },
282 { 1.2294913236274982, 0.30000000000000004, 0.69999999999999996 },
283 { 1.1944567571590048, 0.30000000000000004, 0.80000000000000004 },
284 { 1.1622376896064914, 0.30000000000000004, 0.90000000000000002 },
286 const double toler013 = 2.5000000000000020e-13;
288 // Test data for k=0.39999999999999991.
289 // max(|f - f_GSL|): 8.8817841970012523e-16
290 // max(|f - f_GSL| / |f_GSL|): 6.1925080711125793e-16
291 const testcase_comp_ellint_3<double>
292 data014[10] =
294 { 1.6399998658645112, 0.39999999999999991, 0.0000000000000000 },
295 { 1.5620566886683604, 0.39999999999999991, 0.10000000000000001 },
296 { 1.4941414344266770, 0.39999999999999991, 0.20000000000000001 },
297 { 1.4342789859950078, 0.39999999999999991, 0.29999999999999999 },
298 { 1.3809986210732901, 0.39999999999999991, 0.40000000000000002 },
299 { 1.3331797176377398, 0.39999999999999991, 0.50000000000000000 },
300 { 1.2899514672527024, 0.39999999999999991, 0.59999999999999998 },
301 { 1.2506255923253344, 0.39999999999999991, 0.69999999999999996 },
302 { 1.2146499565727209, 0.39999999999999991, 0.80000000000000004 },
303 { 1.1815758115929846, 0.39999999999999991, 0.90000000000000002 },
305 const double toler014 = 2.5000000000000020e-13;
307 // Test data for k=0.50000000000000000.
308 // max(|f - f_GSL|): 2.2204460492503131e-16
309 // max(|f - f_GSL| / |f_GSL|): 1.7857620325589816e-16
310 const testcase_comp_ellint_3<double>
311 data015[10] =
313 { 1.6857503548125963, 0.50000000000000000, 0.0000000000000000 },
314 { 1.6045524936084892, 0.50000000000000000, 0.10000000000000001 },
315 { 1.5338490483665983, 0.50000000000000000, 0.20000000000000001 },
316 { 1.4715681939859637, 0.50000000000000000, 0.29999999999999999 },
317 { 1.4161679518465340, 0.50000000000000000, 0.40000000000000002 },
318 { 1.3664739530045971, 0.50000000000000000, 0.50000000000000000 },
319 { 1.3215740290190876, 0.50000000000000000, 0.59999999999999998 },
320 { 1.2807475181182502, 0.50000000000000000, 0.69999999999999996 },
321 { 1.2434165408189539, 0.50000000000000000, 0.80000000000000004 },
322 { 1.2091116095504744, 0.50000000000000000, 0.90000000000000002 },
324 const double toler015 = 2.5000000000000020e-13;
326 // Test data for k=0.60000000000000009.
327 // max(|f - f_GSL|): 6.6613381477509392e-16
328 // max(|f - f_GSL| / |f_GSL|): 4.7124937590522226e-16
329 const testcase_comp_ellint_3<double>
330 data016[10] =
332 { 1.7507538029157526, 0.60000000000000009, 0.0000000000000000 },
333 { 1.6648615773343014, 0.60000000000000009, 0.10000000000000001 },
334 { 1.5901418016279374, 0.60000000000000009, 0.20000000000000001 },
335 { 1.5243814243493585, 0.60000000000000009, 0.29999999999999999 },
336 { 1.4659345278069984, 0.60000000000000009, 0.40000000000000002 },
337 { 1.4135484285693078, 0.60000000000000009, 0.50000000000000000 },
338 { 1.3662507535812816, 0.60000000000000009, 0.59999999999999998 },
339 { 1.3232737468822813, 0.60000000000000009, 0.69999999999999996 },
340 { 1.2840021261752192, 0.60000000000000009, 0.80000000000000004 },
341 { 1.2479362973851873, 0.60000000000000009, 0.90000000000000002 },
343 const double toler016 = 2.5000000000000020e-13;
345 // Test data for k=0.69999999999999996.
346 // max(|f - f_GSL|): 4.4408920985006262e-16
347 // max(|f - f_GSL| / |f_GSL|): 3.3074070916136724e-16
348 const testcase_comp_ellint_3<double>
349 data017[10] =
351 { 1.8456939983747236, 0.69999999999999996, 0.0000000000000000 },
352 { 1.7528050171757608, 0.69999999999999996, 0.10000000000000001 },
353 { 1.6721098780092145, 0.69999999999999996, 0.20000000000000001 },
354 { 1.6011813647733213, 0.69999999999999996, 0.29999999999999999 },
355 { 1.5382162002954762, 0.69999999999999996, 0.40000000000000002 },
356 { 1.4818433192178544, 0.69999999999999996, 0.50000000000000000 },
357 { 1.4309994736080540, 0.69999999999999996, 0.59999999999999998 },
358 { 1.3848459188329196, 0.69999999999999996, 0.69999999999999996 },
359 { 1.3427110650397531, 0.69999999999999996, 0.80000000000000004 },
360 { 1.3040500499695913, 0.69999999999999996, 0.90000000000000002 },
362 const double toler017 = 2.5000000000000020e-13;
364 // Test data for k=0.80000000000000004.
365 // max(|f - f_GSL|): 2.2204460492503131e-16
366 // max(|f - f_GSL| / |f_GSL|): 1.5960830388244336e-16
367 const testcase_comp_ellint_3<double>
368 data018[10] =
370 { 1.9953027776647296, 0.80000000000000004, 0.0000000000000000 },
371 { 1.8910755418379521, 0.80000000000000004, 0.10000000000000001 },
372 { 1.8007226661734588, 0.80000000000000004, 0.20000000000000001 },
373 { 1.7214611048717301, 0.80000000000000004, 0.29999999999999999 },
374 { 1.6512267838651289, 0.80000000000000004, 0.40000000000000002 },
375 { 1.5884528947755532, 0.80000000000000004, 0.50000000000000000 },
376 { 1.5319262547427865, 0.80000000000000004, 0.59999999999999998 },
377 { 1.4806912324625332, 0.80000000000000004, 0.69999999999999996 },
378 { 1.4339837018309471, 0.80000000000000004, 0.80000000000000004 },
379 { 1.3911845406776222, 0.80000000000000004, 0.90000000000000002 },
381 const double toler018 = 2.5000000000000020e-13;
383 // Test data for k=0.89999999999999991.
384 // max(|f - f_GSL|): 4.4408920985006262e-16
385 // max(|f - f_GSL| / |f_GSL|): 2.6751587294384150e-16
386 const testcase_comp_ellint_3<double>
387 data019[10] =
389 { 2.2805491384227703, 0.89999999999999991, 0.0000000000000000 },
390 { 2.1537868513875287, 0.89999999999999991, 0.10000000000000001 },
391 { 2.0443194576468895, 0.89999999999999991, 0.20000000000000001 },
392 { 1.9486280260314426, 0.89999999999999991, 0.29999999999999999 },
393 { 1.8641114227238351, 0.89999999999999991, 0.40000000000000002 },
394 { 1.7888013241937863, 0.89999999999999991, 0.50000000000000000 },
395 { 1.7211781128919525, 0.89999999999999991, 0.59999999999999998 },
396 { 1.6600480747670940, 0.89999999999999991, 0.69999999999999996 },
397 { 1.6044591960982202, 0.89999999999999991, 0.80000000000000004 },
398 { 1.5536420236310948, 0.89999999999999991, 0.90000000000000002 },
400 const double toler019 = 2.5000000000000020e-13;
402 template<typename Tp, unsigned int Num>
403 void
404 test(const testcase_comp_ellint_3<Tp> (&data)[Num], Tp toler)
406 const Tp eps = std::numeric_limits<Tp>::epsilon();
407 Tp max_abs_diff = -Tp(1);
408 Tp max_abs_frac = -Tp(1);
409 unsigned int num_datum = Num;
410 for (unsigned int i = 0; i < num_datum; ++i)
412 const Tp f = std::comp_ellint_3(data[i].k, data[i].nu);
413 const Tp f0 = data[i].f0;
414 const Tp diff = f - f0;
415 if (std::abs(diff) > max_abs_diff)
416 max_abs_diff = std::abs(diff);
417 if (std::abs(f0) > Tp(10) * eps
418 && std::abs(f) > Tp(10) * eps)
420 const Tp frac = diff / f0;
421 if (std::abs(frac) > max_abs_frac)
422 max_abs_frac = std::abs(frac);
425 VERIFY(max_abs_frac < toler);
429 main()
431 test(data001, toler001);
432 test(data002, toler002);
433 test(data003, toler003);
434 test(data004, toler004);
435 test(data005, toler005);
436 test(data006, toler006);
437 test(data007, toler007);
438 test(data008, toler008);
439 test(data009, toler009);
440 test(data010, toler010);
441 test(data011, toler011);
442 test(data012, toler012);
443 test(data013, toler013);
444 test(data014, toler014);
445 test(data015, toler015);
446 test(data016, toler016);
447 test(data017, toler017);
448 test(data018, toler018);
449 test(data019, toler019);
450 return 0;