29 #ifndef _GLIBCXX_TR1_CMATH
30 #define _GLIBCXX_TR1_CMATH 1
32 #pragma GCC system_header
34 #if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
35 # error TR1 header cannot be included from C++0x header
40 #if defined(_GLIBCXX_INCLUDE_AS_TR1)
43 # define _GLIBCXX_INCLUDE_AS_TR1
44 # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
45 # define _GLIBCXX_END_NAMESPACE_TR1 }
46 # define _GLIBCXX_TR1 tr1::
49 # undef _GLIBCXX_END_NAMESPACE_TR1
50 # undef _GLIBCXX_BEGIN_NAMESPACE_TR1
51 # undef _GLIBCXX_INCLUDE_AS_TR1
61 pow(
double __x,
double __y)
65 pow(
float __x,
float __y)
69 pow(
long double __x,
long double __y)
72 template<
typename _Tp,
typename _Up>
73 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
76 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
77 return std::pow(__type(__x), __type(__y));
111 assoc_laguerref(
unsigned int __n,
unsigned int __m,
float __x)
112 {
return __detail::__assoc_laguerre<float>(__n, __m, __x); }
115 assoc_laguerrel(
unsigned int __n,
unsigned int __m,
long double __x)
117 return __detail::__assoc_laguerre<long double>(__n, __m, __x);
121 template<
typename _Tp>
122 inline typename __gnu_cxx::__promote<_Tp>::__type
125 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
126 return __detail::__assoc_laguerre<__type>(__n, __m, __x);
130 assoc_legendref(
unsigned int __l,
unsigned int __m,
float __x)
131 {
return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
134 assoc_legendrel(
unsigned int __l,
unsigned int __m,
long double __x)
135 {
return __detail::__assoc_legendre_p<long double>(__l, __m, __x); }
138 template<
typename _Tp>
139 inline typename __gnu_cxx::__promote<_Tp>::__type
142 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
143 return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
147 betaf(
float __x,
float __y)
148 {
return __detail::__beta<float>(__x, __y); }
151 betal(
long double __x,
long double __y)
152 {
return __detail::__beta<long double>(__x, __y); }
155 template<
typename _Tpx,
typename _Tpy>
156 inline typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type
159 typedef typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type __type;
160 return __detail::__beta<__type>(__x, __y);
164 comp_ellint_1f(
float __k)
165 {
return __detail::__comp_ellint_1<float>(__k); }
168 comp_ellint_1l(
long double __k)
169 {
return __detail::__comp_ellint_1<long double>(__k); }
172 template<
typename _Tp>
173 inline typename __gnu_cxx::__promote<_Tp>::__type
176 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
177 return __detail::__comp_ellint_1<__type>(__k);
181 comp_ellint_2f(
float __k)
182 {
return __detail::__comp_ellint_2<float>(__k); }
185 comp_ellint_2l(
long double __k)
186 {
return __detail::__comp_ellint_2<long double>(__k); }
189 template<
typename _Tp>
190 inline typename __gnu_cxx::__promote<_Tp>::__type
193 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
194 return __detail::__comp_ellint_2<__type>(__k);
198 comp_ellint_3f(
float __k,
float __nu)
199 {
return __detail::__comp_ellint_3<float>(__k, __nu); }
202 comp_ellint_3l(
long double __k,
long double __nu)
203 {
return __detail::__comp_ellint_3<long double>(__k, __nu); }
206 template<
typename _Tp,
typename _Tpn>
207 inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type
210 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type;
211 return __detail::__comp_ellint_3<__type>(__k, __nu);
215 conf_hypergf(
float __a,
float __c,
float __x)
216 {
return __detail::__conf_hyperg<float>(__a, __c, __x); }
219 conf_hypergl(
long double __a,
long double __c,
long double __x)
220 {
return __detail::__conf_hyperg<long double>(__a, __c, __x); }
223 template<
typename _Tpa,
typename _Tpc,
typename _Tp>
224 inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type
227 typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type;
228 return __detail::__conf_hyperg<__type>(__a, __c, __x);
232 cyl_bessel_if(
float __nu,
float __x)
233 {
return __detail::__cyl_bessel_i<float>(__nu, __x); }
236 cyl_bessel_il(
long double __nu,
long double __x)
237 {
return __detail::__cyl_bessel_i<long double>(__nu, __x); }
240 template<
typename _Tpnu,
typename _Tp>
241 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
244 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
245 return __detail::__cyl_bessel_i<__type>(__nu, __x);
249 cyl_bessel_jf(
float __nu,
float __x)
250 {
return __detail::__cyl_bessel_j<float>(__nu, __x); }
253 cyl_bessel_jl(
long double __nu,
long double __x)
254 {
return __detail::__cyl_bessel_j<long double>(__nu, __x); }
257 template<
typename _Tpnu,
typename _Tp>
258 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
261 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
262 return __detail::__cyl_bessel_j<__type>(__nu, __x);
266 cyl_bessel_kf(
float __nu,
float __x)
267 {
return __detail::__cyl_bessel_k<float>(__nu, __x); }
270 cyl_bessel_kl(
long double __nu,
long double __x)
271 {
return __detail::__cyl_bessel_k<long double>(__nu, __x); }
274 template<
typename _Tpnu,
typename _Tp>
275 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
278 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
279 return __detail::__cyl_bessel_k<__type>(__nu, __x);
283 cyl_neumannf(
float __nu,
float __x)
284 {
return __detail::__cyl_neumann_n<float>(__nu, __x); }
287 cyl_neumannl(
long double __nu,
long double __x)
288 {
return __detail::__cyl_neumann_n<long double>(__nu, __x); }
291 template<
typename _Tpnu,
typename _Tp>
292 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
295 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
296 return __detail::__cyl_neumann_n<__type>(__nu, __x);
300 ellint_1f(
float __k,
float __phi)
301 {
return __detail::__ellint_1<float>(__k, __phi); }
304 ellint_1l(
long double __k,
long double __phi)
305 {
return __detail::__ellint_1<long double>(__k, __phi); }
308 template<
typename _Tp,
typename _Tpp>
309 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
312 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
313 return __detail::__ellint_1<__type>(__k, __phi);
317 ellint_2f(
float __k,
float __phi)
318 {
return __detail::__ellint_2<float>(__k, __phi); }
321 ellint_2l(
long double __k,
long double __phi)
322 {
return __detail::__ellint_2<long double>(__k, __phi); }
325 template<
typename _Tp,
typename _Tpp>
326 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
329 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
330 return __detail::__ellint_2<__type>(__k, __phi);
334 ellint_3f(
float __k,
float __nu,
float __phi)
335 {
return __detail::__ellint_3<float>(__k, __nu, __phi); }
338 ellint_3l(
long double __k,
long double __nu,
long double __phi)
339 {
return __detail::__ellint_3<long double>(__k, __nu, __phi); }
342 template<
typename _Tp,
typename _Tpn,
typename _Tpp>
343 inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type
346 typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type;
347 return __detail::__ellint_3<__type>(__k, __nu, __phi);
352 {
return __detail::__expint<float>(__x); }
355 expintl(
long double __x)
356 {
return __detail::__expint<long double>(__x); }
359 template<
typename _Tp>
360 inline typename __gnu_cxx::__promote<_Tp>::__type
363 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
364 return __detail::__expint<__type>(__x);
368 hermitef(
unsigned int __n,
float __x)
369 {
return __detail::__poly_hermite<float>(__n, __x); }
372 hermitel(
unsigned int __n,
long double __x)
373 {
return __detail::__poly_hermite<long double>(__n, __x); }
376 template<
typename _Tp>
377 inline typename __gnu_cxx::__promote<_Tp>::__type
380 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
381 return __detail::__poly_hermite<__type>(__n, __x);
385 hypergf(
float __a,
float __b,
float __c,
float __x)
386 {
return __detail::__hyperg<float>(__a, __b, __c, __x); }
389 hypergl(
long double __a,
long double __b,
long double __c,
long double __x)
390 {
return __detail::__hyperg<long double>(__a, __b, __c, __x); }
393 template<
typename _Tpa,
typename _Tpb,
typename _Tpc,
typename _Tp>
394 inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type
395 hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
397 typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type __type;
398 return __detail::__hyperg<__type>(__a, __b, __c, __x);
402 laguerref(
unsigned int __n,
float __x)
403 {
return __detail::__laguerre<float>(__n, __x); }
406 laguerrel(
unsigned int __n,
long double __x)
407 {
return __detail::__laguerre<long double>(__n, __x); }
410 template<
typename _Tp>
411 inline typename __gnu_cxx::__promote<_Tp>::__type
414 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
415 return __detail::__laguerre<__type>(__n, __x);
419 legendref(
unsigned int __n,
float __x)
420 {
return __detail::__poly_legendre_p<float>(__n, __x); }
423 legendrel(
unsigned int __n,
long double __x)
424 {
return __detail::__poly_legendre_p<long double>(__n, __x); }
427 template<
typename _Tp>
428 inline typename __gnu_cxx::__promote<_Tp>::__type
431 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
432 return __detail::__poly_legendre_p<__type>(__n, __x);
436 riemann_zetaf(
float __x)
437 {
return __detail::__riemann_zeta<float>(__x); }
440 riemann_zetal(
long double __x)
441 {
return __detail::__riemann_zeta<long double>(__x); }
444 template<
typename _Tp>
445 inline typename __gnu_cxx::__promote<_Tp>::__type
448 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
449 return __detail::__riemann_zeta<__type>(__x);
453 sph_besself(
unsigned int __n,
float __x)
454 {
return __detail::__sph_bessel<float>(__n, __x); }
457 sph_bessell(
unsigned int __n,
long double __x)
458 {
return __detail::__sph_bessel<long double>(__n, __x); }
461 template<
typename _Tp>
462 inline typename __gnu_cxx::__promote<_Tp>::__type
465 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
466 return __detail::__sph_bessel<__type>(__n, __x);
470 sph_legendref(
unsigned int __l,
unsigned int __m,
float __theta)
471 {
return __detail::__sph_legendre<float>(__l, __m, __theta); }
474 sph_legendrel(
unsigned int __l,
unsigned int __m,
long double __theta)
475 {
return __detail::__sph_legendre<long double>(__l, __m, __theta); }
478 template<
typename _Tp>
479 inline typename __gnu_cxx::__promote<_Tp>::__type
482 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
483 return __detail::__sph_legendre<__type>(__l, __m, __theta);
487 sph_neumannf(
unsigned int __n,
float __x)
488 {
return __detail::__sph_neumann<float>(__n, __x); }
491 sph_neumannl(
unsigned int __n,
long double __x)
492 {
return __detail::__sph_neumann<long double>(__n, __x); }
495 template<
typename _Tp>
496 inline typename __gnu_cxx::__promote<_Tp>::__type
499 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
500 return __detail::__sph_neumann<__type>(__n, __x);
507 #endif // _GLIBCXX_TR1_CMATH