]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/doc/sf/hankel.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / sf / hankel.qbk
1
2 [section:hankel Hankel Functions]
3 [section:cyl_hankel Cyclic Hankel Functions]
4
5 [h4 Synopsis]
6
7 template <class T1, class T2>
8 std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x);
9
10 template <class T1, class T2, class ``__Policy``>
11 std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x, const ``__Policy``&);
12
13 template <class T1, class T2>
14 std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x);
15
16 template <class T1, class T2, class ``__Policy``>
17 std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x, const ``__Policy``&);
18
19
20 [h4 Description]
21
22 The functions __cyl_hankel_1 and __cyl_hankel_2 return the result of the
23 [@http://dlmf.nist.gov/10.2#P3 Hankel functions] of the first and second kind respectively:
24
25 [:['cyl_hankel_1(v, x) = H[sub v][super (1)](x) = J[sub v](x) + i Y[sub v](x)]]
26
27 [:['cyl_hankel_2(v, x) = H[sub v][super (2)](x) = J[sub v](x) - i Y[sub v](x)]]
28
29 where:
30
31 ['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
33 The return type of these functions is computed using the __arg_promotion_rules
34 when T1 and T2 are different types. The functions are also optimised for the
35 relatively common case that T1 is an integer.
36
37 [optional_policy]
38
39 Note that while the arguments to these functions are real values, the results are complex.
40 That means that the functions can only be instantiated on types `float`, `double` and `long double`.
41 The functions have also been extended to operate over the whole range of ['v] and ['x]
42 (unlike __cyl_bessel_j and __cyl_neumann).
43
44 [h4 Performance]
45
46 These functions are generally more efficient than two separate calls to the underlying Bessel
47 functions as internally Bessel J and Y can be computed simultaneously.
48
49 [h4 Testing]
50
51 There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
52 on the Bessel functions upon which these are based.
53
54 [h4 Accuracy]
55
56 Refer to __cyl_bessel_j and __cyl_neumann.
57
58 [h4 Implementation]
59
60 For ['x < 0] the following reflection formulae are used:
61
62 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselJ/16/01/01/ [equation hankel1]]
63
64 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/ [equation hankel2]]
65
66 [@http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/16/01/01/ [equation hankel3]]
67
68 Otherwise the implementation is trivially in terms of the Bessel J and Y functions.
69
70 Note however, that the Hankel functions compute the Bessel J and Y functions simultaneously,
71 and therefore a single Hankel function call is more efficient than two Bessel function calls.
72 The one exception is when ['v] is a small positive integer, in which case the usual Bessel function
73 routines for integer order are used.
74
75 [endsect]
76
77
78 [section:sph_hankel Spherical Hankel Functions]
79
80 [h4 Synopsis]
81
82 template <class T1, class T2>
83 std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x);
84
85 template <class T1, class T2, class ``__Policy``>
86 std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x, const ``__Policy``&);
87
88 template <class T1, class T2>
89 std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x);
90
91 template <class T1, class T2, class ``__Policy``>
92 std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x, const ``__Policy``&);
93
94
95 [h4 Description]
96
97 The functions __sph_hankel_1 and __sph_hankel_2 return the result of the
98 [@http://dlmf.nist.gov/10.47#P1 spherical Hankel functions] of the first and second kind respectively:
99
100 [equation hankel4]
101
102 [equation hankel5]
103
104 The return type of these functions is computed using the __arg_promotion_rules
105 when T1 and T2 are different types. The functions are also optimised for the
106 relatively common case that T1 is an integer.
107
108 [optional_policy]
109
110 Note that while the arguments to these functions are real values, the results are complex.
111 That means that the functions can only be instantiated on types `float`, `double` and `long double`.
112 The functions have also been extended to operate over the whole range of ['v] and ['x]
113 (unlike __cyl_bessel_j and __cyl_neumann).
114
115 [h4 Testing]
116
117 There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
118 on the Bessel functions upon which these are based.
119
120 [h4 Accuracy]
121
122 Refer to __cyl_bessel_j and __cyl_neumann.
123
124 [h4 Implementation]
125
126 These functions are trivially implemented in terms of __cyl_hankel_1 and __cyl_hankel_2.
127
128 [endsect]
129 [endsect]
130
131 [/
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).
136 ]