sinc.qbk 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. [section:sinc Sinus Cardinal and Hyperbolic Sinus Cardinal Functions]
  8. [section:sinc_overview Sinus Cardinal and Hyperbolic Sinus Cardinal Functions Overview]
  9. The [@http://mathworld.wolfram.com/SincFunction.html Sinus Cardinal family of functions]
  10. (indexed by the family of indices [^a > 0])
  11. is defined by
  12. [equation special_functions_blurb20]
  13. it sees heavy use in signal processing tasks.
  14. By analogy, the
  15. [@http://mathworld.wolfram.com/SinhcFunction.htm Hyperbolic Sinus Cardinal]
  16. family of functions
  17. (also indexed by the family of indices [^a > 0]) is defined by
  18. [equation special_functions_blurb22]
  19. These two families of functions are composed of entire functions.
  20. These functions (__sinc_pi and __sinhc_pi) are needed by
  21. [@http://www.boost.org/libs/math/quaternion/quaternion.html our implementation]
  22. of [@http://mathworld.wolfram.com/Quaternion.html quaternions]
  23. and [@http://mathworld.wolfram.com/Octonion.html octonions].
  24. [: ['[*Sinus Cardinal of index pi (purple) and Hyperbolic Sinus Cardinal of index pi (red) on R]]]
  25. [: [$../graphs/sinc_pi_and_sinhc_pi_on_r.png]]
  26. [endsect] [/section:sinc_overview Sinus Cardinal and Hyperbolic Sinus Cardinal Functions Overview]
  27. [section sinc_pi]
  28. ``
  29. #include <boost/math/special_functions/sinc.hpp>
  30. ``
  31. template<class T>
  32. ``__sf_result`` sinc_pi(const T x);
  33. template<class T, class ``__Policy``>
  34. ``__sf_result`` sinc_pi(const T x, const ``__Policy``&);
  35. template<class T, template<typename> class U>
  36. U<T> sinc_pi(const U<T> x);
  37. template<class T, template<typename> class U, class ``__Policy``>
  38. U<T> sinc_pi(const U<T> x, const ``__Policy``&);
  39. Computes
  40. [link math_toolkit.sinc.sinc_overview
  41. the Sinus Cardinal] of x:
  42. [expression sinc_pi(x) = sin(x) / x]
  43. The second form is for complex numbers,
  44. quaternions, octonions etc. Taylor series are used at the origin
  45. to ensure accuracy.
  46. [graph sinc_pi]
  47. [optional_policy]
  48. [endsect] [/section sinc_pi]
  49. [section sinhc_pi]
  50. ``
  51. #include <boost/math/special_functions/sinhc.hpp>
  52. ``
  53. template<class T>
  54. ``__sf_result`` sinhc_pi(const T x);
  55. template<class T, class ``__Policy``>
  56. ``__sf_result`` sinhc_pi(const T x, const ``__Policy``&);
  57. template<typename T, template<typename> class U>
  58. U<T> sinhc_pi(const U<T> x);
  59. template<class T, template<typename> class U, class ``__Policy``>
  60. U<T> sinhc_pi(const U<T> x, const ``__Policy``&);
  61. Computes [@http://mathworld.wolfram.com/SinhcFunction.html sinhc function],
  62. the [link math_toolkit.sinc.sinc_overview Hyperbolic Sinus Cardinal] of x:
  63. [expression sinhc_pi(x) = sinh(x) / x]
  64. The second form is for
  65. complex numbers, quaternions, octonions etc. Taylor series are used at the origin
  66. to ensure accuracy.
  67. The return type of the first form is computed using the __arg_promotion_rules
  68. when T is an integer type.
  69. [optional_policy]
  70. [graph sinhc_pi]
  71. [endsect] [/section sinhc_pi]
  72. [endsect] [/section:sinc Sinus Cardinal and Hyperbolic Sinus Cardinal Functions]