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