1 [section:hankel Hankel Functions]
2 [section:cyl_hankel Cyclic Hankel Functions]
6 template <class T1, class T2>
7 std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x);
9 template <class T1, class T2, class ``__Policy``>
10 std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x, const ``__Policy``&);
12 template <class T1, class T2>
13 std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x);
15 template <class T1, class T2, class ``__Policy``>
16 std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x, const ``__Policy``&);
21 The functions __cyl_hankel_1 and __cyl_hankel_2 return the result of the
22 [@http://dlmf.nist.gov/10.2#P3 Hankel functions] of the first and second kind respectively:
24 [expression ['cyl_hankel_1(v, x) = H[sub v][super (1)](x) = J[sub v](x) + i Y[sub v](x)]]
26 [expression ['cyl_hankel_2(v, x) = H[sub v][super (2)](x) = J[sub v](x) - i Y[sub v](x)]]
30 ['J[sub v](x)] is the Bessel function of the first kind, and ['Y[sub v](x)] is the Bessel function of the second kind.
32 The return type of these functions is computed using the __arg_promotion_rules
33 when T1 and T2 are different types. The functions are also optimised for the
34 relatively common case that T1 is an integer.
38 Note that while the arguments to these functions are real values, the results are complex.
39 That means that the functions can only be instantiated on types `float`, `double` and `long double`.
40 The functions have also been extended to operate over the whole range of ['v] and ['x]
41 (unlike __cyl_bessel_j and __cyl_neumann).
45 These functions are generally more efficient than two separate calls to the underlying Bessel
46 functions as internally Bessel J and Y can be computed simultaneously.
50 There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
51 on the Bessel functions upon which these are based.
55 Refer to __cyl_bessel_j and __cyl_neumann.
59 For ['x < 0] the following reflection formulae are used:
61 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselJ/16/01/01/ [equation hankel1]]
63 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/ [equation hankel2]]
65 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/ [equation hankel3]]
67 Otherwise the implementation is trivially in terms of the Bessel J and Y functions.
69 Note however, that the Hankel functions compute the Bessel J and Y functions simultaneously,
70 and therefore a single Hankel function call is more efficient than two Bessel function calls.
71 The one exception is when ['v] is a small positive integer, in which case the usual Bessel function
72 routines for integer order are used.
74 [endsect] [/section:cyl_hankel Cyclic Hankel Functions]
76 [section:sph_hankel Spherical Hankel Functions]
80 template <class T1, class T2>
81 std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x);
83 template <class T1, class T2, class ``__Policy``>
84 std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x, const ``__Policy``&);
86 template <class T1, class T2>
87 std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x);
89 template <class T1, class T2, class ``__Policy``>
90 std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x, const ``__Policy``&);
95 The functions __sph_hankel_1 and __sph_hankel_2 return the result of the
96 [@http://dlmf.nist.gov/10.47#P1 spherical Hankel functions] of the first and second kind respectively:
102 The return type of these functions is computed using the __arg_promotion_rules
103 when T1 and T2 are different types. The functions are also optimised for the
104 relatively common case that T1 is an integer.
108 Note that while the arguments to these functions are real values, the results are complex.
109 That means that the functions can only be instantiated on types `float`, `double` and `long double`.
110 The functions have also been extended to operate over the whole range of ['v] and ['x]
111 (unlike __cyl_bessel_j and __cyl_neumann).
115 There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
116 on the Bessel functions upon which these are based.
120 Refer to __cyl_bessel_j and __cyl_neumann.
124 These functions are trivially implemented in terms of __cyl_hankel_1 and __cyl_hankel_2.
126 [endsect] [/section:sph_hankel Spherical Hankel Functions]
128 [endsect] [/section:hankel Hankel Functions]
132 Copyright 2012 John Maddock.
133 Distributed under the Boost Software License, Version 1.0.
134 (See accompanying file LICENSE_1_0.txt or copy at
135 http://www.boost.org/LICENSE_1_0.txt).