bessel_first.html 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>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.79.1">
  7. <link rel="home" href="../../index.html" title="Math Toolkit 2.11.0">
  8. <link rel="up" href="../bessel.html" title="Bessel Functions">
  9. <link rel="prev" href="bessel_over.html" title="Bessel Function Overview">
  10. <link rel="next" href="bessel_root.html" title="Finding Zeros of 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_over.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="bessel_root.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.bessel_first"></a><a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">Bessel Functions of
  28. the First and Second Kinds</a>
  29. </h3></div></div></div>
  30. <h5>
  31. <a name="math_toolkit.bessel.bessel_first.h0"></a>
  32. <span class="phrase"><a name="math_toolkit.bessel.bessel_first.synopsis"></a></span><a class="link" href="bessel_first.html#math_toolkit.bessel.bessel_first.synopsis">Synopsis</a>
  33. </h5>
  34. <p>
  35. <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span></code>
  36. </p>
  37. <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</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_j</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. <span class="keyword">template</span> <span class="special">&lt;</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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
  40. <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_j</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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
  41. <span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
  42. <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_neumann</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>
  43. <span class="keyword">template</span> <span class="special">&lt;</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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</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_neumann</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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
  45. </pre>
  46. <h5>
  47. <a name="math_toolkit.bessel.bessel_first.h1"></a>
  48. <span class="phrase"><a name="math_toolkit.bessel.bessel_first.description"></a></span><a class="link" href="bessel_first.html#math_toolkit.bessel.bessel_first.description">Description</a>
  49. </h5>
  50. <p>
  51. The functions <a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_bessel_j</a>
  52. and <a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a> return
  53. the result of the Bessel functions of the first and second kinds respectively:
  54. </p>
  55. <div class="blockquote"><blockquote class="blockquote"><p>
  56. <span class="serif_italic">cyl_bessel_j(v, x) = J<sub>v</sub>(x)</span>
  57. </p></blockquote></div>
  58. <div class="blockquote"><blockquote class="blockquote"><p>
  59. <span class="serif_italic">cyl_neumann(v, x) = Y<sub>v</sub>(x) = N<sub>v</sub>(x)</span>
  60. </p></blockquote></div>
  61. <p>
  62. where:
  63. </p>
  64. <div class="blockquote"><blockquote class="blockquote"><p>
  65. <span class="inlinemediaobject"><img src="../../../equations/bessel2.svg"></span>
  66. </p></blockquote></div>
  67. <div class="blockquote"><blockquote class="blockquote"><p>
  68. <span class="inlinemediaobject"><img src="../../../equations/bessel3.svg"></span>
  69. </p></blockquote></div>
  70. <p>
  71. 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
  72. type calculation rules</em></span></a> when T1 and T2 are different types.
  73. The functions are also optimised for the relatively common case that T1 is
  74. an integer.
  75. </p>
  76. <p>
  77. The final <a class="link" href="../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
  78. be used to control the behaviour of the function: how it handles errors,
  79. what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">policy
  80. documentation for more details</a>.
  81. </p>
  82. <p>
  83. The functions return the result of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
  84. 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>
  85. this occurs when <code class="computeroutput"><span class="identifier">x</span> <span class="special">&lt;</span>
  86. <span class="number">0</span></code> and v is not an integer, or when
  87. <code class="computeroutput"><span class="identifier">x</span> <span class="special">==</span>
  88. <span class="number">0</span></code> and <code class="computeroutput"><span class="identifier">v</span>
  89. <span class="special">!=</span> <span class="number">0</span></code>.
  90. For <a class="link" href="bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a> this
  91. occurs when <code class="computeroutput"><span class="identifier">x</span> <span class="special">&lt;=</span>
  92. <span class="number">0</span></code>.
  93. </p>
  94. <p>
  95. The following graph illustrates the cyclic nature of J<sub>v</sub>:
  96. </p>
  97. <div class="blockquote"><blockquote class="blockquote"><p>
  98. <span class="inlinemediaobject"><img src="../../../graphs/cyl_bessel_j.svg" align="middle"></span>
  99. </p></blockquote></div>
  100. <p>
  101. The following graph shows the behaviour of Y<sub>v</sub>: this is also cyclic for large
  102. <span class="emphasis"><em>x</em></span>, but tends to -&#8734; for small <span class="emphasis"><em>x</em></span>:
  103. </p>
  104. <div class="blockquote"><blockquote class="blockquote"><p>
  105. <span class="inlinemediaobject"><img src="../../../graphs/cyl_neumann.svg" align="middle"></span>
  106. </p></blockquote></div>
  107. <h5>
  108. <a name="math_toolkit.bessel.bessel_first.h2"></a>
  109. <span class="phrase"><a name="math_toolkit.bessel.bessel_first.testing"></a></span><a class="link" href="bessel_first.html#math_toolkit.bessel.bessel_first.testing">Testing</a>
  110. </h5>
  111. <p>
  112. There are two sets of test values: spot values calculated using <a href="http://functions.wolfram.com" target="_top">functions.wolfram.com</a>,
  113. and a much larger set of tests computed using a simplified version of this
  114. implementation (with all the special case handling removed).
  115. </p>
  116. <h5>
  117. <a name="math_toolkit.bessel.bessel_first.h3"></a>
  118. <span class="phrase"><a name="math_toolkit.bessel.bessel_first.accuracy"></a></span><a class="link" href="bessel_first.html#math_toolkit.bessel.bessel_first.accuracy">Accuracy</a>
  119. </h5>
  120. <p>
  121. The following tables show how the accuracy of these functions varies on various
  122. platforms, along with comparisons to other libraries. Note that the cyclic
  123. nature of these functions means that they have an infinite number of irrational
  124. roots: in general these functions have arbitrarily large <span class="emphasis"><em>relative</em></span>
  125. errors when the arguments are sufficiently close to a root. Of course the
  126. absolute error in such cases is always small. Note that only results for
  127. the widest floating-point type on the system are given as narrower types
  128. have <a class="link" href="../relative_error.html#math_toolkit.relative_error.zero_error">effectively zero
  129. error</a>. All values are relative errors in units of epsilon. Most of
  130. the gross errors exhibited by other libraries occur for very large arguments
  131. - you will need to drill down into the actual program output if you need
  132. more information on this.
  133. </p>
  134. <div class="table">
  135. <a name="math_toolkit.bessel.bessel_first.table_cyl_bessel_j_integer_orders_"></a><p class="title"><b>Table&#160;8.40.&#160;Error rates for cyl_bessel_j (integer orders)</b></p>
  136. <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_j (integer orders)">
  137. <colgroup>
  138. <col>
  139. <col>
  140. <col>
  141. <col>
  142. <col>
  143. </colgroup>
  144. <thead><tr>
  145. <th>
  146. </th>
  147. <th>
  148. <p>
  149. GNU C++ version 7.1.0<br> linux<br> long double
  150. </p>
  151. </th>
  152. <th>
  153. <p>
  154. GNU C++ version 7.1.0<br> linux<br> double
  155. </p>
  156. </th>
  157. <th>
  158. <p>
  159. Sun compiler version 0x5150<br> Sun Solaris<br> long double
  160. </p>
  161. </th>
  162. <th>
  163. <p>
  164. Microsoft Visual C++ version 14.1<br> Win32<br> double
  165. </p>
  166. </th>
  167. </tr></thead>
  168. <tbody>
  169. <tr>
  170. <td>
  171. <p>
  172. Bessel J0: Mathworld Data (Integer Version)
  173. </p>
  174. </td>
  175. <td>
  176. <p>
  177. <span class="blue">Max = 6.55&#949; (Mean = 2.86&#949;)</span><br> <br>
  178. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 5.04&#949; (Mean = 1.78&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j_integer_orders___cmath__Bessel_J0_Mathworld_Data_Integer_Version_">And
  179. other failures.</a>)
  180. </p>
  181. </td>
  182. <td>
  183. <p>
  184. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  185. 2.1:</em></span> Max = 1.12&#949; (Mean = 0.488&#949;))<br> (<span class="emphasis"><em>Rmath
  186. 3.2.3:</em></span> Max = 0.629&#949; (Mean = 0.223&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_integer_orders__Rmath_3_2_3_Bessel_J0_Mathworld_Data_Integer_Version_">And
  187. other failures.</a>)
  188. </p>
  189. </td>
  190. <td>
  191. <p>
  192. <span class="blue">Max = 6.55&#949; (Mean = 2.86&#949;)</span>
  193. </p>
  194. </td>
  195. <td>
  196. <p>
  197. <span class="blue">Max = 2.52&#949; (Mean = 1.2&#949;)</span><br> <br>
  198. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 1.89&#949; (Mean = 0.988&#949;))
  199. </p>
  200. </td>
  201. </tr>
  202. <tr>
  203. <td>
  204. <p>
  205. Bessel J0: Mathworld Data (Tricky cases) (Integer Version)
  206. </p>
  207. </td>
  208. <td>
  209. <p>
  210. <span class="blue">Max = 1.64e+08&#949; (Mean = 6.69e+07&#949;)</span><br>
  211. <br> (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 4.79e+08&#949; (Mean
  212. = 1.96e+08&#949;))
  213. </p>
  214. </td>
  215. <td>
  216. <p>
  217. <span class="blue">Max = 8e+04&#949; (Mean = 3.27e+04&#949;)</span><br>
  218. <br> (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 1e+07&#949; (Mean = 4.11e+06&#949;))<br>
  219. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 1.04e+07&#949; (Mean = 4.29e+06&#949;))
  220. </p>
  221. </td>
  222. <td>
  223. <p>
  224. <span class="blue">Max = 1.64e+08&#949; (Mean = 6.69e+07&#949;)</span>
  225. </p>
  226. </td>
  227. <td>
  228. <p>
  229. <span class="blue">Max = 1e+07&#949; (Mean = 4.09e+06&#949;)</span><br>
  230. <br> (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> <span class="red">Max
  231. = 2.54e+08&#949; (Mean = 1.04e+08&#949;))</span>
  232. </p>
  233. </td>
  234. </tr>
  235. <tr>
  236. <td>
  237. <p>
  238. Bessel J1: Mathworld Data (Integer Version)
  239. </p>
  240. </td>
  241. <td>
  242. <p>
  243. <span class="blue">Max = 3.59&#949; (Mean = 1.33&#949;)</span><br> <br>
  244. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 6.1&#949; (Mean = 2.95&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j_integer_orders___cmath__Bessel_J1_Mathworld_Data_Integer_Version_">And
  245. other failures.</a>)
  246. </p>
  247. </td>
  248. <td>
  249. <p>
  250. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  251. 2.1:</em></span> Max = 1.89&#949; (Mean = 0.721&#949;))<br> (<span class="emphasis"><em>Rmath
  252. 3.2.3:</em></span> Max = 0.946&#949; (Mean = 0.39&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_integer_orders__Rmath_3_2_3_Bessel_J1_Mathworld_Data_Integer_Version_">And
  253. other failures.</a>)
  254. </p>
  255. </td>
  256. <td>
  257. <p>
  258. <span class="blue">Max = 1.44&#949; (Mean = 0.637&#949;)</span>
  259. </p>
  260. </td>
  261. <td>
  262. <p>
  263. <span class="blue">Max = 1.73&#949; (Mean = 0.976&#949;)</span><br> <br>
  264. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 11.4&#949; (Mean = 4.15&#949;))
  265. </p>
  266. </td>
  267. </tr>
  268. <tr>
  269. <td>
  270. <p>
  271. Bessel J1: Mathworld Data (tricky cases) (Integer Version)
  272. </p>
  273. </td>
  274. <td>
  275. <p>
  276. <span class="blue">Max = 2.18e+05&#949; (Mean = 9.76e+04&#949;)</span><br>
  277. <br> (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 2.15e+06&#949; (Mean
  278. = 1.58e+06&#949;))
  279. </p>
  280. </td>
  281. <td>
  282. <p>
  283. <span class="blue">Max = 106&#949; (Mean = 47.5&#949;)</span><br> <br>
  284. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 1.26e+06&#949; (Mean = 6.28e+05&#949;))<br>
  285. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 2.93e+06&#949; (Mean = 1.7e+06&#949;))
  286. </p>
  287. </td>
  288. <td>
  289. <p>
  290. <span class="blue">Max = 2.18e+05&#949; (Mean = 9.76e+04&#949;)</span>
  291. </p>
  292. </td>
  293. <td>
  294. <p>
  295. <span class="blue">Max = 3.23e+04&#949; (Mean = 1.45e+04&#949;)</span><br>
  296. <br> (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 1.44e+07&#949; (Mean
  297. = 6.5e+06&#949;))
  298. </p>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>
  303. <p>
  304. Bessel JN: Mathworld Data (Integer Version)
  305. </p>
  306. </td>
  307. <td>
  308. <p>
  309. <span class="blue">Max = 6.85&#949; (Mean = 3.35&#949;)</span><br> <br>
  310. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 2.13e+19&#949; (Mean
  311. = 5.16e+18&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j_integer_orders___cmath__Bessel_JN_Mathworld_Data_Integer_Version_">And
  312. other failures.</a>)</span>
  313. </p>
  314. </td>
  315. <td>
  316. <p>
  317. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  318. 2.1:</em></span> Max = 6.9e+05&#949; (Mean = 2.53e+05&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_integer_orders__GSL_2_1_Bessel_JN_Mathworld_Data_Integer_Version_">And
  319. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  320. <span class="red">Max = +INF&#949; (Mean = +INF&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_integer_orders__Rmath_3_2_3_Bessel_JN_Mathworld_Data_Integer_Version_">And
  321. other failures.</a>)</span>
  322. </p>
  323. </td>
  324. <td>
  325. <p>
  326. <span class="blue">Max = 463&#949; (Mean = 112&#949;)</span>
  327. </p>
  328. </td>
  329. <td>
  330. <p>
  331. <span class="blue">Max = 14.7&#949; (Mean = 5.4&#949;)</span><br> <br>
  332. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> <span class="red">Max =
  333. +INF&#949; (Mean = +INF&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_Microsoft_Visual_C_version_14_1_Win32_double_cyl_bessel_j_integer_orders___math_h__Bessel_JN_Mathworld_Data_Integer_Version_">And
  334. other failures.</a>)</span>
  335. </p>
  336. </td>
  337. </tr>
  338. </tbody>
  339. </table></div>
  340. </div>
  341. <br class="table-break"><div class="table">
  342. <a name="math_toolkit.bessel.bessel_first.table_cyl_bessel_j"></a><p class="title"><b>Table&#160;8.41.&#160;Error rates for cyl_bessel_j</b></p>
  343. <div class="table-contents"><table class="table" summary="Error rates for cyl_bessel_j">
  344. <colgroup>
  345. <col>
  346. <col>
  347. <col>
  348. <col>
  349. <col>
  350. </colgroup>
  351. <thead><tr>
  352. <th>
  353. </th>
  354. <th>
  355. <p>
  356. GNU C++ version 7.1.0<br> linux<br> long double
  357. </p>
  358. </th>
  359. <th>
  360. <p>
  361. GNU C++ version 7.1.0<br> linux<br> double
  362. </p>
  363. </th>
  364. <th>
  365. <p>
  366. Sun compiler version 0x5150<br> Sun Solaris<br> long double
  367. </p>
  368. </th>
  369. <th>
  370. <p>
  371. Microsoft Visual C++ version 14.1<br> Win32<br> double
  372. </p>
  373. </th>
  374. </tr></thead>
  375. <tbody>
  376. <tr>
  377. <td>
  378. <p>
  379. Bessel J0: Mathworld Data
  380. </p>
  381. </td>
  382. <td>
  383. <p>
  384. <span class="blue">Max = 6.55&#949; (Mean = 2.86&#949;)</span><br> <br>
  385. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 5.04&#949; (Mean = 1.78&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j__cmath__Bessel_J0_Mathworld_Data">And
  386. other failures.</a>)
  387. </p>
  388. </td>
  389. <td>
  390. <p>
  391. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  392. 2.1:</em></span> Max = 0.629&#949; (Mean = 0.223&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_J0_Mathworld_Data">And
  393. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  394. Max = 0.629&#949; (Mean = 0.223&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_Rmath_3_2_3_Bessel_J0_Mathworld_Data">And
  395. other failures.</a>)
  396. </p>
  397. </td>
  398. <td>
  399. <p>
  400. <span class="blue">Max = 6.55&#949; (Mean = 2.86&#949;)</span>
  401. </p>
  402. </td>
  403. <td>
  404. <p>
  405. <span class="blue">Max = 2.52&#949; (Mean = 1.2&#949;)</span>
  406. </p>
  407. </td>
  408. </tr>
  409. <tr>
  410. <td>
  411. <p>
  412. Bessel J0: Mathworld Data (Tricky cases)
  413. </p>
  414. </td>
  415. <td>
  416. <p>
  417. <span class="blue">Max = 1.64e+08&#949; (Mean = 6.69e+07&#949;)</span><br>
  418. <br> (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 4.79e+08&#949; (Mean
  419. = 1.96e+08&#949;))
  420. </p>
  421. </td>
  422. <td>
  423. <p>
  424. <span class="blue">Max = 8e+04&#949; (Mean = 3.27e+04&#949;)</span><br>
  425. <br> (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 6.5e+07&#949; (Mean = 2.66e+07&#949;))<br>
  426. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 1.04e+07&#949; (Mean = 4.29e+06&#949;))
  427. </p>
  428. </td>
  429. <td>
  430. <p>
  431. <span class="blue">Max = 1.64e+08&#949; (Mean = 6.69e+07&#949;)</span>
  432. </p>
  433. </td>
  434. <td>
  435. <p>
  436. <span class="blue">Max = 1e+07&#949; (Mean = 4.09e+06&#949;)</span>
  437. </p>
  438. </td>
  439. </tr>
  440. <tr>
  441. <td>
  442. <p>
  443. Bessel J1: Mathworld Data
  444. </p>
  445. </td>
  446. <td>
  447. <p>
  448. <span class="blue">Max = 3.59&#949; (Mean = 1.33&#949;)</span><br> <br>
  449. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 6.1&#949; (Mean = 2.95&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j__cmath__Bessel_J1_Mathworld_Data">And
  450. other failures.</a>)
  451. </p>
  452. </td>
  453. <td>
  454. <p>
  455. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  456. 2.1:</em></span> Max = 6.62&#949; (Mean = 2.35&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_J1_Mathworld_Data">And
  457. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  458. Max = 0.946&#949; (Mean = 0.39&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_Rmath_3_2_3_Bessel_J1_Mathworld_Data">And
  459. other failures.</a>)
  460. </p>
  461. </td>
  462. <td>
  463. <p>
  464. <span class="blue">Max = 1.44&#949; (Mean = 0.637&#949;)</span>
  465. </p>
  466. </td>
  467. <td>
  468. <p>
  469. <span class="blue">Max = 1.73&#949; (Mean = 0.976&#949;)</span>
  470. </p>
  471. </td>
  472. </tr>
  473. <tr>
  474. <td>
  475. <p>
  476. Bessel J1: Mathworld Data (tricky cases)
  477. </p>
  478. </td>
  479. <td>
  480. <p>
  481. <span class="blue">Max = 2.18e+05&#949; (Mean = 9.76e+04&#949;)</span><br>
  482. <br> (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 2.15e+06&#949; (Mean
  483. = 1.58e+06&#949;))
  484. </p>
  485. </td>
  486. <td>
  487. <p>
  488. <span class="blue">Max = 106&#949; (Mean = 47.5&#949;)</span><br> <br>
  489. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 8.75e+05&#949; (Mean = 5.32e+05&#949;))<br>
  490. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 2.93e+06&#949; (Mean = 1.7e+06&#949;))
  491. </p>
  492. </td>
  493. <td>
  494. <p>
  495. <span class="blue">Max = 2.18e+05&#949; (Mean = 9.76e+04&#949;)</span>
  496. </p>
  497. </td>
  498. <td>
  499. <p>
  500. <span class="blue">Max = 3.23e+04&#949; (Mean = 1.45e+04&#949;)</span>
  501. </p>
  502. </td>
  503. </tr>
  504. <tr>
  505. <td>
  506. <p>
  507. Bessel JN: Mathworld Data
  508. </p>
  509. </td>
  510. <td>
  511. <p>
  512. <span class="blue">Max = 6.85&#949; (Mean = 3.35&#949;)</span><br> <br>
  513. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 2.13e+19&#949; (Mean
  514. = 5.16e+18&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j__cmath__Bessel_JN_Mathworld_Data">And
  515. other failures.</a>)</span>
  516. </p>
  517. </td>
  518. <td>
  519. <p>
  520. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  521. 2.1:</em></span> Max = 6.9e+05&#949; (Mean = 2.15e+05&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_JN_Mathworld_Data">And
  522. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  523. <span class="red">Max = +INF&#949; (Mean = +INF&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_Rmath_3_2_3_Bessel_JN_Mathworld_Data">And
  524. other failures.</a>)</span>
  525. </p>
  526. </td>
  527. <td>
  528. <p>
  529. <span class="blue">Max = 463&#949; (Mean = 112&#949;)</span>
  530. </p>
  531. </td>
  532. <td>
  533. <p>
  534. <span class="blue">Max = 14.7&#949; (Mean = 5.4&#949;)</span>
  535. </p>
  536. </td>
  537. </tr>
  538. <tr>
  539. <td>
  540. <p>
  541. Bessel J: Mathworld Data
  542. </p>
  543. </td>
  544. <td>
  545. <p>
  546. <span class="blue">Max = 14.7&#949; (Mean = 4.11&#949;)</span><br> <br>
  547. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 3.49e+05&#949; (Mean = 8.09e+04&#949;)
  548. <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j__cmath__Bessel_J_Mathworld_Data">And
  549. other failures.</a>)
  550. </p>
  551. </td>
  552. <td>
  553. <p>
  554. <span class="blue">Max = 10&#949; (Mean = 2.24&#949;)</span><br> <br>
  555. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 2.39e+05&#949; (Mean = 5.37e+04&#949;)
  556. <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_J_Mathworld_Data">And
  557. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  558. <span class="red">Max = +INF&#949; (Mean = +INF&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_Rmath_3_2_3_Bessel_J_Mathworld_Data">And
  559. other failures.</a>)</span>
  560. </p>
  561. </td>
  562. <td>
  563. <p>
  564. <span class="blue">Max = 14.7&#949; (Mean = 4.22&#949;)</span>
  565. </p>
  566. </td>
  567. <td>
  568. <p>
  569. <span class="blue">Max = 14.9&#949; (Mean = 3.89&#949;)</span>
  570. </p>
  571. </td>
  572. </tr>
  573. <tr>
  574. <td>
  575. <p>
  576. Bessel J: Mathworld Data (large values)
  577. </p>
  578. </td>
  579. <td>
  580. <p>
  581. <span class="blue">Max = 607&#949; (Mean = 305&#949;)</span><br> <br>
  582. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 34.9&#949; (Mean = 17.4&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_bessel_j__cmath__Bessel_J_Mathworld_Data_large_values_">And
  583. other failures.</a>)
  584. </p>
  585. </td>
  586. <td>
  587. <p>
  588. <span class="blue">Max = 0.536&#949; (Mean = 0.268&#949;)</span><br> <br>
  589. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 4.91e+03&#949; (Mean = 2.46e+03&#949;)
  590. <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_J_Mathworld_Data_large_values_">And
  591. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  592. Max = 5.9&#949; (Mean = 3.76&#949;))
  593. </p>
  594. </td>
  595. <td>
  596. <p>
  597. <span class="blue">Max = 607&#949; (Mean = 305&#949;)</span>
  598. </p>
  599. </td>
  600. <td>
  601. <p>
  602. <span class="blue">Max = 9.31&#949; (Mean = 5.52&#949;)</span>
  603. </p>
  604. </td>
  605. </tr>
  606. <tr>
  607. <td>
  608. <p>
  609. Bessel JN: Random Data
  610. </p>
  611. </td>
  612. <td>
  613. <p>
  614. <span class="blue">Max = 50.8&#949; (Mean = 3.69&#949;)</span><br> <br>
  615. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 1.12e+03&#949; (Mean = 88.7&#949;))
  616. </p>
  617. </td>
  618. <td>
  619. <p>
  620. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  621. 2.1:</em></span> Max = 75.7&#949; (Mean = 5.36&#949;))<br> (<span class="emphasis"><em>Rmath
  622. 3.2.3:</em></span> Max = 3.93&#949; (Mean = 1.22&#949;))
  623. </p>
  624. </td>
  625. <td>
  626. <p>
  627. <span class="blue">Max = 99.6&#949; (Mean = 22&#949;)</span>
  628. </p>
  629. </td>
  630. <td>
  631. <p>
  632. <span class="blue">Max = 17.5&#949; (Mean = 1.46&#949;)</span>
  633. </p>
  634. </td>
  635. </tr>
  636. <tr>
  637. <td>
  638. <p>
  639. Bessel J: Random Data
  640. </p>
  641. </td>
  642. <td>
  643. <p>
  644. <span class="blue">Max = 11.4&#949; (Mean = 1.68&#949;)</span><br> <br>
  645. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 501&#949; (Mean = 52.3&#949;))
  646. </p>
  647. </td>
  648. <td>
  649. <p>
  650. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  651. 2.1:</em></span> Max = 15.5&#949; (Mean = 3.33&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_bessel_j_GSL_2_1_Bessel_J_Random_Data">And
  652. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  653. Max = 6.74&#949; (Mean = 1.3&#949;))
  654. </p>
  655. </td>
  656. <td>
  657. <p>
  658. <span class="blue">Max = 260&#949; (Mean = 34&#949;)</span>
  659. </p>
  660. </td>
  661. <td>
  662. <p>
  663. <span class="blue">Max = 9.24&#949; (Mean = 1.17&#949;)</span>
  664. </p>
  665. </td>
  666. </tr>
  667. <tr>
  668. <td>
  669. <p>
  670. Bessel J: Random Data (Tricky large values)
  671. </p>
  672. </td>
  673. <td>
  674. <p>
  675. <span class="blue">Max = 785&#949; (Mean = 94.2&#949;)</span><br> <br>
  676. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 5.01e+17&#949; (Mean
  677. = 6.23e+16&#949;))</span>
  678. </p>
  679. </td>
  680. <td>
  681. <p>
  682. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  683. 2.1:</em></span> Max = 2.48e+05&#949; (Mean = 5.11e+04&#949;))<br> (<span class="emphasis"><em>Rmath
  684. 3.2.3:</em></span> Max = 71.6&#949; (Mean = 11.7&#949;))
  685. </p>
  686. </td>
  687. <td>
  688. <p>
  689. <span class="blue">Max = 785&#949; (Mean = 97.4&#949;)</span>
  690. </p>
  691. </td>
  692. <td>
  693. <p>
  694. <span class="blue">Max = 59.2&#949; (Mean = 8.67&#949;)</span>
  695. </p>
  696. </td>
  697. </tr>
  698. </tbody>
  699. </table></div>
  700. </div>
  701. <br class="table-break"><div class="table">
  702. <a name="math_toolkit.bessel.bessel_first.table_cyl_neumann_integer_orders_"></a><p class="title"><b>Table&#160;8.42.&#160;Error rates for cyl_neumann (integer orders)</b></p>
  703. <div class="table-contents"><table class="table" summary="Error rates for cyl_neumann (integer orders)">
  704. <colgroup>
  705. <col>
  706. <col>
  707. <col>
  708. <col>
  709. <col>
  710. </colgroup>
  711. <thead><tr>
  712. <th>
  713. </th>
  714. <th>
  715. <p>
  716. GNU C++ version 7.1.0<br> linux<br> long double
  717. </p>
  718. </th>
  719. <th>
  720. <p>
  721. GNU C++ version 7.1.0<br> linux<br> double
  722. </p>
  723. </th>
  724. <th>
  725. <p>
  726. Sun compiler version 0x5150<br> Sun Solaris<br> long double
  727. </p>
  728. </th>
  729. <th>
  730. <p>
  731. Microsoft Visual C++ version 14.1<br> Win32<br> double
  732. </p>
  733. </th>
  734. </tr></thead>
  735. <tbody>
  736. <tr>
  737. <td>
  738. <p>
  739. Y0: Mathworld Data (Integer Version)
  740. </p>
  741. </td>
  742. <td>
  743. <p>
  744. <span class="blue">Max = 5.53&#949; (Mean = 2.4&#949;)</span><br> <br>
  745. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 2.05e+05&#949; (Mean = 6.87e+04&#949;))
  746. </p>
  747. </td>
  748. <td>
  749. <p>
  750. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  751. 2.1:</em></span> Max = 6.46&#949; (Mean = 2.38&#949;))<br> (<span class="emphasis"><em>Rmath
  752. 3.2.3:</em></span> Max = 167&#949; (Mean = 56.5&#949;))
  753. </p>
  754. </td>
  755. <td>
  756. <p>
  757. <span class="blue">Max = 5.53&#949; (Mean = 2.4&#949;)</span>
  758. </p>
  759. </td>
  760. <td>
  761. <p>
  762. <span class="blue">Max = 4.61&#949; (Mean = 2.29&#949;)</span><br> <br>
  763. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 5.37e+03&#949; (Mean = 1.81e+03&#949;))
  764. </p>
  765. </td>
  766. </tr>
  767. <tr>
  768. <td>
  769. <p>
  770. Y1: Mathworld Data (Integer Version)
  771. </p>
  772. </td>
  773. <td>
  774. <p>
  775. <span class="blue">Max = 6.33&#949; (Mean = 2.25&#949;)</span><br> <br>
  776. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 9.71e+03&#949; (Mean = 4.08e+03&#949;))
  777. </p>
  778. </td>
  779. <td>
  780. <p>
  781. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  782. 2.1:</em></span> Max = 1.51&#949; (Mean = 0.839&#949;))<br> (<span class="emphasis"><em>Rmath
  783. 3.2.3:</em></span> Max = 193&#949; (Mean = 64.4&#949;))
  784. </p>
  785. </td>
  786. <td>
  787. <p>
  788. <span class="blue">Max = 6.33&#949; (Mean = 2.29&#949;)</span>
  789. </p>
  790. </td>
  791. <td>
  792. <p>
  793. <span class="blue">Max = 4.75&#949; (Mean = 1.72&#949;)</span><br> <br>
  794. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 1.86e+04&#949; (Mean = 6.2e+03&#949;))
  795. </p>
  796. </td>
  797. </tr>
  798. <tr>
  799. <td>
  800. <p>
  801. Yn: Mathworld Data (Integer Version)
  802. </p>
  803. </td>
  804. <td>
  805. <p>
  806. <span class="blue">Max = 55.2&#949; (Mean = 17.8&#949;)</span><br> <br>
  807. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 2.2e+20&#949; (Mean
  808. = 6.97e+19&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_neumann_integer_orders___cmath__Yn_Mathworld_Data_Integer_Version_">And
  809. other failures.</a>)</span>
  810. </p>
  811. </td>
  812. <td>
  813. <p>
  814. <span class="blue">Max = 0.993&#949; (Mean = 0.314&#949;)</span><br> <br>
  815. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 2.41e+05&#949; (Mean = 7.62e+04&#949;))<br>
  816. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 1.24e+04&#949; (Mean = 4e+03&#949;))
  817. </p>
  818. </td>
  819. <td>
  820. <p>
  821. <span class="blue">Max = 55.2&#949; (Mean = 17.8&#949;)</span>
  822. </p>
  823. </td>
  824. <td>
  825. <p>
  826. <span class="blue">Max = 35&#949; (Mean = 11.9&#949;)</span><br> <br>
  827. (<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 2.49e+05&#949; (Mean = 8.14e+04&#949;))
  828. </p>
  829. </td>
  830. </tr>
  831. </tbody>
  832. </table></div>
  833. </div>
  834. <br class="table-break"><div class="table">
  835. <a name="math_toolkit.bessel.bessel_first.table_cyl_neumann"></a><p class="title"><b>Table&#160;8.43.&#160;Error rates for cyl_neumann</b></p>
  836. <div class="table-contents"><table class="table" summary="Error rates for cyl_neumann">
  837. <colgroup>
  838. <col>
  839. <col>
  840. <col>
  841. <col>
  842. <col>
  843. </colgroup>
  844. <thead><tr>
  845. <th>
  846. </th>
  847. <th>
  848. <p>
  849. GNU C++ version 7.1.0<br> linux<br> long double
  850. </p>
  851. </th>
  852. <th>
  853. <p>
  854. GNU C++ version 7.1.0<br> linux<br> double
  855. </p>
  856. </th>
  857. <th>
  858. <p>
  859. Sun compiler version 0x5150<br> Sun Solaris<br> long double
  860. </p>
  861. </th>
  862. <th>
  863. <p>
  864. Microsoft Visual C++ version 14.1<br> Win32<br> double
  865. </p>
  866. </th>
  867. </tr></thead>
  868. <tbody>
  869. <tr>
  870. <td>
  871. <p>
  872. Y0: Mathworld Data
  873. </p>
  874. </td>
  875. <td>
  876. <p>
  877. <span class="blue">Max = 5.53&#949; (Mean = 2.4&#949;)</span><br> <br>
  878. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 2.05e+05&#949; (Mean = 6.87e+04&#949;))
  879. </p>
  880. </td>
  881. <td>
  882. <p>
  883. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  884. 2.1:</em></span> Max = 60.9&#949; (Mean = 20.4&#949;))<br> (<span class="emphasis"><em>Rmath
  885. 3.2.3:</em></span> Max = 167&#949; (Mean = 56.5&#949;))
  886. </p>
  887. </td>
  888. <td>
  889. <p>
  890. <span class="blue">Max = 5.53&#949; (Mean = 2.4&#949;)</span>
  891. </p>
  892. </td>
  893. <td>
  894. <p>
  895. <span class="blue">Max = 4.61&#949; (Mean = 2.29&#949;)</span>
  896. </p>
  897. </td>
  898. </tr>
  899. <tr>
  900. <td>
  901. <p>
  902. Y1: Mathworld Data
  903. </p>
  904. </td>
  905. <td>
  906. <p>
  907. <span class="blue">Max = 6.33&#949; (Mean = 2.25&#949;)</span><br> <br>
  908. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 9.71e+03&#949; (Mean = 4.08e+03&#949;))
  909. </p>
  910. </td>
  911. <td>
  912. <p>
  913. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  914. 2.1:</em></span> Max = 23.4&#949; (Mean = 8.1&#949;))<br> (<span class="emphasis"><em>Rmath
  915. 3.2.3:</em></span> Max = 193&#949; (Mean = 64.4&#949;))
  916. </p>
  917. </td>
  918. <td>
  919. <p>
  920. <span class="blue">Max = 6.33&#949; (Mean = 2.29&#949;)</span>
  921. </p>
  922. </td>
  923. <td>
  924. <p>
  925. <span class="blue">Max = 4.75&#949; (Mean = 1.72&#949;)</span>
  926. </p>
  927. </td>
  928. </tr>
  929. <tr>
  930. <td>
  931. <p>
  932. Yn: Mathworld Data
  933. </p>
  934. </td>
  935. <td>
  936. <p>
  937. <span class="blue">Max = 55.2&#949; (Mean = 17.8&#949;)</span><br> <br>
  938. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 2.2e+20&#949; (Mean
  939. = 6.97e+19&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_neumann__cmath__Yn_Mathworld_Data">And
  940. other failures.</a>)</span>
  941. </p>
  942. </td>
  943. <td>
  944. <p>
  945. <span class="blue">Max = 0.993&#949; (Mean = 0.314&#949;)</span><br> <br>
  946. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 2.41e+05&#949; (Mean = 7.62e+04&#949;)
  947. <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_neumann_GSL_2_1_Yn_Mathworld_Data">And
  948. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  949. Max = 1.24e+04&#949; (Mean = 4e+03&#949;))
  950. </p>
  951. </td>
  952. <td>
  953. <p>
  954. <span class="blue">Max = 55.2&#949; (Mean = 17.8&#949;)</span>
  955. </p>
  956. </td>
  957. <td>
  958. <p>
  959. <span class="blue">Max = 35&#949; (Mean = 11.9&#949;)</span>
  960. </p>
  961. </td>
  962. </tr>
  963. <tr>
  964. <td>
  965. <p>
  966. Yv: Mathworld Data
  967. </p>
  968. </td>
  969. <td>
  970. <p>
  971. <span class="blue">Max = 10.7&#949; (Mean = 4.93&#949;)</span><br> <br>
  972. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max = 3.49e+15&#949; (Mean
  973. = 1.05e+15&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_neumann__cmath__Yv_Mathworld_Data">And
  974. other failures.</a>)</span>
  975. </p>
  976. </td>
  977. <td>
  978. <p>
  979. <span class="blue">Max = 10&#949; (Mean = 3.02&#949;)</span><br> <br>
  980. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 1.07e+05&#949; (Mean = 3.22e+04&#949;)
  981. <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_neumann_GSL_2_1_Yv_Mathworld_Data">And
  982. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  983. Max = 243&#949; (Mean = 73.9&#949;))
  984. </p>
  985. </td>
  986. <td>
  987. <p>
  988. <span class="blue">Max = 10.7&#949; (Mean = 5.1&#949;)</span>
  989. </p>
  990. </td>
  991. <td>
  992. <p>
  993. <span class="blue">Max = 7.89&#949; (Mean = 3.27&#949;)</span>
  994. </p>
  995. </td>
  996. </tr>
  997. <tr>
  998. <td>
  999. <p>
  1000. Yv: Mathworld Data (large values)
  1001. </p>
  1002. </td>
  1003. <td>
  1004. <p>
  1005. <span class="blue">Max = 1.7&#949; (Mean = 1.33&#949;)</span><br> <br>
  1006. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 43.2&#949; (Mean = 16.3&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_neumann__cmath__Yv_Mathworld_Data_large_values_">And
  1007. other failures.</a>)
  1008. </p>
  1009. </td>
  1010. <td>
  1011. <p>
  1012. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  1013. 2.1:</em></span> Max = 60.8&#949; (Mean = 23&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_cyl_neumann_GSL_2_1_Yv_Mathworld_Data_large_values_">And
  1014. other failures.</a>)<br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span>
  1015. Max = 0.682&#949; (Mean = 0.335&#949;))
  1016. </p>
  1017. </td>
  1018. <td>
  1019. <p>
  1020. <span class="blue">Max = 1.7&#949; (Mean = 1.33&#949;)</span>
  1021. </p>
  1022. </td>
  1023. <td>
  1024. <p>
  1025. <span class="blue">Max = 0.682&#949; (Mean = 0.423&#949;)</span>
  1026. </p>
  1027. </td>
  1028. </tr>
  1029. <tr>
  1030. <td>
  1031. <p>
  1032. Y0 and Y1: Random Data
  1033. </p>
  1034. </td>
  1035. <td>
  1036. <p>
  1037. <span class="blue">Max = 10.8&#949; (Mean = 3.04&#949;)</span><br> <br>
  1038. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 2.59e+03&#949; (Mean = 500&#949;))
  1039. </p>
  1040. </td>
  1041. <td>
  1042. <p>
  1043. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  1044. 2.1:</em></span> Max = 34.4&#949; (Mean = 8.9&#949;))<br> (<span class="emphasis"><em>Rmath
  1045. 3.2.3:</em></span> Max = 83&#949; (Mean = 14.2&#949;))
  1046. </p>
  1047. </td>
  1048. <td>
  1049. <p>
  1050. <span class="blue">Max = 10.8&#949; (Mean = 3.04&#949;)</span>
  1051. </p>
  1052. </td>
  1053. <td>
  1054. <p>
  1055. <span class="blue">Max = 4.17&#949; (Mean = 1.24&#949;)</span>
  1056. </p>
  1057. </td>
  1058. </tr>
  1059. <tr>
  1060. <td>
  1061. <p>
  1062. Yn: Random Data
  1063. </p>
  1064. </td>
  1065. <td>
  1066. <p>
  1067. <span class="blue">Max = 338&#949; (Mean = 27.5&#949;)</span><br> <br>
  1068. (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 4.01e+03&#949; (Mean = 348&#949;))
  1069. </p>
  1070. </td>
  1071. <td>
  1072. <p>
  1073. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span><br> <br> (<span class="emphasis"><em>GSL
  1074. 2.1:</em></span> Max = 500&#949; (Mean = 47.8&#949;))<br> (<span class="emphasis"><em>Rmath
  1075. 3.2.3:</em></span> Max = 691&#949; (Mean = 67.9&#949;))
  1076. </p>
  1077. </td>
  1078. <td>
  1079. <p>
  1080. <span class="blue">Max = 338&#949; (Mean = 27.5&#949;)</span>
  1081. </p>
  1082. </td>
  1083. <td>
  1084. <p>
  1085. <span class="blue">Max = 117&#949; (Mean = 10.2&#949;)</span>
  1086. </p>
  1087. </td>
  1088. </tr>
  1089. <tr>
  1090. <td>
  1091. <p>
  1092. Yv: Random Data
  1093. </p>
  1094. </td>
  1095. <td>
  1096. <p>
  1097. <span class="blue">Max = 2.08e+03&#949; (Mean = 149&#949;)</span><br>
  1098. <br> (<span class="emphasis"><em>&lt;cmath&gt;:</em></span> <span class="red">Max
  1099. = +INF&#949; (Mean = +INF&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_long_double_cyl_neumann__cmath__Yv_Random_Data">And
  1100. other failures.</a>)</span>
  1101. </p>
  1102. </td>
  1103. <td>
  1104. <p>
  1105. <span class="blue">Max = 1.53&#949; (Mean = 0.102&#949;)</span><br> <br>
  1106. (<span class="emphasis"><em>GSL 2.1:</em></span> Max = 1.41e+06&#949; (Mean = 7.67e+04&#949;))<br>
  1107. (<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 1.79e+05&#949; (Mean = 9.64e+03&#949;))
  1108. </p>
  1109. </td>
  1110. <td>
  1111. <p>
  1112. <span class="blue">Max = 2.08e+03&#949; (Mean = 149&#949;)</span>
  1113. </p>
  1114. </td>
  1115. <td>
  1116. <p>
  1117. <span class="blue">Max = 1.23e+03&#949; (Mean = 69.9&#949;)</span>
  1118. </p>
  1119. </td>
  1120. </tr>
  1121. </tbody>
  1122. </table></div>
  1123. </div>
  1124. <br class="table-break"><p>
  1125. Note that for large <span class="emphasis"><em>x</em></span> these functions are largely dependent
  1126. on the accuracy of the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">sin</span></code> and
  1127. <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cos</span></code> functions.
  1128. </p>
  1129. <p>
  1130. Comparison to GSL and <a href="http://www.netlib.org/cephes/" target="_top">Cephes</a>
  1131. is interesting: both <a href="http://www.netlib.org/cephes/" target="_top">Cephes</a>
  1132. and this library optimise the integer order case - leading to identical results
  1133. - simply using the general case is for the most part slightly more accurate
  1134. though, as noted by the better accuracy of GSL in the integer argument cases.
  1135. This implementation tends to perform much better when the arguments become
  1136. large, <a href="http://www.netlib.org/cephes/" target="_top">Cephes</a> in particular
  1137. produces some remarkably inaccurate results with some of the test data (no
  1138. significant figures correct), and even GSL performs badly with some inputs
  1139. to J<sub>v</sub>. Note that by way of double-checking these results, the worst performing
  1140. <a href="http://www.netlib.org/cephes/" target="_top">Cephes</a> and GSL cases were
  1141. recomputed using <a href="http://functions.wolfram.com" target="_top">functions.wolfram.com</a>,
  1142. and the result checked against our test data: no errors in the test data
  1143. were found.
  1144. </p>
  1145. <p>
  1146. The following error plot are based on an exhaustive search of the functions
  1147. domain for J0 and Y0, MSVC-15.5 at <code class="computeroutput"><span class="keyword">double</span></code>
  1148. precision, other compilers and precisions are very similar - the plots simply
  1149. illustrate the relatively large errors as you approach a zero, and the very
  1150. low errors elsewhere.
  1151. </p>
  1152. <div class="blockquote"><blockquote class="blockquote"><p>
  1153. <span class="inlinemediaobject"><img src="../../../graphs/j0__double.svg" align="middle"></span>
  1154. </p></blockquote></div>
  1155. <div class="blockquote"><blockquote class="blockquote"><p>
  1156. <span class="inlinemediaobject"><img src="../../../graphs/y0__double.svg" align="middle"></span>
  1157. </p></blockquote></div>
  1158. <h5>
  1159. <a name="math_toolkit.bessel.bessel_first.h4"></a>
  1160. <span class="phrase"><a name="math_toolkit.bessel.bessel_first.implementation"></a></span><a class="link" href="bessel_first.html#math_toolkit.bessel.bessel_first.implementation">Implementation</a>
  1161. </h5>
  1162. <p>
  1163. The implementation is mostly about filtering off various special cases:
  1164. </p>
  1165. <p>
  1166. When <span class="emphasis"><em>x</em></span> is negative, then the order <span class="emphasis"><em>v</em></span>
  1167. must be an integer or the result is a domain error. If the order is an integer
  1168. then the function is odd for odd orders and even for even orders, so we reflect
  1169. to <span class="emphasis"><em>x &gt; 0</em></span>.
  1170. </p>
  1171. <p>
  1172. When the order <span class="emphasis"><em>v</em></span> is negative then the reflection formulae
  1173. can be used to move to <span class="emphasis"><em>v &gt; 0</em></span>:
  1174. </p>
  1175. <div class="blockquote"><blockquote class="blockquote"><p>
  1176. <span class="inlinemediaobject"><img src="../../../equations/bessel9.svg"></span>
  1177. </p></blockquote></div>
  1178. <div class="blockquote"><blockquote class="blockquote"><p>
  1179. <span class="inlinemediaobject"><img src="../../../equations/bessel10.svg"></span>
  1180. </p></blockquote></div>
  1181. <p>
  1182. Note that if the order is an integer, then these formulae reduce to:
  1183. </p>
  1184. <div class="blockquote"><blockquote class="blockquote"><p>
  1185. <span class="serif_italic">J<sub>-n</sub> = (-1)<sup>n</sup>J<sub>n</sub></span>
  1186. </p></blockquote></div>
  1187. <div class="blockquote"><blockquote class="blockquote"><p>
  1188. <span class="serif_italic">Y<sub>-n</sub> = (-1)<sup>n</sup>Y<sub>n</sub></span>
  1189. </p></blockquote></div>
  1190. <p>
  1191. However, in general, a negative order implies that we will need to compute
  1192. both J and Y.
  1193. </p>
  1194. <p>
  1195. When <span class="emphasis"><em>x</em></span> is large compared to the order <span class="emphasis"><em>v</em></span>
  1196. then the asymptotic expansions for large <span class="emphasis"><em>x</em></span> in M. Abramowitz
  1197. and I.A. Stegun, <span class="emphasis"><em>Handbook of Mathematical Functions</em></span>
  1198. 9.2.19 are used (these were found to be more reliable than those in A&amp;S
  1199. 9.2.5).
  1200. </p>
  1201. <p>
  1202. When the order <span class="emphasis"><em>v</em></span> is an integer the method first relates
  1203. the result to J<sub>0</sub>, J<sub>1</sub>, Y<sub>0</sub> and Y<sub>1</sub> using either forwards or backwards recurrence
  1204. (Miller's algorithm) depending upon which is stable. The values for J<sub>0</sub>, J<sub>1</sub>,
  1205. Y<sub>0</sub> and Y<sub>1</sub> are calculated using the rational minimax approximations on root-bracketing
  1206. intervals for small <span class="emphasis"><em>|x|</em></span> and Hankel asymptotic expansion
  1207. for large <span class="emphasis"><em>|x|</em></span>. The coefficients are from:
  1208. </p>
  1209. <div class="blockquote"><blockquote class="blockquote"><p>
  1210. W.J. Cody, <span class="emphasis"><em>ALGORITHM 715: SPECFUN - A Portable FORTRAN Package
  1211. of Special Function Routines and Test Drivers</em></span>, ACM Transactions
  1212. on Mathematical Software, vol 19, 22 (1993).
  1213. </p></blockquote></div>
  1214. <p>
  1215. and
  1216. </p>
  1217. <div class="blockquote"><blockquote class="blockquote"><p>
  1218. J.F. Hart et al, <span class="emphasis"><em>Computer Approximations</em></span>, John Wiley
  1219. &amp; Sons, New York, 1968.
  1220. </p></blockquote></div>
  1221. <p>
  1222. These approximations are accurate to around 19 decimal digits: therefore
  1223. these methods are not used when type T has more than 64 binary digits.
  1224. </p>
  1225. <p>
  1226. When <span class="emphasis"><em>x</em></span> is smaller than machine epsilon then the following
  1227. approximations for Y<sub>0</sub>(x), Y<sub>1</sub>(x), Y<sub>2</sub>(x) and Y<sub>n</sub>(x) can be used (see: <a href="http://functions.wolfram.com/03.03.06.0037.01" target="_top">http://functions.wolfram.com/03.03.06.0037.01</a>,
  1228. <a href="http://functions.wolfram.com/03.03.06.0038.01" target="_top">http://functions.wolfram.com/03.03.06.0038.01</a>,
  1229. <a href="http://functions.wolfram.com/03.03.06.0039.01" target="_top">http://functions.wolfram.com/03.03.06.0039.01</a>
  1230. and <a href="http://functions.wolfram.com/03.03.06.0040.01" target="_top">http://functions.wolfram.com/03.03.06.0040.01</a>):
  1231. </p>
  1232. <div class="blockquote"><blockquote class="blockquote"><p>
  1233. <span class="inlinemediaobject"><img src="../../../equations/bessel_y0_small_z.svg"></span>
  1234. </p></blockquote></div>
  1235. <div class="blockquote"><blockquote class="blockquote"><p>
  1236. <span class="inlinemediaobject"><img src="../../../equations/bessel_y1_small_z.svg"></span>
  1237. </p></blockquote></div>
  1238. <div class="blockquote"><blockquote class="blockquote"><p>
  1239. <span class="inlinemediaobject"><img src="../../../equations/bessel_y2_small_z.svg"></span>
  1240. </p></blockquote></div>
  1241. <div class="blockquote"><blockquote class="blockquote"><p>
  1242. <span class="inlinemediaobject"><img src="../../../equations/bessel_yn_small_z.svg"></span>
  1243. </p></blockquote></div>
  1244. <p>
  1245. When <span class="emphasis"><em>x</em></span> is small compared to <span class="emphasis"><em>v</em></span> and
  1246. <span class="emphasis"><em>v</em></span> is not an integer, then the following series approximation
  1247. can be used for Y<sub>v</sub>(x), this is also an area where other approximations are
  1248. often too slow to converge to be used (see <a href="http://functions.wolfram.com/03.03.06.0034.01" target="_top">http://functions.wolfram.com/03.03.06.0034.01</a>):
  1249. </p>
  1250. <div class="blockquote"><blockquote class="blockquote"><p>
  1251. <span class="inlinemediaobject"><img src="../../../equations/bessel_yv_small_z.svg"></span>
  1252. </p></blockquote></div>
  1253. <p>
  1254. When <span class="emphasis"><em>x</em></span> is small compared to <span class="emphasis"><em>v</em></span>,
  1255. J<sub>v</sub>x is best computed directly from the series:
  1256. </p>
  1257. <div class="blockquote"><blockquote class="blockquote"><p>
  1258. <span class="inlinemediaobject"><img src="../../../equations/bessel2.svg"></span>
  1259. </p></blockquote></div>
  1260. <p>
  1261. In the general case we compute J<sub>v</sub> and Y<sub>v</sub> simultaneously.
  1262. </p>
  1263. <p>
  1264. To get the initial values, let &#956; = &#957; - floor(&#957; + 1/2), then &#956; is the fractional part
  1265. of &#957; such that |&#956;| &lt;= 1/2 (we need this for convergence later). The idea
  1266. is to calculate J<sub>&#956;</sub>(x), J<sub>&#956;+1</sub>(x), Y<sub>&#956;</sub>(x), Y<sub>&#956;+1</sub>(x) and use them to obtain J<sub>&#957;</sub>(x), Y<sub>&#957;</sub>(x).
  1267. </p>
  1268. <p>
  1269. The algorithm is called Steed's method, which needs two continued fractions
  1270. as well as the Wronskian:
  1271. </p>
  1272. <div class="blockquote"><blockquote class="blockquote"><p>
  1273. <span class="inlinemediaobject"><img src="../../../equations/bessel8.svg"></span>
  1274. </p></blockquote></div>
  1275. <div class="blockquote"><blockquote class="blockquote"><p>
  1276. <span class="inlinemediaobject"><img src="../../../equations/bessel11.svg"></span>
  1277. </p></blockquote></div>
  1278. <div class="blockquote"><blockquote class="blockquote"><p>
  1279. <span class="inlinemediaobject"><img src="../../../equations/bessel12.svg"></span>
  1280. </p></blockquote></div>
  1281. <p>
  1282. See: F.S. Acton, <span class="emphasis"><em>Numerical Methods that Work</em></span>, The Mathematical
  1283. Association of America, Washington, 1997.
  1284. </p>
  1285. <p>
  1286. The continued fractions are computed using the modified Lentz's method (W.J.
  1287. Lentz, <span class="emphasis"><em>Generating Bessel functions in Mie scattering calculations
  1288. using continued fractions</em></span>, Applied Optics, vol 15, 668 (1976)).
  1289. Their convergence rates depend on <span class="emphasis"><em>x</em></span>, therefore we need
  1290. different strategies for large <span class="emphasis"><em>x</em></span> and small <span class="emphasis"><em>x</em></span>:
  1291. </p>
  1292. <div class="blockquote"><blockquote class="blockquote"><p>
  1293. <span class="emphasis"><em>x &gt; v</em></span>, CF1 needs O(<span class="emphasis"><em>x</em></span>) iterations
  1294. to converge, CF2 converges rapidly
  1295. </p></blockquote></div>
  1296. <div class="blockquote"><blockquote class="blockquote"><p>
  1297. <span class="emphasis"><em>x &lt;= v</em></span>, CF1 converges rapidly, CF2 fails to converge
  1298. when <span class="emphasis"><em>x</em></span> <code class="literal">-&gt;</code> 0
  1299. </p></blockquote></div>
  1300. <p>
  1301. When <span class="emphasis"><em>x</em></span> is large (<span class="emphasis"><em>x</em></span> &gt; 2), both
  1302. continued fractions converge (CF1 may be slow for really large <span class="emphasis"><em>x</em></span>).
  1303. J<sub>&#956;</sub>, J<sub>&#956;+1</sub>, Y<sub>&#956;</sub>, Y<sub>&#956;+1</sub> can be calculated by
  1304. </p>
  1305. <div class="blockquote"><blockquote class="blockquote"><p>
  1306. <span class="inlinemediaobject"><img src="../../../equations/bessel13.svg"></span>
  1307. </p></blockquote></div>
  1308. <p>
  1309. where
  1310. </p>
  1311. <div class="blockquote"><blockquote class="blockquote"><p>
  1312. <span class="inlinemediaobject"><img src="../../../equations/bessel14.svg"></span>
  1313. </p></blockquote></div>
  1314. <p>
  1315. J<sub>&#957;</sub> and Y<sub>&#956;</sub> are then calculated using backward (Miller's algorithm) and forward
  1316. recurrence respectively.
  1317. </p>
  1318. <p>
  1319. When <span class="emphasis"><em>x</em></span> is small (<span class="emphasis"><em>x</em></span> &lt;= 2), CF2
  1320. convergence may fail (but CF1 works very well). The solution here is Temme's
  1321. series:
  1322. </p>
  1323. <div class="blockquote"><blockquote class="blockquote"><p>
  1324. <span class="inlinemediaobject"><img src="../../../equations/bessel15.svg"></span>
  1325. </p></blockquote></div>
  1326. <p>
  1327. where
  1328. </p>
  1329. <div class="blockquote"><blockquote class="blockquote"><p>
  1330. <span class="inlinemediaobject"><img src="../../../equations/bessel16.svg"></span>
  1331. </p></blockquote></div>
  1332. <p>
  1333. g<sub>k</sub> and h<sub>k</sub>
  1334. are also computed by recursions (involving gamma functions), but
  1335. the formulas are a little complicated, readers are refered to N.M. Temme,
  1336. <span class="emphasis"><em>On the numerical evaluation of the ordinary Bessel function of
  1337. the second kind</em></span>, Journal of Computational Physics, vol 21, 343
  1338. (1976). Note Temme's series converge only for |&#956;| &lt;= 1/2.
  1339. </p>
  1340. <p>
  1341. As the previous case, Y<sub>&#957;</sub> is calculated from the forward recurrence, so is Y<sub>&#957;+1</sub>.
  1342. With these two values and f<sub>&#957;</sub>, the Wronskian yields J<sub>&#957;</sub>(x) directly without backward
  1343. recurrence.
  1344. </p>
  1345. </div>
  1346. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  1347. <td align="left"></td>
  1348. <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2019 Nikhar
  1349. Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
  1350. Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
  1351. R&#229;de, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
  1352. Daryle Walker and Xiaogang Zhang<p>
  1353. Distributed under the Boost Software License, Version 1.0. (See accompanying
  1354. 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>)
  1355. </p>
  1356. </div></td>
  1357. </tr></table>
  1358. <hr>
  1359. <div class="spirit-nav">
  1360. <a accesskey="p" href="bessel_over.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="bessel_root.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  1361. </div>
  1362. </body>
  1363. </html>