]> git.donarmstrong.com Git - rsem.git/blob - boost/math/special_functions/math_fwd.hpp
RSEM Source Codes
[rsem.git] / boost / math / special_functions / math_fwd.hpp
1 // math_fwd.hpp
2
3 // TODO revise completely for new distribution classes.
4
5 // Copyright Paul A. Bristow 2006.
6 // Copyright John Maddock 2006.
7
8 // Use, modification and distribution are subject to the
9 // Boost Software License, Version 1.0.
10 // (See accompanying file LICENSE_1_0.txt
11 // or copy at http://www.boost.org/LICENSE_1_0.txt)
12
13 // Omnibus list of forward declarations of math special functions.
14
15 // IT = Integer type.
16 // RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
17 // AT = Integer or Real type 
18
19 #ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
20 #define BOOST_MATH_SPECIAL_MATH_FWD_HPP
21
22 #ifdef _MSC_VER
23 #pragma once
24 #endif
25
26 #include <boost/math/special_functions/detail/round_fwd.hpp>
27 #include <boost/math/tools/promotion.hpp> // for argument promotion.
28 #include <boost/math/policies/policy.hpp>
29 #include <boost/mpl/comparison.hpp>
30 #include <boost/config/no_tr1/complex.hpp>
31
32 #define BOOST_NO_MACRO_EXPAND /**/
33
34 namespace boost
35 {
36    namespace math
37    { // Math functions (in roughly alphabetic order).
38
39    // Beta functions.
40    template <class RT1, class RT2>
41    typename tools::promote_args<RT1, RT2>::type 
42          beta(RT1 a, RT2 b); // Beta function (2 arguments).
43
44    template <class RT1, class RT2, class A>
45    typename tools::promote_args<RT1, RT2, A>::type 
46          beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
47
48    template <class RT1, class RT2, class RT3, class Policy>
49    typename tools::promote_args<RT1, RT2, RT3>::type 
50          beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
51
52    template <class RT1, class RT2, class RT3>
53    typename tools::promote_args<RT1, RT2, RT3>::type 
54          betac(RT1 a, RT2 b, RT3 x);
55
56    template <class RT1, class RT2, class RT3, class Policy>
57    typename tools::promote_args<RT1, RT2, RT3>::type 
58          betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
59
60    template <class RT1, class RT2, class RT3>
61    typename tools::promote_args<RT1, RT2, RT3>::type 
62          ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
63
64    template <class RT1, class RT2, class RT3, class Policy>
65    typename tools::promote_args<RT1, RT2, RT3>::type 
66          ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
67
68    template <class RT1, class RT2, class RT3>
69    typename tools::promote_args<RT1, RT2, RT3>::type 
70          ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
71
72    template <class RT1, class RT2, class RT3, class Policy>
73    typename tools::promote_args<RT1, RT2, RT3>::type 
74          ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
75
76    template <class T1, class T2, class T3, class T4>
77    typename tools::promote_args<T1, T2, T3, T4>::type  
78          ibeta_inv(T1 a, T2 b, T3 p, T4* py);
79
80    template <class T1, class T2, class T3, class T4, class Policy>
81    typename tools::promote_args<T1, T2, T3, T4>::type  
82          ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
83
84    template <class RT1, class RT2, class RT3>
85    typename tools::promote_args<RT1, RT2, RT3>::type 
86          ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
87
88    template <class RT1, class RT2, class RT3, class Policy>
89    typename tools::promote_args<RT1, RT2, RT3>::type 
90          ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
91
92    template <class RT1, class RT2, class RT3>
93    typename tools::promote_args<RT1, RT2, RT3>::type 
94          ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
95
96    template <class RT1, class RT2, class RT3, class Policy>
97    typename tools::promote_args<RT1, RT2, RT3>::type 
98          ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
99
100    template <class RT1, class RT2, class RT3>
101    typename tools::promote_args<RT1, RT2, RT3>::type 
102          ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
103
104    template <class RT1, class RT2, class RT3, class Policy>
105    typename tools::promote_args<RT1, RT2, RT3>::type 
106          ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
107
108    template <class T1, class T2, class T3, class T4>
109    typename tools::promote_args<T1, T2, T3, T4>::type 
110          ibetac_inv(T1 a, T2 b, T3 q, T4* py);
111
112    template <class T1, class T2, class T3, class T4, class Policy>
113    typename tools::promote_args<T1, T2, T3, T4>::type 
114          ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
115
116    template <class RT1, class RT2, class RT3>
117    typename tools::promote_args<RT1, RT2, RT3>::type 
118          ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
119
120    template <class RT1, class RT2, class RT3, class Policy>
121    typename tools::promote_args<RT1, RT2, RT3>::type 
122          ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
123
124    template <class RT1, class RT2, class RT3>
125    typename tools::promote_args<RT1, RT2, RT3>::type 
126          ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
127
128    template <class RT1, class RT2, class RT3, class Policy>
129    typename tools::promote_args<RT1, RT2, RT3>::type 
130          ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
131
132    template <class RT1, class RT2, class RT3>
133    typename tools::promote_args<RT1, RT2, RT3>::type 
134          ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
135
136    template <class RT1, class RT2, class RT3, class Policy>
137    typename tools::promote_args<RT1, RT2, RT3>::type 
138          ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
139
140    template <class RT1, class RT2, class RT3>
141    typename tools::promote_args<RT1, RT2, RT3>::type 
142          ibeta_derivative(RT1 a, RT2 b, RT3 x);  // derivative of incomplete beta
143
144    template <class RT1, class RT2, class RT3, class Policy>
145    typename tools::promote_args<RT1, RT2, RT3>::type 
146          ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);  // derivative of incomplete beta
147
148    // erf & erfc error functions.
149    template <class RT> // Error function.
150    typename tools::promote_args<RT>::type erf(RT z);
151    template <class RT, class Policy> // Error function.
152    typename tools::promote_args<RT>::type erf(RT z, const Policy&);
153
154    template <class RT>// Error function complement.
155    typename tools::promote_args<RT>::type erfc(RT z);
156    template <class RT, class Policy>// Error function complement.
157    typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
158
159    template <class RT>// Error function inverse.
160    typename tools::promote_args<RT>::type erf_inv(RT z);
161    template <class RT, class Policy>// Error function inverse.
162    typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
163
164    template <class RT>// Error function complement inverse.
165    typename tools::promote_args<RT>::type erfc_inv(RT z);
166    template <class RT, class Policy>// Error function complement inverse.
167    typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
168
169    // Polynomials:
170    template <class T1, class T2, class T3>
171    typename tools::promote_args<T1, T2, T3>::type 
172          legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
173
174    template <class T>
175    typename tools::promote_args<T>::type 
176          legendre_p(int l, T x);
177
178    template <class T, class Policy>
179    typename tools::promote_args<T>::type 
180          legendre_p(int l, T x, const Policy& pol);
181
182    template <class T>
183    typename tools::promote_args<T>::type 
184          legendre_q(unsigned l, T x);
185
186    template <class T, class Policy>
187    typename tools::promote_args<T>::type 
188          legendre_q(unsigned l, T x, const Policy& pol);
189
190    template <class T1, class T2, class T3>
191    typename tools::promote_args<T1, T2, T3>::type 
192          legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
193
194    template <class T>
195    typename tools::promote_args<T>::type 
196          legendre_p(int l, int m, T x);
197
198    template <class T, class Policy>
199    typename tools::promote_args<T>::type 
200          legendre_p(int l, int m, T x, const Policy& pol);
201
202    template <class T1, class T2, class T3>
203    typename tools::promote_args<T1, T2, T3>::type  
204          laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
205
206    template <class T1, class T2, class T3>
207    typename tools::promote_args<T1, T2, T3>::type  
208       laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
209
210    template <class T>
211    typename tools::promote_args<T>::type 
212       laguerre(unsigned n, T x);
213
214    template <class T, class Policy>
215    typename tools::promote_args<T>::type 
216       laguerre(unsigned n, unsigned m, T x, const Policy& pol);
217
218    template <class T1, class T2>
219    struct laguerre_result
220    {
221       typedef typename mpl::if_<
222          policies::is_policy<T2>,
223          typename tools::promote_args<T1>::type,
224          typename tools::promote_args<T2>::type
225       >::type type;
226    };
227
228    template <class T1, class T2>
229    typename laguerre_result<T1, T2>::type 
230       laguerre(unsigned n, T1 m, T2 x);
231
232    template <class T>
233    typename tools::promote_args<T>::type 
234       hermite(unsigned n, T x);
235
236    template <class T, class Policy>
237    typename tools::promote_args<T>::type 
238       hermite(unsigned n, T x, const Policy& pol);
239
240    template <class T1, class T2, class T3>
241    typename tools::promote_args<T1, T2, T3>::type 
242       hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
243
244    template <class T1, class T2>
245    std::complex<typename tools::promote_args<T1, T2>::type> 
246          spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
247
248    template <class T1, class T2, class Policy>
249    std::complex<typename tools::promote_args<T1, T2>::type> 
250       spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
251
252    template <class T1, class T2>
253    typename tools::promote_args<T1, T2>::type 
254          spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
255
256    template <class T1, class T2, class Policy>
257    typename tools::promote_args<T1, T2>::type 
258       spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
259
260    template <class T1, class T2>
261    typename tools::promote_args<T1, T2>::type 
262          spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
263
264    template <class T1, class T2, class Policy>
265    typename tools::promote_args<T1, T2>::type 
266       spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
267
268    // Elliptic integrals:
269    template <class T1, class T2, class T3>
270    typename tools::promote_args<T1, T2, T3>::type 
271          ellint_rf(T1 x, T2 y, T3 z);
272
273    template <class T1, class T2, class T3, class Policy>
274    typename tools::promote_args<T1, T2, T3>::type 
275          ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
276
277    template <class T1, class T2, class T3>
278    typename tools::promote_args<T1, T2, T3>::type 
279          ellint_rd(T1 x, T2 y, T3 z);
280
281    template <class T1, class T2, class T3, class Policy>
282    typename tools::promote_args<T1, T2, T3>::type 
283          ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
284
285    template <class T1, class T2>
286    typename tools::promote_args<T1, T2>::type 
287          ellint_rc(T1 x, T2 y);
288
289    template <class T1, class T2, class Policy>
290    typename tools::promote_args<T1, T2>::type 
291          ellint_rc(T1 x, T2 y, const Policy& pol);
292
293    template <class T1, class T2, class T3, class T4>
294    typename tools::promote_args<T1, T2, T3, T4>::type 
295          ellint_rj(T1 x, T2 y, T3 z, T4 p);
296
297    template <class T1, class T2, class T3, class T4, class Policy>
298    typename tools::promote_args<T1, T2, T3, T4>::type 
299          ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
300
301    template <typename T>
302    typename tools::promote_args<T>::type ellint_2(T k);
303
304    template <class T1, class T2>
305    typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
306
307    template <class T1, class T2, class Policy>
308    typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
309
310    template <typename T>
311    typename tools::promote_args<T>::type ellint_1(T k);
312
313    template <class T1, class T2>
314    typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
315
316    template <class T1, class T2, class Policy>
317    typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
318
319    namespace detail{
320
321    template <class T, class U, class V>
322    struct ellint_3_result
323    {
324       typedef typename mpl::if_<
325          policies::is_policy<V>,
326          typename tools::promote_args<T, U>::type,
327          typename tools::promote_args<T, U, V>::type
328       >::type type;
329    };
330
331    } // namespace detail
332
333
334    template <class T1, class T2, class T3>
335    typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
336
337    template <class T1, class T2, class T3, class Policy>
338    typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
339
340    template <class T1, class T2>
341    typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
342
343    // Factorial functions.
344    // Note: not for integral types, at present.
345    template <class RT>
346    struct max_factorial;
347    template <class RT>
348    RT factorial(unsigned int);
349    template <class RT, class Policy>
350    RT factorial(unsigned int, const Policy& pol);
351    template <class RT>
352    RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); 
353    template <class RT>
354    RT double_factorial(unsigned i);
355    template <class RT, class Policy>
356    RT double_factorial(unsigned i, const Policy& pol);
357
358    template <class RT>
359    typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
360
361    template <class RT, class Policy>
362    typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
363
364    template <class RT>
365    typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
366
367    template <class RT, class Policy>
368    typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
369
370    // Gamma functions.
371    template <class RT>
372    typename tools::promote_args<RT>::type tgamma(RT z);
373
374    template <class RT>
375    typename tools::promote_args<RT>::type tgamma1pm1(RT z);
376
377    template <class RT, class Policy>
378    typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
379
380    template <class RT1, class RT2>
381    typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
382
383    template <class RT1, class RT2, class Policy>
384    typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
385
386    template <class RT>
387    typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
388
389    template <class RT, class Policy>
390    typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
391
392    template <class RT>
393    typename tools::promote_args<RT>::type lgamma(RT x);
394
395    template <class RT, class Policy>
396    typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
397
398    template <class RT1, class RT2>
399    typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
400
401    template <class RT1, class RT2, class Policy>
402    typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
403
404    template <class RT1, class RT2>
405    typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
406
407    template <class RT1, class RT2, class Policy>
408    typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
409
410    template <class RT1, class RT2>
411    typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
412
413    template <class RT1, class RT2, class Policy>
414    typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
415
416    template <class T1, class T2>
417    typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
418
419    template <class T1, class T2, class Policy>
420    typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
421
422    template <class T1, class T2>
423    typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
424
425    template <class T1, class T2, class Policy>
426    typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
427
428    template <class T1, class T2>
429    typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
430
431    template <class T1, class T2, class Policy>
432    typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
433
434    // gamma inverse.
435    template <class T1, class T2>
436    typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
437
438    template <class T1, class T2, class Policy>
439    typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
440
441    template <class T1, class T2>
442    typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
443
444    template <class T1, class T2, class Policy>
445    typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
446
447    template <class T1, class T2>
448    typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
449
450    template <class T1, class T2, class Policy>
451    typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
452
453    template <class T1, class T2>
454    typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
455
456    template <class T1, class T2, class Policy>
457    typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
458
459    // digamma:
460    template <class T>
461    typename tools::promote_args<T>::type digamma(T x);
462
463    template <class T, class Policy>
464    typename tools::promote_args<T>::type digamma(T x, const Policy&);
465
466    // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
467    template <class T1, class T2>
468    typename tools::promote_args<T1, T2>::type 
469          hypot(T1 x, T2 y);
470
471    template <class T1, class T2, class Policy>
472    typename tools::promote_args<T1, T2>::type 
473          hypot(T1 x, T2 y, const Policy&);
474
475    // cbrt - cube root.
476    template <class RT>
477    typename tools::promote_args<RT>::type cbrt(RT z);
478
479    template <class RT, class Policy>
480    typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
481
482    // log1p is log(x + 1)
483    template <class T>
484    typename tools::promote_args<T>::type log1p(T);
485
486    template <class T, class Policy>
487    typename tools::promote_args<T>::type log1p(T, const Policy&);
488
489    // log1pmx is log(x + 1) - x
490    template <class T>
491    typename tools::promote_args<T>::type log1pmx(T);
492
493    template <class T, class Policy>
494    typename tools::promote_args<T>::type log1pmx(T, const Policy&);
495
496    // Exp (x) minus 1 functions.
497    template <class T>
498    typename tools::promote_args<T>::type expm1(T);
499
500    template <class T, class Policy>
501    typename tools::promote_args<T>::type expm1(T, const Policy&);
502
503    // Power - 1
504    template <class T1, class T2>
505    typename tools::promote_args<T1, T2>::type 
506          powm1(const T1 a, const T2 z);
507
508    template <class T1, class T2, class Policy>
509    typename tools::promote_args<T1, T2>::type 
510          powm1(const T1 a, const T2 z, const Policy&);
511
512    // sqrt(1+x) - 1
513    template <class T>
514    typename tools::promote_args<T>::type sqrt1pm1(const T& val);
515
516    template <class T, class Policy>
517    typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
518
519    // sinus cardinals:
520    template <class T>
521    typename tools::promote_args<T>::type sinc_pi(T x);
522
523    template <class T, class Policy>
524    typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
525
526    template <class T>
527    typename tools::promote_args<T>::type sinhc_pi(T x);
528
529    template <class T, class Policy>
530    typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
531
532    // inverse hyperbolics:
533    template<typename T>
534    typename tools::promote_args<T>::type asinh(T x);
535
536    template<typename T, class Policy>
537    typename tools::promote_args<T>::type asinh(T x, const Policy&);
538
539    template<typename T>
540    typename tools::promote_args<T>::type acosh(T x);
541
542    template<typename T, class Policy>
543    typename tools::promote_args<T>::type acosh(T x, const Policy&);
544
545    template<typename T>
546    typename tools::promote_args<T>::type atanh(T x);
547
548    template<typename T, class Policy>
549    typename tools::promote_args<T>::type atanh(T x, const Policy&);
550
551    namespace detail{
552
553       typedef mpl::int_<0> bessel_no_int_tag;      // No integer optimisation possible.
554       typedef mpl::int_<1> bessel_maybe_int_tag;   // Maybe integer optimisation.
555       typedef mpl::int_<2> bessel_int_tag;         // Definite integer optimistaion.
556
557       template <class T1, class T2, class Policy>
558       struct bessel_traits
559       {
560          typedef typename tools::promote_args<
561             T1, T2
562          >::type result_type;
563
564          typedef typename policies::precision<result_type, Policy>::type precision_type;
565
566          typedef typename mpl::if_<
567             mpl::or_<
568                mpl::less_equal<precision_type, mpl::int_<0> >,
569                mpl::greater<precision_type, mpl::int_<64> > >,
570             bessel_no_int_tag,
571             typename mpl::if_<
572                is_integral<T1>,
573                bessel_int_tag,
574                bessel_maybe_int_tag
575             >::type
576          >::type optimisation_tag;
577       };
578    } // detail
579
580    // Bessel functions:
581    template <class T1, class T2, class Policy>
582    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
583
584    template <class T1, class T2>
585    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
586
587    template <class T, class Policy>
588    typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
589
590    template <class T>
591    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
592
593    template <class T1, class T2, class Policy>
594    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
595
596    template <class T1, class T2>
597    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
598
599    template <class T1, class T2, class Policy>
600    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
601
602    template <class T1, class T2>
603    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
604
605    template <class T1, class T2, class Policy>
606    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
607
608    template <class T1, class T2>
609    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
610
611    template <class T, class Policy>
612    typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
613
614    template <class T>
615    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
616
617    template <class T, class Policy>
618    typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
619
620    template <class T>
621    typename tools::promote_args<T>::type sin_pi(T x);
622
623    template <class T, class Policy>
624    typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
625
626    template <class T>
627    typename tools::promote_args<T>::type cos_pi(T x);
628
629    template <class T>
630    int fpclassify BOOST_NO_MACRO_EXPAND(T t);
631
632    template <class T>
633    bool isfinite BOOST_NO_MACRO_EXPAND(T z);
634
635    template <class T>
636    bool isinf BOOST_NO_MACRO_EXPAND(T t);
637
638    template <class T>
639    bool isnan BOOST_NO_MACRO_EXPAND(T t);
640
641    template <class T>
642    bool isnormal BOOST_NO_MACRO_EXPAND(T t);
643
644    // Exponential integrals:
645    namespace detail{
646
647    template <class T, class U>
648    struct expint_result
649    {
650       typedef typename mpl::if_<
651          policies::is_policy<U>,
652          typename tools::promote_args<T>::type,
653          typename tools::promote_args<U>::type
654       >::type type;
655    };
656
657    } // namespace detail
658
659    template <class T, class Policy>
660    typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
661
662    template <class T, class U>
663    typename detail::expint_result<T, U>::type expint(T const z, U const u);
664
665    template <class T>
666    typename tools::promote_args<T>::type expint(T z);
667
668    // Zeta:
669    template <class T, class Policy>
670    typename tools::promote_args<T>::type zeta(T s, const Policy&);
671
672    template <class T>
673    typename tools::promote_args<T>::type zeta(T s);
674
675    // pow:
676    template <int N, typename T, class Policy>
677    typename tools::promote_args<T>::type pow(T base, const Policy& policy);
678
679    template <int N, typename T>
680    typename tools::promote_args<T>::type pow(T base);
681
682    // next:
683    template <class T, class Policy>
684    T nextafter(const T&, const T&, const Policy&);
685    template <class T>
686    T nextafter(const T&, const T&);
687    template <class T, class Policy>
688    T float_next(const T&, const Policy&);
689    template <class T>
690    T float_next(const T&);
691    template <class T, class Policy>
692    T float_prior(const T&, const Policy&);
693    template <class T>
694    T float_prior(const T&);
695    template <class T, class Policy>
696    T float_distance(const T&, const T&, const Policy&);
697    template <class T>
698    T float_distance(const T&, const T&);
699
700     } // namespace math
701 } // namespace boost
702
703 #ifdef BOOST_HAS_LONG_LONG
704 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
705    \
706    template <class T>\
707    inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
708    \
709    template <class T>\
710    inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
711    \
712    template <class T>\
713    inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
714
715 #else
716 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)
717 #endif
718
719 #define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
720    \
721    BOOST_MATH_DETAIL_LL_FUNC(Policy)\
722    \
723    template <class RT1, class RT2>\
724    inline typename boost::math::tools::promote_args<RT1, RT2>::type \
725    beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
726 \
727    template <class RT1, class RT2, class A>\
728    inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
729    beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
730 \
731    template <class RT1, class RT2, class RT3>\
732    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
733    betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
734 \
735    template <class RT1, class RT2, class RT3>\
736    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
737    ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
738 \
739    template <class RT1, class RT2, class RT3>\
740    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
741    ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
742 \
743    template <class T1, class T2, class T3, class T4>\
744    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type  \
745    ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
746 \
747    template <class RT1, class RT2, class RT3>\
748    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
749    ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
750 \
751    template <class T1, class T2, class T3, class T4>\
752    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
753    ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
754 \
755    template <class RT1, class RT2, class RT3>\
756    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
757    ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
758 \
759    template <class T1, class T2, class T3>\
760    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
761    ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
762 \
763    template <class RT1, class RT2, class RT3>\
764    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
765    ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
766 \
767    template <class T1, class T2, class T3>\
768    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
769    ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
770 \
771    template <class RT1, class RT2, class RT3>\
772    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
773    ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
774 \
775    template <class RT1, class RT2, class RT3>\
776    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
777    ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
778 \
779    template <class RT>\
780    inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
781 \
782    template <class RT>\
783    inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
784 \
785    template <class RT>\
786    inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
787 \
788    template <class RT>\
789    inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
790 \
791    using boost::math::legendre_next;\
792 \
793    template <class T>\
794    inline typename boost::math::tools::promote_args<T>::type \
795    legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
796 \
797    template <class T>\
798    inline typename boost::math::tools::promote_args<T>::type \
799    legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
800 \
801    using ::boost::math::legendre_next;\
802 \
803    template <class T>\
804    inline typename boost::math::tools::promote_args<T>::type \
805    legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
806 \
807    using ::boost::math::laguerre_next;\
808 \
809    template <class T>\
810    inline typename boost::math::tools::promote_args<T>::type \
811    laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
812 \
813    template <class T1, class T2>\
814    inline typename boost::math::laguerre_result<T1, T2>::type \
815    laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
816 \
817    template <class T>\
818    inline typename boost::math::tools::promote_args<T>::type \
819    hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
820 \
821    using boost::math::hermite_next;\
822 \
823    template <class T1, class T2>\
824    inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
825    spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
826 \
827    template <class T1, class T2>\
828    inline typename boost::math::tools::promote_args<T1, T2>::type \
829    spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
830 \
831    template <class T1, class T2>\
832    inline typename boost::math::tools::promote_args<T1, T2>::type \
833    spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
834 \
835    template <class T1, class T2, class Policy>\
836    inline typename boost::math::tools::promote_args<T1, T2>::type \
837       spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
838 \
839    template <class T1, class T2, class T3>\
840    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
841    ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
842 \
843    template <class T1, class T2, class T3>\
844    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
845    ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
846 \
847    template <class T1, class T2>\
848    inline typename boost::math::tools::promote_args<T1, T2>::type \
849    ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
850 \
851    template <class T1, class T2, class T3, class T4>\
852    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
853    ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
854 \
855    template <typename T>\
856    inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
857 \
858    template <class T1, class T2>\
859    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
860 \
861    template <typename T>\
862    inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
863 \
864    template <class T1, class T2>\
865    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
866 \
867    template <class T1, class T2, class T3>\
868    inline typename boost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\
869 \
870    template <class T1, class T2>\
871    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
872 \
873    using boost::math::max_factorial;\
874    template <class RT>\
875    inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
876    using boost::math::unchecked_factorial;\
877    template <class RT>\
878    inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
879    template <class RT>\
880    inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
881    template <class RT>\
882    inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
883    using boost::math::fpclassify;\
884 \
885    template <class RT>\
886    inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
887 \
888    template <class RT>\
889    inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
890 \
891    template <class RT1, class RT2>\
892    inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
893 \
894    template <class RT>\
895    inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
896 \
897    template <class RT>\
898    inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
899 \
900    template <class RT1, class RT2>\
901    inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
902 \
903    template <class RT1, class RT2>\
904    inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
905 \
906    template <class RT1, class RT2>\
907    inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
908 \
909    template <class T1, class T2>\
910    inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\
911 \
912    template <class T1, class T2>\
913    inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
914 \
915    template <class T1, class T2>\
916    inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\
917 \
918    template <class T1, class T2>\
919    inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\
920 \
921    template <class T1, class T2>\
922    inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\
923 \
924    template <class T1, class T2>\
925    inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\
926 \
927    template <class T1, class T2>\
928    inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\
929 \
930    template <class T>\
931    inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
932 \
933    template <class T1, class T2>\
934    inline typename boost::math::tools::promote_args<T1, T2>::type \
935    hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
936 \
937    template <class RT>\
938    inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
939 \
940    template <class T>\
941    inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
942 \
943    template <class T>\
944    inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
945 \
946    template <class T>\
947    inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
948 \
949    template <class T1, class T2>\
950    inline typename boost::math::tools::promote_args<T1, T2>::type \
951    powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
952 \
953    template <class T>\
954    inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
955 \
956    template <class T>\
957    inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
958 \
959    template <class T>\
960    inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
961 \
962    template<typename T>\
963    inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
964 \
965    template<typename T>\
966    inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
967 \
968    template<typename T>\
969    inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
970 \
971    template <class T1, class T2>\
972    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
973    { return boost::math::cyl_bessel_j(v, x, Policy()); }\
974 \
975    template <class T>\
976    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
977    { return boost::math::sph_bessel(v, x, Policy()); }\
978 \
979    template <class T1, class T2>\
980    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
981    cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
982 \
983    template <class T1, class T2>\
984    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
985    cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
986 \
987    template <class T1, class T2>\
988    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
989    cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
990 \
991    template <class T>\
992    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
993    sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
994 \
995    template <class T>\
996    inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
997 \
998    template <class T>\
999    inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
1000 \
1001    using boost::math::fpclassify;\
1002    using boost::math::isfinite;\
1003    using boost::math::isinf;\
1004    using boost::math::isnan;\
1005    using boost::math::isnormal;\
1006    \
1007    template <class T, class U>\
1008    inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
1009    { return boost::math::expint(z, u, Policy()); }\
1010    \
1011    template <class T>\
1012    inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
1013    \
1014    template <class T>\
1015    inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
1016    \
1017    template <class T>\
1018    inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
1019    \
1020    template <class T>\
1021    inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
1022    \
1023    template <class T>\
1024    inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
1025    \
1026    template <class T>\
1027    inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
1028    \
1029    template <class T>\
1030    inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
1031    \
1032    template <class T>\
1033    inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
1034    \
1035    template <class T>\
1036    inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1037    \
1038    template <class T>\
1039    inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1040    \
1041    template <class T>\
1042    inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1043    \
1044    template <int N, class T>\
1045    inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
1046    \
1047    template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
1048    template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
1049    template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
1050    template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
1051
1052
1053 #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
1054
1055