tr1_ref.qbk 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. [section:tr1_ref TR1 C Functions Quick Reference]
  2. [h4 Supported TR1 Functions]
  3. namespace boost{ namespace math{ namespace tr1{ extern "C"{
  4. // [5.2.1.1] associated Laguerre polynomials:
  5. double assoc_laguerre(unsigned n, unsigned m, double x);
  6. float assoc_laguerref(unsigned n, unsigned m, float x);
  7. long double assoc_laguerrel(unsigned n, unsigned m, long double x);
  8. // [5.2.1.2] associated Legendre functions:
  9. double assoc_legendre(unsigned l, unsigned m, double x);
  10. float assoc_legendref(unsigned l, unsigned m, float x);
  11. long double assoc_legendrel(unsigned l, unsigned m, long double x);
  12. // [5.2.1.3] beta function:
  13. double beta(double x, double y);
  14. float betaf(float x, float y);
  15. long double betal(long double x, long double y);
  16. // [5.2.1.4] (complete) elliptic integral of the first kind:
  17. double comp_ellint_1(double k);
  18. float comp_ellint_1f(float k);
  19. long double comp_ellint_1l(long double k);
  20. // [5.2.1.5] (complete) elliptic integral of the second kind:
  21. double comp_ellint_2(double k);
  22. float comp_ellint_2f(float k);
  23. long double comp_ellint_2l(long double k);
  24. // [5.2.1.6] (complete) elliptic integral of the third kind:
  25. double comp_ellint_3(double k, double nu);
  26. float comp_ellint_3f(float k, float nu);
  27. long double comp_ellint_3l(long double k, long double nu);
  28. // [5.2.1.8] regular modified cylindrical Bessel functions:
  29. double cyl_bessel_i(double nu, double x);
  30. float cyl_bessel_if(float nu, float x);
  31. long double cyl_bessel_il(long double nu, long double x);
  32. // [5.2.1.9] cylindrical Bessel functions (of the first kind):
  33. double cyl_bessel_j(double nu, double x);
  34. float cyl_bessel_jf(float nu, float x);
  35. long double cyl_bessel_jl(long double nu, long double x);
  36. // [5.2.1.10] irregular modified cylindrical Bessel functions:
  37. double cyl_bessel_k(double nu, double x);
  38. float cyl_bessel_kf(float nu, float x);
  39. long double cyl_bessel_kl(long double nu, long double x);
  40. // [5.2.1.11] cylindrical Neumann functions;
  41. // cylindrical Bessel functions (of the second kind):
  42. double cyl_neumann(double nu, double x);
  43. float cyl_neumannf(float nu, float x);
  44. long double cyl_neumannl(long double nu, long double x);
  45. // [5.2.1.12] (incomplete) elliptic integral of the first kind:
  46. double ellint_1(double k, double phi);
  47. float ellint_1f(float k, float phi);
  48. long double ellint_1l(long double k, long double phi);
  49. // [5.2.1.13] (incomplete) elliptic integral of the second kind:
  50. double ellint_2(double k, double phi);
  51. float ellint_2f(float k, float phi);
  52. long double ellint_2l(long double k, long double phi);
  53. // [5.2.1.14] (incomplete) elliptic integral of the third kind:
  54. double ellint_3(double k, double nu, double phi);
  55. float ellint_3f(float k, float nu, float phi);
  56. long double ellint_3l(long double k, long double nu, long double phi);
  57. // [5.2.1.15] exponential integral:
  58. double expint(double x);
  59. float expintf(float x);
  60. long double expintl(long double x);
  61. // [5.2.1.16] Hermite polynomials:
  62. double hermite(unsigned n, double x);
  63. float hermitef(unsigned n, float x);
  64. long double hermitel(unsigned n, long double x);
  65. // [5.2.1.18] Laguerre polynomials:
  66. double laguerre(unsigned n, double x);
  67. float laguerref(unsigned n, float x);
  68. long double laguerrel(unsigned n, long double x);
  69. // [5.2.1.19] Legendre polynomials:
  70. double legendre(unsigned l, double x);
  71. float legendref(unsigned l, float x);
  72. long double legendrel(unsigned l, long double x);
  73. // [5.2.1.20] Riemann zeta function:
  74. double riemann_zeta(double);
  75. float riemann_zetaf(float);
  76. long double riemann_zetal(long double);
  77. // [5.2.1.21] spherical Bessel functions (of the first kind):
  78. double sph_bessel(unsigned n, double x);
  79. float sph_besself(unsigned n, float x);
  80. long double sph_bessell(unsigned n, long double x);
  81. // [5.2.1.22] spherical associated Legendre functions:
  82. double sph_legendre(unsigned l, unsigned m, double theta);
  83. float sph_legendref(unsigned l, unsigned m, float theta);
  84. long double sph_legendrel(unsigned l, unsigned m, long double theta);
  85. // [5.2.1.23] spherical Neumann functions;
  86. // spherical Bessel functions (of the second kind):
  87. double sph_neumann(unsigned n, double x);
  88. float sph_neumannf(unsigned n, float x);
  89. long double sph_neumannl(unsigned n, long double x);
  90. }}}} // namespaces
  91. In addition sufficient additional overloads of the `double` versions of the
  92. above functions are provided, so that calling the function with any mixture
  93. of `float`, `double`, `long double`, or /integer/ arguments is supported, with the
  94. return type determined by the __arg_promotion_rules.
  95. For example:
  96. expintf(2.0f); // float version, returns float.
  97. expint(2.0f); // also calls the float version and returns float.
  98. expint(2.0); // double version, returns double.
  99. expintl(2.0L); // long double version, returns a long double.
  100. expint(2.0L); // also calls the long double version.
  101. expint(2); // integer argument is treated as a double, returns double.
  102. [h4 Quick Reference]
  103. // [5.2.1.1] associated Laguerre polynomials:
  104. double assoc_laguerre(unsigned n, unsigned m, double x);
  105. float assoc_laguerref(unsigned n, unsigned m, float x);
  106. long double assoc_laguerrel(unsigned n, unsigned m, long double x);
  107. The assoc_laguerre functions return:
  108. [equation laguerre_1]
  109. See also __laguerre for the full template (header only) version of this function.
  110. // [5.2.1.2] associated Legendre functions:
  111. double assoc_legendre(unsigned l, unsigned m, double x);
  112. float assoc_legendref(unsigned l, unsigned m, float x);
  113. long double assoc_legendrel(unsigned l, unsigned m, long double x);
  114. The assoc_legendre functions return:
  115. [equation legendre_1b]
  116. See also __legendre for the full template (header only) version of this function.
  117. // [5.2.1.3] beta function:
  118. double beta(double x, double y);
  119. float betaf(float x, float y);
  120. long double betal(long double x, long double y);
  121. Returns the beta function of /x/ and /y/:
  122. [equation beta1]
  123. See also __beta for the full template (header only) version of this function.
  124. // [5.2.1.4] (complete) elliptic integral of the first kind:
  125. double comp_ellint_1(double k);
  126. float comp_ellint_1f(float k);
  127. long double comp_ellint_1l(long double k);
  128. Returns the complete elliptic integral of the first kind of /k/:
  129. [equation ellint6]
  130. See also __ellint_1 for the full template (header only) version of this function.
  131. // [5.2.1.5] (complete) elliptic integral of the second kind:
  132. double comp_ellint_2(double k);
  133. float comp_ellint_2f(float k);
  134. long double comp_ellint_2l(long double k);
  135. Returns the complete elliptic integral of the second kind of /k/:
  136. [equation ellint7]
  137. See also __ellint_2 for the full template (header only) version of this function.
  138. // [5.2.1.6] (complete) elliptic integral of the third kind:
  139. double comp_ellint_3(double k, double nu);
  140. float comp_ellint_3f(float k, float nu);
  141. long double comp_ellint_3l(long double k, long double nu);
  142. Returns the complete elliptic integral of the third kind of /k/ and /nu/:
  143. [equation ellint8]
  144. See also __ellint_3 for the full template (header only) version of this function.
  145. // [5.2.1.8] regular modified cylindrical Bessel functions:
  146. double cyl_bessel_i(double nu, double x);
  147. float cyl_bessel_if(float nu, float x);
  148. long double cyl_bessel_il(long double nu, long double x);
  149. Returns the modified bessel function of the first kind of /nu/ and /x/:
  150. [equation mbessel2]
  151. See also __cyl_bessel_i for the full template (header only) version of this function.
  152. // [5.2.1.9] cylindrical Bessel functions (of the first kind):
  153. double cyl_bessel_j(double nu, double x);
  154. float cyl_bessel_jf(float nu, float x);
  155. long double cyl_bessel_jl(long double nu, long double x);
  156. Returns the bessel function of the first kind of /nu/ and /x/:
  157. [equation bessel2]
  158. See also __cyl_bessel_j for the full template (header only) version of this function.
  159. // [5.2.1.10] irregular modified cylindrical Bessel functions:
  160. double cyl_bessel_k(double nu, double x);
  161. float cyl_bessel_kf(float nu, float x);
  162. long double cyl_bessel_kl(long double nu, long double x);
  163. Returns the modified bessel function of the second kind of /nu/ and /x/:
  164. [equation mbessel3]
  165. See also __cyl_bessel_k for the full template (header only) version of this function.
  166. // [5.2.1.11] cylindrical Neumann functions;
  167. // cylindrical Bessel functions (of the second kind):
  168. double cyl_neumann(double nu, double x);
  169. float cyl_neumannf(float nu, float x);
  170. long double cyl_neumannl(long double nu, long double x);
  171. Returns the bessel function of the second kind (Neumann function) of /nu/ and /x/:
  172. [equation bessel3]
  173. See also __cyl_neumann for the full template (header only) version of this function.
  174. // [5.2.1.12] (incomplete) elliptic integral of the first kind:
  175. double ellint_1(double k, double phi);
  176. float ellint_1f(float k, float phi);
  177. long double ellint_1l(long double k, long double phi);
  178. Returns the incomplete elliptic integral of the first kind of /k/ and /phi/:
  179. [equation ellint2]
  180. See also __ellint_1 for the full template (header only) version of this function.
  181. // [5.2.1.13] (incomplete) elliptic integral of the second kind:
  182. double ellint_2(double k, double phi);
  183. float ellint_2f(float k, float phi);
  184. long double ellint_2l(long double k, long double phi);
  185. Returns the incomplete elliptic integral of the second kind of /k/ and /phi/:
  186. [equation ellint3]
  187. See also __ellint_2 for the full template (header only) version of this function.
  188. // [5.2.1.14] (incomplete) elliptic integral of the third kind:
  189. double ellint_3(double k, double nu, double phi);
  190. float ellint_3f(float k, float nu, float phi);
  191. long double ellint_3l(long double k, long double nu, long double phi);
  192. Returns the incomplete elliptic integral of the third kind of /k/, /nu/ and /phi/:
  193. [equation ellint4]
  194. See also __ellint_3 for the full template (header only) version of this function.
  195. // [5.2.1.15] exponential integral:
  196. double expint(double x);
  197. float expintf(float x);
  198. long double expintl(long double x);
  199. Returns the exponential integral Ei of /x/:
  200. [equation expint_i_1]
  201. See also __expint for the full template (header only) version of this function.
  202. // [5.2.1.16] Hermite polynomials:
  203. double hermite(unsigned n, double x);
  204. float hermitef(unsigned n, float x);
  205. long double hermitel(unsigned n, long double x);
  206. Returns the n'th Hermite polynomial of /x/:
  207. [equation hermite_0]
  208. See also __hermite for the full template (header only) version of this function.
  209. // [5.2.1.18] Laguerre polynomials:
  210. double laguerre(unsigned n, double x);
  211. float laguerref(unsigned n, float x);
  212. long double laguerrel(unsigned n, long double x);
  213. Returns the n'th Laguerre polynomial of /x/:
  214. [equation laguerre_0]
  215. See also __laguerre for the full template (header only) version of this function.
  216. // [5.2.1.19] Legendre polynomials:
  217. double legendre(unsigned l, double x);
  218. float legendref(unsigned l, float x);
  219. long double legendrel(unsigned l, long double x);
  220. Returns the l'th Legendre polynomial of /x/:
  221. [equation legendre_0]
  222. See also __legendre for the full template (header only) version of this function.
  223. // [5.2.1.20] Riemann zeta function:
  224. double riemann_zeta(double);
  225. float riemann_zetaf(float);
  226. long double riemann_zetal(long double);
  227. Returns the Riemann Zeta function of /x/:
  228. [equation zeta1]
  229. See also __zeta for the full template (header only) version of this function.
  230. // [5.2.1.21] spherical Bessel functions (of the first kind):
  231. double sph_bessel(unsigned n, double x);
  232. float sph_besself(unsigned n, float x);
  233. long double sph_bessell(unsigned n, long double x);
  234. Returns the spherical Bessel function of the first kind of /x/ j[sub n](x):
  235. [equation sbessel2]
  236. See also __sph_bessel for the full template (header only) version of this function.
  237. // [5.2.1.22] spherical associated Legendre functions:
  238. double sph_legendre(unsigned l, unsigned m, double theta);
  239. float sph_legendref(unsigned l, unsigned m, float theta);
  240. long double sph_legendrel(unsigned l, unsigned m, long double theta);
  241. Returns the spherical associated Legendre function of /l/, /m/ and /theta/:
  242. [equation spherical_3]
  243. See also __spherical_harmonic for the full template (header only) version of this function.
  244. // [5.2.1.23] spherical Neumann functions;
  245. // spherical Bessel functions (of the second kind):
  246. double sph_neumann(unsigned n, double x);
  247. float sph_neumannf(unsigned n, float x);
  248. long double sph_neumannl(unsigned n, long double x);
  249. Returns the spherical Neumann function of /x/ y[sub n](x):
  250. [equation sbessel2]
  251. See also __sph_bessel for the full template (header only) version of this function.
  252. [h4 Currently Unsupported TR1 Functions]
  253. // [5.2.1.7] confluent hypergeometric functions:
  254. double conf_hyperg(double a, double c, double x);
  255. float conf_hypergf(float a, float c, float x);
  256. long double conf_hypergl(long double a, long double c, long double x);
  257. // [5.2.1.17] hypergeometric functions:
  258. double hyperg(double a, double b, double c, double x);
  259. float hypergf(float a, float b, float c, float x);
  260. long double hypergl(long double a, long double b, long double c,
  261. long double x);
  262. [note These two functions are not implemented as they are not believed
  263. to be numerically stable.]
  264. [endsect]
  265. [/
  266. Copyright 2008, 2009 John Maddock and Paul A. Bristow.
  267. Distributed under the Boost Software License, Version 1.0.
  268. (See accompanying file LICENSE_1_0.txt or copy at
  269. http://www.boost.org/LICENSE_1_0.txt).
  270. ]