• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/ math.qbk
2  Copyright 2006 Hubert Holin and John Maddock.
3  Distributed under the Boost Software License, Version 1.0.
4  (See accompanying file LICENSE_1_0.txt or copy at
5  http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[section:sinc Sinus Cardinal and Hyperbolic Sinus Cardinal Functions]
9
10[section:sinc_overview Sinus Cardinal and Hyperbolic Sinus Cardinal Functions Overview]
11
12The [@http://mathworld.wolfram.com/SincFunction.html Sinus Cardinal family of functions]
13(indexed by the family of indices [^a > 0])
14is defined by
15
16[equation special_functions_blurb20]
17
18it sees heavy use in signal processing tasks.
19
20By analogy, the
21[@http://mathworld.wolfram.com/SinhcFunction.htm Hyperbolic Sinus Cardinal]
22family of functions
23(also indexed by the family of indices [^a > 0]) is defined by
24
25[equation special_functions_blurb22]
26
27These two families of functions are composed of entire functions.
28
29These functions (__sinc_pi and __sinhc_pi) are needed by
30[@http://www.boost.org/libs/math/quaternion/quaternion.html our implementation]
31of [@http://mathworld.wolfram.com/Quaternion.html quaternions]
32and [@http://mathworld.wolfram.com/Octonion.html octonions].
33
34[: ['[*Sinus Cardinal of index pi (purple) and Hyperbolic Sinus Cardinal of index pi (red) on R]]]
35[: [$../graphs/sinc_pi_and_sinhc_pi_on_r.png]]
36
37[endsect] [/section:sinc_overview Sinus Cardinal and Hyperbolic Sinus Cardinal Functions Overview]
38
39[section sinc_pi]
40
41``
42#include <boost/math/special_functions/sinc.hpp>
43``
44
45   template<class T>
46   ``__sf_result`` sinc_pi(const T x);
47
48   template<class T, class ``__Policy``>
49   ``__sf_result`` sinc_pi(const T x, const ``__Policy``&);
50
51   template<class T, template<typename> class U>
52   U<T> sinc_pi(const U<T> x);
53
54   template<class T, template<typename> class U, class ``__Policy``>
55   U<T> sinc_pi(const U<T> x, const ``__Policy``&);
56
57Computes
58[link math_toolkit.sinc.sinc_overview
59the Sinus Cardinal] of x:
60
61[expression sinc_pi(x) = sin(x) / x]
62
63The second form is for complex numbers,
64quaternions, octonions etc. Taylor series are used at the origin
65to ensure accuracy.
66
67[graph sinc_pi]
68
69[optional_policy]
70
71[endsect] [/section sinc_pi]
72
73
74[section sinhc_pi]
75
76``
77#include <boost/math/special_functions/sinhc.hpp>
78``
79
80   template<class T>
81   ``__sf_result`` sinhc_pi(const T x);
82
83   template<class T, class ``__Policy``>
84   ``__sf_result`` sinhc_pi(const T x, const ``__Policy``&);
85
86   template<typename T, template<typename> class U>
87   U<T> sinhc_pi(const U<T> x);
88
89   template<class T, template<typename> class U, class ``__Policy``>
90   U<T> sinhc_pi(const U<T> x, const ``__Policy``&);
91
92Computes [@http://mathworld.wolfram.com/SinhcFunction.html sinhc function],
93the [link math_toolkit.sinc.sinc_overview  Hyperbolic Sinus Cardinal] of x:
94
95[expression sinhc_pi(x) = sinh(x) / x]
96
97The second form is for
98complex numbers, quaternions, octonions etc. Taylor series are used at the origin
99to ensure accuracy.
100
101The return type of the first form is computed using the __arg_promotion_rules
102when T is an integer type.
103
104[optional_policy]
105
106[graph sinhc_pi]
107
108[endsect] [/section sinhc_pi]
109
110[endsect] [/section:sinc Sinus Cardinal and Hyperbolic Sinus Cardinal Functions]
111
112