bessel_jy.qbk 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. [section:bessel_first Bessel Functions of the First and Second Kinds]
  2. [h4 Synopsis]
  3. `#include <boost/math/special_functions/bessel.hpp>`
  4. template <class T1, class T2>
  5. ``__sf_result`` cyl_bessel_j(T1 v, T2 x);
  6. template <class T1, class T2, class ``__Policy``>
  7. ``__sf_result`` cyl_bessel_j(T1 v, T2 x, const ``__Policy``&);
  8. template <class T1, class T2>
  9. ``__sf_result`` cyl_neumann(T1 v, T2 x);
  10. template <class T1, class T2, class ``__Policy``>
  11. ``__sf_result`` cyl_neumann(T1 v, T2 x, const ``__Policy``&);
  12. [h4 Description]
  13. The functions __cyl_bessel_j and __cyl_neumann return the result of the
  14. Bessel functions of the first and second kinds respectively:
  15. [expression cyl_bessel_j(v, x) = J[sub v](x)]
  16. [expression cyl_neumann(v, x) = Y[sub v](x) = N[sub v](x)]
  17. where:
  18. [equation bessel2]
  19. [equation bessel3]
  20. The return type of these functions is computed using the __arg_promotion_rules
  21. when T1 and T2 are different types. The functions are also optimised for the
  22. relatively common case that T1 is an integer.
  23. [optional_policy]
  24. The functions return the result of __domain_error whenever the result is
  25. undefined or complex. For __cyl_bessel_j this occurs when `x < 0` and v is not
  26. an integer, or when `x == 0` and `v != 0`. For __cyl_neumann this occurs
  27. when `x <= 0`.
  28. The following graph illustrates the cyclic nature of J[sub v]:
  29. [graph cyl_bessel_j]
  30. The following graph shows the behaviour of Y[sub v]: this is also
  31. cyclic for large /x/, but tends to -[infin] for small /x/:
  32. [graph cyl_neumann]
  33. [h4 Testing]
  34. There are two sets of test values: spot values calculated using
  35. [@http://functions.wolfram.com functions.wolfram.com],
  36. and a much larger set of tests computed using
  37. a simplified version of this implementation
  38. (with all the special case handling removed).
  39. [h4 Accuracy]
  40. The following tables show how the accuracy of these functions
  41. varies on various platforms, along with comparisons to other
  42. libraries. Note that the cyclic nature of these
  43. functions means that they have an infinite number of irrational
  44. roots: in general these functions have arbitrarily large /relative/
  45. errors when the arguments are sufficiently close to a root. Of
  46. course the absolute error in such cases is always small.
  47. Note that only results for the widest floating-point type on the
  48. system are given as narrower types have __zero_error. All values
  49. are relative errors in units of epsilon. Most of the gross errors
  50. exhibited by other libraries occur for very large arguments - you will
  51. need to drill down into the actual program output if you need more
  52. information on this.
  53. [table_cyl_bessel_j_integer_orders_]
  54. [table_cyl_bessel_j]
  55. [table_cyl_neumann_integer_orders_]
  56. [table_cyl_neumann]
  57. Note that for large /x/ these functions are largely dependent on
  58. the accuracy of the `std::sin` and `std::cos` functions.
  59. Comparison to GSL and __cephes is interesting: both __cephes and this library optimise
  60. the integer order case - leading to identical results - simply using the general
  61. case is for the most part slightly more accurate though, as noted by the
  62. better accuracy of GSL in the integer argument cases. This implementation tends to
  63. perform much better when the arguments become large, __cephes in particular produces
  64. some remarkably inaccurate results with some of the test data (no significant figures
  65. correct), and even GSL performs badly with some inputs to J[sub v]. Note that
  66. by way of double-checking these results, the worst performing __cephes and GSL cases
  67. were recomputed using [@http://functions.wolfram.com functions.wolfram.com],
  68. and the result checked against our test data: no errors in the test data were found.
  69. The following error plot are based on an exhaustive search of the functions domain for J0 and Y0,
  70. MSVC-15.5 at `double` precision, other compilers and precisions are very similar - the plots simply
  71. illustrate the relatively large errors as you approach a zero, and the very low errors elsewhere.
  72. [graph j0__double]
  73. [graph y0__double]
  74. [h4 Implementation]
  75. The implementation is mostly about filtering off various special cases:
  76. When /x/ is negative, then the order /v/ must be an integer or the
  77. result is a domain error. If the order is an integer then the function
  78. is odd for odd orders and even for even orders, so we reflect to /x > 0/.
  79. When the order /v/ is negative then the reflection formulae can be used to
  80. move to /v > 0/:
  81. [equation bessel9]
  82. [equation bessel10]
  83. Note that if the order is an integer, then these formulae reduce to:
  84. [expression J[sub -n] = (-1)[super n]J[sub n]]
  85. [expression Y[sub -n] = (-1)[super n]Y[sub n]]
  86. However, in general, a negative order implies that we will need to compute
  87. both J and Y.
  88. When /x/ is large compared to the order /v/ then the asymptotic expansions
  89. for large /x/ in M. Abramowitz and I.A. Stegun,
  90. ['Handbook of Mathematical Functions] 9.2.19 are used
  91. (these were found to be more reliable
  92. than those in A&S 9.2.5).
  93. When the order /v/ is an integer the method first relates the result
  94. to J[sub 0], J[sub 1], Y[sub 0] and Y[sub 1] using either
  95. forwards or backwards recurrence (Miller's algorithm) depending upon which is stable.
  96. The values for J[sub 0], J[sub 1], Y[sub 0] and Y[sub 1] are
  97. calculated using the rational minimax approximations on
  98. root-bracketing intervals for small ['|x|] and Hankel asymptotic
  99. expansion for large ['|x|]. The coefficients are from:
  100. [:W.J. Cody, ['ALGORITHM 715: SPECFUN - A Portable FORTRAN Package of
  101. Special Function Routines and Test Drivers], ACM Transactions on Mathematical
  102. Software, vol 19, 22 (1993).]
  103. and
  104. [:J.F. Hart et al, ['Computer Approximations], John Wiley & Sons, New York, 1968.]
  105. These approximations are accurate to around 19 decimal digits: therefore
  106. these methods are not used when type T has more than 64 binary digits.
  107. When /x/ is smaller than machine epsilon then the following approximations for
  108. Y[sub 0](x), Y[sub 1](x), Y[sub 2](x) and Y[sub n](x) can be used
  109. (see: [@http://functions.wolfram.com/03.03.06.0037.01 http://functions.wolfram.com/03.03.06.0037.01],
  110. [@http://functions.wolfram.com/03.03.06.0038.01 http://functions.wolfram.com/03.03.06.0038.01],
  111. [@http://functions.wolfram.com/03.03.06.0039.01 http://functions.wolfram.com/03.03.06.0039.01]
  112. and [@http://functions.wolfram.com/03.03.06.0040.01 http://functions.wolfram.com/03.03.06.0040.01]):
  113. [equation bessel_y0_small_z]
  114. [equation bessel_y1_small_z]
  115. [equation bessel_y2_small_z]
  116. [equation bessel_yn_small_z]
  117. When /x/ is small compared to /v/ and /v/ is not an integer, then the following
  118. series approximation can be used for Y[sub v](x), this is also an area where other
  119. approximations are often too slow to converge to be used
  120. (see [@http://functions.wolfram.com/03.03.06.0034.01 http://functions.wolfram.com/03.03.06.0034.01]):
  121. [equation bessel_yv_small_z]
  122. When /x/ is small compared to /v/, J[sub v]x is best computed directly from the series:
  123. [equation bessel2]
  124. In the general case we compute J[sub v] and
  125. Y[sub v] simultaneously.
  126. To get the initial values, let
  127. [mu] = [nu] - floor([nu] + 1/2), then [mu] is the fractional part
  128. of [nu] such that
  129. |[mu]| <= 1/2 (we need this for convergence later). The idea is to
  130. calculate J[sub [mu]](x), J[sub [mu]+1](x), Y[sub [mu]](x), Y[sub [mu]+1](x)
  131. and use them to obtain J[sub [nu]](x), Y[sub [nu]](x).
  132. The algorithm is called Steed's method, which needs two
  133. continued fractions as well as the Wronskian:
  134. [equation bessel8]
  135. [equation bessel11]
  136. [equation bessel12]
  137. See: F.S. Acton, ['Numerical Methods that Work],
  138. The Mathematical Association of America, Washington, 1997.
  139. The continued fractions are computed using the modified Lentz's method
  140. (W.J. Lentz, ['Generating Bessel functions in Mie scattering calculations
  141. using continued fractions], Applied Optics, vol 15, 668 (1976)).
  142. Their convergence rates depend on ['x], therefore we need
  143. different strategies for large ['x] and small ['x]:
  144. [:['x > v], CF1 needs O(['x]) iterations to converge, CF2 converges rapidly]
  145. [:['x <= v], CF1 converges rapidly, CF2 fails to converge when ['x] [^->] 0]
  146. When ['x] is large (['x] > 2), both continued fractions converge (CF1
  147. may be slow for really large ['x]). J[sub [mu]], J[sub [mu]+1],
  148. Y[sub [mu]], Y[sub [mu]+1] can be calculated by
  149. [equation bessel13]
  150. where
  151. [equation bessel14]
  152. J[sub [nu]] and Y[sub [mu]] are then calculated using backward
  153. (Miller's algorithm) and forward recurrence respectively.
  154. When ['x] is small (['x] <= 2), CF2 convergence may fail (but CF1
  155. works very well). The solution here is Temme's series:
  156. [equation bessel15]
  157. where
  158. [equation bessel16]
  159. g[sub k] and h[sub k]
  160. are also computed by recursions (involving gamma functions), but the
  161. formulas are a little complicated, readers are refered to
  162. N.M. Temme, ['On the numerical evaluation of the ordinary Bessel function
  163. of the second kind], Journal of Computational Physics, vol 21, 343 (1976).
  164. Note Temme's series converge only for |[mu]| <= 1/2.
  165. As the previous case, Y[sub [nu]] is calculated from the forward
  166. recurrence, so is Y[sub [nu]+1]. With these two
  167. values and f[sub [nu]], the Wronskian yields J[sub [nu]](x) directly
  168. without backward recurrence.
  169. [endsect] [/section:bessel_first Bessel Functions of the First and Second Kinds]
  170. [section:bessel_root Finding Zeros of Bessel Functions of the First and Second Kinds]
  171. [h4 Synopsis]
  172. `#include <boost/math/special_functions/bessel.hpp>`
  173. Functions for obtaining both a single zero or root of the Bessel function,
  174. and placing multiple zeros into a container like `std::vector`
  175. by providing an output iterator.
  176. The signature of the single value functions are:
  177. template <class T>
  178. T cyl_bessel_j_zero(
  179. T v, // Floating-point value for Jv.
  180. int m); // 1-based index of zero.
  181. template <class T>
  182. T cyl_neumann_zero(
  183. T v, // Floating-point value for Jv.
  184. int m); // 1-based index of zero.
  185. and for multiple zeros:
  186. template <class T, class OutputIterator>
  187. OutputIterator cyl_bessel_j_zero(
  188. T v, // Floating-point value for Jv.
  189. int start_index, // 1-based index of first zero.
  190. unsigned number_of_zeros, // How many zeros to generate.
  191. OutputIterator out_it); // Destination for zeros.
  192. template <class T, class OutputIterator>
  193. OutputIterator cyl_neumann_zero(
  194. T v, // Floating-point value for Jv.
  195. int start_index, // 1-based index of zero.
  196. unsigned number_of_zeros, // How many zeros to generate
  197. OutputIterator out_it); // Destination for zeros.
  198. There are also versions which allow control of the __policy_section for error handling and precision.
  199. template <class T>
  200. T cyl_bessel_j_zero(
  201. T v, // Floating-point value for Jv.
  202. int m, // 1-based index of zero.
  203. const Policy&); // Policy to use.
  204. template <class T>
  205. T cyl_neumann_zero(
  206. T v, // Floating-point value for Jv.
  207. int m, // 1-based index of zero.
  208. const Policy&); // Policy to use.
  209. template <class T, class OutputIterator>
  210. OutputIterator cyl_bessel_j_zero(
  211. T v, // Floating-point value for Jv.
  212. int start_index, // 1-based index of first zero.
  213. unsigned number_of_zeros, // How many zeros to generate.
  214. OutputIterator out_it, // Destination for zeros.
  215. const Policy& pol); // Policy to use.
  216. template <class T, class OutputIterator>
  217. OutputIterator cyl_neumann_zero(
  218. T v, // Floating-point value for Jv.
  219. int start_index, // 1-based index of zero.
  220. unsigned number_of_zeros, // How many zeros to generate.
  221. OutputIterator out_it, // Destination for zeros.
  222. const Policy& pol); // Policy to use.
  223. [h4 Description]
  224. Every real order [nu] cylindrical Bessel and Neumann functions have an infinite
  225. number of zeros on the positive real axis. The real zeros on the positive real
  226. axis can be found by solving for the roots of
  227. [:['J[sub [nu]](j[sub [nu], m]) = 0]]
  228. [:['Y[sub [nu]](y[sub [nu], m]) = 0]]
  229. Here, ['j[sub [nu], m]] represents the ['m[super th]]
  230. root of the cylindrical Bessel function of order ['[nu]],
  231. and ['y[sub [nu], m]] represents the ['m[super th]]
  232. root of the cylindrical Neumann function of order ['[nu]].
  233. The zeros or roots (values of `x` where the function crosses the horizontal `y = 0` axis)
  234. of the Bessel and Neumann functions are computed by two functions,
  235. `cyl_bessel_j_zero` and `cyl_neumann_zero`.
  236. In each case the index or rank of the zero
  237. returned is 1-based, which is to say:
  238. [:cyl_bessel_j_zero(v, 1);]
  239. returns the first zero of Bessel J.
  240. Passing an `start_index <= 0` results in a `std::domain_error` being raised.
  241. For certain parameters, however, the zero'th root is defined and
  242. it has a value of zero. For example, the zero'th root
  243. of `J[sub v](x)` is defined and it has a value of zero for all
  244. values of `v > 0` and for negative integer values of `v = -n`.
  245. Similar cases are described in the implementation details below.
  246. The order `v` of `J` can be positive, negative and zero for the `cyl_bessel_j`
  247. and `cyl_neumann` functions, but not infinite nor NaN.
  248. [graph bessel_j_zeros]
  249. [graph neumann_y_zeros]
  250. [h4 Examples of finding Bessel and Neumann zeros]
  251. [import ../../example/bessel_zeros_example_1.cpp]
  252. [bessel_zeros_example_1]
  253. [bessel_zeros_example_2]
  254. [import ../../example/bessel_zeros_interator_example.cpp]
  255. [bessel_zeros_iterator_example_1]
  256. [bessel_zeros_iterator_example_2]
  257. [import ../../example/neumann_zeros_example_1.cpp]
  258. [neumann_zeros_example_1]
  259. [neumann_zeros_example_2]
  260. [import ../../example/bessel_errors_example.cpp]
  261. [bessel_errors_example_1]
  262. [bessel_errors_example_2]
  263. The full code (and output) for these examples is at
  264. [@../../example/bessel_zeros_example_1.cpp Bessel zeros],
  265. [@../../example/bessel_zeros_interator_example.cpp Bessel zeros iterator],
  266. [@../../example/neumann_zeros_example_1.cpp Neumann zeros],
  267. [@../../example/bessel_errors_example.cpp Bessel error messages].
  268. [h3 Implementation]
  269. Various methods are used to compute initial estimates
  270. for ['j[sub [nu], m]] and ['y[sub [nu], m]] ; these are described in detail below.
  271. After finding the initial estimate of a given root,
  272. its precision is subsequently refined to the desired level
  273. using Newton-Raphson iteration from Boost.Math's __root_finding_with_derivatives
  274. utilities combined with the functions __cyl_bessel_j and __cyl_neumann.
  275. Newton iteration requires both ['J[sub [nu]](x)] or ['Y[sub [nu]](x)]
  276. as well as its derivative. The derivatives of ['J[sub [nu]](x)] and ['Y[sub [nu]](x)]
  277. with respect to ['x] are given by __Abramowitz_Stegun.
  278. In particular,
  279. [expression d/[sub dx] ['J[sub [nu]](x)] = ['J[sub [nu]-1](x)] - [nu] J[sub [nu]](x) / x]
  280. [expression d/[sub dx] ['Y[sub [nu]](x)] = ['Y[sub [nu]-1](x)] - [nu] Y[sub [nu]](x) / x]
  281. Enumeration of the rank of a root (in other words the index of a root)
  282. begins with one and counts up, in other words
  283. ['m,=1,2,3,[ellipsis]] The value of the first root is always greater than zero.
  284. For certain special parameters, cylindrical Bessel functions
  285. and cylindrical Neumann functions have a root at the origin. For example,
  286. ['J[sub [nu]](x)] has a root at the origin for every positive order
  287. ['[nu] > 0], and for every negative integer order
  288. ['[nu] = -n] with ['n [isin] [negative] [super +]] and ['n [ne] 0].
  289. In addition, ['Y[sub [nu]](x)] has a root at the origin
  290. for every negative half-integer order ['[nu] = -n/2], with ['n [isin] [negative] [super +]] and
  291. and ['n [ne] 0].
  292. For these special parameter values, the origin with
  293. a value of ['x = 0] is provided as the ['0[super th]]
  294. root generated by `cyl_bessel_j_zero()`
  295. and `cyl_neumann_zero()`.
  296. When calculating initial estimates for the roots
  297. of Bessel functions, a distinction is made between
  298. positive order and negative order, and different
  299. methods are used for these. In addition, different algorithms
  300. are used for the first root ['m = 1] and
  301. for subsequent roots with higher rank ['m [ge] 2].
  302. Furthermore, estimates of the roots for Bessel functions
  303. with order above and below a cutoff at ['[nu] = 2.2]
  304. are calculated with different methods.
  305. Calculations of the estimates of ['j[sub [nu],1]] and ['y[sub [nu],1]]
  306. with ['0 [le] [nu] < 2.2] use empirically tabulated values.
  307. The coefficients for these have been generated by a
  308. computer algebra system.
  309. Calculations of the estimates of ['j[sub [nu],1]] and ['y[sub [nu],1]]
  310. with ['[nu][ge] 2.2] use Eqs.9.5.14 and 9.5.15 in __Abramowitz_Stegun.
  311. In particular,
  312. [expression j[sub [nu],1] [cong] [nu] + 1.85575 [nu][super [frac13]] + 1.033150 [nu][super -[frac13]] - 0.00397 [nu][super -1] - 0.0908 [nu][super -5/3] + 0.043 [nu][super -7/3] + [ellipsis]]
  313. and
  314. [expression y[sub [nu],1] [cong] [nu] + 0.93157 [nu][super [frac13]] + 0.26035 [nu][super -[frac13]] + 0.01198 [nu][super -1] - 0.0060 [nu][super -5/3] - 0.001 [nu][super -7/3] + [ellipsis]]
  315. Calculations of the estimates of ['j[sub [nu], m]] and ['y[sub [nu], m]]
  316. with rank ['m > 2] and ['0 [le] [nu] < 2.2] use
  317. McMahon's approximation, as described in M. Abramowitz and I. A. Stegan, Section 9.5 and 9.5.12.
  318. In particular,
  319. [:['j[sub [nu],m], y[sub [nu],m] [cong]]]
  320. [:[:[beta] - ([mu]-1) / 8[beta]]]
  321. [:[:['- 4([mu]-1)(7[mu] - 31) / 3(8[beta])[super 3]]]]
  322. [:[:['-32([mu]-1)(83[mu][sup2] - 982[mu] + 3779) / 15(8[beta])[super 5]]]]
  323. [:[:['-64([mu]-1)(6949[mu][super 3] - 153855[mu][sup2] + 1585743[mu]- 6277237) / 105(8a)[super 7]]]]
  324. [:[:['- [ellipsis]] [emquad] (5)]]
  325. where ['[mu] = 4[nu][super 2]] and ['[beta] = (m + [frac12][nu] - [frac14])[pi]]
  326. for ['j[sub [nu],m]] and
  327. ['[beta] = (m + [frac12][nu] -[frac34])[pi] for ['y[sub [nu],m]]].
  328. Calculations of the estimates of ['j[sub [nu], m]] and ['y[sub [nu], m]]
  329. with ['[nu] [ge] 2.2] use
  330. one term in the asymptotic expansion given in
  331. Eq.9.5.22 and top line of Eq.9.5.26 combined with Eq. 9.3.39,
  332. all in __Abramowitz_Stegun explicit and easy-to-understand treatment
  333. for asymptotic expansion of zeros.
  334. The latter two equations are expressed for argument ['(x)] greater than one.
  335. (Olver also gives the series form of the equations in
  336. [@http://dlmf.nist.gov/10.21#vi [sect]10.21(vi) McMahon's Asymptotic Expansions for Large Zeros] - using slightly different variable names).
  337. In summary,
  338. [expression j[sub [nu], m] [sim] [nu]x(-[zeta]) + f[sub 1](-[zeta]/[nu])]
  339. where ['-[zeta] = [nu][super -2/3]a[sub m]] and ['a[sub m]] is
  340. the absolute value of the ['m[super th]] root of ['Ai(x)] on the negative real axis.
  341. Here ['x = x(-[zeta])] is the inverse of the function
  342. [expression [frac23](-[zeta])[super 3/2] = [radic](x[sup2] - 1) - cos[supminus][sup1](1/x)] (7)
  343. Furthermore,
  344. [expression f[sub 1](-[zeta]) = [frac12]x(-[zeta]) {h(-[zeta])}[sup2] [sdot] b[sub 0](-[zeta])]
  345. where
  346. [expression h(-[zeta]) = {4(-[zeta]) / (x[sup2] - 1)}[super 4]]
  347. and
  348. [expression b[sub 0](-[zeta]) = -5/(48[zeta][sup2]) + 1/(-[zeta])[super [frac12]] [sdot] { 5/(24(x[super 2]-1)[super 3/2]) + 1/(8(x[super 2]-1)[super [frac12])]}]
  349. When solving for ['x(-[zeta])] in Eq. 7 above,
  350. the right-hand-side is expanded to order 2 in
  351. a Taylor series for large ['x]. This results in
  352. [expression [frac23](-[zeta])[super 3/2] [approx] x + 1/2x - [pi]/2]
  353. The positive root of the resulting quadratic equation
  354. is used to find an initial estimate ['x(-[zeta])].
  355. This initial estimate is subsequently refined with
  356. several steps of Newton-Raphson iteration
  357. in Eq. 7.
  358. Estimates of the roots of cylindrical Bessel functions
  359. of negative order on the positive real axis are found
  360. using interlacing relations. For example, the ['m[super th]]
  361. root of the cylindrical Bessel function ['j[sub -[nu],m]]
  362. is bracketed by the ['m[super th]] root and the
  363. ['(m+1)[super th]] root of the Bessel function of
  364. corresponding positive integer order. In other words,
  365. [expression j[sub n[nu], m] < j[sub -[nu], m] < j[sub n[nu], m+1]]
  366. where ['m > 1] and ['n[sub [nu]]] represents the integral
  367. floor of the absolute value of ['|-[nu]|].
  368. Similar bracketing relations are used to find estimates
  369. of the roots of Neumann functions of negative order,
  370. whereby a discontinuity at every negative half-integer
  371. order needs to be handled.
  372. Bracketing relations do not hold for the first root
  373. of cylindrical Bessel functions and cylindrical Neumann
  374. functions with negative order. Therefore, iterative algorithms
  375. combined with root-finding via bisection are used
  376. to localize ['j[sub -[nu],1]] and ['y[sub -[nu],1]].
  377. [h3 Testing]
  378. The precision of evaluation of zeros was tested at 50 decimal digits using `cpp_dec_float_50`
  379. and found identical with spot values computed by __WolframAlpha.
  380. [endsect] [/section:bessel Finding Zeros of Bessel Functions of the First and Second Kinds]
  381. [/
  382. Copyright 2006, 2013 John Maddock, Paul A. Bristow, Xiaogang Zhang and Christopher Kormanyos.
  383. Distributed under the Boost Software License, Version 1.0.
  384. (See accompanying file LICENSE_1_0.txt or copy at
  385. http://www.boost.org/LICENSE_1_0.txt).
  386. ]