math_fwd.hpp 81 KB

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