]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
4 | <title>Modified Bessel Functions of the First and Second Kinds</title> | |
5 | <link rel="stylesheet" href="../../math.css" type="text/css"> | |
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.77.1"> | |
7 | <link rel="home" href="../../index.html" title="Math Toolkit 2.5.1"> | |
8 | <link rel="up" href="../bessel.html" title="Bessel Functions"> | |
9 | <link rel="prev" href="bessel_root.html" title="Finding Zeros of Bessel Functions of the First and Second Kinds"> | |
10 | <link rel="next" href="sph_bessel.html" title="Spherical Bessel Functions of the First and Second Kinds"> | |
11 | </head> | |
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
13 | <table cellpadding="2" width="100%"><tr> | |
14 | <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> | |
15 | <td align="center"><a href="../../../../../../index.html">Home</a></td> | |
16 | <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> | |
17 | <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> | |
18 | <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> | |
19 | <td align="center"><a href="../../../../../../more/index.htm">More</a></td> | |
20 | </tr></table> | |
21 | <hr> | |
22 | <div class="spirit-nav"> | |
23 | <a accesskey="p" href="bessel_root.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../bessel.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sph_bessel.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> | |
24 | </div> | |
25 | <div class="section"> | |
26 | <div class="titlepage"><div><div><h3 class="title"> | |
27 | <a name="math_toolkit.bessel.mbessel"></a><a class="link" href="mbessel.html" title="Modified Bessel Functions of the First and Second Kinds">Modified Bessel Functions | |
28 | of the First and Second Kinds</a> | |
29 | </h3></div></div></div> | |
30 | <h5> | |
31 | <a name="math_toolkit.bessel.mbessel.h0"></a> | |
32 | <span class="phrase"><a name="math_toolkit.bessel.mbessel.synopsis"></a></span><a class="link" href="mbessel.html#math_toolkit.bessel.mbessel.synopsis">Synopsis</a> | |
33 | </h5> | |
34 | <p> | |
35 | <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">bessel</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> | |
36 | </p> | |
37 | <pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">></span> | |
38 | <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_i</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">);</span> | |
39 | ||
40 | <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> | |
41 | <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_i</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> | |
42 | ||
43 | <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">></span> | |
44 | <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_k</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">);</span> | |
45 | ||
46 | <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> | |
47 | <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_k</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> | |
48 | </pre> | |
49 | <h5> | |
50 | <a name="math_toolkit.bessel.mbessel.h1"></a> | |
51 | <span class="phrase"><a name="math_toolkit.bessel.mbessel.description"></a></span><a class="link" href="mbessel.html#math_toolkit.bessel.mbessel.description">Description</a> | |
52 | </h5> | |
53 | <p> | |
54 | The functions <a class="link" href="mbessel.html" title="Modified Bessel Functions of the First and Second Kinds">cyl_bessel_i</a> | |
55 | and <a class="link" href="mbessel.html" title="Modified Bessel Functions of the First and Second Kinds">cyl_bessel_k</a> return | |
56 | the result of the modified Bessel functions of the first and second kind | |
57 | respectively: | |
58 | </p> | |
59 | <p> | |
60 | cyl_bessel_i(v, x) = I<sub>v</sub>(x) | |
61 | </p> | |
62 | <p> | |
63 | cyl_bessel_k(v, x) = K<sub>v</sub>(x) | |
64 | </p> | |
65 | <p> | |
66 | where: | |
67 | </p> | |
68 | <p> | |
69 | <span class="inlinemediaobject"><img src="../../../equations/mbessel2.svg"></span> | |
70 | </p> | |
71 | <p> | |
72 | <span class="inlinemediaobject"><img src="../../../equations/mbessel3.svg"></span> | |
73 | </p> | |
74 | <p> | |
75 | The return type of these functions is computed using the <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>result | |
76 | type calculation rules</em></span></a> when T1 and T2 are different types. | |
77 | The functions are also optimised for the relatively common case that T1 is | |
78 | an integer. | |
79 | </p> | |
80 | <p> | |
81 | The final <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can | |
82 | be used to control the behaviour of the function: how it handles errors, | |
83 | what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">policy | |
84 | documentation for more details</a>. | |
85 | </p> | |
86 | <p> | |
87 | The functions return the result of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a> | |
88 | whenever the result is undefined or complex. For <a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_bessel_j</a> | |
89 | this occurs when <code class="computeroutput"><span class="identifier">x</span> <span class="special"><</span> | |
90 | <span class="number">0</span></code> and v is not an integer, or when | |
91 | <code class="computeroutput"><span class="identifier">x</span> <span class="special">==</span> | |
92 | <span class="number">0</span></code> and <code class="computeroutput"><span class="identifier">v</span> | |
93 | <span class="special">!=</span> <span class="number">0</span></code>. | |
94 | For <a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a> this | |
95 | occurs when <code class="computeroutput"><span class="identifier">x</span> <span class="special"><=</span> | |
96 | <span class="number">0</span></code>. | |
97 | </p> | |
98 | <p> | |
99 | The following graph illustrates the exponential behaviour of I<sub>v</sub>. | |
100 | </p> | |
101 | <p> | |
102 | <span class="inlinemediaobject"><img src="../../../graphs/cyl_bessel_i.svg" align="middle"></span> | |
103 | </p> | |
104 | <p> | |
105 | The following graph illustrates the exponential decay of K<sub>v</sub>. | |
106 | </p> | |
107 | <p> | |
108 | <span class="inlinemediaobject"><img src="../../../graphs/cyl_bessel_k.svg" align="middle"></span> | |
109 | </p> | |
110 | <h5> | |
111 | <a name="math_toolkit.bessel.mbessel.h2"></a> | |
112 | <span class="phrase"><a name="math_toolkit.bessel.mbessel.testing"></a></span><a class="link" href="mbessel.html#math_toolkit.bessel.mbessel.testing">Testing</a> | |
113 | </h5> | |
114 | <p> | |
115 | There are two sets of test values: spot values calculated using <a href="http://functions.wolfram.com" target="_top">functions.wolfram.com</a>, | |
116 | and a much larger set of tests computed using a simplified version of this | |
117 | implementation (with all the special case handling removed). | |
118 | </p> | |
119 | <h5> | |
120 | <a name="math_toolkit.bessel.mbessel.h3"></a> | |
121 | <span class="phrase"><a name="math_toolkit.bessel.mbessel.accuracy"></a></span><a class="link" href="mbessel.html#math_toolkit.bessel.mbessel.accuracy">Accuracy</a> | |
122 | </h5> | |
123 | <p> | |
124 | The following tables show how the accuracy of these functions varies on various | |
125 | platforms, along with comparison to other libraries. Note that only results | |
126 | for the widest floating-point type on the system are given, as narrower types | |
127 | have <a class="link" href="../relative_error.html#math_toolkit.relative_error.zero_error">effectively zero | |
128 | error</a>. All values are relative errors in units of epsilon. Note that | |
129 | our test suite includes some fairly extreme inputs which results in most | |
130 | of the worst problem cases in other libraries: | |
131 | </p> | |
132 | <div class="table"> | |
133 | <a name="math_toolkit.bessel.mbessel.table_cyl_bessel_i_integer_orders_"></a><p class="title"><b>Table 6.44. Error rates for cyl_bessel_i (integer orders)</b></p> | |
134 | <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_i (integer orders)"> | |
135 | <colgroup> | |
136 | <col> | |
137 | <col> | |
138 | <col> | |
139 | <col> | |
140 | <col> | |
141 | </colgroup> | |
142 | <thead><tr> | |
143 | <th> | |
144 | </th> | |
145 | <th> | |
146 | <p> | |
147 | Microsoft Visual C++ version 12.0<br> Win32<br> double | |
148 | </p> | |
149 | </th> | |
150 | <th> | |
151 | <p> | |
152 | GNU C++ version 5.1.0<br> linux<br> long double | |
153 | </p> | |
154 | </th> | |
155 | <th> | |
156 | <p> | |
157 | GNU C++ version 5.1.0<br> linux<br> double | |
158 | </p> | |
159 | </th> | |
160 | <th> | |
161 | <p> | |
162 | Sun compiler version 0x5130<br> Sun Solaris<br> long double | |
163 | </p> | |
164 | </th> | |
165 | </tr></thead> | |
166 | <tbody> | |
167 | <tr> | |
168 | <td> | |
169 | <p> | |
170 | Bessel I0: Mathworld Data (Integer Version) | |
171 | </p> | |
172 | </td> | |
173 | <td> | |
174 | <p> | |
175 | <span class="blue">Max = 0.877ε (Mean = 0.549ε)</span> | |
176 | </p> | |
177 | </td> | |
178 | <td> | |
179 | <p> | |
180 | <span class="blue">Max = 4.57ε (Mean = 2.1ε)</span><br> <br> | |
181 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 8.49ε (Mean = 3.46ε) | |
182 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i_integer_orders___tr1_cmath__Bessel_I0_Mathworld_Data_Integer_Version_">And | |
183 | other failures.</a>) | |
184 | </p> | |
185 | </td> | |
186 | <td> | |
187 | <p> | |
188 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
189 | 1.16:</em></span> Max = 0.79ε (Mean = 0.482ε))<br> (<span class="emphasis"><em>Rmath | |
190 | 3.0.2:</em></span> <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Rmath_3_0_2_Bessel_I0_Mathworld_Data_Integer_Version_">And | |
191 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
192 | <span class="red">Max = 2.55e+43ε (Mean = 8.06e+42ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Cephes_Bessel_I0_Mathworld_Data_Integer_Version_">And | |
193 | other failures.</a>)</span> | |
194 | </p> | |
195 | </td> | |
196 | <td> | |
197 | <p> | |
198 | <span class="blue">Max = 4.54ε (Mean = 2.11ε)</span> | |
199 | </p> | |
200 | </td> | |
201 | </tr> | |
202 | <tr> | |
203 | <td> | |
204 | <p> | |
205 | Bessel I1: Mathworld Data (Integer Version) | |
206 | </p> | |
207 | </td> | |
208 | <td> | |
209 | <p> | |
210 | <span class="blue">Max = 0.885ε (Mean = 0.55ε)</span> | |
211 | </p> | |
212 | </td> | |
213 | <td> | |
214 | <p> | |
215 | <span class="blue">Max = 7.83ε (Mean = 2.79ε)</span><br> <br> | |
216 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 5ε (Mean = 2.15ε) | |
217 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i_integer_orders___tr1_cmath__Bessel_I1_Mathworld_Data_Integer_Version_">And | |
218 | other failures.</a>) | |
219 | </p> | |
220 | </td> | |
221 | <td> | |
222 | <p> | |
223 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
224 | 1.16:</em></span> Max = 0.82ε (Mean = 0.456ε))<br> (<span class="emphasis"><em>Rmath | |
225 | 3.0.2:</em></span> <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Rmath_3_0_2_Bessel_I1_Mathworld_Data_Integer_Version_">And | |
226 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
227 | <span class="red">Max = 1.28e+43ε (Mean = 4.05e+42ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Cephes_Bessel_I1_Mathworld_Data_Integer_Version_">And | |
228 | other failures.</a>)</span> | |
229 | </p> | |
230 | </td> | |
231 | <td> | |
232 | <p> | |
233 | <span class="blue">Max = 6.52ε (Mean = 2.25ε)</span> | |
234 | </p> | |
235 | </td> | |
236 | </tr> | |
237 | <tr> | |
238 | <td> | |
239 | <p> | |
240 | Bessel In: Mathworld Data (Integer Version) | |
241 | </p> | |
242 | </td> | |
243 | <td> | |
244 | <p> | |
245 | <span class="blue">Max = 3.46ε (Mean = 1.32ε)</span> | |
246 | </p> | |
247 | </td> | |
248 | <td> | |
249 | <p> | |
250 | <span class="blue">Max = 1.8ε (Mean = 1.33ε)</span><br> <br> | |
251 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 430ε (Mean = 163ε) | |
252 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i_integer_orders___tr1_cmath__Bessel_In_Mathworld_Data_Integer_Version_">And | |
253 | other failures.</a>) | |
254 | </p> | |
255 | </td> | |
256 | <td> | |
257 | <p> | |
258 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
259 | 1.16:</em></span> Max = 5.15ε (Mean = 2.13ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__GSL_1_16_Bessel_In_Mathworld_Data_Integer_Version_">And | |
260 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
261 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Rmath_3_0_2_Bessel_In_Mathworld_Data_Integer_Version_">And | |
262 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
263 | <span class="red">Max = 3.67e+177ε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_integer_orders__Cephes_Bessel_In_Mathworld_Data_Integer_Version_">And | |
264 | other failures.</a>)</span> | |
265 | </p> | |
266 | </td> | |
267 | <td> | |
268 | <p> | |
269 | <span class="blue">Max = 463ε (Mean = 140ε)</span> | |
270 | </p> | |
271 | </td> | |
272 | </tr> | |
273 | </tbody> | |
274 | </table></div> | |
275 | </div> | |
276 | <br class="table-break"><div class="table"> | |
277 | <a name="math_toolkit.bessel.mbessel.table_cyl_bessel_i"></a><p class="title"><b>Table 6.45. Error rates for cyl_bessel_i</b></p> | |
278 | <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_i"> | |
279 | <colgroup> | |
280 | <col> | |
281 | <col> | |
282 | <col> | |
283 | <col> | |
284 | <col> | |
285 | </colgroup> | |
286 | <thead><tr> | |
287 | <th> | |
288 | </th> | |
289 | <th> | |
290 | <p> | |
291 | Microsoft Visual C++ version 12.0<br> Win32<br> double | |
292 | </p> | |
293 | </th> | |
294 | <th> | |
295 | <p> | |
296 | GNU C++ version 5.1.0<br> linux<br> long double | |
297 | </p> | |
298 | </th> | |
299 | <th> | |
300 | <p> | |
301 | GNU C++ version 5.1.0<br> linux<br> double | |
302 | </p> | |
303 | </th> | |
304 | <th> | |
305 | <p> | |
306 | Sun compiler version 0x5130<br> Sun Solaris<br> long double | |
307 | </p> | |
308 | </th> | |
309 | </tr></thead> | |
310 | <tbody> | |
311 | <tr> | |
312 | <td> | |
313 | <p> | |
314 | Bessel I0: Mathworld Data | |
315 | </p> | |
316 | </td> | |
317 | <td> | |
318 | <p> | |
319 | <span class="blue">Max = 0.877ε (Mean = 0.549ε)</span> | |
320 | </p> | |
321 | </td> | |
322 | <td> | |
323 | <p> | |
324 | <span class="blue">Max = 4.57ε (Mean = 2.1ε)</span><br> <br> | |
325 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 8.49ε (Mean = 3.46ε) | |
326 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_I0_Mathworld_Data">And | |
327 | other failures.</a>) | |
328 | </p> | |
329 | </td> | |
330 | <td> | |
331 | <p> | |
332 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
333 | 1.16:</em></span> Max = 270ε (Mean = 91.6ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_I0_Mathworld_Data">And | |
334 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
335 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Rmath_3_0_2_Bessel_I0_Mathworld_Data">And | |
336 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
337 | <span class="red">Max = 2.55e+43ε (Mean = 8.06e+42ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Cephes_Bessel_I0_Mathworld_Data">And | |
338 | other failures.</a>)</span> | |
339 | </p> | |
340 | </td> | |
341 | <td> | |
342 | <p> | |
343 | <span class="blue">Max = 4.54ε (Mean = 2.11ε)</span> | |
344 | </p> | |
345 | </td> | |
346 | </tr> | |
347 | <tr> | |
348 | <td> | |
349 | <p> | |
350 | Bessel I1: Mathworld Data | |
351 | </p> | |
352 | </td> | |
353 | <td> | |
354 | <p> | |
355 | <span class="blue">Max = 0.885ε (Mean = 0.55ε)</span> | |
356 | </p> | |
357 | </td> | |
358 | <td> | |
359 | <p> | |
360 | <span class="blue">Max = 7.83ε (Mean = 2.79ε)</span><br> <br> | |
361 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 5ε (Mean = 2.15ε) | |
362 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_I1_Mathworld_Data">And | |
363 | other failures.</a>) | |
364 | </p> | |
365 | </td> | |
366 | <td> | |
367 | <p> | |
368 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
369 | 1.16:</em></span> Max = 128ε (Mean = 41ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_I1_Mathworld_Data">And | |
370 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
371 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Rmath_3_0_2_Bessel_I1_Mathworld_Data">And | |
372 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
373 | <span class="red">Max = 1.28e+43ε (Mean = 4.05e+42ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Cephes_Bessel_I1_Mathworld_Data">And | |
374 | other failures.</a>)</span> | |
375 | </p> | |
376 | </td> | |
377 | <td> | |
378 | <p> | |
379 | <span class="blue">Max = 6.52ε (Mean = 2.25ε)</span> | |
380 | </p> | |
381 | </td> | |
382 | </tr> | |
383 | <tr> | |
384 | <td> | |
385 | <p> | |
386 | Bessel In: Mathworld Data | |
387 | </p> | |
388 | </td> | |
389 | <td> | |
390 | <p> | |
391 | <span class="blue">Max = 3.46ε (Mean = 1.32ε)</span> | |
392 | </p> | |
393 | </td> | |
394 | <td> | |
395 | <p> | |
396 | <span class="blue">Max = 1.8ε (Mean = 1.33ε)</span><br> <br> | |
397 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 430ε (Mean = 163ε) | |
398 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_In_Mathworld_Data">And | |
399 | other failures.</a>) | |
400 | </p> | |
401 | </td> | |
402 | <td> | |
403 | <p> | |
404 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
405 | 1.16:</em></span> Max = 2.31ε (Mean = 0.838ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_In_Mathworld_Data">And | |
406 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
407 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Rmath_3_0_2_Bessel_In_Mathworld_Data">And | |
408 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
409 | <span class="red">Max = 3.67e+177ε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Cephes_Bessel_In_Mathworld_Data">And | |
410 | other failures.</a>)</span> | |
411 | </p> | |
412 | </td> | |
413 | <td> | |
414 | <p> | |
415 | <span class="blue">Max = 463ε (Mean = 140ε)</span> | |
416 | </p> | |
417 | </td> | |
418 | </tr> | |
419 | <tr> | |
420 | <td> | |
421 | <p> | |
422 | Bessel Iv: Mathworld Data | |
423 | </p> | |
424 | </td> | |
425 | <td> | |
426 | <p> | |
427 | <span class="blue">Max = 2.97ε (Mean = 1.33ε)</span> | |
428 | </p> | |
429 | </td> | |
430 | <td> | |
431 | <p> | |
432 | <span class="blue">Max = 4.12ε (Mean = 1.85ε)</span><br> <br> | |
433 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 616ε (Mean = 221ε) | |
434 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_Iv_Mathworld_Data">And | |
435 | other failures.</a>) | |
436 | </p> | |
437 | </td> | |
438 | <td> | |
439 | <p> | |
440 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
441 | 1.16:</em></span> Max = 5.95ε (Mean = 2.08ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_Iv_Mathworld_Data">And | |
442 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
443 | Max = 1e+04ε (Mean = 3.18e+03ε))<br> (<span class="emphasis"><em>Cephes:</em></span> | |
444 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Cephes_Bessel_Iv_Mathworld_Data">And | |
445 | other failures.</a>)</span> | |
446 | </p> | |
447 | </td> | |
448 | <td> | |
449 | <p> | |
450 | <span class="blue">Max = 4.12ε (Mean = 1.95ε)</span> | |
451 | </p> | |
452 | </td> | |
453 | </tr> | |
454 | <tr> | |
455 | <td> | |
456 | <p> | |
457 | Bessel In: Random Data | |
458 | </p> | |
459 | </td> | |
460 | <td> | |
461 | <p> | |
462 | <span class="blue">Max = 9.67ε (Mean = 1.89ε)</span> | |
463 | </p> | |
464 | </td> | |
465 | <td> | |
466 | <p> | |
467 | <span class="blue">Max = 6.79ε (Mean = 1.15ε)</span><br> <br> | |
468 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 645ε (Mean = 132ε)) | |
469 | </p> | |
470 | </td> | |
471 | <td> | |
472 | <p> | |
473 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
474 | 1.16:</em></span> Max = 261ε (Mean = 53.2ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_In_Random_Data">And | |
475 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
476 | Max = 7.37ε (Mean = 2.4ε))<br> (<span class="emphasis"><em>Cephes:</em></span> Max | |
477 | = 4.22e+06ε (Mean = 2.26e+05ε)) | |
478 | </p> | |
479 | </td> | |
480 | <td> | |
481 | <p> | |
482 | <span class="blue">Max = 176ε (Mean = 39.2ε)</span> | |
483 | </p> | |
484 | </td> | |
485 | </tr> | |
486 | <tr> | |
487 | <td> | |
488 | <p> | |
489 | Bessel Iv: Random Data | |
490 | </p> | |
491 | </td> | |
492 | <td> | |
493 | <p> | |
494 | <span class="blue">Max = 7.46ε (Mean = 1.54ε)</span> | |
495 | </p> | |
496 | </td> | |
497 | <td> | |
498 | <p> | |
499 | <span class="blue">Max = 8.35ε (Mean = 1.49ε)</span><br> <br> | |
500 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 1.05e+03ε (Mean = | |
501 | 224ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_Iv_Random_Data">And | |
502 | other failures.</a>) | |
503 | </p> | |
504 | </td> | |
505 | <td> | |
506 | <p> | |
507 | <span class="blue">Max = 0.661ε (Mean = 0.0441ε)</span><br> | |
508 | <br> (<span class="emphasis"><em>GSL 1.16:</em></span> Max = 6.18e+03ε (Mean = 1.55e+03ε) | |
509 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_Iv_Random_Data">And | |
510 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
511 | <span class="red">Max = 4.28e+08ε (Mean = 2.85e+07ε))</span><br> | |
512 | (<span class="emphasis"><em>Cephes:</em></span> <span class="red">Max = 6e+30ε (Mean | |
513 | = 4e+29ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Cephes_Bessel_Iv_Random_Data">And | |
514 | other failures.</a>)</span> | |
515 | </p> | |
516 | </td> | |
517 | <td> | |
518 | <p> | |
519 | <span class="blue">Max = 283ε (Mean = 88.4ε)</span> | |
520 | </p> | |
521 | </td> | |
522 | </tr> | |
523 | <tr> | |
524 | <td> | |
525 | <p> | |
526 | Bessel Iv: Mathworld Data (large values) | |
527 | </p> | |
528 | </td> | |
529 | <td> | |
530 | <p> | |
531 | <span class="blue">Max = 3.67ε (Mean = 1.64ε)</span> | |
532 | </p> | |
533 | </td> | |
534 | <td> | |
535 | <p> | |
536 | <span class="blue">Max = 14.7ε (Mean = 6.57ε)</span><br> <br> | |
537 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 118ε (Mean = 57.2ε) | |
538 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_i__tr1_cmath__Bessel_Iv_Mathworld_Data_large_values_">And | |
539 | other failures.</a>) | |
540 | </p> | |
541 | </td> | |
542 | <td> | |
543 | <p> | |
544 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
545 | 1.16:</em></span> Max = 37ε (Mean = 18ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_GSL_1_16_Bessel_Iv_Mathworld_Data_large_values_">And | |
546 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
547 | <span class="red">Max = 3.77e+168ε (Mean = 2.39e+168ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_i_Rmath_3_0_2_Bessel_Iv_Mathworld_Data_large_values_">And | |
548 | other failures.</a>)</span><br> (<span class="emphasis"><em>Cephes:</em></span> | |
549 | Max = 73.7ε (Mean = 58.5ε)) | |
550 | </p> | |
551 | </td> | |
552 | <td> | |
553 | <p> | |
554 | <span class="blue">Max = 14.7ε (Mean = 6.59ε)</span> | |
555 | </p> | |
556 | </td> | |
557 | </tr> | |
558 | </tbody> | |
559 | </table></div> | |
560 | </div> | |
561 | <br class="table-break"><div class="table"> | |
562 | <a name="math_toolkit.bessel.mbessel.table_cyl_bessel_k_integer_orders_"></a><p class="title"><b>Table 6.46. Error rates for cyl_bessel_k (integer orders)</b></p> | |
563 | <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_k (integer orders)"> | |
564 | <colgroup> | |
565 | <col> | |
566 | <col> | |
567 | <col> | |
568 | <col> | |
569 | <col> | |
570 | </colgroup> | |
571 | <thead><tr> | |
572 | <th> | |
573 | </th> | |
574 | <th> | |
575 | <p> | |
576 | Microsoft Visual C++ version 12.0<br> Win32<br> double | |
577 | </p> | |
578 | </th> | |
579 | <th> | |
580 | <p> | |
581 | GNU C++ version 5.1.0<br> linux<br> long double | |
582 | </p> | |
583 | </th> | |
584 | <th> | |
585 | <p> | |
586 | GNU C++ version 5.1.0<br> linux<br> double | |
587 | </p> | |
588 | </th> | |
589 | <th> | |
590 | <p> | |
591 | Sun compiler version 0x5130<br> Sun Solaris<br> long double | |
592 | </p> | |
593 | </th> | |
594 | </tr></thead> | |
595 | <tbody> | |
596 | <tr> | |
597 | <td> | |
598 | <p> | |
599 | Bessel K0: Mathworld Data (Integer Version) | |
600 | </p> | |
601 | </td> | |
602 | <td> | |
603 | <p> | |
604 | <span class="blue">Max = 1.55ε (Mean = 0.837ε)</span> | |
605 | </p> | |
606 | </td> | |
607 | <td> | |
608 | <p> | |
609 | <span class="blue">Max = 4.16ε (Mean = 1.46ε)</span><br> <br> | |
610 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 9.33ε (Mean = 3.25ε)) | |
611 | </p> | |
612 | </td> | |
613 | <td> | |
614 | <p> | |
615 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
616 | 1.16:</em></span> Max = 1.2ε (Mean = 0.733ε))<br> (<span class="emphasis"><em>Rmath | |
617 | 3.0.2:</em></span> Max = 0.833ε (Mean = 0.601ε))<br> (<span class="emphasis"><em>Cephes:</em></span> | |
618 | Max = 1.1e+06ε (Mean = 3.68e+05ε)) | |
619 | </p> | |
620 | </td> | |
621 | <td> | |
622 | <p> | |
623 | <span class="blue">Max = 4.16ε (Mean = 1.49ε)</span> | |
624 | </p> | |
625 | </td> | |
626 | </tr> | |
627 | <tr> | |
628 | <td> | |
629 | <p> | |
630 | Bessel K1: Mathworld Data (Integer Version) | |
631 | </p> | |
632 | </td> | |
633 | <td> | |
634 | <p> | |
635 | <span class="blue">Max = 1ε (Mean = 0.573ε)</span> | |
636 | </p> | |
637 | </td> | |
638 | <td> | |
639 | <p> | |
640 | <span class="blue">Max = 1.8ε (Mean = 1.02ε)</span><br> <br> | |
641 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 8.94ε (Mean = 3.19ε)) | |
642 | </p> | |
643 | </td> | |
644 | <td> | |
645 | <p> | |
646 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
647 | 1.16:</em></span> Max = 0.626ε (Mean = 0.333ε))<br> (<span class="emphasis"><em>Rmath | |
648 | 3.0.2:</em></span> Max = 0.894ε (Mean = 0.516ε))<br> (<span class="emphasis"><em>Cephes:</em></span> | |
649 | Max = 5.38e+05ε (Mean = 1.79e+05ε)) | |
650 | </p> | |
651 | </td> | |
652 | <td> | |
653 | <p> | |
654 | <span class="blue">Max = 1.8ε (Mean = 1.02ε)</span> | |
655 | </p> | |
656 | </td> | |
657 | </tr> | |
658 | <tr> | |
659 | <td> | |
660 | <p> | |
661 | Bessel Kn: Mathworld Data (Integer Version) | |
662 | </p> | |
663 | </td> | |
664 | <td> | |
665 | <p> | |
666 | <span class="blue">Max = 3.63ε (Mean = 1.46ε)</span> | |
667 | </p> | |
668 | </td> | |
669 | <td> | |
670 | <p> | |
671 | <span class="blue">Max = 4.48ε (Mean = 2.14ε)</span><br> <br> | |
672 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 12.9ε (Mean = 4.91ε) | |
673 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_k_integer_orders___tr1_cmath__Bessel_Kn_Mathworld_Data_Integer_Version_">And | |
674 | other failures.</a>) | |
675 | </p> | |
676 | </td> | |
677 | <td> | |
678 | <p> | |
679 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
680 | 1.16:</em></span> Max = 168ε (Mean = 59.5ε))<br> (<span class="emphasis"><em>Rmath | |
681 | 3.0.2:</em></span> Max = 8.48ε (Mean = 2.98ε))<br> (<span class="emphasis"><em>Cephes:</em></span> | |
682 | <span class="red">Max = +INFε (Mean = +INFε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_integer_orders__Cephes_Bessel_Kn_Mathworld_Data_Integer_Version_">And | |
683 | other failures.</a>)</span> | |
684 | </p> | |
685 | </td> | |
686 | <td> | |
687 | <p> | |
688 | <span class="blue">Max = 4.48ε (Mean = 1.98ε)</span> | |
689 | </p> | |
690 | </td> | |
691 | </tr> | |
692 | </tbody> | |
693 | </table></div> | |
694 | </div> | |
695 | <br class="table-break"><div class="table"> | |
696 | <a name="math_toolkit.bessel.mbessel.table_cyl_bessel_k"></a><p class="title"><b>Table 6.47. Error rates for cyl_bessel_k</b></p> | |
697 | <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_k"> | |
698 | <colgroup> | |
699 | <col> | |
700 | <col> | |
701 | <col> | |
702 | <col> | |
703 | <col> | |
704 | </colgroup> | |
705 | <thead><tr> | |
706 | <th> | |
707 | </th> | |
708 | <th> | |
709 | <p> | |
710 | Microsoft Visual C++ version 12.0<br> Win32<br> double | |
711 | </p> | |
712 | </th> | |
713 | <th> | |
714 | <p> | |
715 | GNU C++ version 5.1.0<br> linux<br> long double | |
716 | </p> | |
717 | </th> | |
718 | <th> | |
719 | <p> | |
720 | GNU C++ version 5.1.0<br> linux<br> double | |
721 | </p> | |
722 | </th> | |
723 | <th> | |
724 | <p> | |
725 | Sun compiler version 0x5130<br> Sun Solaris<br> long double | |
726 | </p> | |
727 | </th> | |
728 | </tr></thead> | |
729 | <tbody> | |
730 | <tr> | |
731 | <td> | |
732 | <p> | |
733 | Bessel K0: Mathworld Data | |
734 | </p> | |
735 | </td> | |
736 | <td> | |
737 | <p> | |
738 | <span class="blue">Max = 1.55ε (Mean = 0.837ε)</span> | |
739 | </p> | |
740 | </td> | |
741 | <td> | |
742 | <p> | |
743 | <span class="blue">Max = 4.16ε (Mean = 1.46ε)</span><br> <br> | |
744 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 9.33ε (Mean = 3.25ε)) | |
745 | </p> | |
746 | </td> | |
747 | <td> | |
748 | <p> | |
749 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
750 | 1.16:</em></span> Max = 6.04ε (Mean = 2.16ε))<br> (<span class="emphasis"><em>Rmath | |
751 | 3.0.2:</em></span> Max = 0.833ε (Mean = 0.601ε)) | |
752 | </p> | |
753 | </td> | |
754 | <td> | |
755 | <p> | |
756 | <span class="blue">Max = 4.16ε (Mean = 1.49ε)</span> | |
757 | </p> | |
758 | </td> | |
759 | </tr> | |
760 | <tr> | |
761 | <td> | |
762 | <p> | |
763 | Bessel K1: Mathworld Data | |
764 | </p> | |
765 | </td> | |
766 | <td> | |
767 | <p> | |
768 | <span class="blue">Max = 1ε (Mean = 0.573ε)</span> | |
769 | </p> | |
770 | </td> | |
771 | <td> | |
772 | <p> | |
773 | <span class="blue">Max = 1.8ε (Mean = 1.02ε)</span><br> <br> | |
774 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 8.94ε (Mean = 3.19ε)) | |
775 | </p> | |
776 | </td> | |
777 | <td> | |
778 | <p> | |
779 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
780 | 1.16:</em></span> Max = 6.26ε (Mean = 2.21ε))<br> (<span class="emphasis"><em>Rmath | |
781 | 3.0.2:</em></span> Max = 0.894ε (Mean = 0.516ε)) | |
782 | </p> | |
783 | </td> | |
784 | <td> | |
785 | <p> | |
786 | <span class="blue">Max = 1.8ε (Mean = 1.02ε)</span> | |
787 | </p> | |
788 | </td> | |
789 | </tr> | |
790 | <tr> | |
791 | <td> | |
792 | <p> | |
793 | Bessel Kn: Mathworld Data | |
794 | </p> | |
795 | </td> | |
796 | <td> | |
797 | <p> | |
798 | <span class="blue">Max = 3.63ε (Mean = 1.46ε)</span> | |
799 | </p> | |
800 | </td> | |
801 | <td> | |
802 | <p> | |
803 | <span class="blue">Max = 4.48ε (Mean = 2.14ε)</span><br> <br> | |
804 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 12.9ε (Mean = 4.91ε) | |
805 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_k__tr1_cmath__Bessel_Kn_Mathworld_Data">And | |
806 | other failures.</a>) | |
807 | </p> | |
808 | </td> | |
809 | <td> | |
810 | <p> | |
811 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
812 | 1.16:</em></span> Max = 3.36ε (Mean = 1.43ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_GSL_1_16_Bessel_Kn_Mathworld_Data">And | |
813 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
814 | Max = 8.48ε (Mean = 2.98ε)) | |
815 | </p> | |
816 | </td> | |
817 | <td> | |
818 | <p> | |
819 | <span class="blue">Max = 4.48ε (Mean = 1.98ε)</span> | |
820 | </p> | |
821 | </td> | |
822 | </tr> | |
823 | <tr> | |
824 | <td> | |
825 | <p> | |
826 | Bessel Kv: Mathworld Data | |
827 | </p> | |
828 | </td> | |
829 | <td> | |
830 | <p> | |
831 | <span class="blue">Max = 4.78ε (Mean = 2.2ε)</span> | |
832 | </p> | |
833 | </td> | |
834 | <td> | |
835 | <p> | |
836 | <span class="blue">Max = 3.58ε (Mean = 2.44ε)</span><br> <br> | |
837 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 13ε (Mean = 4.81ε) | |
838 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_k__tr1_cmath__Bessel_Kv_Mathworld_Data">And | |
839 | other failures.</a>) | |
840 | </p> | |
841 | </td> | |
842 | <td> | |
843 | <p> | |
844 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
845 | 1.16:</em></span> Max = 5.47ε (Mean = 2.04ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_GSL_1_16_Bessel_Kv_Mathworld_Data">And | |
846 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
847 | Max = 3.15ε (Mean = 1.35ε)) | |
848 | </p> | |
849 | </td> | |
850 | <td> | |
851 | <p> | |
852 | <span class="blue">Max = 3.58ε (Mean = 2.29ε)</span> | |
853 | </p> | |
854 | </td> | |
855 | </tr> | |
856 | <tr> | |
857 | <td> | |
858 | <p> | |
859 | Bessel Kv: Mathworld Data (large values) | |
860 | </p> | |
861 | </td> | |
862 | <td> | |
863 | <p> | |
864 | <span class="blue">Max = 59.8ε (Mean = 26.9ε)</span> | |
865 | </p> | |
866 | </td> | |
867 | <td> | |
868 | <p> | |
869 | <span class="blue">Max = 42.3ε (Mean = 21ε)</span><br> <br> | |
870 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 42.3ε (Mean = 19.8ε) | |
871 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_k__tr1_cmath__Bessel_Kv_Mathworld_Data_large_values_">And | |
872 | other failures.</a>) | |
873 | </p> | |
874 | </td> | |
875 | <td> | |
876 | <p> | |
877 | <span class="blue">Max = 0ε (Mean = 0ε)</span><br> <br> (<span class="emphasis"><em>GSL | |
878 | 1.16:</em></span> Max = 308ε (Mean = 142ε) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_GSL_1_16_Bessel_Kv_Mathworld_Data_large_values_">And | |
879 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
880 | Max = 84.6ε (Mean = 37.8ε)) | |
881 | </p> | |
882 | </td> | |
883 | <td> | |
884 | <p> | |
885 | <span class="blue">Max = 43.1ε (Mean = 21.3ε)</span> | |
886 | </p> | |
887 | </td> | |
888 | </tr> | |
889 | <tr> | |
890 | <td> | |
891 | <p> | |
892 | Bessel Kn: Random Data | |
893 | </p> | |
894 | </td> | |
895 | <td> | |
896 | <p> | |
897 | <span class="blue">Max = 7.47ε (Mean = 1.4ε)</span> | |
898 | </p> | |
899 | </td> | |
900 | <td> | |
901 | <p> | |
902 | <span class="blue">Max = 4.55ε (Mean = 1.09ε)</span><br> <br> | |
903 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 13.9ε (Mean = 2.91ε)) | |
904 | </p> | |
905 | </td> | |
906 | <td> | |
907 | <p> | |
908 | <span class="blue">Max = 0.764ε (Mean = 0.0348ε)</span><br> | |
909 | <br> (<span class="emphasis"><em>GSL 1.16:</em></span> Max = 8.71ε (Mean = 1.76ε) | |
910 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_GSL_1_16_Bessel_Kn_Random_Data">And | |
911 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
912 | Max = 7.47ε (Mean = 1.34ε)) | |
913 | </p> | |
914 | </td> | |
915 | <td> | |
916 | <p> | |
917 | <span class="blue">Max = 4.55ε (Mean = 1.21ε)</span> | |
918 | </p> | |
919 | </td> | |
920 | </tr> | |
921 | <tr> | |
922 | <td> | |
923 | <p> | |
924 | Bessel Kv: Random Data | |
925 | </p> | |
926 | </td> | |
927 | <td> | |
928 | <p> | |
929 | <span class="blue">Max = 8.33ε (Mean = 1.62ε)</span> | |
930 | </p> | |
931 | </td> | |
932 | <td> | |
933 | <p> | |
934 | <span class="blue">Max = 7.88ε (Mean = 1.48ε)</span><br> <br> | |
935 | (<span class="emphasis"><em><tr1/cmath>:</em></span> Max = 13.6ε (Mean = 2.68ε) | |
936 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_cyl_bessel_k__tr1_cmath__Bessel_Kv_Random_Data">And | |
937 | other failures.</a>) | |
938 | </p> | |
939 | </td> | |
940 | <td> | |
941 | <p> | |
942 | <span class="blue">Max = 0.507ε (Mean = 0.0313ε)</span><br> | |
943 | <br> (<span class="emphasis"><em>GSL 1.16:</em></span> Max = 9.71ε (Mean = 1.47ε) | |
944 | <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_double_cyl_bessel_k_GSL_1_16_Bessel_Kv_Random_Data">And | |
945 | other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.0.2:</em></span> | |
946 | Max = 7.37ε (Mean = 1.49ε)) | |
947 | </p> | |
948 | </td> | |
949 | <td> | |
950 | <p> | |
951 | <span class="blue">Max = 7.88ε (Mean = 1.49ε)</span> | |
952 | </p> | |
953 | </td> | |
954 | </tr> | |
955 | </tbody> | |
956 | </table></div> | |
957 | </div> | |
958 | <br class="table-break"><h5> | |
959 | <a name="math_toolkit.bessel.mbessel.h4"></a> | |
960 | <span class="phrase"><a name="math_toolkit.bessel.mbessel.implementation"></a></span><a class="link" href="mbessel.html#math_toolkit.bessel.mbessel.implementation">Implementation</a> | |
961 | </h5> | |
962 | <p> | |
963 | The following are handled as special cases first: | |
964 | </p> | |
965 | <p> | |
966 | When computing I<sub>v</sub>   for <span class="emphasis"><em>x < 0</em></span>, then ν   must be an integer | |
967 | or a domain error occurs. If ν   is an integer, then the function is odd if ν   is | |
968 | odd and even if ν   is even, and we can reflect to <span class="emphasis"><em>x > 0</em></span>. | |
969 | </p> | |
970 | <p> | |
971 | For I<sub>v</sub>   with v equal to 0, 1 or 0.5 are handled as special cases. | |
972 | </p> | |
973 | <p> | |
974 | The 0 and 1 cases use minimax rational approximations on finite and infinite | |
975 | intervals. The coefficients are from: | |
976 | </p> | |
977 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> | |
978 | <li class="listitem"> | |
979 | J.M. Blair and C.A. Edwards, <span class="emphasis"><em>Stable rational minimax approximations | |
980 | to the modified Bessel functions I_0(x) and I_1(x)</em></span>, Atomic | |
981 | Energy of Canada Limited Report 4928, Chalk River, 1974. | |
982 | </li> | |
983 | <li class="listitem"> | |
984 | S. Moshier, <span class="emphasis"><em>Methods and Programs for Mathematical Functions</em></span>, | |
985 | Ellis Horwood Ltd, Chichester, 1989. | |
986 | </li> | |
987 | </ul></div> | |
988 | <p> | |
989 | While the 0.5 case is a simple trigonometric function: | |
990 | </p> | |
991 | <p> | |
992 | I<sub>0.5</sub>(x) = sqrt(2 / πx) * sinh(x) | |
993 | </p> | |
994 | <p> | |
995 | For K<sub>v</sub>   with <span class="emphasis"><em>v</em></span> an integer, the result is calculated using | |
996 | the recurrence relation: | |
997 | </p> | |
998 | <p> | |
999 | <span class="inlinemediaobject"><img src="../../../equations/mbessel5.svg"></span> | |
1000 | </p> | |
1001 | <p> | |
1002 | starting from K<sub>0</sub>   and K<sub>1</sub>   which are calculated using rational the approximations | |
1003 | above. These rational approximations are accurate to around 19 digits, and | |
1004 | are therefore only used when T has no more than 64 binary digits of precision. | |
1005 | </p> | |
1006 | <p> | |
1007 | When <span class="emphasis"><em>x</em></span> is small compared to <span class="emphasis"><em>v</em></span>, | |
1008 | I<sub>v</sub>x   is best computed directly from the series: | |
1009 | </p> | |
1010 | <p> | |
1011 | <span class="inlinemediaobject"><img src="../../../equations/mbessel17.svg"></span> | |
1012 | </p> | |
1013 | <p> | |
1014 | In the general case, we first normalize ν   to [<code class="literal">0, [inf]</code>) | |
1015 | with the help of the reflection formulae: | |
1016 | </p> | |
1017 | <p> | |
1018 | <span class="inlinemediaobject"><img src="../../../equations/mbessel9.svg"></span> | |
1019 | </p> | |
1020 | <p> | |
1021 | <span class="inlinemediaobject"><img src="../../../equations/mbessel10.svg"></span> | |
1022 | </p> | |
1023 | <p> | |
1024 | Let μ   = ν - floor(ν + 1/2), then μ   is the fractional part of ν   such that |μ| <= 1/2 | |
1025 | (we need this for convergence later). The idea is to calculate K<sub>μ</sub>(x) and K<sub>μ+1</sub>(x), | |
1026 | and use them to obtain I<sub>ν</sub>(x) and K<sub>ν</sub>(x). | |
1027 | </p> | |
1028 | <p> | |
1029 | The algorithm is proposed by Temme in N.M. Temme, <span class="emphasis"><em>On the numerical | |
1030 | evaluation of the modified bessel function of the third kind</em></span>, | |
1031 | Journal of Computational Physics, vol 19, 324 (1975), which needs two continued | |
1032 | fractions as well as the Wronskian: | |
1033 | </p> | |
1034 | <p> | |
1035 | <span class="inlinemediaobject"><img src="../../../equations/mbessel11.svg"></span> | |
1036 | </p> | |
1037 | <p> | |
1038 | <span class="inlinemediaobject"><img src="../../../equations/mbessel12.svg"></span> | |
1039 | </p> | |
1040 | <p> | |
1041 | <span class="inlinemediaobject"><img src="../../../equations/mbessel8.svg"></span> | |
1042 | </p> | |
1043 | <p> | |
1044 | The continued fractions are computed using the modified Lentz's method (W.J. | |
1045 | Lentz, <span class="emphasis"><em>Generating Bessel functions in Mie scattering calculations | |
1046 | using continued fractions</em></span>, Applied Optics, vol 15, 668 (1976)). | |
1047 | Their convergence rates depend on <span class="emphasis"><em>x</em></span>, therefore we need | |
1048 | different strategies for large <span class="emphasis"><em>x</em></span> and small <span class="emphasis"><em>x</em></span>. | |
1049 | </p> | |
1050 | <p> | |
1051 | <span class="emphasis"><em>x > v</em></span>, CF1 needs O(<span class="emphasis"><em>x</em></span>) iterations | |
1052 | to converge, CF2 converges rapidly. | |
1053 | </p> | |
1054 | <p> | |
1055 | <span class="emphasis"><em>x <= v</em></span>, CF1 converges rapidly, CF2 fails to converge | |
1056 | when <span class="emphasis"><em>x</em></span> <code class="literal">-></code> 0. | |
1057 | </p> | |
1058 | <p> | |
1059 | When <span class="emphasis"><em>x</em></span> is large (<span class="emphasis"><em>x</em></span> > 2), both | |
1060 | continued fractions converge (CF1 may be slow for really large <span class="emphasis"><em>x</em></span>). | |
1061 | K<sub>μ</sub>   and K<sub>μ+1</sub>   | |
1062 | can be calculated by | |
1063 | </p> | |
1064 | <p> | |
1065 | <span class="inlinemediaobject"><img src="../../../equations/mbessel13.svg"></span> | |
1066 | </p> | |
1067 | <p> | |
1068 | where | |
1069 | </p> | |
1070 | <p> | |
1071 | <span class="inlinemediaobject"><img src="../../../equations/mbessel14.svg"></span> | |
1072 | </p> | |
1073 | <p> | |
1074 | <span class="emphasis"><em>S</em></span> is also a series that is summed along with CF2, see | |
1075 | I.J. Thompson and A.R. Barnett, <span class="emphasis"><em>Modified Bessel functions I_v and | |
1076 | K_v of real order and complex argument to selected accuracy</em></span>, Computer | |
1077 | Physics Communications, vol 47, 245 (1987). | |
1078 | </p> | |
1079 | <p> | |
1080 | When <span class="emphasis"><em>x</em></span> is small (<span class="emphasis"><em>x</em></span> <= 2), CF2 | |
1081 | convergence may fail (but CF1 works very well). The solution here is Temme's | |
1082 | series: | |
1083 | </p> | |
1084 | <p> | |
1085 | <span class="inlinemediaobject"><img src="../../../equations/mbessel15.svg"></span> | |
1086 | </p> | |
1087 | <p> | |
1088 | where | |
1089 | </p> | |
1090 | <p> | |
1091 | <span class="inlinemediaobject"><img src="../../../equations/mbessel16.svg"></span> | |
1092 | </p> | |
1093 | <p> | |
1094 | f<sub>k</sub>   and h<sub>k</sub>   | |
1095 | are also computed by recursions (involving gamma functions), but | |
1096 | the formulas are a little complicated, readers are referred to N.M. Temme, | |
1097 | <span class="emphasis"><em>On the numerical evaluation of the modified Bessel function of | |
1098 | the third kind</em></span>, Journal of Computational Physics, vol 19, 324 | |
1099 | (1975). Note: Temme's series converge only for |μ| <= 1/2. | |
1100 | </p> | |
1101 | <p> | |
1102 | K<sub>ν</sub>(x) is then calculated from the forward recurrence, as is K<sub>ν+1</sub>(x). With these | |
1103 | two values and f<sub>ν</sub>, the Wronskian yields I<sub>ν</sub>(x) directly. | |
1104 | </p> | |
1105 | </div> | |
1106 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
1107 | <td align="left"></td> | |
1108 | <td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012-2014 Nikhar Agrawal, | |
1109 | Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert | |
1110 | Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan Råde, Gautam Sewani, | |
1111 | Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p> | |
1112 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
1113 | file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) | |
1114 | </p> | |
1115 | </div></td> | |
1116 | </tr></table> | |
1117 | <hr> | |
1118 | <div class="spirit-nav"> | |
1119 | <a accesskey="p" href="bessel_root.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../bessel.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sph_bessel.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> | |
1120 | </div> | |
1121 | </body> | |
1122 | </html> |