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> 267 std::complex<typename tools::promote_args<T1, T2>::type> 268 spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); 269 270 template <class T1, class T2, class Policy> 271 std::complex<typename tools::promote_args<T1, T2>::type> 272 spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); 273 274 template <class T1, class T2> 275 typename tools::promote_args<T1, T2>::type 276 spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); 277 278 template <class T1, class T2, class Policy> 279 typename tools::promote_args<T1, T2>::type 280 spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); 281 282 template <class T1, class T2> 283 typename tools::promote_args<T1, T2>::type 284 spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); 285 286 template <class T1, class T2, class Policy> 287 typename tools::promote_args<T1, T2>::type 288 spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); 289 290 // Elliptic integrals: 291 template <class T1, class T2, class T3> 292 typename tools::promote_args<T1, T2, T3>::type 293 ellint_rf(T1 x, T2 y, T3 z); 294 295 template <class T1, class T2, class T3, class Policy> 296 typename tools::promote_args<T1, T2, T3>::type 297 ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); 298 299 template <class T1, class T2, class T3> 300 typename tools::promote_args<T1, T2, T3>::type 301 ellint_rd(T1 x, T2 y, T3 z); 302 303 template <class T1, class T2, class T3, class Policy> 304 typename tools::promote_args<T1, T2, T3>::type 305 ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); 306 307 template <class T1, class T2> 308 typename tools::promote_args<T1, T2>::type 309 ellint_rc(T1 x, T2 y); 310 311 template <class T1, class T2, class Policy> 312 typename tools::promote_args<T1, T2>::type 313 ellint_rc(T1 x, T2 y, const Policy& pol); 314 315 template <class T1, class T2, class T3, class T4> 316 typename tools::promote_args<T1, T2, T3, T4>::type 317 ellint_rj(T1 x, T2 y, T3 z, T4 p); 318 319 template <class T1, class T2, class T3, class T4, class Policy> 320 typename tools::promote_args<T1, T2, T3, T4>::type 321 ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); 322 323 template <class T1, class T2, class T3> 324 typename tools::promote_args<T1, T2, T3>::type 325 ellint_rg(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_rg(T1 x, T2 y, T3 z, const Policy& pol); 330 331 template <typename T> 332 typename tools::promote_args<T>::type ellint_2(T k); 333 334 template <class T1, class T2> 335 typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi); 336 337 template <class T1, class T2, class Policy> 338 typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol); 339 340 template <typename T> 341 typename tools::promote_args<T>::type ellint_1(T k); 342 343 template <class T1, class T2> 344 typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi); 345 346 template <class T1, class T2, class Policy> 347 typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol); 348 349 template <typename T> 350 typename tools::promote_args<T>::type ellint_d(T k); 351 352 template <class T1, class T2> 353 typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi); 354 355 template <class T1, class T2, class Policy> 356 typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi, const Policy& pol); 357 358 template <class T1, class T2> 359 typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi); 360 361 template <class T1, class T2, class Policy> 362 typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi, const Policy& pol); 363 364 template <class T1, class T2> 365 typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi); 366 367 template <class T1, class T2, class Policy> 368 typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi, const Policy& pol); 369 370 namespace detail{ 371 372 template <class T, class U, class V> 373 struct ellint_3_result 374 { 375 typedef typename mpl::if_< 376 policies::is_policy<V>, 377 typename tools::promote_args<T, U>::type, 378 typename tools::promote_args<T, U, V>::type 379 >::type type; 380 }; 381 382 } // namespace detail 383 384 385 template <class T1, class T2, class T3> 386 typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi); 387 388 template <class T1, class T2, class T3, class Policy> 389 typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); 390 391 template <class T1, class T2> 392 typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v); 393 394 // Factorial functions. 395 // Note: not for integral types, at present. 396 template <class RT> 397 struct max_factorial; 398 template <class RT> 399 RT factorial(unsigned int); 400 template <class RT, class Policy> 401 RT factorial(unsigned int, const Policy& pol); 402 template <class RT> 403 RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); 404 template <class RT> 405 RT double_factorial(unsigned i); 406 template <class RT, class Policy> 407 RT double_factorial(unsigned i, const Policy& pol); 408 409 template <class RT> 410 typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n); 411 412 template <class RT, class Policy> 413 typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol); 414 415 template <class RT> 416 typename tools::promote_args<RT>::type rising_factorial(RT x, int n); 417 418 template <class RT, class Policy> 419 typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol); 420 421 // Gamma functions. 422 template <class RT> 423 typename tools::promote_args<RT>::type tgamma(RT z); 424 425 template <class RT> 426 typename tools::promote_args<RT>::type tgamma1pm1(RT z); 427 428 template <class RT, class Policy> 429 typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol); 430 431 template <class RT1, class RT2> 432 typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z); 433 434 template <class RT1, class RT2, class Policy> 435 typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol); 436 437 template <class RT> 438 typename tools::promote_args<RT>::type lgamma(RT z, int* sign); 439 440 template <class RT, class Policy> 441 typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol); 442 443 template <class RT> 444 typename tools::promote_args<RT>::type lgamma(RT x); 445 446 template <class RT, class Policy> 447 typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol); 448 449 template <class RT1, class RT2> 450 typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z); 451 452 template <class RT1, class RT2, class Policy> 453 typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&); 454 455 template <class RT1, class RT2> 456 typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z); 457 458 template <class RT1, class RT2, class Policy> 459 typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&); 460 461 template <class RT1, class RT2> 462 typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z); 463 464 template <class RT1, class RT2, class Policy> 465 typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&); 466 467 template <class T1, class T2> 468 typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta); 469 470 template <class T1, class T2, class Policy> 471 typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); 472 473 template <class T1, class T2> 474 typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b); 475 476 template <class T1, class T2, class Policy> 477 typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&); 478 479 template <class T1, class T2> 480 typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x); 481 482 template <class T1, class T2, class Policy> 483 typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&); 484 485 // gamma inverse. 486 template <class T1, class T2> 487 typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p); 488 489 template <class T1, class T2, class Policy> 490 typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&); 491 492 template <class T1, class T2> 493 typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p); 494 495 template <class T1, class T2, class Policy> 496 typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&); 497 498 template <class T1, class T2> 499 typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q); 500 501 template <class T1, class T2, class Policy> 502 typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&); 503 504 template <class T1, class T2> 505 typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q); 506 507 template <class T1, class T2, class Policy> 508 typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&); 509 510 // digamma: 511 template <class T> 512 typename tools::promote_args<T>::type digamma(T x); 513 514 template <class T, class Policy> 515 typename tools::promote_args<T>::type digamma(T x, const Policy&); 516 517 // trigamma: 518 template <class T> 519 typename tools::promote_args<T>::type trigamma(T x); 520 521 template <class T, class Policy> 522 typename tools::promote_args<T>::type trigamma(T x, const Policy&); 523 524 // polygamma: 525 template <class T> 526 typename tools::promote_args<T>::type polygamma(int n, T x); 527 528 template <class T, class Policy> 529 typename tools::promote_args<T>::type polygamma(int n, T x, const Policy&); 530 531 // Hypotenuse function sqrt(x ^ 2 + y ^ 2). 532 template <class T1, class T2> 533 typename tools::promote_args<T1, T2>::type 534 hypot(T1 x, T2 y); 535 536 template <class T1, class T2, class Policy> 537 typename tools::promote_args<T1, T2>::type 538 hypot(T1 x, T2 y, const Policy&); 539 540 // cbrt - cube root. 541 template <class RT> 542 typename tools::promote_args<RT>::type cbrt(RT z); 543 544 template <class RT, class Policy> 545 typename tools::promote_args<RT>::type cbrt(RT z, const Policy&); 546 547 // log1p is log(x + 1) 548 template <class T> 549 typename tools::promote_args<T>::type log1p(T); 550 551 template <class T, class Policy> 552 typename tools::promote_args<T>::type log1p(T, const Policy&); 553 554 // log1pmx is log(x + 1) - x 555 template <class T> 556 typename tools::promote_args<T>::type log1pmx(T); 557 558 template <class T, class Policy> 559 typename tools::promote_args<T>::type log1pmx(T, const Policy&); 560 561 // Exp (x) minus 1 functions. 562 template <class T> 563 typename tools::promote_args<T>::type expm1(T); 564 565 template <class T, class Policy> 566 typename tools::promote_args<T>::type expm1(T, const Policy&); 567 568 // Power - 1 569 template <class T1, class T2> 570 typename tools::promote_args<T1, T2>::type 571 powm1(const T1 a, const T2 z); 572 573 template <class T1, class T2, class Policy> 574 typename tools::promote_args<T1, T2>::type 575 powm1(const T1 a, const T2 z, const Policy&); 576 577 // sqrt(1+x) - 1 578 template <class T> 579 typename tools::promote_args<T>::type sqrt1pm1(const T& val); 580 581 template <class T, class Policy> 582 typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&); 583 584 // sinus cardinals: 585 template <class T> 586 typename tools::promote_args<T>::type sinc_pi(T x); 587 588 template <class T, class Policy> 589 typename tools::promote_args<T>::type sinc_pi(T x, const Policy&); 590 591 template <class T> 592 typename tools::promote_args<T>::type sinhc_pi(T x); 593 594 template <class T, class Policy> 595 typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&); 596 597 // inverse hyperbolics: 598 template<typename T> 599 typename tools::promote_args<T>::type asinh(T x); 600 601 template<typename T, class Policy> 602 typename tools::promote_args<T>::type asinh(T x, const Policy&); 603 604 template<typename T> 605 typename tools::promote_args<T>::type acosh(T x); 606 607 template<typename T, class Policy> 608 typename tools::promote_args<T>::type acosh(T x, const Policy&); 609 610 template<typename T> 611 typename tools::promote_args<T>::type atanh(T x); 612 613 template<typename T, class Policy> 614 typename tools::promote_args<T>::type atanh(T x, const Policy&); 615 616 namespace detail{ 617 618 typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible. 619 typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation. 620 typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion. 621 622 template <class T1, class T2, class Policy> 623 struct bessel_traits 624 { 625 typedef typename mpl::if_< 626 is_integral<T1>, 627 typename tools::promote_args<T2>::type, 628 typename tools::promote_args<T1, T2>::type 629 >::type result_type; 630 631 typedef typename policies::precision<result_type, Policy>::type precision_type; 632 633 typedef typename mpl::if_< 634 mpl::or_< 635 mpl::less_equal<precision_type, mpl::int_<0> >, 636 mpl::greater<precision_type, mpl::int_<64> > >, 637 bessel_no_int_tag, 638 typename mpl::if_< 639 is_integral<T1>, 640 bessel_int_tag, 641 bessel_maybe_int_tag 642 >::type 643 >::type optimisation_tag; 644 typedef typename mpl::if_< 645 mpl::or_< 646 mpl::less_equal<precision_type, mpl::int_<0> >, 647 mpl::greater<precision_type, mpl::int_<113> > >, 648 bessel_no_int_tag, 649 typename mpl::if_< 650 is_integral<T1>, 651 bessel_int_tag, 652 bessel_maybe_int_tag 653 >::type 654 >::type optimisation_tag128; 655 }; 656 } // detail 657 658 // Bessel functions: 659 template <class T1, class T2, class Policy> 660 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); 661 template <class T1, class T2, class Policy> 662 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol); 663 664 template <class T1, class T2> 665 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x); 666 template <class T1, class T2> 667 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x); 668 669 template <class T, class Policy> 670 typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol); 671 template <class T, class Policy> 672 typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol); 673 674 template <class T> 675 typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x); 676 template <class T> 677 typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x); 678 679 template <class T1, class T2, class Policy> 680 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); 681 template <class T1, class T2, class Policy> 682 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol); 683 684 template <class T1, class T2> 685 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x); 686 template <class T1, class T2> 687 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x); 688 689 template <class T1, class T2, class Policy> 690 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); 691 template <class T1, class T2, class Policy> 692 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol); 693 694 template <class T1, class T2> 695 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x); 696 template <class T1, class T2> 697 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x); 698 699 template <class T1, class T2, class Policy> 700 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); 701 template <class T1, class T2, class Policy> 702 typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol); 703 704 template <class T1, class T2> 705 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x); 706 template <class T1, class T2> 707 typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x); 708 709 template <class T, class Policy> 710 typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol); 711 template <class T, class Policy> 712 typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol); 713 714 template <class T> 715 typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x); 716 template <class T> 717 typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x); 718 719 template <class T, class Policy> 720 typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); 721 722 template <class T> 723 typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m); 724 725 template <class T, class OutputIterator> 726 OutputIterator cyl_bessel_j_zero(T v, 727 int start_index, 728 unsigned number_of_zeros, 729 OutputIterator out_it); 730 731 template <class T, class OutputIterator, class Policy> 732 OutputIterator cyl_bessel_j_zero(T v, 733 int start_index, 734 unsigned number_of_zeros, 735 OutputIterator out_it, 736 const Policy&); 737 738 template <class T, class Policy> 739 typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol); 740 741 template <class T> 742 typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m); 743 744 template <class T, class OutputIterator> 745 OutputIterator cyl_neumann_zero(T v, 746 int start_index, 747 unsigned number_of_zeros, 748 OutputIterator out_it); 749 750 template <class T, class OutputIterator, class Policy> 751 OutputIterator cyl_neumann_zero(T v, 752 int start_index, 753 unsigned number_of_zeros, 754 OutputIterator out_it, 755 const Policy&); 756 757 template <class T1, class T2> 758 std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x); 759 760 template <class T1, class T2, class Policy> 761 std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); 762 763 template <class T1, class T2, class Policy> 764 std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol); 765 766 template <class T1, class T2> 767 std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x); 768 769 template <class T1, class T2, class Policy> 770 std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol); 771 772 template <class T1, class T2> 773 std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x); 774 775 template <class T1, class T2, class Policy> 776 std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol); 777 778 template <class T1, class T2> 779 std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x); 780 781 template <class T, class Policy> 782 typename tools::promote_args<T>::type airy_ai(T x, const Policy&); 783 784 template <class T> 785 typename tools::promote_args<T>::type airy_ai(T x); 786 787 template <class T, class Policy> 788 typename tools::promote_args<T>::type airy_bi(T x, const Policy&); 789 790 template <class T> 791 typename tools::promote_args<T>::type airy_bi(T x); 792 793 template <class T, class Policy> 794 typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&); 795 796 template <class T> 797 typename tools::promote_args<T>::type airy_ai_prime(T x); 798 799 template <class T, class Policy> 800 typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&); 801 802 template <class T> 803 typename tools::promote_args<T>::type airy_bi_prime(T x); 804 805 template <class T> 806 T airy_ai_zero(int m); 807 template <class T, class Policy> 808 T airy_ai_zero(int m, const Policy&); 809 810 template <class OutputIterator> 811 OutputIterator airy_ai_zero( 812 int start_index, 813 unsigned number_of_zeros, 814 OutputIterator out_it); 815 template <class OutputIterator, class Policy> 816 OutputIterator airy_ai_zero( 817 int start_index, 818 unsigned number_of_zeros, 819 OutputIterator out_it, 820 const Policy&); 821 822 template <class T> 823 T airy_bi_zero(int m); 824 template <class T, class Policy> 825 T airy_bi_zero(int m, const Policy&); 826 827 template <class OutputIterator> 828 OutputIterator airy_bi_zero( 829 int start_index, 830 unsigned number_of_zeros, 831 OutputIterator out_it); 832 template <class OutputIterator, class Policy> 833 OutputIterator airy_bi_zero( 834 int start_index, 835 unsigned number_of_zeros, 836 OutputIterator out_it, 837 const Policy&); 838 839 template <class T, class Policy> 840 typename tools::promote_args<T>::type sin_pi(T x, const Policy&); 841 842 template <class T> 843 typename tools::promote_args<T>::type sin_pi(T x); 844 845 template <class T, class Policy> 846 typename tools::promote_args<T>::type cos_pi(T x, const Policy&); 847 848 template <class T> 849 typename tools::promote_args<T>::type cos_pi(T x); 850 851 template <class T> 852 int fpclassify BOOST_NO_MACRO_EXPAND(T t); 853 854 template <class T> 855 bool isfinite BOOST_NO_MACRO_EXPAND(T z); 856 857 template <class T> 858 bool isinf BOOST_NO_MACRO_EXPAND(T t); 859 860 template <class T> 861 bool isnan BOOST_NO_MACRO_EXPAND(T t); 862 863 template <class T> 864 bool isnormal BOOST_NO_MACRO_EXPAND(T t); 865 866 template<class T> 867 int signbit BOOST_NO_MACRO_EXPAND(T x); 868 869 template <class T> 870 int sign BOOST_NO_MACRO_EXPAND(const T& z); 871 872 template <class T, class U> 873 typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y); 874 875 template <class T> 876 typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z); 877 878 // Exponential integrals: 879 namespace detail{ 880 881 template <class T, class U> 882 struct expint_result 883 { 884 typedef typename mpl::if_< 885 policies::is_policy<U>, 886 typename tools::promote_args<T>::type, 887 typename tools::promote_args<U>::type 888 >::type type; 889 }; 890 891 } // namespace detail 892 893 template <class T, class Policy> 894 typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&); 895 896 template <class T, class U> 897 typename detail::expint_result<T, U>::type expint(T const z, U const u); 898 899 template <class T> 900 typename tools::promote_args<T>::type expint(T z); 901 902 // Zeta: 903 template <class T, class Policy> 904 typename tools::promote_args<T>::type zeta(T s, const Policy&); 905 906 // Owen's T function: 907 template <class T1, class T2, class Policy> 908 typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol); 909 910 template <class T1, class T2> 911 typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a); 912 913 // Jacobi Functions: 914 template <class T, class U, class V, class Policy> 915 typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&); 916 917 template <class T, class U, class V> 918 typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0); 919 920 template <class U, class T, class Policy> 921 typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol); 922 923 template <class U, class T> 924 typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta); 925 926 template <class T, class U, class Policy> 927 typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol); 928 929 template <class T, class U> 930 typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta); 931 932 template <class T, class U, class Policy> 933 typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol); 934 935 template <class T, class U> 936 typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta); 937 938 template <class T, class U, class Policy> 939 typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol); 940 941 template <class T, class U> 942 typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta); 943 944 template <class T, class U, class Policy> 945 typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol); 946 947 template <class T, class U> 948 typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta); 949 950 template <class T, class U, class Policy> 951 typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol); 952 953 template <class T, class U> 954 typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta); 955 956 template <class T, class U, class Policy> 957 typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol); 958 959 template <class T, class U> 960 typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta); 961 962 template <class T, class U, class Policy> 963 typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol); 964 965 template <class T, class U> 966 typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta); 967 968 template <class T, class U, class Policy> 969 typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol); 970 971 template <class T, class U> 972 typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta); 973 974 template <class T, class U, class Policy> 975 typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol); 976 977 template <class T, class U> 978 typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta); 979 980 template <class T, class U, class Policy> 981 typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol); 982 983 template <class T, class U> 984 typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta); 985 986 template <class T, class U, class Policy> 987 typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol); 988 989 template <class T, class U> 990 typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta); 991 992 993 template <class T> 994 typename tools::promote_args<T>::type zeta(T s); 995 996 // pow: 997 template <int N, typename T, class Policy> 998 typename tools::promote_args<T>::type pow(T base, const Policy& policy); 999 1000 template <int N, typename T> 1001 typename tools::promote_args<T>::type pow(T base); 1002 1003 // next: 1004 template <class T, class U, class Policy> 1005 typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&); 1006 template <class T, class U> 1007 typename tools::promote_args<T, U>::type nextafter(const T&, const U&); 1008 template <class T, class Policy> 1009 typename tools::promote_args<T>::type float_next(const T&, const Policy&); 1010 template <class T> 1011 typename tools::promote_args<T>::type float_next(const T&); 1012 template <class T, class Policy> 1013 typename tools::promote_args<T>::type float_prior(const T&, const Policy&); 1014 template <class T> 1015 typename tools::promote_args<T>::type float_prior(const T&); 1016 template <class T, class U, class Policy> 1017 typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&); 1018 template <class T, class U> 1019 typename tools::promote_args<T, U>::type float_distance(const T&, const U&); 1020 template <class T, class Policy> 1021 typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol); 1022 template <class T> 1023 typename tools::promote_args<T>::type float_advance(const T& val, int distance); 1024 1025 template <class T, class Policy> 1026 typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol); 1027 template <class T> 1028 typename tools::promote_args<T>::type ulp(const T& val); 1029 1030 template <class T, class U> 1031 typename tools::promote_args<T, U>::type relative_difference(const T&, const U&); 1032 template <class T, class U> 1033 typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&); 1034 1035 template<class T> 1036 T unchecked_bernoulli_b2n(const std::size_t n); 1037 template <class T, class Policy> 1038 T bernoulli_b2n(const int i, const Policy &pol); 1039 template <class T> 1040 T bernoulli_b2n(const int i); 1041 template <class T, class OutputIterator, class Policy> 1042 OutputIterator bernoulli_b2n(const int start_index, 1043 const unsigned number_of_bernoullis_b2n, 1044 OutputIterator out_it, 1045 const Policy& pol); 1046 template <class T, class OutputIterator> 1047 OutputIterator bernoulli_b2n(const int start_index, 1048 const unsigned number_of_bernoullis_b2n, 1049 OutputIterator out_it); 1050 template <class T, class Policy> 1051 T tangent_t2n(const int i, const Policy &pol); 1052 template <class T> 1053 T tangent_t2n(const int i); 1054 template <class T, class OutputIterator, class Policy> 1055 OutputIterator tangent_t2n(const int start_index, 1056 const unsigned number_of_bernoullis_b2n, 1057 OutputIterator out_it, 1058 const Policy& pol); 1059 template <class T, class OutputIterator> 1060 OutputIterator tangent_t2n(const int start_index, 1061 const unsigned number_of_bernoullis_b2n, 1062 OutputIterator out_it); 1063 1064 } // namespace math 1065 } // namespace boost 1066 1067 #ifdef BOOST_HAS_LONG_LONG 1068 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)\ 1069 \ 1070 template <class T>\ 1071 inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ 1072 \ 1073 template <class T>\ 1074 inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\ 1075 \ 1076 template <class T>\ 1077 inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\ 1078 1079 #else 1080 #define BOOST_MATH_DETAIL_LL_FUNC(Policy) 1081 #endif 1082 1083 #define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\ 1084 \ 1085 BOOST_MATH_DETAIL_LL_FUNC(Policy)\ 1086 \ 1087 template <class RT1, class RT2>\ 1088 inline typename boost::math::tools::promote_args<RT1, RT2>::type \ 1089 beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\ 1090 \ 1091 template <class RT1, class RT2, class A>\ 1092 inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \ 1093 beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\ 1094 \ 1095 template <class RT1, class RT2, class RT3>\ 1096 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1097 betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\ 1098 \ 1099 template <class RT1, class RT2, class RT3>\ 1100 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1101 ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\ 1102 \ 1103 template <class RT1, class RT2, class RT3>\ 1104 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1105 ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\ 1106 \ 1107 template <class T1, class T2, class T3, class T4>\ 1108 inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \ 1109 ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\ 1110 \ 1111 template <class RT1, class RT2, class RT3>\ 1112 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1113 ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\ 1114 \ 1115 template <class T1, class T2, class T3, class T4>\ 1116 inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \ 1117 ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\ 1118 \ 1119 template <class RT1, class RT2, class RT3>\ 1120 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1121 ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\ 1122 \ 1123 template <class T1, class T2, class T3>\ 1124 inline typename boost::math::tools::promote_args<T1, T2, T3>::type \ 1125 ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\ 1126 \ 1127 template <class RT1, class RT2, class RT3>\ 1128 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1129 ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\ 1130 \ 1131 template <class T1, class T2, class T3>\ 1132 inline typename boost::math::tools::promote_args<T1, T2, T3>::type \ 1133 ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\ 1134 \ 1135 template <class RT1, class RT2, class RT3>\ 1136 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1137 ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\ 1138 \ 1139 template <class RT1, class RT2, class RT3>\ 1140 inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \ 1141 ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\ 1142 \ 1143 template <class T> T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient<T, Policy>(n, k, Policy()); }\ 1144 \ 1145 template <class RT>\ 1146 inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\ 1147 \ 1148 template <class RT>\ 1149 inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\ 1150 \ 1151 template <class RT>\ 1152 inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\ 1153 \ 1154 template <class RT>\ 1155 inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\ 1156 \ 1157 using boost::math::legendre_next;\ 1158 \ 1159 template <class T>\ 1160 inline typename boost::math::tools::promote_args<T>::type \ 1161 legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\ 1162 \ 1163 template <class T>\ 1164 inline typename boost::math::tools::promote_args<T>::type \ 1165 legendre_p_prime(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\ 1166 \ 1167 template <class T>\ 1168 inline typename boost::math::tools::promote_args<T>::type \ 1169 legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\ 1170 \ 1171 using ::boost::math::legendre_next;\ 1172 \ 1173 template <class T>\ 1174 inline typename boost::math::tools::promote_args<T>::type \ 1175 legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\ 1176 \ 1177 using ::boost::math::laguerre_next;\ 1178 \ 1179 template <class T>\ 1180 inline typename boost::math::tools::promote_args<T>::type \ 1181 laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\ 1182 \ 1183 template <class T1, class T2>\ 1184 inline typename boost::math::laguerre_result<T1, T2>::type \ 1185 laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\ 1186 \ 1187 template <class T>\ 1188 inline typename boost::math::tools::promote_args<T>::type \ 1189 hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\ 1190 \ 1191 using boost::math::hermite_next;\ 1192 \ 1193 template <class T1, class T2>\ 1194 inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \ 1195 spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\ 1196 \ 1197 template <class T1, class T2>\ 1198 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1199 spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\ 1200 \ 1201 template <class T1, class T2>\ 1202 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1203 spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\ 1204 \ 1205 template <class T1, class T2, class Policy>\ 1206 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1207 spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\ 1208 \ 1209 template <class T1, class T2, class T3>\ 1210 inline typename boost::math::tools::promote_args<T1, T2, T3>::type \ 1211 ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\ 1212 \ 1213 template <class T1, class T2, class T3>\ 1214 inline typename boost::math::tools::promote_args<T1, T2, T3>::type \ 1215 ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\ 1216 \ 1217 template <class T1, class T2>\ 1218 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1219 ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\ 1220 \ 1221 template <class T1, class T2, class T3, class T4>\ 1222 inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \ 1223 ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\ 1224 \ 1225 template <class T1, class T2, class T3>\ 1226 inline typename boost::math::tools::promote_args<T1, T2, T3>::type \ 1227 ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\ 1228 \ 1229 template <typename T>\ 1230 inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\ 1231 \ 1232 template <class T1, class T2>\ 1233 inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\ 1234 \ 1235 template <typename T>\ 1236 inline typename boost::math::tools::promote_args<T>::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\ 1237 \ 1238 template <class T1, class T2>\ 1239 inline typename boost::math::tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\ 1240 \ 1241 template <class T1, class T2>\ 1242 inline typename boost::math::tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\ 1243 \ 1244 template <class T1, class T2>\ 1245 inline typename boost::math::tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\ 1246 \ 1247 template <typename T>\ 1248 inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\ 1249 \ 1250 template <class T1, class T2>\ 1251 inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\ 1252 \ 1253 template <class T1, class T2, class T3>\ 1254 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()); }\ 1255 \ 1256 template <class T1, class T2>\ 1257 inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\ 1258 \ 1259 using boost::math::max_factorial;\ 1260 template <class RT>\ 1261 inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\ 1262 using boost::math::unchecked_factorial;\ 1263 template <class RT>\ 1264 inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\ 1265 template <class RT>\ 1266 inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\ 1267 template <class RT>\ 1268 inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\ 1269 \ 1270 template <class RT>\ 1271 inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\ 1272 \ 1273 template <class RT>\ 1274 inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\ 1275 \ 1276 template <class RT1, class RT2>\ 1277 inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\ 1278 \ 1279 template <class RT>\ 1280 inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\ 1281 \ 1282 template <class RT>\ 1283 inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\ 1284 \ 1285 template <class RT1, class RT2>\ 1286 inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\ 1287 \ 1288 template <class RT1, class RT2>\ 1289 inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\ 1290 \ 1291 template <class RT1, class RT2>\ 1292 inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\ 1293 \ 1294 template <class T1, class T2>\ 1295 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()); }\ 1296 \ 1297 template <class T1, class T2>\ 1298 inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\ 1299 \ 1300 template <class T1, class T2>\ 1301 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()); }\ 1302 \ 1303 template <class T1, class T2>\ 1304 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()); }\ 1305 \ 1306 template <class T1, class T2>\ 1307 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()); }\ 1308 \ 1309 template <class T1, class T2>\ 1310 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()); }\ 1311 \ 1312 template <class T1, class T2>\ 1313 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()); }\ 1314 \ 1315 template <class T>\ 1316 inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\ 1317 \ 1318 template <class T>\ 1319 inline typename boost::math::tools::promote_args<T>::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\ 1320 \ 1321 template <class T>\ 1322 inline typename boost::math::tools::promote_args<T>::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\ 1323 \ 1324 template <class T1, class T2>\ 1325 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1326 hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\ 1327 \ 1328 template <class RT>\ 1329 inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\ 1330 \ 1331 template <class T>\ 1332 inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\ 1333 \ 1334 template <class T>\ 1335 inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\ 1336 \ 1337 template <class T>\ 1338 inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\ 1339 \ 1340 template <class T1, class T2>\ 1341 inline typename boost::math::tools::promote_args<T1, T2>::type \ 1342 powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\ 1343 \ 1344 template <class T>\ 1345 inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\ 1346 \ 1347 template <class T>\ 1348 inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\ 1349 \ 1350 template <class T>\ 1351 inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\ 1352 \ 1353 template<typename T>\ 1354 inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\ 1355 \ 1356 template<typename T>\ 1357 inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\ 1358 \ 1359 template<typename T>\ 1360 inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\ 1361 \ 1362 template <class T1, class T2>\ 1363 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\ 1364 { return boost::math::cyl_bessel_j(v, x, Policy()); }\ 1365 \ 1366 template <class T1, class T2>\ 1367 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j_prime(T1 v, T2 x)\ 1368 { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\ 1369 \ 1370 template <class T>\ 1371 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\ 1372 { return boost::math::sph_bessel(v, x, Policy()); }\ 1373 \ 1374 template <class T>\ 1375 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel_prime(unsigned v, T x)\ 1376 { return boost::math::sph_bessel_prime(v, x, Policy()); }\ 1377 \ 1378 template <class T1, class T2>\ 1379 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1380 cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\ 1381 \ 1382 template <class T1, class T2>\ 1383 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1384 cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\ 1385 \ 1386 template <class T1, class T2>\ 1387 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1388 cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\ 1389 \ 1390 template <class T1, class T2>\ 1391 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1392 cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\ 1393 \ 1394 template <class T1, class T2>\ 1395 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1396 cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\ 1397 \ 1398 template <class T1, class T2>\ 1399 inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \ 1400 cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\ 1401 \ 1402 template <class T>\ 1403 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \ 1404 sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\ 1405 \ 1406 template <class T>\ 1407 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \ 1408 sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\ 1409 \ 1410 template <class T>\ 1411 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\ 1412 { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\ 1413 \ 1414 template <class OutputIterator, class T>\ 1415 inline void cyl_bessel_j_zero(T v,\ 1416 int start_index,\ 1417 unsigned number_of_zeros,\ 1418 OutputIterator out_it)\ 1419 { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ 1420 \ 1421 template <class T>\ 1422 inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\ 1423 { return boost::math::cyl_neumann_zero(v, m, Policy()); }\ 1424 \ 1425 template <class OutputIterator, class T>\ 1426 inline void cyl_neumann_zero(T v,\ 1427 int start_index,\ 1428 unsigned number_of_zeros,\ 1429 OutputIterator out_it)\ 1430 { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ 1431 \ 1432 template <class T>\ 1433 inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\ 1434 \ 1435 template <class T>\ 1436 inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\ 1437 \ 1438 using boost::math::fpclassify;\ 1439 using boost::math::isfinite;\ 1440 using boost::math::isinf;\ 1441 using boost::math::isnan;\ 1442 using boost::math::isnormal;\ 1443 using boost::math::signbit;\ 1444 using boost::math::sign;\ 1445 using boost::math::copysign;\ 1446 using boost::math::changesign;\ 1447 \ 1448 template <class T, class U>\ 1449 inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\ 1450 { return boost::math::expint(z, u, Policy()); }\ 1451 \ 1452 template <class T>\ 1453 inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\ 1454 \ 1455 template <class T>\ 1456 inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\ 1457 \ 1458 template <class T>\ 1459 inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\ 1460 \ 1461 template <class T>\ 1462 inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\ 1463 \ 1464 template <class T>\ 1465 inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\ 1466 \ 1467 template <class T>\ 1468 inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\ 1469 \ 1470 template <class T>\ 1471 inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\ 1472 \ 1473 template <class T>\ 1474 inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\ 1475 \ 1476 template <class T>\ 1477 inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ 1478 \ 1479 template <class T>\ 1480 inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ 1481 \ 1482 template <class T>\ 1483 inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ 1484 \ 1485 template <int N, class T>\ 1486 inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\ 1487 \ 1488 template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\ 1489 template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\ 1490 template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\ 1491 template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\ 1492 template <class T> T ulp(const T& a){ return boost::math::ulp(a, Policy()); }\ 1493 \ 1494 template <class RT1, class RT2>\ 1495 inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\ 1496 \ 1497 template <class T1, class T2>\ 1498 inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\ 1499 { return boost::math::cyl_hankel_1(v, x, Policy()); }\ 1500 \ 1501 template <class T1, class T2>\ 1502 inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\ 1503 { return boost::math::cyl_hankel_2(v, x, Policy()); }\ 1504 \ 1505 template <class T1, class T2>\ 1506 inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\ 1507 { return boost::math::sph_hankel_1(v, x, Policy()); }\ 1508 \ 1509 template <class T1, class T2>\ 1510 inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\ 1511 { return boost::math::sph_hankel_2(v, x, Policy()); }\ 1512 \ 1513 template <class T>\ 1514 inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\ 1515 { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\ 1516 \ 1517 template <class U, class T>\ 1518 inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\ 1519 { return boost::math::jacobi_sn(k, theta, Policy()); }\ 1520 \ 1521 template <class T, class U>\ 1522 inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\ 1523 { return boost::math::jacobi_cn(k, theta, Policy()); }\ 1524 \ 1525 template <class T, class U>\ 1526 inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\ 1527 { return boost::math::jacobi_dn(k, theta, Policy()); }\ 1528 \ 1529 template <class T, class U>\ 1530 inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\ 1531 { return boost::math::jacobi_cd(k, theta, Policy()); }\ 1532 \ 1533 template <class T, class U>\ 1534 inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\ 1535 { return boost::math::jacobi_dc(k, theta, Policy()); }\ 1536 \ 1537 template <class T, class U>\ 1538 inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\ 1539 { return boost::math::jacobi_ns(k, theta, Policy()); }\ 1540 \ 1541 template <class T, class U>\ 1542 inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\ 1543 { return boost::math::jacobi_sd(k, theta, Policy()); }\ 1544 \ 1545 template <class T, class U>\ 1546 inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\ 1547 { return boost::math::jacobi_ds(k, theta, Policy()); }\ 1548 \ 1549 template <class T, class U>\ 1550 inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\ 1551 { return boost::math::jacobi_nc(k, theta, Policy()); }\ 1552 \ 1553 template <class T, class U>\ 1554 inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\ 1555 { return boost::math::jacobi_nd(k, theta, Policy()); }\ 1556 \ 1557 template <class T, class U>\ 1558 inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\ 1559 { return boost::math::jacobi_sc(k, theta, Policy()); }\ 1560 \ 1561 template <class T, class U>\ 1562 inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\ 1563 { return boost::math::jacobi_cs(k, theta, Policy()); }\ 1564 \ 1565 template <class T>\ 1566 inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\ 1567 { return boost::math::airy_ai(x, Policy()); }\ 1568 \ 1569 template <class T>\ 1570 inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\ 1571 { return boost::math::airy_bi(x, Policy()); }\ 1572 \ 1573 template <class T>\ 1574 inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\ 1575 { return boost::math::airy_ai_prime(x, Policy()); }\ 1576 \ 1577 template <class T>\ 1578 inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\ 1579 { return boost::math::airy_bi_prime(x, Policy()); }\ 1580 \ 1581 template <class T>\ 1582 inline T airy_ai_zero(int m)\ 1583 { return boost::math::airy_ai_zero<T>(m, Policy()); }\ 1584 template <class T, class OutputIterator>\ 1585 OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ 1586 { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\ 1587 \ 1588 template <class T>\ 1589 inline T airy_bi_zero(int m)\ 1590 { return boost::math::airy_bi_zero<T>(m, Policy()); }\ 1591 template <class T, class OutputIterator>\ 1592 OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ 1593 { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\ 1594 \ 1595 template <class T>\ 1596 T bernoulli_b2n(const int i)\ 1597 { return boost::math::bernoulli_b2n<T>(i, Policy()); }\ 1598 template <class T, class OutputIterator>\ 1599 OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ 1600 { return boost::math::bernoulli_b2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ 1601 \ 1602 template <class T>\ 1603 T tangent_t2n(const int i)\ 1604 { return boost::math::tangent_t2n<T>(i, Policy()); }\ 1605 template <class T, class OutputIterator>\ 1606 OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ 1607 { return boost::math::tangent_t2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ 1608 \ 1609 1610 1611 1612 1613 1614 #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP 1615