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 <vector>
27 #include <boost/math/special_functions/detail/round_fwd.hpp>
28 #include <boost/math/tools/promotion.hpp> // for argument promotion.
29 #include <boost/math/policies/policy.hpp>
30 #include <boost/mpl/comparison.hpp>
31 #include <boost/utility/enable_if.hpp>
32 #include <boost/config/no_tr1/complex.hpp>
33 
34 #define BOOST_NO_MACRO_EXPAND /**/
35 
36 namespace boost
37 {
38    namespace math
39    { // Math functions (in roughly alphabetic order).
40 
41    // Beta functions.
42    template <class RT1, class RT2>
43    typename tools::promote_args<RT1, RT2>::type
44          beta(RT1 a, RT2 b); // Beta function (2 arguments).
45 
46    template <class RT1, class RT2, class A>
47    typename tools::promote_args<RT1, RT2, A>::type
48          beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
49 
50    template <class RT1, class RT2, class RT3, class Policy>
51    typename tools::promote_args<RT1, RT2, RT3>::type
52          beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
53 
54    template <class RT1, class RT2, class RT3>
55    typename tools::promote_args<RT1, RT2, RT3>::type
56          betac(RT1 a, RT2 b, RT3 x);
57 
58    template <class RT1, class RT2, class RT3, class Policy>
59    typename tools::promote_args<RT1, RT2, RT3>::type
60          betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
61 
62    template <class RT1, class RT2, class RT3>
63    typename tools::promote_args<RT1, RT2, RT3>::type
64          ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
65 
66    template <class RT1, class RT2, class RT3, class Policy>
67    typename tools::promote_args<RT1, RT2, RT3>::type
68          ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
69 
70    template <class RT1, class RT2, class RT3>
71    typename tools::promote_args<RT1, RT2, RT3>::type
72          ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
73 
74    template <class RT1, class RT2, class RT3, class Policy>
75    typename tools::promote_args<RT1, RT2, RT3>::type
76          ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
77 
78    template <class T1, class T2, class T3, class T4>
79    typename tools::promote_args<T1, T2, T3, T4>::type
80          ibeta_inv(T1 a, T2 b, T3 p, T4* py);
81 
82    template <class T1, class T2, class T3, class T4, class Policy>
83    typename tools::promote_args<T1, T2, T3, T4>::type
84          ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
85 
86    template <class RT1, class RT2, class RT3>
87    typename tools::promote_args<RT1, RT2, RT3>::type
88          ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
89 
90    template <class RT1, class RT2, class RT3, class Policy>
91    typename tools::promote_args<RT1, RT2, RT3>::type
92          ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
93 
94    template <class RT1, class RT2, class RT3>
95    typename tools::promote_args<RT1, RT2, RT3>::type
96          ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
97 
98    template <class RT1, class RT2, class RT3, class Policy>
99    typename tools::promote_args<RT1, RT2, RT3>::type
100          ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
101 
102    template <class RT1, class RT2, class RT3>
103    typename tools::promote_args<RT1, RT2, RT3>::type
104          ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
105 
106    template <class RT1, class RT2, class RT3, class Policy>
107    typename tools::promote_args<RT1, RT2, RT3>::type
108          ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
109 
110    template <class T1, class T2, class T3, class T4>
111    typename tools::promote_args<T1, T2, T3, T4>::type
112          ibetac_inv(T1 a, T2 b, T3 q, T4* py);
113 
114    template <class T1, class T2, class T3, class T4, class Policy>
115    typename tools::promote_args<T1, T2, T3, T4>::type
116          ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
117 
118    template <class RT1, class RT2, class RT3>
119    typename tools::promote_args<RT1, RT2, RT3>::type
120          ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
121 
122    template <class RT1, class RT2, class RT3, class Policy>
123    typename tools::promote_args<RT1, RT2, RT3>::type
124          ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
125 
126    template <class RT1, class RT2, class RT3>
127    typename tools::promote_args<RT1, RT2, RT3>::type
128          ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
129 
130    template <class RT1, class RT2, class RT3, class Policy>
131    typename tools::promote_args<RT1, RT2, RT3>::type
132          ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
133 
134    template <class RT1, class RT2, class RT3>
135    typename tools::promote_args<RT1, RT2, RT3>::type
136          ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
137 
138    template <class RT1, class RT2, class RT3, class Policy>
139    typename tools::promote_args<RT1, RT2, RT3>::type
140          ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
141 
142    template <class RT1, class RT2, class RT3>
143    typename tools::promote_args<RT1, RT2, RT3>::type
144          ibeta_derivative(RT1 a, RT2 b, RT3 x);  // derivative of incomplete beta
145 
146    template <class RT1, class RT2, class RT3, class Policy>
147    typename tools::promote_args<RT1, RT2, RT3>::type
148          ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);  // derivative of incomplete beta
149 
150    // Binomial:
151    template <class T, class Policy>
152    T binomial_coefficient(unsigned n, unsigned k, const Policy& pol);
153    template <class T>
154    T binomial_coefficient(unsigned n, unsigned k);
155 
156    // erf & erfc error functions.
157    template <class RT> // Error function.
158    typename tools::promote_args<RT>::type erf(RT z);
159    template <class RT, class Policy> // Error function.
160    typename tools::promote_args<RT>::type erf(RT z, const Policy&);
161 
162    template <class RT>// Error function complement.
163    typename tools::promote_args<RT>::type erfc(RT z);
164    template <class RT, class Policy>// Error function complement.
165    typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
166 
167    template <class RT>// Error function inverse.
168    typename tools::promote_args<RT>::type erf_inv(RT z);
169    template <class RT, class Policy>// Error function inverse.
170    typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
171 
172    template <class RT>// Error function complement inverse.
173    typename tools::promote_args<RT>::type erfc_inv(RT z);
174    template <class RT, class Policy>// Error function complement inverse.
175    typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
176 
177    // Polynomials:
178    template <class T1, class T2, class T3>
179    typename tools::promote_args<T1, T2, T3>::type
180          legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
181 
182    template <class T>
183    typename tools::promote_args<T>::type
184          legendre_p(int l, T x);
185    template <class T>
186    typename tools::promote_args<T>::type
187           legendre_p_prime(int l, T x);
188 
189 
190    template <class T, class Policy>
191    inline std::vector<T> legendre_p_zeros(int l, const Policy& pol);
192 
193    template <class T>
194    inline std::vector<T> legendre_p_zeros(int l);
195 
196 #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
197    template <class T, class Policy>
198    typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
199          legendre_p(int l, T x, const Policy& pol);
200    template <class T, class Policy>
201    inline typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
202       legendre_p_prime(int l, T x, const Policy& pol);
203 #endif
204    template <class T>
205    typename tools::promote_args<T>::type
206          legendre_q(unsigned l, T x);
207 #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
208    template <class T, class Policy>
209    typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
210          legendre_q(unsigned l, T x, const Policy& pol);
211 #endif
212    template <class T1, class T2, class T3>
213    typename tools::promote_args<T1, T2, T3>::type
214          legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
215 
216    template <class T>
217    typename tools::promote_args<T>::type
218          legendre_p(int l, int m, T x);
219 
220    template <class T, class Policy>
221    typename tools::promote_args<T>::type
222          legendre_p(int l, int m, T x, const Policy& pol);
223 
224    template <class T1, class T2, class T3>
225    typename tools::promote_args<T1, T2, T3>::type
226          laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
227 
228    template <class T1, class T2, class T3>
229    typename tools::promote_args<T1, T2, T3>::type
230       laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
231 
232    template <class T>
233    typename tools::promote_args<T>::type
234       laguerre(unsigned n, T x);
235 
236    template <class T, class Policy>
237    typename tools::promote_args<T>::type
238       laguerre(unsigned n, unsigned m, T x, const Policy& pol);
239 
240    template <class T1, class T2>
241    struct laguerre_result
242    {
243       typedef typename mpl::if_<
244          policies::is_policy<T2>,
245          typename tools::promote_args<T1>::type,
246          typename tools::promote_args<T2>::type
247       >::type type;
248    };
249 
250    template <class T1, class T2>
251    typename laguerre_result<T1, T2>::type
252       laguerre(unsigned n, T1 m, T2 x);
253 
254    template <class T>
255    typename tools::promote_args<T>::type
256       hermite(unsigned n, T x);
257 
258    template <class T, class Policy>
259    typename tools::promote_args<T>::type
260       hermite(unsigned n, T x, const Policy& pol);
261 
262    template <class T1, class T2, class T3>
263    typename tools::promote_args<T1, T2, T3>::type
264       hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
265 
266    template<class T1, class T2, class T3>
267    typename tools::promote_args<T1, T2, T3>::type chebyshev_next(T1 const & x, T2 const & Tn, T3 const & Tn_1);
268 
269    template <class Real, class Policy>
270    typename tools::promote_args<Real>::type
271       chebyshev_t(unsigned n, Real const & x, const Policy&);
272    template<class Real>
273    typename tools::promote_args<Real>::type chebyshev_t(unsigned n, Real const & x);
274 
275    template <class Real, class Policy>
276    typename tools::promote_args<Real>::type
277       chebyshev_u(unsigned n, Real const & x, const Policy&);
278    template<class Real>
279    typename tools::promote_args<Real>::type chebyshev_u(unsigned n, Real const & x);
280 
281    template <class Real, class Policy>
282    typename tools::promote_args<Real>::type
283       chebyshev_t_prime(unsigned n, Real const & x, const Policy&);
284    template<class Real>
285    typename tools::promote_args<Real>::type chebyshev_t_prime(unsigned n, Real const & x);
286 
287    template<class Real, class T2>
288    Real chebyshev_clenshaw_recurrence(const Real* const c, size_t length, const T2& x);
289 
290    template <class T1, class T2>
291    std::complex<typename tools::promote_args<T1, T2>::type>
292          spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
293 
294    template <class T1, class T2, class Policy>
295    std::complex<typename tools::promote_args<T1, T2>::type>
296       spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
297 
298    template <class T1, class T2>
299    typename tools::promote_args<T1, T2>::type
300          spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
301 
302    template <class T1, class T2, class Policy>
303    typename tools::promote_args<T1, T2>::type
304       spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
305 
306    template <class T1, class T2>
307    typename tools::promote_args<T1, T2>::type
308          spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
309 
310    template <class T1, class T2, class Policy>
311    typename tools::promote_args<T1, T2>::type
312       spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
313 
314    // Elliptic integrals:
315    template <class T1, class T2, class T3>
316    typename tools::promote_args<T1, T2, T3>::type
317          ellint_rf(T1 x, T2 y, T3 z);
318 
319    template <class T1, class T2, class T3, class Policy>
320    typename tools::promote_args<T1, T2, T3>::type
321          ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
322 
323    template <class T1, class T2, class T3>
324    typename tools::promote_args<T1, T2, T3>::type
325          ellint_rd(T1 x, T2 y, T3 z);
326 
327    template <class T1, class T2, class T3, class Policy>
328    typename tools::promote_args<T1, T2, T3>::type
329          ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
330 
331    template <class T1, class T2>
332    typename tools::promote_args<T1, T2>::type
333          ellint_rc(T1 x, T2 y);
334 
335    template <class T1, class T2, class Policy>
336    typename tools::promote_args<T1, T2>::type
337          ellint_rc(T1 x, T2 y, const Policy& pol);
338 
339    template <class T1, class T2, class T3, class T4>
340    typename tools::promote_args<T1, T2, T3, T4>::type
341          ellint_rj(T1 x, T2 y, T3 z, T4 p);
342 
343    template <class T1, class T2, class T3, class T4, class Policy>
344    typename tools::promote_args<T1, T2, T3, T4>::type
345          ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
346 
347    template <class T1, class T2, class T3>
348    typename tools::promote_args<T1, T2, T3>::type
349       ellint_rg(T1 x, T2 y, T3 z);
350 
351    template <class T1, class T2, class T3, class Policy>
352    typename tools::promote_args<T1, T2, T3>::type
353       ellint_rg(T1 x, T2 y, T3 z, const Policy& pol);
354 
355    template <typename T>
356    typename tools::promote_args<T>::type ellint_2(T k);
357 
358    template <class T1, class T2>
359    typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
360 
361    template <class T1, class T2, class Policy>
362    typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
363 
364    template <typename T>
365    typename tools::promote_args<T>::type ellint_1(T k);
366 
367    template <class T1, class T2>
368    typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
369 
370    template <class T1, class T2, class Policy>
371    typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
372 
373    template <typename T>
374    typename tools::promote_args<T>::type ellint_d(T k);
375 
376    template <class T1, class T2>
377    typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi);
378 
379    template <class T1, class T2, class Policy>
380    typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi, const Policy& pol);
381 
382    template <class T1, class T2>
383    typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi);
384 
385    template <class T1, class T2, class Policy>
386    typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi, const Policy& pol);
387 
388    template <class T1, class T2>
389    typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi);
390 
391    template <class T1, class T2, class Policy>
392    typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi, const Policy& pol);
393 
394    namespace detail{
395 
396    template <class T, class U, class V>
397    struct ellint_3_result
398    {
399       typedef typename mpl::if_<
400          policies::is_policy<V>,
401          typename tools::promote_args<T, U>::type,
402          typename tools::promote_args<T, U, V>::type
403       >::type type;
404    };
405 
406    } // namespace detail
407 
408 
409    template <class T1, class T2, class T3>
410    typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
411 
412    template <class T1, class T2, class T3, class Policy>
413    typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
414 
415    template <class T1, class T2>
416    typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
417 
418    // Factorial functions.
419    // Note: not for integral types, at present.
420    template <class RT>
421    struct max_factorial;
422    template <class RT>
423    RT factorial(unsigned int);
424    template <class RT, class Policy>
425    RT factorial(unsigned int, const Policy& pol);
426    template <class RT>
427    RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
428    template <class RT>
429    RT double_factorial(unsigned i);
430    template <class RT, class Policy>
431    RT double_factorial(unsigned i, const Policy& pol);
432 
433    template <class RT>
434    typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
435 
436    template <class RT, class Policy>
437    typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
438 
439    template <class RT>
440    typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
441 
442    template <class RT, class Policy>
443    typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
444 
445    // Gamma functions.
446    template <class RT>
447    typename tools::promote_args<RT>::type tgamma(RT z);
448 
449    template <class RT>
450    typename tools::promote_args<RT>::type tgamma1pm1(RT z);
451 
452    template <class RT, class Policy>
453    typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
454 
455    template <class RT1, class RT2>
456    typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
457 
458    template <class RT1, class RT2, class Policy>
459    typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
460 
461    template <class RT>
462    typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
463 
464    template <class RT, class Policy>
465    typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
466 
467    template <class RT>
468    typename tools::promote_args<RT>::type lgamma(RT x);
469 
470    template <class RT, class Policy>
471    typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
472 
473    template <class RT1, class RT2>
474    typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
475 
476    template <class RT1, class RT2, class Policy>
477    typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
478 
479    template <class RT1, class RT2>
480    typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
481 
482    template <class RT1, class RT2, class Policy>
483    typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
484 
485    template <class RT1, class RT2>
486    typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
487 
488    template <class RT1, class RT2, class Policy>
489    typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
490 
491    template <class T1, class T2>
492    typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
493 
494    template <class T1, class T2, class Policy>
495    typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
496 
497    template <class T1, class T2>
498    typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
499 
500    template <class T1, class T2, class Policy>
501    typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
502 
503    template <class T1, class T2>
504    typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
505 
506    template <class T1, class T2, class Policy>
507    typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
508 
509    // gamma inverse.
510    template <class T1, class T2>
511    typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
512 
513    template <class T1, class T2, class Policy>
514    typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
515 
516    template <class T1, class T2>
517    typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
518 
519    template <class T1, class T2, class Policy>
520    typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
521 
522    template <class T1, class T2>
523    typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
524 
525    template <class T1, class T2, class Policy>
526    typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
527 
528    template <class T1, class T2>
529    typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
530 
531    template <class T1, class T2, class Policy>
532    typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
533 
534    // digamma:
535    template <class T>
536    typename tools::promote_args<T>::type digamma(T x);
537 
538    template <class T, class Policy>
539    typename tools::promote_args<T>::type digamma(T x, const Policy&);
540 
541    // trigamma:
542    template <class T>
543    typename tools::promote_args<T>::type trigamma(T x);
544 
545    template <class T, class Policy>
546    typename tools::promote_args<T>::type trigamma(T x, const Policy&);
547 
548    // polygamma:
549    template <class T>
550    typename tools::promote_args<T>::type polygamma(int n, T x);
551 
552    template <class T, class Policy>
553    typename tools::promote_args<T>::type polygamma(int n, T x, const Policy&);
554 
555    // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
556    template <class T1, class T2>
557    typename tools::promote_args<T1, T2>::type
558          hypot(T1 x, T2 y);
559 
560    template <class T1, class T2, class Policy>
561    typename tools::promote_args<T1, T2>::type
562          hypot(T1 x, T2 y, const Policy&);
563 
564    // cbrt - cube root.
565    template <class RT>
566    typename tools::promote_args<RT>::type cbrt(RT z);
567 
568    template <class RT, class Policy>
569    typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
570 
571    // log1p is log(x + 1)
572    template <class T>
573    typename tools::promote_args<T>::type log1p(T);
574 
575    template <class T, class Policy>
576    typename tools::promote_args<T>::type log1p(T, const Policy&);
577 
578    // log1pmx is log(x + 1) - x
579    template <class T>
580    typename tools::promote_args<T>::type log1pmx(T);
581 
582    template <class T, class Policy>
583    typename tools::promote_args<T>::type log1pmx(T, const Policy&);
584 
585    // Exp (x) minus 1 functions.
586    template <class T>
587    typename tools::promote_args<T>::type expm1(T);
588 
589    template <class T, class Policy>
590    typename tools::promote_args<T>::type expm1(T, const Policy&);
591 
592    // Power - 1
593    template <class T1, class T2>
594    typename tools::promote_args<T1, T2>::type
595          powm1(const T1 a, const T2 z);
596 
597    template <class T1, class T2, class Policy>
598    typename tools::promote_args<T1, T2>::type
599          powm1(const T1 a, const T2 z, const Policy&);
600 
601    // sqrt(1+x) - 1
602    template <class T>
603    typename tools::promote_args<T>::type sqrt1pm1(const T& val);
604 
605    template <class T, class Policy>
606    typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
607 
608    // sinus cardinals:
609    template <class T>
610    typename tools::promote_args<T>::type sinc_pi(T x);
611 
612    template <class T, class Policy>
613    typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
614 
615    template <class T>
616    typename tools::promote_args<T>::type sinhc_pi(T x);
617 
618    template <class T, class Policy>
619    typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
620 
621    // inverse hyperbolics:
622    template<typename T>
623    typename tools::promote_args<T>::type asinh(T x);
624 
625    template<typename T, class Policy>
626    typename tools::promote_args<T>::type asinh(T x, const Policy&);
627 
628    template<typename T>
629    typename tools::promote_args<T>::type acosh(T x);
630 
631    template<typename T, class Policy>
632    typename tools::promote_args<T>::type acosh(T x, const Policy&);
633 
634    template<typename T>
635    typename tools::promote_args<T>::type atanh(T x);
636 
637    template<typename T, class Policy>
638    typename tools::promote_args<T>::type atanh(T x, const Policy&);
639 
640    namespace detail{
641 
642       typedef boost::integral_constant<int, 0> bessel_no_int_tag;      // No integer optimisation possible.
643       typedef boost::integral_constant<int, 1> bessel_maybe_int_tag;   // Maybe integer optimisation.
644       typedef boost::integral_constant<int, 2> bessel_int_tag;         // Definite integer optimisation.
645 
646       template <class T1, class T2, class Policy>
647       struct bessel_traits
648       {
649          typedef typename mpl::if_<
650             is_integral<T1>,
651             typename tools::promote_args<T2>::type,
652             typename tools::promote_args<T1, T2>::type
653          >::type result_type;
654 
655          typedef typename policies::precision<result_type, Policy>::type precision_type;
656 
657          typedef typename mpl::if_<
658             mpl::or_<
659                mpl::less_equal<precision_type, boost::integral_constant<int, 0> >,
660                mpl::greater<precision_type, boost::integral_constant<int, 64> > >,
661             bessel_no_int_tag,
662             typename mpl::if_<
663                is_integral<T1>,
664                bessel_int_tag,
665                bessel_maybe_int_tag
666             >::type
667          >::type optimisation_tag;
668          typedef typename mpl::if_<
669             mpl::or_<
670                mpl::less_equal<precision_type, boost::integral_constant<int, 0> >,
671                mpl::greater<precision_type, boost::integral_constant<int, 113> > >,
672             bessel_no_int_tag,
673             typename mpl::if_<
674                is_integral<T1>,
675                bessel_int_tag,
676                bessel_maybe_int_tag
677             >::type
678          >::type optimisation_tag128;
679       };
680    } // detail
681 
682    // Bessel functions:
683    template <class T1, class T2, class Policy>
684    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
685    template <class T1, class T2, class Policy>
686    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol);
687 
688    template <class T1, class T2>
689    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
690    template <class T1, class T2>
691    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x);
692 
693    template <class T, class Policy>
694    typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
695    template <class T, class Policy>
696    typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol);
697 
698    template <class T>
699    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
700    template <class T>
701    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x);
702 
703    template <class T1, class T2, class Policy>
704    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
705    template <class T1, class T2, class Policy>
706    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol);
707 
708    template <class T1, class T2>
709    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
710    template <class T1, class T2>
711    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x);
712 
713    template <class T1, class T2, class Policy>
714    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
715    template <class T1, class T2, class Policy>
716    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol);
717 
718    template <class T1, class T2>
719    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
720    template <class T1, class T2>
721    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x);
722 
723    template <class T1, class T2, class Policy>
724    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
725    template <class T1, class T2, class Policy>
726    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol);
727 
728    template <class T1, class T2>
729    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
730    template <class T1, class T2>
731    typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x);
732 
733    template <class T, class Policy>
734    typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
735    template <class T, class Policy>
736    typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol);
737 
738    template <class T>
739    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
740    template <class T>
741    typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x);
742 
743    template <class T, class Policy>
744    typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
745 
746    template <class T>
747    typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
748 
749    template <class T, class OutputIterator>
750    OutputIterator cyl_bessel_j_zero(T v,
751                           int start_index,
752                           unsigned number_of_zeros,
753                           OutputIterator out_it);
754 
755    template <class T, class OutputIterator, class Policy>
756    OutputIterator cyl_bessel_j_zero(T v,
757                           int start_index,
758                           unsigned number_of_zeros,
759                           OutputIterator out_it,
760                           const Policy&);
761 
762    template <class T, class Policy>
763    typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
764 
765    template <class T>
766    typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
767 
768    template <class T, class OutputIterator>
769    OutputIterator cyl_neumann_zero(T v,
770                          int start_index,
771                          unsigned number_of_zeros,
772                          OutputIterator out_it);
773 
774    template <class T, class OutputIterator, class Policy>
775    OutputIterator cyl_neumann_zero(T v,
776                          int start_index,
777                          unsigned number_of_zeros,
778                          OutputIterator out_it,
779                          const Policy&);
780 
781    template <class T1, class T2>
782    std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
783 
784    template <class T1, class T2, class Policy>
785    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
786 
787    template <class T1, class T2, class Policy>
788    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
789 
790    template <class T1, class T2>
791    std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
792 
793    template <class T1, class T2, class Policy>
794    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
795 
796    template <class T1, class T2>
797    std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
798 
799    template <class T1, class T2, class Policy>
800    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
801 
802    template <class T1, class T2>
803    std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
804 
805    template <class T, class Policy>
806    typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
807 
808    template <class T>
809    typename tools::promote_args<T>::type airy_ai(T x);
810 
811    template <class T, class Policy>
812    typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
813 
814    template <class T>
815    typename tools::promote_args<T>::type airy_bi(T x);
816 
817    template <class T, class Policy>
818    typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
819 
820    template <class T>
821    typename tools::promote_args<T>::type airy_ai_prime(T x);
822 
823    template <class T, class Policy>
824    typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
825 
826    template <class T>
827    typename tools::promote_args<T>::type airy_bi_prime(T x);
828 
829    template <class T>
830    T airy_ai_zero(int m);
831    template <class T, class Policy>
832    T airy_ai_zero(int m, const Policy&);
833 
834    template <class OutputIterator>
835    OutputIterator airy_ai_zero(
836                      int start_index,
837                      unsigned number_of_zeros,
838                      OutputIterator out_it);
839    template <class OutputIterator, class Policy>
840    OutputIterator airy_ai_zero(
841                      int start_index,
842                      unsigned number_of_zeros,
843                      OutputIterator out_it,
844                      const Policy&);
845 
846    template <class T>
847    T airy_bi_zero(int m);
848    template <class T, class Policy>
849    T airy_bi_zero(int m, const Policy&);
850 
851    template <class OutputIterator>
852    OutputIterator airy_bi_zero(
853                      int start_index,
854                      unsigned number_of_zeros,
855                      OutputIterator out_it);
856    template <class OutputIterator, class Policy>
857    OutputIterator airy_bi_zero(
858                      int start_index,
859                      unsigned number_of_zeros,
860                      OutputIterator out_it,
861                      const Policy&);
862 
863    template <class T, class Policy>
864    typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
865 
866    template <class T>
867    typename tools::promote_args<T>::type sin_pi(T x);
868 
869    template <class T, class Policy>
870    typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
871 
872    template <class T>
873    typename tools::promote_args<T>::type cos_pi(T x);
874 
875    template <class T>
876    int fpclassify BOOST_NO_MACRO_EXPAND(T t);
877 
878    template <class T>
879    bool isfinite BOOST_NO_MACRO_EXPAND(T z);
880 
881    template <class T>
882    bool isinf BOOST_NO_MACRO_EXPAND(T t);
883 
884    template <class T>
885    bool isnan BOOST_NO_MACRO_EXPAND(T t);
886 
887    template <class T>
888    bool isnormal BOOST_NO_MACRO_EXPAND(T t);
889 
890    template<class T>
891    int signbit BOOST_NO_MACRO_EXPAND(T x);
892 
893    template <class T>
894    int sign BOOST_NO_MACRO_EXPAND(const T& z);
895 
896    template <class T, class U>
897    typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
898 
899    template <class T>
900    typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
901 
902    // Exponential integrals:
903    namespace detail{
904 
905    template <class T, class U>
906    struct expint_result
907    {
908       typedef typename mpl::if_<
909          policies::is_policy<U>,
910          typename tools::promote_args<T>::type,
911          typename tools::promote_args<U>::type
912       >::type type;
913    };
914 
915    } // namespace detail
916 
917    template <class T, class Policy>
918    typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
919 
920    template <class T, class U>
921    typename detail::expint_result<T, U>::type expint(T const z, U const u);
922 
923    template <class T>
924    typename tools::promote_args<T>::type expint(T z);
925 
926    // Zeta:
927    template <class T, class Policy>
928    typename tools::promote_args<T>::type zeta(T s, const Policy&);
929 
930    // Owen's T function:
931    template <class T1, class T2, class Policy>
932    typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
933 
934    template <class T1, class T2>
935    typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
936 
937    // Jacobi Functions:
938    template <class T, class U, class V, class Policy>
939    typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
940 
941    template <class T, class U, class V>
942    typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
943 
944    template <class U, class T, class Policy>
945    typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
946 
947    template <class U, class T>
948    typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
949 
950    template <class T, class U, class Policy>
951    typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
952 
953    template <class T, class U>
954    typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
955 
956    template <class T, class U, class Policy>
957    typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
958 
959    template <class T, class U>
960    typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
961 
962    template <class T, class U, class Policy>
963    typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
964 
965    template <class T, class U>
966    typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
967 
968    template <class T, class U, class Policy>
969    typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
970 
971    template <class T, class U>
972    typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
973 
974    template <class T, class U, class Policy>
975    typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
976 
977    template <class T, class U>
978    typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
979 
980    template <class T, class U, class Policy>
981    typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
982 
983    template <class T, class U>
984    typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
985 
986    template <class T, class U, class Policy>
987    typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
988 
989    template <class T, class U>
990    typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
991 
992    template <class T, class U, class Policy>
993    typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
994 
995    template <class T, class U>
996    typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
997 
998    template <class T, class U, class Policy>
999    typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
1000 
1001    template <class T, class U>
1002    typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
1003 
1004    template <class T, class U, class Policy>
1005    typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
1006 
1007    template <class T, class U>
1008    typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
1009 
1010    template <class T, class U, class Policy>
1011    typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
1012 
1013    template <class T, class U>
1014    typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
1015 
1016    // Jacobi Theta Functions:
1017    template <class T, class U, class Policy>
1018    typename tools::promote_args<T, U>::type jacobi_theta1(T z, U q, const Policy& pol);
1019 
1020    template <class T, class U>
1021    typename tools::promote_args<T, U>::type jacobi_theta1(T z, U q);
1022 
1023    template <class T, class U, class Policy>
1024    typename tools::promote_args<T, U>::type jacobi_theta2(T z, U q, const Policy& pol);
1025 
1026    template <class T, class U>
1027    typename tools::promote_args<T, U>::type jacobi_theta2(T z, U q);
1028 
1029    template <class T, class U, class Policy>
1030    typename tools::promote_args<T, U>::type jacobi_theta3(T z, U q, const Policy& pol);
1031 
1032    template <class T, class U>
1033    typename tools::promote_args<T, U>::type jacobi_theta3(T z, U q);
1034 
1035    template <class T, class U, class Policy>
1036    typename tools::promote_args<T, U>::type jacobi_theta4(T z, U q, const Policy& pol);
1037 
1038    template <class T, class U>
1039    typename tools::promote_args<T, U>::type jacobi_theta4(T z, U q);
1040 
1041    template <class T, class U, class Policy>
1042    typename tools::promote_args<T, U>::type jacobi_theta1tau(T z, U tau, const Policy& pol);
1043 
1044    template <class T, class U>
1045    typename tools::promote_args<T, U>::type jacobi_theta1tau(T z, U tau);
1046 
1047    template <class T, class U, class Policy>
1048    typename tools::promote_args<T, U>::type jacobi_theta2tau(T z, U tau, const Policy& pol);
1049 
1050    template <class T, class U>
1051    typename tools::promote_args<T, U>::type jacobi_theta2tau(T z, U tau);
1052 
1053    template <class T, class U, class Policy>
1054    typename tools::promote_args<T, U>::type jacobi_theta3tau(T z, U tau, const Policy& pol);
1055 
1056    template <class T, class U>
1057    typename tools::promote_args<T, U>::type jacobi_theta3tau(T z, U tau);
1058 
1059    template <class T, class U, class Policy>
1060    typename tools::promote_args<T, U>::type jacobi_theta4tau(T z, U tau, const Policy& pol);
1061 
1062    template <class T, class U>
1063    typename tools::promote_args<T, U>::type jacobi_theta4tau(T z, U tau);
1064 
1065    template <class T, class U, class Policy>
1066    typename tools::promote_args<T, U>::type jacobi_theta3m1(T z, U q, const Policy& pol);
1067 
1068    template <class T, class U>
1069    typename tools::promote_args<T, U>::type jacobi_theta3m1(T z, U q);
1070 
1071    template <class T, class U, class Policy>
1072    typename tools::promote_args<T, U>::type jacobi_theta4m1(T z, U q, const Policy& pol);
1073 
1074    template <class T, class U>
1075    typename tools::promote_args<T, U>::type jacobi_theta4m1(T z, U q);
1076 
1077    template <class T, class U, class Policy>
1078    typename tools::promote_args<T, U>::type jacobi_theta3m1tau(T z, U tau, const Policy& pol);
1079 
1080    template <class T, class U>
1081    typename tools::promote_args<T, U>::type jacobi_theta3m1tau(T z, U tau);
1082 
1083    template <class T, class U, class Policy>
1084    typename tools::promote_args<T, U>::type jacobi_theta4m1tau(T z, U tau, const Policy& pol);
1085 
1086    template <class T, class U>
1087    typename tools::promote_args<T, U>::type jacobi_theta4m1tau(T z, U tau);
1088 
1089 
1090    template <class T>
1091    typename tools::promote_args<T>::type zeta(T s);
1092 
1093    // pow:
1094    template <int N, typename T, class Policy>
1095    BOOST_CXX14_CONSTEXPR typename tools::promote_args<T>::type pow(T base, const Policy& policy);
1096 
1097    template <int N, typename T>
1098    BOOST_CXX14_CONSTEXPR typename tools::promote_args<T>::type pow(T base);
1099 
1100    // next:
1101    template <class T, class U, class Policy>
1102    typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
1103    template <class T, class U>
1104    typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
1105    template <class T, class Policy>
1106    typename tools::promote_args<T>::type float_next(const T&, const Policy&);
1107    template <class T>
1108    typename tools::promote_args<T>::type float_next(const T&);
1109    template <class T, class Policy>
1110    typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
1111    template <class T>
1112    typename tools::promote_args<T>::type float_prior(const T&);
1113    template <class T, class U, class Policy>
1114    typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
1115    template <class T, class U>
1116    typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
1117    template <class T, class Policy>
1118    typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
1119    template <class T>
1120    typename tools::promote_args<T>::type float_advance(const T& val, int distance);
1121 
1122    template <class T, class Policy>
1123    typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol);
1124    template <class T>
1125    typename tools::promote_args<T>::type ulp(const T& val);
1126 
1127    template <class T, class U>
1128    typename tools::promote_args<T, U>::type relative_difference(const T&, const U&);
1129    template <class T, class U>
1130    typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&);
1131 
1132    template<class T>
1133    BOOST_MATH_CONSTEXPR_TABLE_FUNCTION T unchecked_bernoulli_b2n(const std::size_t n);
1134    template <class T, class Policy>
1135    T bernoulli_b2n(const int i, const Policy &pol);
1136    template <class T>
1137    T bernoulli_b2n(const int i);
1138    template <class T, class OutputIterator, class Policy>
1139    OutputIterator bernoulli_b2n(const int start_index,
1140                                        const unsigned number_of_bernoullis_b2n,
1141                                        OutputIterator out_it,
1142                                        const Policy& pol);
1143    template <class T, class OutputIterator>
1144    OutputIterator bernoulli_b2n(const int start_index,
1145                                        const unsigned number_of_bernoullis_b2n,
1146                                        OutputIterator out_it);
1147    template <class T, class Policy>
1148    T tangent_t2n(const int i, const Policy &pol);
1149    template <class T>
1150    T tangent_t2n(const int i);
1151    template <class T, class OutputIterator, class Policy>
1152    OutputIterator tangent_t2n(const int start_index,
1153                                        const unsigned number_of_bernoullis_b2n,
1154                                        OutputIterator out_it,
1155                                        const Policy& pol);
1156    template <class T, class OutputIterator>
1157    OutputIterator tangent_t2n(const int start_index,
1158                                        const unsigned number_of_bernoullis_b2n,
1159                                        OutputIterator out_it);
1160 
1161    // Lambert W:
1162    template <class T, class Policy>
1163    typename boost::math::tools::promote_args<T>::type lambert_w0(T z, const Policy& pol);
1164    template <class T>
1165    typename boost::math::tools::promote_args<T>::type lambert_w0(T z);
1166    template <class T, class Policy>
1167    typename boost::math::tools::promote_args<T>::type lambert_wm1(T z, const Policy& pol);
1168    template <class T>
1169    typename boost::math::tools::promote_args<T>::type lambert_wm1(T z);
1170    template <class T, class Policy>
1171    typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z, const Policy& pol);
1172    template <class T>
1173    typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z);
1174    template <class T, class Policy>
1175    typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z, const Policy& pol);
1176    template <class T>
1177    typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z);
1178 
1179    // Hypergeometrics:
1180    template <class T1, class T2> typename tools::promote_args<T1, T2>::type hypergeometric_1F0(T1 a, T2 z);
1181    template <class T1, class T2, class Policy> typename tools::promote_args<T1, T2>::type hypergeometric_1F0(T1 a, T2 z, const Policy&);
1182 
1183    template <class T1, class T2> typename tools::promote_args<T1, T2>::type hypergeometric_0F1(T1 b, T2 z);
1184    template <class T1, class T2, class Policy> typename tools::promote_args<T1, T2>::type hypergeometric_0F1(T1 b, T2 z, const Policy&);
1185 
1186    template <class T1, class T2, class T3> typename tools::promote_args<T1, T2, T3>::type hypergeometric_2F0(T1 a1, T2 a2, T3 z);
1187    template <class T1, class T2, class T3, class Policy> typename tools::promote_args<T1, T2, T3>::type hypergeometric_2F0(T1 a1, T2 a2, T3 z, const Policy&);
1188 
1189    template <class T1, class T2, class T3> typename tools::promote_args<T1, T2, T3>::type hypergeometric_1F1(T1 a, T2 b, T3 z);
1190    template <class T1, class T2, class T3, class Policy> typename tools::promote_args<T1, T2, T3>::type hypergeometric_1F1(T1 a, T2 b, T3 z, const Policy&);
1191 
1192 
1193     } // namespace math
1194 } // namespace boost
1195 
1196 #ifdef BOOST_HAS_LONG_LONG
1197 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
1198    \
1199    template <class T>\
1200    inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1201    \
1202    template <class T>\
1203    inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
1204    \
1205    template <class T>\
1206    inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
1207 
1208 #else
1209 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)
1210 #endif
1211 
1212 #if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_HDR_ARRAY)
1213 #  define BOOST_MATH_DETAIL_11_FUNC(Policy)\
1214    template <class T, class U, class V>\
1215    inline typename boost::math::tools::promote_args<T, U>::type hypergeometric_1F1(const T& a, const U& b, const V& z)\
1216    { return boost::math::hypergeometric_1F1(a, b, z, Policy()); }\
1217 
1218 #else
1219 #  define BOOST_MATH_DETAIL_11_FUNC(Policy)
1220 #endif
1221 
1222 #define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
1223    \
1224    BOOST_MATH_DETAIL_LL_FUNC(Policy)\
1225    BOOST_MATH_DETAIL_11_FUNC(Policy)\
1226    \
1227    template <class RT1, class RT2>\
1228    inline typename boost::math::tools::promote_args<RT1, RT2>::type \
1229    beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
1230 \
1231    template <class RT1, class RT2, class A>\
1232    inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
1233    beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
1234 \
1235    template <class RT1, class RT2, class RT3>\
1236    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1237    betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
1238 \
1239    template <class RT1, class RT2, class RT3>\
1240    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1241    ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
1242 \
1243    template <class RT1, class RT2, class RT3>\
1244    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1245    ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
1246 \
1247    template <class T1, class T2, class T3, class T4>\
1248    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type  \
1249    ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
1250 \
1251    template <class RT1, class RT2, class RT3>\
1252    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1253    ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
1254 \
1255    template <class T1, class T2, class T3, class T4>\
1256    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
1257    ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
1258 \
1259    template <class RT1, class RT2, class RT3>\
1260    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1261    ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
1262 \
1263    template <class T1, class T2, class T3>\
1264    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
1265    ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
1266 \
1267    template <class RT1, class RT2, class RT3>\
1268    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1269    ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
1270 \
1271    template <class T1, class T2, class T3>\
1272    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
1273    ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
1274 \
1275    template <class RT1, class RT2, class RT3>\
1276    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1277    ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
1278 \
1279    template <class RT1, class RT2, class RT3>\
1280    inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
1281    ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
1282 \
1283    template <class T> T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient<T, Policy>(n, k, Policy()); }\
1284 \
1285    template <class RT>\
1286    inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
1287 \
1288    template <class RT>\
1289    inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
1290 \
1291    template <class RT>\
1292    inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
1293 \
1294    template <class RT>\
1295    inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
1296 \
1297    using boost::math::legendre_next;\
1298 \
1299    template <class T>\
1300    inline typename boost::math::tools::promote_args<T>::type \
1301    legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
1302 \
1303    template <class T>\
1304    inline typename boost::math::tools::promote_args<T>::type \
1305    legendre_p_prime(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
1306 \
1307    template <class T>\
1308    inline typename boost::math::tools::promote_args<T>::type \
1309    legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
1310 \
1311    using ::boost::math::legendre_next;\
1312 \
1313    template <class T>\
1314    inline typename boost::math::tools::promote_args<T>::type \
1315    legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
1316 \
1317    using ::boost::math::laguerre_next;\
1318 \
1319    template <class T>\
1320    inline typename boost::math::tools::promote_args<T>::type \
1321    laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
1322 \
1323    template <class T1, class T2>\
1324    inline typename boost::math::laguerre_result<T1, T2>::type \
1325    laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
1326 \
1327    template <class T>\
1328    inline typename boost::math::tools::promote_args<T>::type \
1329    hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
1330 \
1331    using boost::math::hermite_next;\
1332 \
1333    using boost::math::chebyshev_next;\
1334 \
1335   template<class Real>\
1336   Real chebyshev_t(unsigned n, Real const & x){ return ::boost::math::chebyshev_t(n, x, Policy()); }\
1337 \
1338   template<class Real>\
1339   Real chebyshev_u(unsigned n, Real const & x){ return ::boost::math::chebyshev_u(n, x, Policy()); }\
1340 \
1341   template<class Real>\
1342   Real chebyshev_t_prime(unsigned n, Real const & x){ return ::boost::math::chebyshev_t_prime(n, x, Policy()); }\
1343 \
1344   using ::boost::math::chebyshev_clenshaw_recurrence;\
1345 \
1346    template <class T1, class T2>\
1347    inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
1348    spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
1349 \
1350    template <class T1, class T2>\
1351    inline typename boost::math::tools::promote_args<T1, T2>::type \
1352    spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
1353 \
1354    template <class T1, class T2>\
1355    inline typename boost::math::tools::promote_args<T1, T2>::type \
1356    spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
1357 \
1358    template <class T1, class T2, class Policy>\
1359    inline typename boost::math::tools::promote_args<T1, T2>::type \
1360       spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
1361 \
1362    template <class T1, class T2, class T3>\
1363    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
1364    ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
1365 \
1366    template <class T1, class T2, class T3>\
1367    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
1368    ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
1369 \
1370    template <class T1, class T2>\
1371    inline typename boost::math::tools::promote_args<T1, T2>::type \
1372    ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
1373 \
1374    template <class T1, class T2, class T3, class T4>\
1375    inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
1376    ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
1377 \
1378    template <class T1, class T2, class T3>\
1379    inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
1380    ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\
1381    \
1382    template <typename T>\
1383    inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
1384 \
1385    template <class T1, class T2>\
1386    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
1387 \
1388    template <typename T>\
1389    inline typename boost::math::tools::promote_args<T>::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\
1390 \
1391    template <class T1, class T2>\
1392    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\
1393 \
1394    template <class T1, class T2>\
1395    inline typename boost::math::tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\
1396 \
1397    template <class T1, class T2>\
1398    inline typename boost::math::tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\
1399 \
1400    template <typename T>\
1401    inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
1402 \
1403    template <class T1, class T2>\
1404    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
1405 \
1406    template <class T1, class T2, class T3>\
1407    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()); }\
1408 \
1409    template <class T1, class T2>\
1410    inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
1411 \
1412    using boost::math::max_factorial;\
1413    template <class RT>\
1414    inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
1415    using boost::math::unchecked_factorial;\
1416    template <class RT>\
1417    inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
1418    template <class RT>\
1419    inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
1420    template <class RT>\
1421    inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
1422 \
1423    template <class RT>\
1424    inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
1425 \
1426    template <class RT>\
1427    inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
1428 \
1429    template <class RT1, class RT2>\
1430    inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
1431 \
1432    template <class RT>\
1433    inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
1434 \
1435    template <class RT>\
1436    inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
1437 \
1438    template <class RT1, class RT2>\
1439    inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
1440 \
1441    template <class RT1, class RT2>\
1442    inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
1443 \
1444    template <class RT1, class RT2>\
1445    inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
1446 \
1447    template <class T1, class T2>\
1448    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()); }\
1449 \
1450    template <class T1, class T2>\
1451    inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
1452 \
1453    template <class T1, class T2>\
1454    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()); }\
1455 \
1456    template <class T1, class T2>\
1457    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()); }\
1458 \
1459    template <class T1, class T2>\
1460    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()); }\
1461 \
1462    template <class T1, class T2>\
1463    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()); }\
1464 \
1465    template <class T1, class T2>\
1466    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()); }\
1467 \
1468    template <class T>\
1469    inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
1470 \
1471    template <class T>\
1472    inline typename boost::math::tools::promote_args<T>::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\
1473 \
1474    template <class T>\
1475    inline typename boost::math::tools::promote_args<T>::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\
1476    \
1477    template <class T1, class T2>\
1478    inline typename boost::math::tools::promote_args<T1, T2>::type \
1479    hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
1480 \
1481    template <class RT>\
1482    inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
1483 \
1484    template <class T>\
1485    inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
1486 \
1487    template <class T>\
1488    inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
1489 \
1490    template <class T>\
1491    inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
1492 \
1493    template <class T1, class T2>\
1494    inline typename boost::math::tools::promote_args<T1, T2>::type \
1495    powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
1496 \
1497    template <class T>\
1498    inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
1499 \
1500    template <class T>\
1501    inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
1502 \
1503    template <class T>\
1504    inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
1505 \
1506    template<typename T>\
1507    inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
1508 \
1509    template<typename T>\
1510    inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
1511 \
1512    template<typename T>\
1513    inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
1514 \
1515    template <class T1, class T2>\
1516    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
1517    { return boost::math::cyl_bessel_j(v, x, Policy()); }\
1518 \
1519    template <class T1, class T2>\
1520    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j_prime(T1 v, T2 x)\
1521    { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\
1522 \
1523    template <class T>\
1524    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
1525    { return boost::math::sph_bessel(v, x, Policy()); }\
1526 \
1527    template <class T>\
1528    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel_prime(unsigned v, T x)\
1529    { return boost::math::sph_bessel_prime(v, x, Policy()); }\
1530 \
1531    template <class T1, class T2>\
1532    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1533    cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
1534 \
1535    template <class T1, class T2>\
1536    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1537    cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\
1538 \
1539    template <class T1, class T2>\
1540    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1541    cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
1542 \
1543    template <class T1, class T2>\
1544    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1545    cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\
1546 \
1547    template <class T1, class T2>\
1548    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1549    cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
1550 \
1551    template <class T1, class T2>\
1552    inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
1553    cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\
1554 \
1555    template <class T>\
1556    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
1557    sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
1558 \
1559    template <class T>\
1560    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
1561    sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\
1562 \
1563    template <class T>\
1564    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
1565    { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\
1566 \
1567 template <class OutputIterator, class T>\
1568    inline void cyl_bessel_j_zero(T v,\
1569                                  int start_index,\
1570                                  unsigned number_of_zeros,\
1571                                  OutputIterator out_it)\
1572    { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
1573 \
1574    template <class T>\
1575    inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
1576    { return boost::math::cyl_neumann_zero(v, m, Policy()); }\
1577 \
1578 template <class OutputIterator, class T>\
1579    inline void cyl_neumann_zero(T v,\
1580                                 int start_index,\
1581                                 unsigned number_of_zeros,\
1582                                 OutputIterator out_it)\
1583    { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
1584 \
1585    template <class T>\
1586    inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x, Policy()); }\
1587 \
1588    template <class T>\
1589    inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x, Policy()); }\
1590 \
1591    using boost::math::fpclassify;\
1592    using boost::math::isfinite;\
1593    using boost::math::isinf;\
1594    using boost::math::isnan;\
1595    using boost::math::isnormal;\
1596    using boost::math::signbit;\
1597    using boost::math::sign;\
1598    using boost::math::copysign;\
1599    using boost::math::changesign;\
1600    \
1601    template <class T, class U>\
1602    inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
1603    { return boost::math::expint(z, u, Policy()); }\
1604    \
1605    template <class T>\
1606    inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
1607    \
1608    template <class T>\
1609    inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
1610    \
1611    template <class T>\
1612    inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
1613    \
1614    template <class T>\
1615    inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
1616    \
1617    template <class T>\
1618    inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
1619    \
1620    template <class T>\
1621    inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
1622    \
1623    template <class T>\
1624    inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
1625    \
1626    template <class T>\
1627    inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
1628    \
1629    template <class T>\
1630    inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1631    \
1632    template <class T>\
1633    inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1634    \
1635    template <class T>\
1636    inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
1637    \
1638    template <int N, class T>\
1639    inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
1640    \
1641    template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
1642    template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
1643    template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
1644    template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
1645    template <class T> T ulp(const T& a){ return boost::math::ulp(a, Policy()); }\
1646    \
1647    template <class RT1, class RT2>\
1648    inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\
1649    \
1650    template <class T1, class T2>\
1651    inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
1652    {  return boost::math::cyl_hankel_1(v, x, Policy()); }\
1653    \
1654    template <class T1, class T2>\
1655    inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
1656    { return boost::math::cyl_hankel_2(v, x, Policy()); }\
1657    \
1658    template <class T1, class T2>\
1659    inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
1660    { return boost::math::sph_hankel_1(v, x, Policy()); }\
1661    \
1662    template <class T1, class T2>\
1663    inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
1664    { return boost::math::sph_hankel_2(v, x, Policy()); }\
1665    \
1666    template <class T>\
1667    inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
1668    { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
1669    \
1670    template <class U, class T>\
1671    inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
1672    { return boost::math::jacobi_sn(k, theta, Policy()); }\
1673    \
1674    template <class T, class U>\
1675    inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
1676    { return boost::math::jacobi_cn(k, theta, Policy()); }\
1677    \
1678    template <class T, class U>\
1679    inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
1680    { return boost::math::jacobi_dn(k, theta, Policy()); }\
1681    \
1682    template <class T, class U>\
1683    inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
1684    { return boost::math::jacobi_cd(k, theta, Policy()); }\
1685    \
1686    template <class T, class U>\
1687    inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
1688    { return boost::math::jacobi_dc(k, theta, Policy()); }\
1689    \
1690    template <class T, class U>\
1691    inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
1692    { return boost::math::jacobi_ns(k, theta, Policy()); }\
1693    \
1694    template <class T, class U>\
1695    inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
1696    { return boost::math::jacobi_sd(k, theta, Policy()); }\
1697    \
1698    template <class T, class U>\
1699    inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
1700    { return boost::math::jacobi_ds(k, theta, Policy()); }\
1701    \
1702    template <class T, class U>\
1703    inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
1704    { return boost::math::jacobi_nc(k, theta, Policy()); }\
1705    \
1706    template <class T, class U>\
1707    inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
1708    { return boost::math::jacobi_nd(k, theta, Policy()); }\
1709    \
1710    template <class T, class U>\
1711    inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
1712    { return boost::math::jacobi_sc(k, theta, Policy()); }\
1713    \
1714    template <class T, class U>\
1715    inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
1716    { return boost::math::jacobi_cs(k, theta, Policy()); }\
1717    \
1718    template <class T, class U>\
1719    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta1(T z, U q)\
1720    { return boost::math::jacobi_theta1(z, q, Policy()); }\
1721    \
1722    template <class T, class U>\
1723    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta2(T z, U q)\
1724    { return boost::math::jacobi_theta2(z, q, Policy()); }\
1725    \
1726    template <class T, class U>\
1727    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta3(T z, U q)\
1728    { return boost::math::jacobi_theta3(z, q, Policy()); }\
1729    \
1730    template <class T, class U>\
1731    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta4(T z, U q)\
1732    { return boost::math::jacobi_theta4(z, q, Policy()); }\
1733    \
1734    template <class T, class U>\
1735    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta1tau(T z, U q)\
1736    { return boost::math::jacobi_theta1tau(z, q, Policy()); }\
1737    \
1738    template <class T, class U>\
1739    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta2tau(T z, U q)\
1740    { return boost::math::jacobi_theta2tau(z, q, Policy()); }\
1741    \
1742    template <class T, class U>\
1743    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta3tau(T z, U q)\
1744    { return boost::math::jacobi_theta3tau(z, q, Policy()); }\
1745    \
1746    template <class T, class U>\
1747    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta4tau(T z, U q)\
1748    { return boost::math::jacobi_theta4tau(z, q, Policy()); }\
1749    \
1750    template <class T, class U>\
1751    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta3m1(T z, U q)\
1752    { return boost::math::jacobi_theta3m1(z, q, Policy()); }\
1753    \
1754    template <class T, class U>\
1755    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta4m1(T z, U q)\
1756    { return boost::math::jacobi_theta4m1(z, q, Policy()); }\
1757    \
1758    template <class T, class U>\
1759    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta3m1tau(T z, U q)\
1760    { return boost::math::jacobi_theta3m1tau(z, q, Policy()); }\
1761    \
1762    template <class T, class U>\
1763    inline typename boost::math::tools::promote_args<T, U>::type jacobi_theta4m1tau(T z, U q)\
1764    { return boost::math::jacobi_theta4m1tau(z, q, Policy()); }\
1765    \
1766    template <class T>\
1767    inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\
1768    {  return boost::math::airy_ai(x, Policy());  }\
1769    \
1770    template <class T>\
1771    inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\
1772    {  return boost::math::airy_bi(x, Policy());  }\
1773    \
1774    template <class T>\
1775    inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
1776    {  return boost::math::airy_ai_prime(x, Policy());  }\
1777    \
1778    template <class T>\
1779    inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
1780    {  return boost::math::airy_bi_prime(x, Policy());  }\
1781    \
1782    template <class T>\
1783    inline T airy_ai_zero(int m)\
1784    { return boost::math::airy_ai_zero<T>(m, Policy()); }\
1785    template <class T, class OutputIterator>\
1786    OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
1787    { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
1788    \
1789    template <class T>\
1790    inline T airy_bi_zero(int m)\
1791    { return boost::math::airy_bi_zero<T>(m, Policy()); }\
1792    template <class T, class OutputIterator>\
1793    OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
1794    { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
1795    \
1796    template <class T>\
1797    T bernoulli_b2n(const int i)\
1798    { return boost::math::bernoulli_b2n<T>(i, Policy()); }\
1799    template <class T, class OutputIterator>\
1800    OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
1801    { return boost::math::bernoulli_b2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
1802    \
1803    template <class T>\
1804    T tangent_t2n(const int i)\
1805    { return boost::math::tangent_t2n<T>(i, Policy()); }\
1806    template <class T, class OutputIterator>\
1807    OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
1808    { return boost::math::tangent_t2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
1809    \
1810    template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_w0(T z) { return boost::math::lambert_w0(z, Policy()); }\
1811    template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_wm1(T z) { return boost::math::lambert_w0(z, Policy()); }\
1812    template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z) { return boost::math::lambert_w0(z, Policy()); }\
1813    template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z) { return boost::math::lambert_w0(z, Policy()); }\
1814    \
1815    template <class T, class U>\
1816    inline typename boost::math::tools::promote_args<T, U>::type hypergeometric_1F0(const T& a, const U& z)\
1817    { return boost::math::hypergeometric_1F0(a, z, Policy()); }\
1818    \
1819    template <class T, class U>\
1820    inline typename boost::math::tools::promote_args<T, U>::type hypergeometric_0F1(const T& a, const U& z)\
1821    { return boost::math::hypergeometric_0F1(a, z, Policy()); }\
1822    \
1823    template <class T, class U, class V>\
1824    inline typename boost::math::tools::promote_args<T, U>::type hypergeometric_2F0(const T& a1, const U& a2, const V& z)\
1825    { return boost::math::hypergeometric_2F0(a1, a2, z, Policy()); }\
1826    \
1827 
1828 
1829 
1830 
1831 
1832 
1833 #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
1834