]> git.proxmox.com Git - ceph.git/blame - 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
CommitLineData
7c673cae
FG
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
22The 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
29where:
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
33The return type of these functions is computed using the __arg_promotion_rules
34when T1 and T2 are different types. The functions are also optimised for the
35relatively common case that T1 is an integer.
36
37[optional_policy]
38
39Note that while the arguments to these functions are real values, the results are complex.
40That means that the functions can only be instantiated on types `float`, `double` and `long double`.
41The 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
46These functions are generally more efficient than two separate calls to the underlying Bessel
47functions as internally Bessel J and Y can be computed simultaneously.
48
49[h4 Testing]
50
51There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
52on the Bessel functions upon which these are based.
53
54[h4 Accuracy]
55
56Refer to __cyl_bessel_j and __cyl_neumann.
57
58[h4 Implementation]
59
60For ['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
68Otherwise the implementation is trivially in terms of the Bessel J and Y functions.
69
70Note however, that the Hankel functions compute the Bessel J and Y functions simultaneously,
71and therefore a single Hankel function call is more efficient than two Bessel function calls.
72The one exception is when ['v] is a small positive integer, in which case the usual Bessel function
73routines 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
97The 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
104The return type of these functions is computed using the __arg_promotion_rules
105when T1 and T2 are different types. The functions are also optimised for the
106relatively common case that T1 is an integer.
107
108[optional_policy]
109
110Note that while the arguments to these functions are real values, the results are complex.
111That means that the functions can only be instantiated on types `float`, `double` and `long double`.
112The 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
117There are just a few spot tests to exercise all the special case handling - the bulk of the testing is done
118on the Bessel functions upon which these are based.
119
120[h4 Accuracy]
121
122Refer to __cyl_bessel_j and __cyl_neumann.
123
124[h4 Implementation]
125
126These 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]