| 1 | // { dg-do run { target c++11 } } |
| 2 | // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" } |
| 3 | // |
| 4 | // Copyright (C) 2016-2025 Free Software Foundation, Inc. |
| 5 | // |
| 6 | // This file is part of the GNU ISO C++ Library. This library is free |
| 7 | // software; you can redistribute it and/or modify it under the |
| 8 | // terms of the GNU General Public License as published by the |
| 9 | // Free Software Foundation; either version 3, or (at your option) |
| 10 | // any later version. |
| 11 | // |
| 12 | // This library is distributed in the hope that it will be useful, |
| 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | // GNU General Public License for more details. |
| 16 | // |
| 17 | // You should have received a copy of the GNU General Public License along |
| 18 | // with this library; see the file COPYING3. If not see |
| 19 | // <http://www.gnu.org/licenses/>. |
| 20 | |
| 21 | // cyl_neumann |
| 22 | // Compare against values generated by the GNU Scientific Library. |
| 23 | // The GSL can be found on the web: http://www.gnu.org/software/gsl/ |
| 24 | #include <limits> |
| 25 | #include <cmath> |
| 26 | #if defined(__TEST_DEBUG) |
| 27 | # include <iostream> |
| 28 | # define VERIFY(A) \ |
| 29 | if (!(A)) \ |
| 30 | { \ |
| 31 | std::cout << "line " << __LINE__ \ |
| 32 | << " max_abs_frac = " << max_abs_frac \ |
| 33 | << std::endl; \ |
| 34 | } |
| 35 | #else |
| 36 | # include <testsuite_hooks.h> |
| 37 | #endif |
| 38 | #include <specfun_testcase.h> |
| 39 | |
| 40 | // Test data for nu=0.0000000000000000. |
| 41 | // max(|f - f_GSL|): 9.9920072216264089e-16 at index 7 |
| 42 | // max(|f - f_GSL| / |f_GSL|): 1.5769525176812613e-14 |
| 43 | // mean(f - f_GSL): 1.7173762412170391e-17 |
| 44 | // variance(f - f_GSL): 1.8144622474613909e-32 |
| 45 | // stddev(f - f_GSL): 1.3470197650596635e-16 |
| 46 | const testcase_cyl_neumann<double> |
| 47 | data007[20] = |
| 48 | { |
| 49 | { -0.93157302493005878, 0.0000000000000000, 0.25000000000000000, 0.0 }, |
| 50 | { -0.44451873350670656, 0.0000000000000000, 0.50000000000000000, 0.0 }, |
| 51 | { -0.13717276938577236, 0.0000000000000000, 0.75000000000000000, 0.0 }, |
| 52 | { 0.088256964215676942, 0.0000000000000000, 1.0000000000000000, 0.0 }, |
| 53 | { 0.25821685159454072, 0.0000000000000000, 1.2500000000000000, 0.0 }, |
| 54 | { 0.38244892379775886, 0.0000000000000000, 1.5000000000000000, 0.0 }, |
| 55 | { 0.46549262864690610, 0.0000000000000000, 1.7500000000000000, 0.0 }, |
| 56 | { 0.51037567264974493, 0.0000000000000000, 2.0000000000000000, 0.0 }, |
| 57 | { 0.52006476245727862, 0.0000000000000000, 2.2500000000000000, 0.0 }, |
| 58 | { 0.49807035961523194, 0.0000000000000000, 2.5000000000000000, 0.0 }, |
| 59 | { 0.44865872156913222, 0.0000000000000000, 2.7500000000000000, 0.0 }, |
| 60 | { 0.37685001001279045, 0.0000000000000000, 3.0000000000000000, 0.0 }, |
| 61 | { 0.28828690267308710, 0.0000000000000000, 3.2500000000000000, 0.0 }, |
| 62 | { 0.18902194392082688, 0.0000000000000000, 3.5000000000000000, 0.0 }, |
| 63 | { 0.085256756977362638, 0.0000000000000000, 3.7500000000000000, 0.0 }, |
| 64 | { -0.016940739325064763, 0.0000000000000000, 4.0000000000000000, 0.0 }, |
| 65 | { -0.11191885116160770, 0.0000000000000000, 4.2500000000000000, 0.0 }, |
| 66 | { -0.19470500862950454, 0.0000000000000000, 4.5000000000000000, 0.0 }, |
| 67 | { -0.26123250323497549, 0.0000000000000000, 4.7500000000000000, 0.0 }, |
| 68 | { -0.30851762524903359, 0.0000000000000000, 5.0000000000000000, 0.0 }, |
| 69 | }; |
| 70 | const double toler007 = 1.0000000000000008e-12; |
| 71 | |
| 72 | // Test data for nu=0.33333333333333331. |
| 73 | // max(|f - f_GSL|): 1.7208456881689926e-15 at index 7 |
| 74 | // max(|f - f_GSL| / |f_GSL|): 5.0141196309547185e-15 |
| 75 | // mean(f - f_GSL): -1.8908485888147198e-17 |
| 76 | // variance(f - f_GSL): 4.0002408539583433e-33 |
| 77 | // stddev(f - f_GSL): 6.3247457292434642e-17 |
| 78 | const testcase_cyl_neumann<double> |
| 79 | data008[20] = |
| 80 | { |
| 81 | { -1.3461842332051073, 0.33333333333333331, 0.25000000000000000, 0.0 }, |
| 82 | { -0.84062782604337771, 0.33333333333333331, 0.50000000000000000, 0.0 }, |
| 83 | { -0.52488281484097088, 0.33333333333333331, 0.75000000000000000, 0.0 }, |
| 84 | { -0.27880164127599216, 0.33333333333333331, 1.0000000000000000, 0.0 }, |
| 85 | { -0.074321349727836453, 0.33333333333333331, 1.2500000000000000, 0.0 }, |
| 86 | { 0.096610087766627981, 0.33333333333333331, 1.5000000000000000, 0.0 }, |
| 87 | { 0.23582564494922068, 0.33333333333333331, 1.7500000000000000, 0.0 }, |
| 88 | { 0.34319996626034494, 0.33333333333333331, 2.0000000000000000, 0.0 }, |
| 89 | { 0.41835668452349323, 0.33333333333333331, 2.2500000000000000, 0.0 }, |
| 90 | { 0.46145947419129157, 0.33333333333333331, 2.5000000000000000, 0.0 }, |
| 91 | { 0.47358926135786023, 0.33333333333333331, 2.7500000000000000, 0.0 }, |
| 92 | { 0.45689303457230640, 0.33333333333333331, 3.0000000000000000, 0.0 }, |
| 93 | { 0.41458485697347386, 0.33333333333333331, 3.2500000000000000, 0.0 }, |
| 94 | { 0.35084133277859947, 0.33333333333333331, 3.5000000000000000, 0.0 }, |
| 95 | { 0.27061914527820891, 0.33333333333333331, 3.7500000000000000, 0.0 }, |
| 96 | { 0.17941676634394862, 0.33333333333333331, 4.0000000000000000, 0.0 }, |
| 97 | { 0.083000434191526043, 0.33333333333333331, 4.2500000000000000, 0.0 }, |
| 98 | { -0.012886361627105348, 0.33333333333333331, 4.5000000000000000, 0.0 }, |
| 99 | { -0.10281143123935124, 0.33333333333333331, 4.7500000000000000, 0.0 }, |
| 100 | { -0.18192321129343850, 0.33333333333333331, 5.0000000000000000, 0.0 }, |
| 101 | }; |
| 102 | const double toler008 = 5.0000000000000039e-13; |
| 103 | |
| 104 | // Test data for nu=0.50000000000000000. |
| 105 | // max(|f - f_GSL|): 5.5511151231257827e-16 at index 1 |
| 106 | // max(|f - f_GSL| / |f_GSL|): 6.6252247616878728e-15 |
| 107 | // mean(f - f_GSL): -8.0924850154318048e-17 |
| 108 | // variance(f - f_GSL): 1.5661893379337934e-34 |
| 109 | // stddev(f - f_GSL): 1.2514748650827124e-17 |
| 110 | const testcase_cyl_neumann<double> |
| 111 | data009[20] = |
| 112 | { |
| 113 | { -1.5461605241060765, 0.50000000000000000, 0.25000000000000000, 0.0 }, |
| 114 | { -0.99024588024340454, 0.50000000000000000, 0.50000000000000000, 0.0 }, |
| 115 | { -0.67411792914454438, 0.50000000000000000, 0.75000000000000000, 0.0 }, |
| 116 | { -0.43109886801837571, 0.50000000000000000, 1.0000000000000000, 0.0 }, |
| 117 | { -0.22502969244466481, 0.50000000000000000, 1.2500000000000000, 0.0 }, |
| 118 | { -0.046083165893097265, 0.50000000000000000, 1.5000000000000000, 0.0 }, |
| 119 | { 0.10750804524368722, 0.50000000000000000, 1.7500000000000000, 0.0 }, |
| 120 | { 0.23478571040624849, 0.50000000000000000, 2.0000000000000000, 0.0 }, |
| 121 | { 0.33414002338271825, 0.50000000000000000, 2.2500000000000000, 0.0 }, |
| 122 | { 0.40427830223905686, 0.50000000000000000, 2.5000000000000000, 0.0 }, |
| 123 | { 0.44472115119490507, 0.50000000000000000, 2.7500000000000000, 0.0 }, |
| 124 | { 0.45604882079463316, 0.50000000000000000, 3.0000000000000000, 0.0 }, |
| 125 | { 0.43998859501924370, 0.50000000000000000, 3.2500000000000000, 0.0 }, |
| 126 | { 0.39938682536304909, 0.50000000000000000, 3.5000000000000000, 0.0 }, |
| 127 | { 0.33809163836693340, 0.50000000000000000, 3.7500000000000000, 0.0 }, |
| 128 | { 0.26076607667717877, 0.50000000000000000, 4.0000000000000000, 0.0 }, |
| 129 | { 0.17264962544644955, 0.50000000000000000, 4.2500000000000000, 0.0 }, |
| 130 | { 0.079285862862978548, 0.50000000000000000, 4.5000000000000000, 0.0 }, |
| 131 | { -0.013765943019498003, 0.50000000000000000, 4.7500000000000000, 0.0 }, |
| 132 | { -0.10121770918510846, 0.50000000000000000, 5.0000000000000000, 0.0 }, |
| 133 | }; |
| 134 | const double toler009 = 5.0000000000000039e-13; |
| 135 | |
| 136 | // Test data for nu=0.66666666666666663. |
| 137 | // max(|f - f_GSL|): 1.0547118733938987e-15 at index 9 |
| 138 | // max(|f - f_GSL| / |f_GSL|): 7.7816158152055799e-15 |
| 139 | // mean(f - f_GSL): 1.0772632785815972e-16 |
| 140 | // variance(f - f_GSL): 1.6340061794441914e-35 |
| 141 | // stddev(f - f_GSL): 4.0422842297940791e-18 |
| 142 | const testcase_cyl_neumann<double> |
| 143 | data010[20] = |
| 144 | { |
| 145 | { -1.8021638417426857, 0.66666666666666663, 0.25000000000000000, 0.0 }, |
| 146 | { -1.1316060101031435, 0.66666666666666663, 0.50000000000000000, 0.0 }, |
| 147 | { -0.80251156358450748, 0.66666666666666663, 0.75000000000000000, 0.0 }, |
| 148 | { -0.56270321497463327, 0.66666666666666663, 1.0000000000000000, 0.0 }, |
| 149 | { -0.36007453643432208, 0.66666666666666663, 1.2500000000000000, 0.0 }, |
| 150 | { -0.18017937469615020, 0.66666666666666663, 1.5000000000000000, 0.0 }, |
| 151 | { -0.019885608758103752, 0.66666666666666663, 1.7500000000000000, 0.0 }, |
| 152 | { 0.11989345361903521, 0.66666666666666663, 2.0000000000000000, 0.0 }, |
| 153 | { 0.23690889836358039, 0.66666666666666663, 2.2500000000000000, 0.0 }, |
| 154 | { 0.32882045742954535, 0.66666666666666663, 2.5000000000000000, 0.0 }, |
| 155 | { 0.39385133784531856, 0.66666666666666663, 2.7500000000000000, 0.0 }, |
| 156 | { 0.43115101690935642, 0.66666666666666663, 3.0000000000000000, 0.0 }, |
| 157 | { 0.44098127351445843, 0.66666666666666663, 3.2500000000000000, 0.0 }, |
| 158 | { 0.42477631413456485, 0.66666666666666663, 3.5000000000000000, 0.0 }, |
| 159 | { 0.38510384155620386, 0.66666666666666663, 3.7500000000000000, 0.0 }, |
| 160 | { 0.32554526794354366, 0.66666666666666663, 4.0000000000000000, 0.0 }, |
| 161 | { 0.25051080073878446, 0.66666666666666663, 4.2500000000000000, 0.0 }, |
| 162 | { 0.16500507211842136, 0.66666666666666663, 4.5000000000000000, 0.0 }, |
| 163 | { 0.074359649728861360, 0.66666666666666663, 4.7500000000000000, 0.0 }, |
| 164 | { -0.016050662643389627, 0.66666666666666663, 5.0000000000000000, 0.0 }, |
| 165 | }; |
| 166 | const double toler010 = 5.0000000000000039e-13; |
| 167 | |
| 168 | // Test data for nu=1.0000000000000000. |
| 169 | // max(|f - f_GSL|): 8.5001450322863548e-16 at index 8 |
| 170 | // max(|f - f_GSL| / |f_GSL|): 3.1259660869292553e-14 |
| 171 | // mean(f - f_GSL): 8.2746309804093703e-17 |
| 172 | // variance(f - f_GSL): 1.0590097247613155e-33 |
| 173 | // stddev(f - f_GSL): 3.2542429607534157e-17 |
| 174 | const testcase_cyl_neumann<double> |
| 175 | data011[20] = |
| 176 | { |
| 177 | { -2.7041052293152825, 1.0000000000000000, 0.25000000000000000, 0.0 }, |
| 178 | { -1.4714723926702433, 1.0000000000000000, 0.50000000000000000, 0.0 }, |
| 179 | { -1.0375945507692856, 1.0000000000000000, 0.75000000000000000, 0.0 }, |
| 180 | { -0.78121282130028891, 1.0000000000000000, 1.0000000000000000, 0.0 }, |
| 181 | { -0.58436403661500824, 1.0000000000000000, 1.2500000000000000, 0.0 }, |
| 182 | { -0.41230862697391119, 1.0000000000000000, 1.5000000000000000, 0.0 }, |
| 183 | { -0.25397298594624573, 1.0000000000000000, 1.7500000000000000, 0.0 }, |
| 184 | { -0.10703243154093699, 1.0000000000000000, 2.0000000000000000, 0.0 }, |
| 185 | { 0.027192057738017056, 1.0000000000000000, 2.2500000000000000, 0.0 }, |
| 186 | { 0.14591813796678599, 1.0000000000000000, 2.5000000000000000, 0.0 }, |
| 187 | { 0.24601900149738354, 1.0000000000000000, 2.7500000000000000, 0.0 }, |
| 188 | { 0.32467442479180003, 1.0000000000000000, 3.0000000000000000, 0.0 }, |
| 189 | { 0.37977777371708382, 1.0000000000000000, 3.2500000000000000, 0.0 }, |
| 190 | { 0.41018841788751170, 1.0000000000000000, 3.5000000000000000, 0.0 }, |
| 191 | { 0.41586877934522715, 1.0000000000000000, 3.7500000000000000, 0.0 }, |
| 192 | { 0.39792571055709991, 1.0000000000000000, 4.0000000000000000, 0.0 }, |
| 193 | { 0.35856889308385076, 1.0000000000000000, 4.2500000000000000, 0.0 }, |
| 194 | { 0.30099732306965449, 1.0000000000000000, 4.5000000000000000, 0.0 }, |
| 195 | { 0.22922559673872217, 1.0000000000000000, 4.7500000000000000, 0.0 }, |
| 196 | { 0.14786314339122700, 1.0000000000000000, 5.0000000000000000, 0.0 }, |
| 197 | }; |
| 198 | const double toler011 = 2.5000000000000015e-12; |
| 199 | |
| 200 | // Test data for nu=2.0000000000000000. |
| 201 | // max(|f - f_GSL|): 1.0547118733938987e-15 at index 8 |
| 202 | // max(|f - f_GSL| / |f_GSL|): 1.1776017189273130e-14 |
| 203 | // mean(f - f_GSL): 1.4502288259166106e-16 |
| 204 | // variance(f - f_GSL): 2.5634607708533707e-35 |
| 205 | // stddev(f - f_GSL): 5.0630630757016755e-18 |
| 206 | const testcase_cyl_neumann<double> |
| 207 | data012[20] = |
| 208 | { |
| 209 | { -20.701268809592200, 2.0000000000000000, 0.25000000000000000, 0.0 }, |
| 210 | { -5.4413708371742668, 2.0000000000000000, 0.50000000000000000, 0.0 }, |
| 211 | { -2.6297460326656559, 2.0000000000000000, 0.75000000000000000, 0.0 }, |
| 212 | { -1.6506826068162548, 2.0000000000000000, 1.0000000000000000, 0.0 }, |
| 213 | { -1.1931993101785539, 2.0000000000000000, 1.2500000000000000, 0.0 }, |
| 214 | { -0.93219375976297369, 2.0000000000000000, 1.5000000000000000, 0.0 }, |
| 215 | { -0.75574746972832973, 2.0000000000000000, 1.7500000000000000, 0.0 }, |
| 216 | { -0.61740810419068193, 2.0000000000000000, 2.0000000000000000, 0.0 }, |
| 217 | { -0.49589404446793012, 2.0000000000000000, 2.2500000000000000, 0.0 }, |
| 218 | { -0.38133584924180314, 2.0000000000000000, 2.5000000000000000, 0.0 }, |
| 219 | { -0.26973581138921693, 2.0000000000000000, 2.7500000000000000, 0.0 }, |
| 220 | { -0.16040039348492377, 2.0000000000000000, 3.0000000000000000, 0.0 }, |
| 221 | { -0.054577503462573951, 2.0000000000000000, 3.2500000000000000, 0.0 }, |
| 222 | { 0.045371437729179787, 2.0000000000000000, 3.5000000000000000, 0.0 }, |
| 223 | { 0.13653992534009185, 2.0000000000000000, 3.7500000000000000, 0.0 }, |
| 224 | { 0.21590359460361472, 2.0000000000000000, 4.0000000000000000, 0.0 }, |
| 225 | { 0.28065715378930217, 2.0000000000000000, 4.2500000000000000, 0.0 }, |
| 226 | { 0.32848159666046206, 2.0000000000000000, 4.5000000000000000, 0.0 }, |
| 227 | { 0.35774854396706901, 2.0000000000000000, 4.7500000000000000, 0.0 }, |
| 228 | { 0.36766288260552438, 2.0000000000000000, 5.0000000000000000, 0.0 }, |
| 229 | }; |
| 230 | const double toler012 = 1.0000000000000008e-12; |
| 231 | |
| 232 | // Test data for nu=5.0000000000000000. |
| 233 | // max(|f - f_GSL|): 2.8421709430404007e-14 at index 4 |
| 234 | // max(|f - f_GSL| / |f_GSL|): 1.0726804245235588e-15 |
| 235 | // mean(f - f_GSL): -1.8762769116165144e-15 |
| 236 | // variance(f - f_GSL): 2.7042659892362611e-31 |
| 237 | // stddev(f - f_GSL): 5.2002557525916566e-16 |
| 238 | const testcase_cyl_neumann<double> |
| 239 | data013[20] = |
| 240 | { |
| 241 | { -251309.48151852371, 5.0000000000000000, 0.25000000000000000, 0.0 }, |
| 242 | { -7946.3014788074752, 5.0000000000000000, 0.50000000000000000, 0.0 }, |
| 243 | { -1067.2468952289760, 5.0000000000000000, 0.75000000000000000, 0.0 }, |
| 244 | { -260.40586662581228, 5.0000000000000000, 1.0000000000000000, 0.0 }, |
| 245 | { -88.474252441880395, 5.0000000000000000, 1.2500000000000000, 0.0 }, |
| 246 | { -37.190308395498064, 5.0000000000000000, 1.5000000000000000, 0.0 }, |
| 247 | { -18.165774988201832, 5.0000000000000000, 1.7500000000000000, 0.0 }, |
| 248 | { -9.9359891284819675, 5.0000000000000000, 2.0000000000000000, 0.0 }, |
| 249 | { -5.9446343848076424, 5.0000000000000000, 2.2500000000000000, 0.0 }, |
| 250 | { -3.8301760007407522, 5.0000000000000000, 2.5000000000000000, 0.0 }, |
| 251 | { -2.6287042009459087, 5.0000000000000000, 2.7500000000000000, 0.0 }, |
| 252 | { -1.9059459538286738, 5.0000000000000000, 3.0000000000000000, 0.0 }, |
| 253 | { -1.4498157389142654, 5.0000000000000000, 3.2500000000000000, 0.0 }, |
| 254 | { -1.1494603169763686, 5.0000000000000000, 3.5000000000000000, 0.0 }, |
| 255 | { -0.94343105151431672, 5.0000000000000000, 3.7500000000000000, 0.0 }, |
| 256 | { -0.79585142111419982, 5.0000000000000000, 4.0000000000000000, 0.0 }, |
| 257 | { -0.68479288173907016, 5.0000000000000000, 4.2500000000000000, 0.0 }, |
| 258 | { -0.59631936513587558, 5.0000000000000000, 4.5000000000000000, 0.0 }, |
| 259 | { -0.52130838331747587, 5.0000000000000000, 4.7500000000000000, 0.0 }, |
| 260 | { -0.45369482249110193, 5.0000000000000000, 5.0000000000000000, 0.0 }, |
| 261 | }; |
| 262 | const double toler013 = 2.5000000000000020e-13; |
| 263 | |
| 264 | // Test data for nu=10.000000000000000. |
| 265 | // max(|f - f_GSL|): 2.3841857910156250e-07 at index 2 |
| 266 | // max(|f - f_GSL| / |f_GSL|): 1.2724057074663479e-15 |
| 267 | // mean(f - f_GSL): 1.1408855549177588e-08 |
| 268 | // variance(f - f_GSL): 7.2112307216715587e-18 |
| 269 | // stddev(f - f_GSL): 2.6853734789916205e-09 |
| 270 | const testcase_cyl_neumann<double> |
| 271 | data014[20] = |
| 272 | { |
| 273 | { -124241617095379.48, 10.000000000000000, 0.25000000000000000, 0.0 }, |
| 274 | { -121963623349.56966, 10.000000000000000, 0.50000000000000000, 0.0 }, |
| 275 | { -2133501638.9057348, 10.000000000000000, 0.75000000000000000, 0.0 }, |
| 276 | { -121618014.27868921, 10.000000000000000, 1.0000000000000000, 0.0 }, |
| 277 | { -13265210.158452792, 10.000000000000000, 1.2500000000000000, 0.0 }, |
| 278 | { -2183993.0260864049, 10.000000000000000, 1.5000000000000000, 0.0 }, |
| 279 | { -478274.82386541169, 10.000000000000000, 1.7500000000000000, 0.0 }, |
| 280 | { -129184.54220803917, 10.000000000000000, 2.0000000000000000, 0.0 }, |
| 281 | { -40993.254794381690, 10.000000000000000, 2.2500000000000000, 0.0 }, |
| 282 | { -14782.847716021070, 10.000000000000000, 2.5000000000000000, 0.0 }, |
| 283 | { -5916.5330998776262, 10.000000000000000, 2.7500000000000000, 0.0 }, |
| 284 | { -2582.6071294842995, 10.000000000000000, 3.0000000000000000, 0.0 }, |
| 285 | { -1213.3423564023892, 10.000000000000000, 3.2500000000000000, 0.0 }, |
| 286 | { -607.27437834125760, 10.000000000000000, 3.5000000000000000, 0.0 }, |
| 287 | { -321.17461059752202, 10.000000000000000, 3.7500000000000000, 0.0 }, |
| 288 | { -178.33055590796428, 10.000000000000000, 4.0000000000000000, 0.0 }, |
| 289 | { -103.40496587570090, 10.000000000000000, 4.2500000000000000, 0.0 }, |
| 290 | { -62.345024619781434, 10.000000000000000, 4.5000000000000000, 0.0 }, |
| 291 | { -38.944510430296937, 10.000000000000000, 4.7500000000000000, 0.0 }, |
| 292 | { -25.129110095610095, 10.000000000000000, 5.0000000000000000, 0.0 }, |
| 293 | }; |
| 294 | const double toler014 = 2.5000000000000020e-13; |
| 295 | |
| 296 | // Test data for nu=20.000000000000000. |
| 297 | // max(|f - f_GSL|): 6442450944.0000000 at index 2 |
| 298 | // max(|f - f_GSL| / |f_GSL|): 1.8080382211114952e-15 |
| 299 | // mean(f - f_GSL): 322083865.10024977 |
| 300 | // variance(f - f_GSL): inf |
| 301 | // stddev(f - f_GSL): inf |
| 302 | const testcase_cyl_neumann<double> |
| 303 | data015[20] = |
| 304 | { |
| 305 | { -4.4678815064152581e+34, 20.000000000000000, 0.25000000000000000, 0.0 }, |
| 306 | { -4.2714301215659088e+28, 20.000000000000000, 0.50000000000000000, 0.0 }, |
| 307 | { -1.2898357375834223e+25, 20.000000000000000, 0.75000000000000000, 0.0 }, |
| 308 | { -4.1139703148355065e+22, 20.000000000000000, 1.0000000000000000, 0.0 }, |
| 309 | { -4.7783533372148580e+20, 20.000000000000000, 1.2500000000000000, 0.0 }, |
| 310 | { -1.2577301772964241e+19, 20.000000000000000, 1.5000000000000000, 0.0 }, |
| 311 | { -5.8251041176649626e+17, 20.000000000000000, 1.7500000000000000, 0.0 }, |
| 312 | { -40816513889983640., 20.000000000000000, 2.0000000000000000, 0.0 }, |
| 313 | { -3925339868516418.5, 20.000000000000000, 2.2500000000000000, 0.0 }, |
| 314 | { -484776559582090.25, 20.000000000000000, 2.5000000000000000, 0.0 }, |
| 315 | { -73320655044814.469, 20.000000000000000, 2.7500000000000000, 0.0 }, |
| 316 | { -13113540041757.449, 20.000000000000000, 3.0000000000000000, 0.0 }, |
| 317 | { -2700669268882.7139, 20.000000000000000, 3.2500000000000000, 0.0 }, |
| 318 | { -627339518240.21240, 20.000000000000000, 3.5000000000000000, 0.0 }, |
| 319 | { -161695236802.71753, 20.000000000000000, 3.7500000000000000, 0.0 }, |
| 320 | { -45637199262.220100, 20.000000000000000, 4.0000000000000000, 0.0 }, |
| 321 | { -13953299213.925377, 20.000000000000000, 4.2500000000000000, 0.0 }, |
| 322 | { -4580215756.5691023, 20.000000000000000, 4.5000000000000000, 0.0 }, |
| 323 | { -1602110715.5159132, 20.000000000000000, 4.7500000000000000, 0.0 }, |
| 324 | { -593396529.69143200, 20.000000000000000, 5.0000000000000000, 0.0 }, |
| 325 | }; |
| 326 | const double toler015 = 2.5000000000000020e-13; |
| 327 | |
| 328 | // Test data for nu=50.000000000000000. |
| 329 | // max(|f - f_GSL|): 6.4703872001161536e+68 at index 2 |
| 330 | // max(|f - f_GSL| / |f_GSL|): 3.7730746786493403e-15 |
| 331 | // mean(f - f_GSL): 3.2351936000129644e+67 |
| 332 | // variance(f - f_GSL): inf |
| 333 | // stddev(f - f_GSL): inf |
| 334 | const testcase_cyl_neumann<double> |
| 335 | data016[20] = |
| 336 | { |
| 337 | { -2.7643487471155969e+107, 50.000000000000000, 0.25000000000000000, 0.0 }, |
| 338 | { -2.4575848224461092e+92, 50.000000000000000, 0.50000000000000000, 0.0 }, |
| 339 | { -3.8604508467683829e+83, 50.000000000000000, 0.75000000000000000, 0.0 }, |
| 340 | { -2.1911428126053411e+77, 50.000000000000000, 1.0000000000000000, 0.0 }, |
| 341 | { -3.1362926828833165e+72, 50.000000000000000, 1.2500000000000000, 0.0 }, |
| 342 | { -3.4584216846550566e+68, 50.000000000000000, 1.5000000000000000, 0.0 }, |
| 343 | { -1.5607714080312795e+65, 50.000000000000000, 1.7500000000000000, 0.0 }, |
| 344 | { -1.9761505765184128e+62, 50.000000000000000, 2.0000000000000000, 0.0 }, |
| 345 | { -5.5023640499231188e+59, 50.000000000000000, 2.2500000000000000, 0.0 }, |
| 346 | { -2.8530384545826849e+57, 50.000000000000000, 2.5000000000000000, 0.0 }, |
| 347 | { -2.4467169322684809e+55, 50.000000000000000, 2.7500000000000000, 0.0 }, |
| 348 | { -3.1793891461005181e+53, 50.000000000000000, 3.0000000000000000, 0.0 }, |
| 349 | { -5.8573901231568658e+51, 50.000000000000000, 3.2500000000000000, 0.0 }, |
| 350 | { -1.4528262197760965e+50, 50.000000000000000, 3.5000000000000000, 0.0 }, |
| 351 | { -4.6566569870478635e+48, 50.000000000000000, 3.7500000000000000, 0.0 }, |
| 352 | { -1.8661134361400254e+47, 50.000000000000000, 4.0000000000000000, 0.0 }, |
| 353 | { -9.1005883612255402e+45, 50.000000000000000, 4.2500000000000000, 0.0 }, |
| 354 | { -5.2813777542386141e+44, 50.000000000000000, 4.5000000000000000, 0.0 }, |
| 355 | { -3.5795477722116469e+43, 50.000000000000000, 4.7500000000000000, 0.0 }, |
| 356 | { -2.7888370175838930e+42, 50.000000000000000, 5.0000000000000000, 0.0 }, |
| 357 | }; |
| 358 | const double toler016 = 2.5000000000000020e-13; |
| 359 | |
| 360 | // Test data for nu=100.00000000000000. |
| 361 | // max(|f - f_GSL|): 1.6126781683773614e+233 at index 0 |
| 362 | // max(|f - f_GSL| / |f_GSL|): 3.9669044390244564e-13 |
| 363 | // mean(f - f_GSL): -8.0633908418868065e+231 |
| 364 | // variance(f - f_GSL): inf |
| 365 | // stddev(f - f_GSL): inf |
| 366 | const testcase_cyl_neumann<double> |
| 367 | data017[20] = |
| 368 | { |
| 369 | { -6.0523080585856763e+245, 100.00000000000000, 0.25000000000000000, 0.0 }, |
| 370 | { -4.7766903780412668e+215, 100.00000000000000, 0.50000000000000000, 0.0 }, |
| 371 | { -1.1758283017660654e+198, 100.00000000000000, 0.75000000000000000, 0.0 }, |
| 372 | { -3.7752878101091316e+185, 100.00000000000000, 1.0000000000000000, 0.0 }, |
| 373 | { -7.7013290729995187e+175, 100.00000000000000, 1.2500000000000000, 0.0 }, |
| 374 | { -9.3152624794288802e+167, 100.00000000000000, 1.5000000000000000, 0.0 }, |
| 375 | { -1.8854163374247264e+161, 100.00000000000000, 1.7500000000000000, 0.0 }, |
| 376 | { -3.0008260488566283e+155, 100.00000000000000, 2.0000000000000000, 0.0 }, |
| 377 | { -2.3075650873777408e+150, 100.00000000000000, 2.2500000000000000, 0.0 }, |
| 378 | { -6.1476258561369381e+145, 100.00000000000000, 2.5000000000000000, 0.0 }, |
| 379 | { -4.4758816234829593e+141, 100.00000000000000, 2.7500000000000000, 0.0 }, |
| 380 | { -7.4747961023547862e+137, 100.00000000000000, 3.0000000000000000, 0.0 }, |
| 381 | { -2.5067022766901547e+134, 100.00000000000000, 3.2500000000000000, 0.0 }, |
| 382 | { -1.5222488313432757e+131, 100.00000000000000, 3.5000000000000000, 0.0 }, |
| 383 | { -1.5422392812241399e+128, 100.00000000000000, 3.7500000000000000, 0.0 }, |
| 384 | { -2.4400857387551062e+125, 100.00000000000000, 4.0000000000000000, 0.0 }, |
| 385 | { -5.7118153392422293e+122, 100.00000000000000, 4.2500000000000000, 0.0 }, |
| 386 | { -1.8915420905193392e+120, 100.00000000000000, 4.5000000000000000, 0.0 }, |
| 387 | { -8.5357945104770158e+117, 100.00000000000000, 4.7500000000000000, 0.0 }, |
| 388 | { -5.0848639160196196e+115, 100.00000000000000, 5.0000000000000000, 0.0 }, |
| 389 | }; |
| 390 | const double toler017 = 2.5000000000000014e-11; |
| 391 | // cyl_neumann |
| 392 | |
| 393 | // Test data for nu=0.0000000000000000. |
| 394 | // max(|f - f_GSL|): 7.1210398688847931e-15 at index 13 |
| 395 | // max(|f - f_GSL| / |f_GSL|): 1.5217467741391491e-12 |
| 396 | // mean(f - f_GSL): 7.2554809382729962e-17 |
| 397 | // variance(f - f_GSL): 8.8801597233792556e-32 |
| 398 | // stddev(f - f_GSL): 2.9799596848580446e-16 |
| 399 | const testcase_cyl_neumann<double> |
| 400 | data018[20] = |
| 401 | { |
| 402 | { -0.30851762524903359, 0.0000000000000000, 5.0000000000000000, 0.0 }, |
| 403 | { 0.055671167283599457, 0.0000000000000000, 10.000000000000000, 0.0 }, |
| 404 | { 0.20546429603891822, 0.0000000000000000, 15.000000000000000, 0.0 }, |
| 405 | { 0.062640596809384053, 0.0000000000000000, 20.000000000000000, 0.0 }, |
| 406 | { -0.12724943226800617, 0.0000000000000000, 25.000000000000000, 0.0 }, |
| 407 | { -0.11729573168666413, 0.0000000000000000, 30.000000000000000, 0.0 }, |
| 408 | { 0.045797987195155689, 0.0000000000000000, 35.000000000000000, 0.0 }, |
| 409 | { 0.12593641705826092, 0.0000000000000000, 40.000000000000000, 0.0 }, |
| 410 | { 0.027060469763313333, 0.0000000000000000, 45.000000000000000, 0.0 }, |
| 411 | { -0.098064995470077118, 0.0000000000000000, 50.000000000000000, 0.0 }, |
| 412 | { -0.077569178730412594, 0.0000000000000000, 55.000000000000000, 0.0 }, |
| 413 | { 0.047358952209449426, 0.0000000000000000, 60.000000000000000, 0.0 }, |
| 414 | { 0.097183557740181920, 0.0000000000000000, 65.000000000000000, 0.0 }, |
| 415 | { 0.0093096664589409992, 0.0000000000000000, 70.000000000000000, 0.0 }, |
| 416 | { -0.085369047647775656, 0.0000000000000000, 75.000000000000000, 0.0 }, |
| 417 | { -0.055620339089770016, 0.0000000000000000, 80.000000000000000, 0.0 }, |
| 418 | { 0.049567884951494251, 0.0000000000000000, 85.000000000000000, 0.0 }, |
| 419 | { 0.079776475854877751, 0.0000000000000000, 90.000000000000000, 0.0 }, |
| 420 | { -0.0028230995861232107, 0.0000000000000000, 95.000000000000000, 0.0 }, |
| 421 | { -0.077244313365083153, 0.0000000000000000, 100.00000000000000, 0.0 }, |
| 422 | }; |
| 423 | const double toler018 = 1.0000000000000006e-10; |
| 424 | |
| 425 | // Test data for nu=0.33333333333333331. |
| 426 | // max(|f - f_GSL|): 6.4392935428259079e-15 at index 13 |
| 427 | // max(|f - f_GSL| / |f_GSL|): 4.0255283668271825e-13 |
| 428 | // mean(f - f_GSL): 4.0124153999343550e-16 |
| 429 | // variance(f - f_GSL): 5.5447658140741534e-32 |
| 430 | // stddev(f - f_GSL): 2.3547326417396418e-16 |
| 431 | const testcase_cyl_neumann<double> |
| 432 | data019[20] = |
| 433 | { |
| 434 | { -0.18192321129343850, 0.33333333333333331, 5.0000000000000000, 0.0 }, |
| 435 | { 0.17020111788268760, 0.33333333333333331, 10.000000000000000, 0.0 }, |
| 436 | { 0.18540507541540796, 0.33333333333333331, 15.000000000000000, 0.0 }, |
| 437 | { -0.028777707635715043, 0.33333333333333331, 20.000000000000000, 0.0 }, |
| 438 | { -0.15829741864944163, 0.33333333333333331, 25.000000000000000, 0.0 }, |
| 439 | { -0.058645772316705209, 0.33333333333333331, 30.000000000000000, 0.0 }, |
| 440 | { 0.10294930308870617, 0.33333333333333331, 35.000000000000000, 0.0 }, |
| 441 | { 0.10547870367098922, 0.33333333333333331, 40.000000000000000, 0.0 }, |
| 442 | { -0.034334228816010816, 0.33333333333333331, 45.000000000000000, 0.0 }, |
| 443 | { -0.11283489933031279, 0.33333333333333331, 50.000000000000000, 0.0 }, |
| 444 | { -0.030007358986895105, 0.33333333333333331, 55.000000000000000, 0.0 }, |
| 445 | { 0.086699173295718121, 0.33333333333333331, 60.000000000000000, 0.0 }, |
| 446 | { 0.074875579668878658, 0.33333333333333331, 65.000000000000000, 0.0 }, |
| 447 | { -0.039323246374552680, 0.33333333333333331, 70.000000000000000, 0.0 }, |
| 448 | { -0.091263539574475236, 0.33333333333333331, 75.000000000000000, 0.0 }, |
| 449 | { -0.013358849535984318, 0.33333333333333331, 80.000000000000000, 0.0 }, |
| 450 | { 0.078373575537830198, 0.33333333333333331, 85.000000000000000, 0.0 }, |
| 451 | { 0.055812482883955940, 0.33333333333333331, 90.000000000000000, 0.0 }, |
| 452 | { -0.043310380106990683, 0.33333333333333331, 95.000000000000000, 0.0 }, |
| 453 | { -0.076900504962136559, 0.33333333333333331, 100.00000000000000, 0.0 }, |
| 454 | }; |
| 455 | const double toler019 = 2.5000000000000014e-11; |
| 456 | |
| 457 | // Test data for nu=0.50000000000000000. |
| 458 | // max(|f - f_GSL|): 6.5919492087118670e-15 at index 12 |
| 459 | // max(|f - f_GSL| / |f_GSL|): 6.0282403975230169e-13 |
| 460 | // mean(f - f_GSL): 4.4870791110485090e-16 |
| 461 | // variance(f - f_GSL): 2.2330752394717835e-31 |
| 462 | // stddev(f - f_GSL): 4.7255425503023288e-16 |
| 463 | const testcase_cyl_neumann<double> |
| 464 | data020[20] = |
| 465 | { |
| 466 | { -0.10121770918510846, 0.50000000000000000, 5.0000000000000000, 0.0 }, |
| 467 | { 0.21170886633139810, 0.50000000000000000, 10.000000000000000, 0.0 }, |
| 468 | { 0.15650551590730855, 0.50000000000000000, 15.000000000000000, 0.0 }, |
| 469 | { -0.072806904785061938, 0.50000000000000000, 20.000000000000000, 0.0 }, |
| 470 | { -0.15817308404205055, 0.50000000000000000, 25.000000000000000, 0.0 }, |
| 471 | { -0.022470290598831138, 0.50000000000000000, 30.000000000000000, 0.0 }, |
| 472 | { 0.12187835265849535, 0.50000000000000000, 35.000000000000000, 0.0 }, |
| 473 | { 0.084138655676395377, 0.50000000000000000, 40.000000000000000, 0.0 }, |
| 474 | { -0.062482641933003201, 0.50000000000000000, 45.000000000000000, 0.0 }, |
| 475 | { -0.10888475635053954, 0.50000000000000000, 50.000000000000000, 0.0 }, |
| 476 | { -0.0023805454010949376, 0.50000000000000000, 55.000000000000000, 0.0 }, |
| 477 | { 0.098104683735037918, 0.50000000000000000, 60.000000000000000, 0.0 }, |
| 478 | { 0.055663470218594434, 0.50000000000000000, 65.000000000000000, 0.0 }, |
| 479 | { -0.060396767883824871, 0.50000000000000000, 70.000000000000000, 0.0 }, |
| 480 | { -0.084922578922046868, 0.50000000000000000, 75.000000000000000, 0.0 }, |
| 481 | { 0.0098472271924441284, 0.50000000000000000, 80.000000000000000, 0.0 }, |
| 482 | { 0.085190643574343625, 0.50000000000000000, 85.000000000000000, 0.0 }, |
| 483 | { 0.037684970437156268, 0.50000000000000000, 90.000000000000000, 0.0 }, |
| 484 | { -0.059772904856097500, 0.50000000000000000, 95.000000000000000, 0.0 }, |
| 485 | { -0.068803091468728109, 0.50000000000000000, 100.00000000000000, 0.0 }, |
| 486 | }; |
| 487 | const double toler020 = 5.0000000000000028e-11; |
| 488 | |
| 489 | // Test data for nu=0.66666666666666663. |
| 490 | // max(|f - f_GSL|): 7.2372663417752392e-15 at index 12 |
| 491 | // max(|f - f_GSL| / |f_GSL|): 4.1336890848340281e-13 |
| 492 | // mean(f - f_GSL): 4.6646714269016339e-16 |
| 493 | // variance(f - f_GSL): 4.7228390491049495e-31 |
| 494 | // stddev(f - f_GSL): 6.8722915021882980e-16 |
| 495 | const testcase_cyl_neumann<double> |
| 496 | data021[20] = |
| 497 | { |
| 498 | { -0.016050662643389627, 0.66666666666666663, 5.0000000000000000, 0.0 }, |
| 499 | { 0.23937232657540733, 0.66666666666666663, 10.000000000000000, 0.0 }, |
| 500 | { 0.11762106604241235, 0.66666666666666663, 15.000000000000000, 0.0 }, |
| 501 | { -0.11182254014899558, 0.66666666666666663, 20.000000000000000, 0.0 }, |
| 502 | { -0.14756582982938804, 0.66666666666666663, 25.000000000000000, 0.0 }, |
| 503 | { 0.015078692908077713, 0.66666666666666663, 30.000000000000000, 0.0 }, |
| 504 | { 0.13260911815705795, 0.66666666666666663, 35.000000000000000, 0.0 }, |
| 505 | { 0.057217565989652698, 0.66666666666666663, 40.000000000000000, 0.0 }, |
| 506 | { -0.086373755152382006, 0.66666666666666663, 45.000000000000000, 0.0 }, |
| 507 | { -0.097624139208051616, 0.66666666666666663, 50.000000000000000, 0.0 }, |
| 508 | { 0.025354902147023392, 0.66666666666666663, 55.000000000000000, 0.0 }, |
| 509 | { 0.10288136476351206, 0.66666666666666663, 60.000000000000000, 0.0 }, |
| 510 | { 0.032728379560128203, 0.66666666666666663, 65.000000000000000, 0.0 }, |
| 511 | { -0.077363672735747818, 0.66666666666666663, 70.000000000000000, 0.0 }, |
| 512 | { -0.072855870458293961, 0.66666666666666663, 75.000000000000000, 0.0 }, |
| 513 | { 0.032358106046953543, 0.66666666666666663, 80.000000000000000, 0.0 }, |
| 514 | { 0.086240651537394228, 0.66666666666666663, 85.000000000000000, 0.0 }, |
| 515 | { 0.017029601697285190, 0.66666666666666663, 90.000000000000000, 0.0 }, |
| 516 | { -0.072173520560584681, 0.66666666666666663, 95.000000000000000, 0.0 }, |
| 517 | { -0.056057339204073887, 0.66666666666666663, 100.00000000000000, 0.0 }, |
| 518 | }; |
| 519 | const double toler021 = 2.5000000000000014e-11; |
| 520 | |
| 521 | // Test data for nu=1.0000000000000000. |
| 522 | // max(|f - f_GSL|): 7.6570694229616265e-15 at index 12 |
| 523 | // max(|f - f_GSL| / |f_GSL|): 4.2680655963073912e-13 |
| 524 | // mean(f - f_GSL): 4.9712838012805347e-16 |
| 525 | // variance(f - f_GSL): 8.8456847510770884e-31 |
| 526 | // stddev(f - f_GSL): 9.4051500525388153e-16 |
| 527 | const testcase_cyl_neumann<double> |
| 528 | data022[20] = |
| 529 | { |
| 530 | { 0.14786314339122700, 1.0000000000000000, 5.0000000000000000, 0.0 }, |
| 531 | { 0.24901542420695386, 1.0000000000000000, 10.000000000000000, 0.0 }, |
| 532 | { 0.021073628036873522, 1.0000000000000000, 15.000000000000000, 0.0 }, |
| 533 | { -0.16551161436252115, 1.0000000000000000, 20.000000000000000, 0.0 }, |
| 534 | { -0.098829964783237412, 1.0000000000000000, 25.000000000000000, 0.0 }, |
| 535 | { 0.084425570661747135, 1.0000000000000000, 30.000000000000000, 0.0 }, |
| 536 | { 0.12751273354559009, 1.0000000000000000, 35.000000000000000, 0.0 }, |
| 537 | { -0.0057935058215497536, 1.0000000000000000, 40.000000000000000, 0.0 }, |
| 538 | { -0.11552517964639945, 1.0000000000000000, 45.000000000000000, 0.0 }, |
| 539 | { -0.056795668562014692, 1.0000000000000000, 50.000000000000000, 0.0 }, |
| 540 | { 0.073846265432577926, 1.0000000000000000, 55.000000000000000, 0.0 }, |
| 541 | { 0.091869609369866892, 1.0000000000000000, 60.000000000000000, 0.0 }, |
| 542 | { -0.017940374275377362, 1.0000000000000000, 65.000000000000000, 0.0 }, |
| 543 | { -0.094844652625716230, 1.0000000000000000, 70.000000000000000, 0.0 }, |
| 544 | { -0.035213785160580421, 1.0000000000000000, 75.000000000000000, 0.0 }, |
| 545 | { 0.069395913784588037, 1.0000000000000000, 80.000000000000000, 0.0 }, |
| 546 | { 0.071233187582749768, 1.0000000000000000, 85.000000000000000, 0.0 }, |
| 547 | { -0.026187238607768244, 1.0000000000000000, 90.000000000000000, 0.0 }, |
| 548 | { -0.081827958724501215, 1.0000000000000000, 95.000000000000000, 0.0 }, |
| 549 | { -0.020372312002759834, 1.0000000000000000, 100.00000000000000, 0.0 }, |
| 550 | }; |
| 551 | const double toler022 = 2.5000000000000014e-11; |
| 552 | |
| 553 | // Test data for nu=2.0000000000000000. |
| 554 | // max(|f - f_GSL|): 7.1210398688847931e-15 at index 13 |
| 555 | // max(|f - f_GSL| / |f_GSL|): 3.9367645301914862e-12 |
| 556 | // mean(f - f_GSL): -6.4293188828390413e-17 |
| 557 | // variance(f - f_GSL): 1.0170794505214399e-31 |
| 558 | // stddev(f - f_GSL): 3.1891683093268064e-16 |
| 559 | const testcase_cyl_neumann<double> |
| 560 | data023[20] = |
| 561 | { |
| 562 | { 0.36766288260552438, 2.0000000000000000, 5.0000000000000000, 0.0 }, |
| 563 | { -0.0058680824422086830, 2.0000000000000000, 10.000000000000000, 0.0 }, |
| 564 | { -0.20265447896733507, 2.0000000000000000, 15.000000000000000, 0.0 }, |
| 565 | { -0.079191758245636165, 2.0000000000000000, 20.000000000000000, 0.0 }, |
| 566 | { 0.11934303508534717, 2.0000000000000000, 25.000000000000000, 0.0 }, |
| 567 | { 0.12292410306411394, 2.0000000000000000, 30.000000000000000, 0.0 }, |
| 568 | { -0.038511545278264829, 2.0000000000000000, 35.000000000000000, 0.0 }, |
| 569 | { -0.12622609234933840, 2.0000000000000000, 40.000000000000000, 0.0 }, |
| 570 | { -0.032194922192042195, 2.0000000000000000, 45.000000000000000, 0.0 }, |
| 571 | { 0.095793168727596537, 2.0000000000000000, 50.000000000000000, 0.0 }, |
| 572 | { 0.080254497473415426, 2.0000000000000000, 55.000000000000000, 0.0 }, |
| 573 | { -0.044296631897120527, 2.0000000000000000, 60.000000000000000, 0.0 }, |
| 574 | { -0.097735569256347382, 2.0000000000000000, 65.000000000000000, 0.0 }, |
| 575 | { -0.012019513676818605, 2.0000000000000000, 70.000000000000000, 0.0 }, |
| 576 | { 0.084430013376826846, 2.0000000000000000, 75.000000000000000, 0.0 }, |
| 577 | { 0.057355236934384719, 2.0000000000000000, 80.000000000000000, 0.0 }, |
| 578 | { -0.047891809949547198, 2.0000000000000000, 85.000000000000000, 0.0 }, |
| 579 | { -0.080358414490605934, 2.0000000000000000, 90.000000000000000, 0.0 }, |
| 580 | { 0.0011004057182389746, 2.0000000000000000, 95.000000000000000, 0.0 }, |
| 581 | { 0.076836867125027963, 2.0000000000000000, 100.00000000000000, 0.0 }, |
| 582 | }; |
| 583 | const double toler023 = 2.5000000000000017e-10; |
| 584 | |
| 585 | // Test data for nu=5.0000000000000000. |
| 586 | // max(|f - f_GSL|): 7.8125169094417357e-15 at index 12 |
| 587 | // max(|f - f_GSL| / |f_GSL|): 3.2742511246789352e-11 |
| 588 | // mean(f - f_GSL): 4.9826543715644767e-16 |
| 589 | // variance(f - f_GSL): 8.7640351124736941e-31 |
| 590 | // stddev(f - f_GSL): 9.3616425441658967e-16 |
| 591 | const testcase_cyl_neumann<double> |
| 592 | data024[20] = |
| 593 | { |
| 594 | { -0.45369482249110193, 5.0000000000000000, 5.0000000000000000, 0.0 }, |
| 595 | { 0.13540304768936234, 5.0000000000000000, 10.000000000000000, 0.0 }, |
| 596 | { 0.16717271575940015, 5.0000000000000000, 15.000000000000000, 0.0 }, |
| 597 | { -0.10003576788953220, 5.0000000000000000, 20.000000000000000, 0.0 }, |
| 598 | { -0.14705799311372267, 5.0000000000000000, 25.000000000000000, 0.0 }, |
| 599 | { 0.031627359289264301, 5.0000000000000000, 30.000000000000000, 0.0 }, |
| 600 | { 0.13554781474770028, 5.0000000000000000, 35.000000000000000, 0.0 }, |
| 601 | { 0.031869448780850247, 5.0000000000000000, 40.000000000000000, 0.0 }, |
| 602 | { -0.10426932700176872, 5.0000000000000000, 45.000000000000000, 0.0 }, |
| 603 | { -0.078548413913081594, 5.0000000000000000, 50.000000000000000, 0.0 }, |
| 604 | { 0.055257033062858375, 5.0000000000000000, 55.000000000000000, 0.0 }, |
| 605 | { 0.099464632840450887, 5.0000000000000000, 60.000000000000000, 0.0 }, |
| 606 | { 0.00023860469499595305, 5.0000000000000000, 65.000000000000000, 0.0 }, |
| 607 | { -0.091861802216406052, 5.0000000000000000, 70.000000000000000, 0.0 }, |
| 608 | { -0.048383671296970042, 5.0000000000000000, 75.000000000000000, 0.0 }, |
| 609 | { 0.060293667104896316, 5.0000000000000000, 80.000000000000000, 0.0 }, |
| 610 | { 0.077506166682733996, 5.0000000000000000, 85.000000000000000, 0.0 }, |
| 611 | { -0.015338764062239767, 5.0000000000000000, 90.000000000000000, 0.0 }, |
| 612 | { -0.081531504045514361, 5.0000000000000000, 95.000000000000000, 0.0 }, |
| 613 | { -0.029480196281661937, 5.0000000000000000, 100.00000000000000, 0.0 }, |
| 614 | }; |
| 615 | const double toler024 = 2.5000000000000013e-09; |
| 616 | |
| 617 | // Test data for nu=10.000000000000000. |
| 618 | // max(|f - f_GSL|): 3.1974423109204508e-14 at index 0 |
| 619 | // max(|f - f_GSL| / |f_GSL|): 2.7474477272995600e-12 |
| 620 | // mean(f - f_GSL): -1.4525707026091795e-15 |
| 621 | // variance(f - f_GSL): 1.6326443279890062e-30 |
| 622 | // stddev(f - f_GSL): 1.2777497125763739e-15 |
| 623 | const testcase_cyl_neumann<double> |
| 624 | data025[20] = |
| 625 | { |
| 626 | { -25.129110095610095, 10.000000000000000, 5.0000000000000000, 0.0 }, |
| 627 | { -0.35981415218340279, 10.000000000000000, 10.000000000000000, 0.0 }, |
| 628 | { 0.21997141360195577, 10.000000000000000, 15.000000000000000, 0.0 }, |
| 629 | { -0.043894653515658105, 10.000000000000000, 20.000000000000000, 0.0 }, |
| 630 | { -0.14871839049980651, 10.000000000000000, 25.000000000000000, 0.0 }, |
| 631 | { 0.075056702122397012, 10.000000000000000, 30.000000000000000, 0.0 }, |
| 632 | { 0.12222473135000546, 10.000000000000000, 35.000000000000000, 0.0 }, |
| 633 | { -0.046723877232677985, 10.000000000000000, 40.000000000000000, 0.0 }, |
| 634 | { -0.11739339009322181, 10.000000000000000, 45.000000000000000, 0.0 }, |
| 635 | { 0.0057238971820535930, 10.000000000000000, 50.000000000000000, 0.0 }, |
| 636 | { 0.10733910125831631, 10.000000000000000, 55.000000000000000, 0.0 }, |
| 637 | { 0.036290350559545478, 10.000000000000000, 60.000000000000000, 0.0 }, |
| 638 | { -0.083239127691715667, 10.000000000000000, 65.000000000000000, 0.0 }, |
| 639 | { -0.069639384138314858, 10.000000000000000, 70.000000000000000, 0.0 }, |
| 640 | { 0.045798335061325066, 10.000000000000000, 75.000000000000000, 0.0 }, |
| 641 | { 0.086269195064844456, 10.000000000000000, 80.000000000000000, 0.0 }, |
| 642 | { -0.0018234674126248740, 10.000000000000000, 85.000000000000000, 0.0 }, |
| 643 | { -0.082067762371231284, 10.000000000000000, 90.000000000000000, 0.0 }, |
| 644 | { -0.038798074754578089, 10.000000000000000, 95.000000000000000, 0.0 }, |
| 645 | { 0.058331574236414913, 10.000000000000000, 100.00000000000000, 0.0 }, |
| 646 | }; |
| 647 | const double toler025 = 2.5000000000000017e-10; |
| 648 | |
| 649 | // Test data for nu=20.000000000000000. |
| 650 | // max(|f - f_GSL|): 1.0728836059570312e-06 at index 0 |
| 651 | // max(|f - f_GSL| / |f_GSL|): 1.7026122670117101e-12 |
| 652 | // mean(f - f_GSL): -5.3644294743674170e-08 |
| 653 | // variance(f - f_GSL): 1.5942991469572787e-16 |
| 654 | // stddev(f - f_GSL): 1.2626555931675426e-08 |
| 655 | const testcase_cyl_neumann<double> |
| 656 | data026[20] = |
| 657 | { |
| 658 | { -593396529.69143200, 20.000000000000000, 5.0000000000000000, 0.0 }, |
| 659 | { -1597.4838482696259, 20.000000000000000, 10.000000000000000, 0.0 }, |
| 660 | { -3.3087330924737621, 20.000000000000000, 15.000000000000000, 0.0 }, |
| 661 | { -0.28548945860020319, 20.000000000000000, 20.000000000000000, 0.0 }, |
| 662 | { 0.19804074776289243, 20.000000000000000, 25.000000000000000, 0.0 }, |
| 663 | { -0.16848153948742683, 20.000000000000000, 30.000000000000000, 0.0 }, |
| 664 | { 0.10102784152594022, 20.000000000000000, 35.000000000000000, 0.0 }, |
| 665 | { 0.045161820565805755, 20.000000000000000, 40.000000000000000, 0.0 }, |
| 666 | { -0.12556489308015448, 20.000000000000000, 45.000000000000000, 0.0 }, |
| 667 | { 0.016442633948115834, 20.000000000000000, 50.000000000000000, 0.0 }, |
| 668 | { 0.10853448778255181, 20.000000000000000, 55.000000000000000, 0.0 }, |
| 669 | { -0.026721408520664701, 20.000000000000000, 60.000000000000000, 0.0 }, |
| 670 | { -0.098780425256324175, 20.000000000000000, 65.000000000000000, 0.0 }, |
| 671 | { 0.016201957786018233, 20.000000000000000, 70.000000000000000, 0.0 }, |
| 672 | { 0.093591198265063721, 20.000000000000000, 75.000000000000000, 0.0 }, |
| 673 | { 0.0040484400737296200, 20.000000000000000, 80.000000000000000, 0.0 }, |
| 674 | { -0.086314929459920531, 20.000000000000000, 85.000000000000000, 0.0 }, |
| 675 | { -0.028274110097231530, 20.000000000000000, 90.000000000000000, 0.0 }, |
| 676 | { 0.072349520791638741, 20.000000000000000, 95.000000000000000, 0.0 }, |
| 677 | { 0.051247973076188474, 20.000000000000000, 100.00000000000000, 0.0 }, |
| 678 | }; |
| 679 | const double toler026 = 1.0000000000000006e-10; |
| 680 | |
| 681 | // Test data for nu=50.000000000000000. |
| 682 | // max(|f - f_GSL|): 1.0522490333925732e+28 at index 0 |
| 683 | // max(|f - f_GSL| / |f_GSL|): 2.6670435417133106e-12 |
| 684 | // mean(f - f_GSL): -5.2612451669628722e+26 |
| 685 | // variance(f - f_GSL): inf |
| 686 | // stddev(f - f_GSL): inf |
| 687 | const testcase_cyl_neumann<double> |
| 688 | data027[20] = |
| 689 | { |
| 690 | { -2.7888370175838930e+42, 50.000000000000000, 5.0000000000000000, 0.0 }, |
| 691 | { -3.6410665018007421e+27, 50.000000000000000, 10.000000000000000, 0.0 }, |
| 692 | { -1.0929732912175415e+19, 50.000000000000000, 15.000000000000000, 0.0 }, |
| 693 | { -15606426801663.734, 50.000000000000000, 20.000000000000000, 0.0 }, |
| 694 | { -753573251.44662738, 50.000000000000000, 25.000000000000000, 0.0 }, |
| 695 | { -386759.32602734759, 50.000000000000000, 30.000000000000000, 0.0 }, |
| 696 | { -1172.8690492895323, 50.000000000000000, 35.000000000000000, 0.0 }, |
| 697 | { -15.615608873419944, 50.000000000000000, 40.000000000000000, 0.0 }, |
| 698 | { -0.87058346204176895, 50.000000000000000, 45.000000000000000, 0.0 }, |
| 699 | { -0.21031655464397747, 50.000000000000000, 50.000000000000000, 0.0 }, |
| 700 | { 0.093048240412999389, 50.000000000000000, 55.000000000000000, 0.0 }, |
| 701 | { 0.0086417699626744754, 50.000000000000000, 60.000000000000000, 0.0 }, |
| 702 | { -0.025019788459222037, 50.000000000000000, 65.000000000000000, 0.0 }, |
| 703 | { -0.0014815155191909152, 50.000000000000000, 70.000000000000000, 0.0 }, |
| 704 | { 0.050335774732164121, 50.000000000000000, 75.000000000000000, 0.0 }, |
| 705 | { -0.092924250967987232, 50.000000000000000, 80.000000000000000, 0.0 }, |
| 706 | { 0.087332463030205698, 50.000000000000000, 85.000000000000000, 0.0 }, |
| 707 | { -0.016164237701651860, 50.000000000000000, 90.000000000000000, 0.0 }, |
| 708 | { -0.068897613820457934, 50.000000000000000, 95.000000000000000, 0.0 }, |
| 709 | { 0.076505263944803045, 50.000000000000000, 100.00000000000000, 0.0 }, |
| 710 | }; |
| 711 | const double toler027 = 2.5000000000000017e-10; |
| 712 | |
| 713 | // Test data for nu=100.00000000000000. |
| 714 | // max(|f - f_GSL|): 6.3342780989716025e+102 at index 0 |
| 715 | // max(|f - f_GSL| / |f_GSL|): 1.2524955818061054e-13 |
| 716 | // mean(f - f_GSL): -3.1671390494858015e+101 |
| 717 | // variance(f - f_GSL): inf |
| 718 | // stddev(f - f_GSL): inf |
| 719 | const testcase_cyl_neumann<double> |
| 720 | data028[20] = |
| 721 | { |
| 722 | { -5.0848639160196196e+115, 100.00000000000000, 5.0000000000000000, 0.0 }, |
| 723 | { -4.8491482711800252e+85, 100.00000000000000, 10.000000000000000, 0.0 }, |
| 724 | { -1.6375955323195320e+68, 100.00000000000000, 15.000000000000000, 0.0 }, |
| 725 | { -8.2002648144679115e+55, 100.00000000000000, 20.000000000000000, 0.0 }, |
| 726 | { -2.9712216432562368e+46, 100.00000000000000, 25.000000000000000, 0.0 }, |
| 727 | { -7.2875284708240751e+38, 100.00000000000000, 30.000000000000000, 0.0 }, |
| 728 | { -3.4251079902107980e+32, 100.00000000000000, 35.000000000000000, 0.0 }, |
| 729 | { -1.4552439438102214e+27, 100.00000000000000, 40.000000000000000, 0.0 }, |
| 730 | { -3.4506612476220073e+22, 100.00000000000000, 45.000000000000000, 0.0 }, |
| 731 | { -3.2938001882025477e+18, 100.00000000000000, 50.000000000000000, 0.0 }, |
| 732 | { -1005686182055520.4, 100.00000000000000, 55.000000000000000, 0.0 }, |
| 733 | { -831892881402.09033, 100.00000000000000, 60.000000000000000, 0.0 }, |
| 734 | { -1650863778.0598392, 100.00000000000000, 65.000000000000000, 0.0 }, |
| 735 | { -7192614.1976097794, 100.00000000000000, 70.000000000000000, 0.0 }, |
| 736 | { -64639.072261231595, 100.00000000000000, 75.000000000000000, 0.0 }, |
| 737 | { -1152.5905185698466, 100.00000000000000, 80.000000000000000, 0.0 }, |
| 738 | { -40.250761402101489, 100.00000000000000, 85.000000000000000, 0.0 }, |
| 739 | { -2.8307771387185294, 100.00000000000000, 90.000000000000000, 0.0 }, |
| 740 | { -0.45762200495904848, 100.00000000000000, 95.000000000000000, 0.0 }, |
| 741 | { -0.16692141141757652, 100.00000000000000, 100.00000000000000, 0.0 }, |
| 742 | }; |
| 743 | const double toler028 = 1.0000000000000006e-11; |
| 744 | |
| 745 | // Test data for nu=100.0000000000000000 |
| 746 | // max(|f - f_GSL|): 3.9022387751663778e-14 at index 16 |
| 747 | // max(|f - f_GSL| / |f_GSL|): 2.4760677072012703e-11 |
| 748 | // mean(f - f_GSL): 3.6878362466971231e-16 |
| 749 | // variance(f - f_GSL): 5.0707962306468580e-28 |
| 750 | // stddev(f - f_GSL): 2.2518428521206487e-14 |
| 751 | const testcase_cyl_neumann<double> |
| 752 | data029[21] = |
| 753 | { |
| 754 | { -2.2438688257729954e-02, 100.0000000000000000, 1000.0000000000000000, 0.0 }, |
| 755 | { -2.1077595159819992e-02, 100.0000000000000000, 1100.0000000000000000, 0.0 }, |
| 756 | { -3.5299439206692585e-03, 100.0000000000000000, 1200.0000000000000000, 0.0 }, |
| 757 | { 1.4250019326536615e-02, 100.0000000000000000, 1300.0000000000000000, 0.0 }, |
| 758 | { 2.1304679089735663e-02, 100.0000000000000000, 1400.0000000000000000, 0.0 }, |
| 759 | { 1.5734395077905267e-02, 100.0000000000000000, 1500.0000000000000000, 0.0 }, |
| 760 | { 2.5544633636137774e-03, 100.0000000000000000, 1600.0000000000000000, 0.0 }, |
| 761 | { -1.0722045524849367e-02, 100.0000000000000000, 1700.0000000000000000, 0.0 }, |
| 762 | { -1.8036919243226864e-02, 100.0000000000000000, 1800.0000000000000000, 0.0 }, |
| 763 | { -1.6958415593079763e-02, 100.0000000000000000, 1900.0000000000000000, 0.0 }, |
| 764 | { -8.8788704566276667e-03, 100.0000000000000000, 2000.0000000000000000, 0.0 }, |
| 765 | { 2.2504407108413179e-03, 100.0000000000000000, 2100.0000000000000000, 0.0 }, |
| 766 | { 1.1833215246712251e-02, 100.0000000000000000, 2200.0000000000000000, 0.0 }, |
| 767 | { 1.6398784536343945e-02, 100.0000000000000000, 2300.0000000000000000, 0.0 }, |
| 768 | { 1.4675984403642338e-02, 100.0000000000000000, 2400.0000000000000000, 0.0 }, |
| 769 | { 7.7523920451654229e-03, 100.0000000000000000, 2500.0000000000000000, 0.0 }, |
| 770 | { -1.5759822576003489e-03, 100.0000000000000000, 2600.0000000000000000, 0.0 }, |
| 771 | { -9.9314877404787089e-03, 100.0000000000000000, 2700.0000000000000000, 0.0 }, |
| 772 | { -1.4534495161704743e-02, 100.0000000000000000, 2800.0000000000000000, 0.0 }, |
| 773 | { -1.4059273497237509e-02, 100.0000000000000000, 2900.0000000000000000, 0.0 }, |
| 774 | { -8.9385158149605185e-03, 100.0000000000000000, 3000.0000000000000000, 0.0 }, |
| 775 | }; |
| 776 | const double toler029 = 1.0000000000000006e-10; |
| 777 | |
| 778 | template<typename Ret, unsigned int Num> |
| 779 | void |
| 780 | test(const testcase_cyl_neumann<Ret> (&data)[Num], Ret toler) |
| 781 | { |
| 782 | bool test __attribute__((unused)) = true; |
| 783 | const Ret eps = std::numeric_limits<Ret>::epsilon(); |
| 784 | Ret max_abs_diff = -Ret(1); |
| 785 | Ret max_abs_frac = -Ret(1); |
| 786 | unsigned int num_datum = Num; |
| 787 | for (unsigned int i = 0; i < num_datum; ++i) |
| 788 | { |
| 789 | const Ret f = std::cyl_neumann(data[i].nu, data[i].x); |
| 790 | const Ret f0 = data[i].f0; |
| 791 | const Ret diff = f - f0; |
| 792 | if (std::abs(diff) > max_abs_diff) |
| 793 | max_abs_diff = std::abs(diff); |
| 794 | if (std::abs(f0) > Ret(10) * eps |
| 795 | && std::abs(f) > Ret(10) * eps) |
| 796 | { |
| 797 | const Ret frac = diff / f0; |
| 798 | if (std::abs(frac) > max_abs_frac) |
| 799 | max_abs_frac = std::abs(frac); |
| 800 | } |
| 801 | } |
| 802 | VERIFY(max_abs_frac < toler); |
| 803 | } |
| 804 | |
| 805 | int |
| 806 | main() |
| 807 | { |
| 808 | test(data007, toler007); |
| 809 | test(data008, toler008); |
| 810 | test(data009, toler009); |
| 811 | test(data010, toler010); |
| 812 | test(data011, toler011); |
| 813 | test(data012, toler012); |
| 814 | test(data013, toler013); |
| 815 | test(data014, toler014); |
| 816 | test(data015, toler015); |
| 817 | test(data016, toler016); |
| 818 | test(data017, toler017); |
| 819 | test(data018, toler018); |
| 820 | test(data019, toler019); |
| 821 | test(data020, toler020); |
| 822 | test(data021, toler021); |
| 823 | test(data022, toler022); |
| 824 | test(data023, toler023); |
| 825 | test(data024, toler024); |
| 826 | test(data025, toler025); |
| 827 | test(data026, toler026); |
| 828 | test(data027, toler027); |
| 829 | test(data028, toler028); |
| 830 | test(data029, toler029); |
| 831 | return 0; |
| 832 | } |