3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Cyclic Hankel Functions</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.5.2">
8 <link rel="up" href="../hankel.html" title="Hankel Functions">
9 <link rel="prev" href="../hankel.html" title="Hankel Functions">
10 <link rel="next" href="sph_hankel.html" title="Spherical Hankel Functions">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../hankel.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../hankel.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_hankel.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="math_toolkit.hankel.cyl_hankel"></a><a class="link" href="cyl_hankel.html" title="Cyclic Hankel Functions">Cyclic Hankel Functions</a>
28 </h3></div></div></div>
30 <a name="math_toolkit.hankel.cyl_hankel.h0"></a>
31 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.synopsis"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.synopsis">Synopsis</a>
33 <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>
34 <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><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="special">></span> <span class="identifier">cyl_hankel_1</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>
36 <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>
37 <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><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="special">></span> <span class="identifier">cyl_hankel_1</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>
39 <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>
40 <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><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="special">></span> <span class="identifier">cyl_hankel_2</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>
42 <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>
43 <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><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="special">></span> <span class="identifier">cyl_hankel_2</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>
46 <a name="math_toolkit.hankel.cyl_hankel.h1"></a>
47 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.description"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.description">Description</a>
50 The functions <a class="link" href="cyl_hankel.html" title="Cyclic Hankel Functions">cyl_hankel_1</a>
51 and <a class="link" href="cyl_hankel.html" title="Cyclic Hankel Functions">cyl_hankel_2</a> return
52 the result of the <a href="http://dlmf.nist.gov/10.2#P3" target="_top">Hankel functions</a>
53 of the first and second kind respectively:
55 <div class="blockquote"><blockquote class="blockquote"><p>
56 <span class="emphasis"><em>cyl_hankel_1(v, x) = H<sub>v</sub><sup>(1)</sup>(x) = J<sub>v</sub>(x) + i Y<sub>v</sub>(x)</em></span>
57 </p></blockquote></div>
58 <div class="blockquote"><blockquote class="blockquote"><p>
59 <span class="emphasis"><em>cyl_hankel_2(v, x) = H<sub>v</sub><sup>(2)</sup>(x) = J<sub>v</sub>(x) - i Y<sub>v</sub>(x)</em></span>
60 </p></blockquote></div>
65 <span class="emphasis"><em>J<sub>v</sub>(x)</em></span> is the Bessel function of the first kind, and
66 <span class="emphasis"><em>Y<sub>v</sub>(x)</em></span> is the Bessel function of the second kind.
69 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
70 type calculation rules</em></span></a> when T1 and T2 are different types.
71 The functions are also optimised for the relatively common case that T1 is
75 The final <a class="link" href="../../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
76 be used to control the behaviour of the function: how it handles errors,
77 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
78 documentation for more details</a>.
81 Note that while the arguments to these functions are real values, the results
82 are complex. That means that the functions can only be instantiated on types
83 <code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>
84 and <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>.
85 The functions have also been extended to operate over the whole range of
86 <span class="emphasis"><em>v</em></span> and <span class="emphasis"><em>x</em></span> (unlike <a class="link" href="../bessel/bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_bessel_j</a>
87 and <a class="link" href="../bessel/bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a>).
90 <a name="math_toolkit.hankel.cyl_hankel.h2"></a>
91 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.performance"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.performance">Performance</a>
94 These functions are generally more efficient than two separate calls to the
95 underlying Bessel functions as internally Bessel J and Y can be computed
99 <a name="math_toolkit.hankel.cyl_hankel.h3"></a>
100 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.testing"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.testing">Testing</a>
103 There are just a few spot tests to exercise all the special case handling
104 - the bulk of the testing is done on the Bessel functions upon which these
108 <a name="math_toolkit.hankel.cyl_hankel.h4"></a>
109 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.accuracy"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.accuracy">Accuracy</a>
112 Refer to <a class="link" href="../bessel/bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_bessel_j</a>
113 and <a class="link" href="../bessel/bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a>.
116 <a name="math_toolkit.hankel.cyl_hankel.h5"></a>
117 <span class="phrase"><a name="math_toolkit.hankel.cyl_hankel.implementation"></a></span><a class="link" href="cyl_hankel.html#math_toolkit.hankel.cyl_hankel.implementation">Implementation</a>
120 For <span class="emphasis"><em>x < 0</em></span> the following reflection formulae are used:
123 <a href="http://functions.wolfram.com/Bessel-TypeFunctions/BesselJ/16/01/01/" target="_top">
124 <span class="inlinemediaobject"><img src="../../../equations/hankel1.svg"></span></a>
127 <a href="http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/" target="_top">
128 <span class="inlinemediaobject"><img src="../../../equations/hankel2.svg"></span></a>
131 <a href="http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/" target="_top">
132 <span class="inlinemediaobject"><img src="../../../equations/hankel3.svg"></span></a>
135 Otherwise the implementation is trivially in terms of the Bessel J and Y
139 Note however, that the Hankel functions compute the Bessel J and Y functions
140 simultaneously, and therefore a single Hankel function call is more efficient
141 than two Bessel function calls. The one exception is when <span class="emphasis"><em>v</em></span>
142 is a small positive integer, in which case the usual Bessel function routines
143 for integer order are used.
146 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
147 <td align="left"></td>
148 <td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012-2014 Nikhar Agrawal,
149 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
150 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan Råde, Gautam Sewani,
151 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p>
152 Distributed under the Boost Software License, Version 1.0. (See accompanying
153 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>)
158 <div class="spirit-nav">
159 <a accesskey="p" href="../hankel.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../hankel.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_hankel.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>