29#ifndef _GLIBCXX_TR1_CMATH
30#define _GLIBCXX_TR1_CMATH 1
33#pragma GCC system_header
40#ifdef _GLIBCXX_USE_C99_MATH_TR1
150namespace std _GLIBCXX_VISIBILITY(default)
152_GLIBCXX_BEGIN_NAMESPACE_VERSION
156#if _GLIBCXX_USE_C99_MATH_TR1
307#if _GLIBCXX_USE_C99_MATH
308#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
311 template<
typename _Tp>
312 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
316 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
317 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
318 FP_SUBNORMAL, FP_ZERO, __type(__f));
321 template<
typename _Tp>
322 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
326 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
327 return __builtin_isfinite(__type(__f));
330 template<
typename _Tp>
331 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
335 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
336 return __builtin_isinf(__type(__f));
339 template<
typename _Tp>
340 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
344 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
345 return __builtin_isnan(__type(__f));
348 template<
typename _Tp>
349 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
353 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
354 return __builtin_isnormal(__type(__f));
357 template<
typename _Tp>
358 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
362 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
363 return __builtin_signbit(__type(__f));
366 template<
typename _Tp>
367 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
369 isgreater(_Tp __f1, _Tp __f2)
371 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
372 return __builtin_isgreater(__type(__f1), __type(__f2));
375 template<
typename _Tp>
376 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
378 isgreaterequal(_Tp __f1, _Tp __f2)
380 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
381 return __builtin_isgreaterequal(__type(__f1), __type(__f2));
384 template<
typename _Tp>
385 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
387 isless(_Tp __f1, _Tp __f2)
389 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
390 return __builtin_isless(__type(__f1), __type(__f2));
393 template<
typename _Tp>
394 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
396 islessequal(_Tp __f1, _Tp __f2)
398 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
399 return __builtin_islessequal(__type(__f1), __type(__f2));
402 template<
typename _Tp>
403 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
405 islessgreater(_Tp __f1, _Tp __f2)
407 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
408 return __builtin_islessgreater(__type(__f1), __type(__f2));
411 template<
typename _Tp>
412 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
414 isunordered(_Tp __f1, _Tp __f2)
416 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
417 return __builtin_isunordered(__type(__f1), __type(__f2));
423#if _GLIBCXX_USE_C99_MATH_TR1
452#if __cplusplus >= 201103L
481 using std::nearbyint;
482 using std::nextafter;
483 using std::nexttoward;
484 using std::remainder;
497#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
500 {
return __builtin_acoshf(__x); }
503 acosh(
long double __x)
504 {
return __builtin_acoshl(__x); }
507 template<
typename _Tp>
508 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
511 {
return __builtin_acosh(__x); }
513#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
516 {
return __builtin_asinhf(__x); }
519 asinh(
long double __x)
520 {
return __builtin_asinhl(__x); }
523 template<
typename _Tp>
524 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
527 {
return __builtin_asinh(__x); }
529#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
532 {
return __builtin_atanhf(__x); }
535 atanh(
long double __x)
536 {
return __builtin_atanhl(__x); }
539 template<
typename _Tp>
540 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
543 {
return __builtin_atanh(__x); }
545#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
548 {
return __builtin_cbrtf(__x); }
551 cbrt(
long double __x)
552 {
return __builtin_cbrtl(__x); }
555 template<
typename _Tp>
556 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
559 {
return __builtin_cbrt(__x); }
561#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
563 copysign(
float __x,
float __y)
564 {
return __builtin_copysignf(__x, __y); }
567 copysign(
long double __x,
long double __y)
568 {
return __builtin_copysignl(__x, __y); }
571 template<
typename _Tp,
typename _Up>
572 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
573 copysign(_Tp __x, _Up __y)
575 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
576 return copysign(__type(__x), __type(__y));
579#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
582 {
return __builtin_erff(__x); }
586 {
return __builtin_erfl(__x); }
589 template<
typename _Tp>
590 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
593 {
return __builtin_erf(__x); }
595#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
598 {
return __builtin_erfcf(__x); }
601 erfc(
long double __x)
602 {
return __builtin_erfcl(__x); }
605 template<
typename _Tp>
606 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
609 {
return __builtin_erfc(__x); }
611#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
614 {
return __builtin_exp2f(__x); }
617 exp2(
long double __x)
618 {
return __builtin_exp2l(__x); }
621 template<
typename _Tp>
622 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
625 {
return __builtin_exp2(__x); }
627#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
630 {
return __builtin_expm1f(__x); }
633 expm1(
long double __x)
634 {
return __builtin_expm1l(__x); }
637 template<
typename _Tp>
638 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
641 {
return __builtin_expm1(__x); }
643#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
645 fdim(
float __x,
float __y)
646 {
return __builtin_fdimf(__x, __y); }
649 fdim(
long double __x,
long double __y)
650 {
return __builtin_fdiml(__x, __y); }
653 template<
typename _Tp,
typename _Up>
654 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
655 fdim(_Tp __x, _Up __y)
657 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
658 return fdim(__type(__x), __type(__y));
661#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
663 fma(
float __x,
float __y,
float __z)
664 {
return __builtin_fmaf(__x, __y, __z); }
667 fma(
long double __x,
long double __y,
long double __z)
668 {
return __builtin_fmal(__x, __y, __z); }
671 template<
typename _Tp,
typename _Up,
typename _Vp>
672 inline typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
673 fma(_Tp __x, _Up __y, _Vp __z)
675 typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
676 return fma(__type(__x), __type(__y), __type(__z));
679#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
681 fmax(
float __x,
float __y)
682 {
return __builtin_fmaxf(__x, __y); }
685 fmax(
long double __x,
long double __y)
686 {
return __builtin_fmaxl(__x, __y); }
689 template<
typename _Tp,
typename _Up>
690 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
691 fmax(_Tp __x, _Up __y)
693 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
694 return fmax(__type(__x), __type(__y));
697#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
699 fmin(
float __x,
float __y)
700 {
return __builtin_fminf(__x, __y); }
703 fmin(
long double __x,
long double __y)
704 {
return __builtin_fminl(__x, __y); }
707 template<
typename _Tp,
typename _Up>
708 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
709 fmin(_Tp __x, _Up __y)
711 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
712 return fmin(__type(__x), __type(__y));
715#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
717 hypot(
float __x,
float __y)
718 {
return __builtin_hypotf(__x, __y); }
721 hypot(
long double __x,
long double __y)
722 {
return __builtin_hypotl(__x, __y); }
725 template<
typename _Tp,
typename _Up>
726 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
727 hypot(_Tp __y, _Up __x)
729 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
730 return hypot(__type(__y), __type(__x));
733#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
736 {
return __builtin_ilogbf(__x); }
739 ilogb(
long double __x)
740 {
return __builtin_ilogbl(__x); }
743 template<
typename _Tp>
744 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
747 {
return __builtin_ilogb(__x); }
749#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
752 {
return __builtin_lgammaf(__x); }
755 lgamma(
long double __x)
756 {
return __builtin_lgammal(__x); }
759 template<
typename _Tp>
760 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
763 {
return __builtin_lgamma(__x); }
765#pragma GCC diagnostic push
766#pragma GCC diagnostic ignored "-Wlong-long"
768#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
771 {
return __builtin_llrintf(__x); }
774 llrint(
long double __x)
775 {
return __builtin_llrintl(__x); }
778 template<
typename _Tp>
779 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
782 {
return __builtin_llrint(__x); }
784#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
787 {
return __builtin_llroundf(__x); }
790 llround(
long double __x)
791 {
return __builtin_llroundl(__x); }
794 template<
typename _Tp>
795 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
798 {
return __builtin_llround(__x); }
799#pragma GCC diagnostic pop
801#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
804 {
return __builtin_log1pf(__x); }
807 log1p(
long double __x)
808 {
return __builtin_log1pl(__x); }
811 template<
typename _Tp>
812 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
815 {
return __builtin_log1p(__x); }
818#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
821 {
return __builtin_log2f(__x); }
824 log2(
long double __x)
825 {
return __builtin_log2l(__x); }
828 template<
typename _Tp>
829 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
832 {
return __builtin_log2(__x); }
834#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
837 {
return __builtin_logbf(__x); }
840 logb(
long double __x)
841 {
return __builtin_logbl(__x); }
844 template<
typename _Tp>
845 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
849 return __builtin_logb(__x);
852#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
855 {
return __builtin_lrintf(__x); }
858 lrint(
long double __x)
859 {
return __builtin_lrintl(__x); }
862 template<
typename _Tp>
863 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
866 {
return __builtin_lrint(__x); }
868#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
871 {
return __builtin_lroundf(__x); }
874 lround(
long double __x)
875 {
return __builtin_lroundl(__x); }
878 template<
typename _Tp>
879 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
882 {
return __builtin_lround(__x); }
884#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
887 {
return __builtin_nearbyintf(__x); }
890 nearbyint(
long double __x)
891 {
return __builtin_nearbyintl(__x); }
894 template<
typename _Tp>
895 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
898 {
return __builtin_nearbyint(__x); }
900#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
902 nextafter(
float __x,
float __y)
903 {
return __builtin_nextafterf(__x, __y); }
906 nextafter(
long double __x,
long double __y)
907 {
return __builtin_nextafterl(__x, __y); }
910 template<
typename _Tp,
typename _Up>
911 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
912 nextafter(_Tp __x, _Up __y)
914 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
915 return nextafter(__type(__x), __type(__y));
918#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
920 nexttoward(
float __x,
long double __y)
921 {
return __builtin_nexttowardf(__x, __y); }
924 nexttoward(
long double __x,
long double __y)
925 {
return __builtin_nexttowardl(__x, __y); }
928 template<
typename _Tp>
929 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
931 nexttoward(_Tp __x,
long double __y)
932 {
return __builtin_nexttoward(__x, __y); }
934#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
936 remainder(
float __x,
float __y)
937 {
return __builtin_remainderf(__x, __y); }
940 remainder(
long double __x,
long double __y)
941 {
return __builtin_remainderl(__x, __y); }
944 template<
typename _Tp,
typename _Up>
945 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
946 remainder(_Tp __x, _Up __y)
948 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
949 return remainder(__type(__x), __type(__y));
952#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
954 remquo(
float __x,
float __y,
int* __pquo)
955 {
return __builtin_remquof(__x, __y, __pquo); }
958 remquo(
long double __x,
long double __y,
int* __pquo)
959 {
return __builtin_remquol(__x, __y, __pquo); }
962 template<
typename _Tp,
typename _Up>
963 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
964 remquo(_Tp __x, _Up __y,
int* __pquo)
966 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
967 return remquo(__type(__x), __type(__y), __pquo);
970#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
973 {
return __builtin_rintf(__x); }
976 rint(
long double __x)
977 {
return __builtin_rintl(__x); }
980 template<
typename _Tp>
981 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
984 {
return __builtin_rint(__x); }
986#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
989 {
return __builtin_roundf(__x); }
992 round(
long double __x)
993 {
return __builtin_roundl(__x); }
996 template<
typename _Tp>
997 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1000 {
return __builtin_round(__x); }
1002#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1004 scalbln(
float __x,
long __ex)
1005 {
return __builtin_scalblnf(__x, __ex); }
1008 scalbln(
long double __x,
long __ex)
1009 {
return __builtin_scalblnl(__x, __ex); }
1012 template<
typename _Tp>
1013 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1015 scalbln(_Tp __x,
long __ex)
1016 {
return __builtin_scalbln(__x, __ex); }
1018#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1020 scalbn(
float __x,
int __ex)
1021 {
return __builtin_scalbnf(__x, __ex); }
1024 scalbn(
long double __x,
int __ex)
1025 {
return __builtin_scalbnl(__x, __ex); }
1028 template<
typename _Tp>
1029 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1031 scalbn(_Tp __x,
int __ex)
1032 {
return __builtin_scalbn(__x, __ex); }
1034#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1037 {
return __builtin_tgammaf(__x); }
1040 tgamma(
long double __x)
1041 {
return __builtin_tgammal(__x); }
1044 template<
typename _Tp>
1045 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1048 {
return __builtin_tgamma(__x); }
1050#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1053 {
return __builtin_truncf(__x); }
1056 trunc(
long double __x)
1057 {
return __builtin_truncl(__x); }
1060 template<
typename _Tp>
1061 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1064 {
return __builtin_trunc(__x); }
1086#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1088 pow(
float __x,
float __y)
1092 pow(
long double __x,
long double __y)
1096 template<
typename _Tp,
typename _Up>
1097 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1098 pow(_Tp __x, _Up __y)
1100 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1101 return std::pow(__type(__x), __type(__y));
1104#if __cplusplus >= 201103L
1113#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
1114#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1117 {
return __builtin_fabsf(__x); }
1120 fabs(
long double __x)
1121 {
return __builtin_fabsl(__x); }
1125 template<
typename _Tp>
1126 inline typename __gnu_cxx::__promote<_Tp>::__type
1128 {
return std::fabs(__x); }
1138_GLIBCXX_END_NAMESPACE_VERSION
1148#if _GLIBCXX_USE_STD_SPEC_FUNCS
1150namespace std _GLIBCXX_VISIBILITY(default)
1152_GLIBCXX_BEGIN_NAMESPACE_VERSION
1241_GLIBCXX_END_NAMESPACE_VERSION
1248#include <tr1/type_traits>
1250#include <tr1/gamma.tcc>
1251#include <tr1/bessel_function.tcc>
1252#include <tr1/beta_function.tcc>
1253#include <tr1/ell_integral.tcc>
1254#include <tr1/exp_integral.tcc>
1255#include <tr1/legendre_function.tcc>
1256#include <tr1/modified_bessel_func.tcc>
1257#include <tr1/poly_hermite.tcc>
1258#include <tr1/poly_laguerre.tcc>
1259#include <tr1/riemann_zeta.tcc>
1261namespace std _GLIBCXX_VISIBILITY(default)
1263_GLIBCXX_BEGIN_NAMESPACE_VERSION
1272 {
return __detail::__assoc_laguerre<float>(__n, __m, __x); }
1277 return __detail::__assoc_laguerre<long double>(__n, __m, __x);
1281 template<
typename _Tp>
1282 inline typename __gnu_cxx::__promote<_Tp>::__type
1285 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1286 return __detail::__assoc_laguerre<__type>(__n, __m, __x);
1291 {
return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
1294 assoc_legendrel(
unsigned int __l,
unsigned int __m,
long double __x)
1295 {
return __detail::__assoc_legendre_p<long double>(__l, __m, __x); }
1298 template<
typename _Tp>
1299 inline typename __gnu_cxx::__promote<_Tp>::__type
1302 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1303 return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
1307 betaf(
float __x,
float __y)
1308 {
return __detail::__beta<float>(__x, __y); }
1311 betal(
long double __x,
long double __y)
1312 {
return __detail::__beta<long double>(__x, __y); }
1315 template<
typename _Tpx,
typename _Tpy>
1316 inline typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type
1319 typedef typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type __type;
1320 return __detail::__beta<__type>(__x, __y);
1325 {
return __detail::__comp_ellint_1<float>(__k); }
1328 comp_ellint_1l(
long double __k)
1329 {
return __detail::__comp_ellint_1<long double>(__k); }
1332 template<
typename _Tp>
1333 inline typename __gnu_cxx::__promote<_Tp>::__type
1336 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1337 return __detail::__comp_ellint_1<__type>(__k);
1342 {
return __detail::__comp_ellint_2<float>(__k); }
1345 comp_ellint_2l(
long double __k)
1346 {
return __detail::__comp_ellint_2<long double>(__k); }
1349 template<
typename _Tp>
1350 inline typename __gnu_cxx::__promote<_Tp>::__type
1353 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1354 return __detail::__comp_ellint_2<__type>(__k);
1359 {
return __detail::__comp_ellint_3<float>(__k, __nu); }
1362 comp_ellint_3l(
long double __k,
long double __nu)
1363 {
return __detail::__comp_ellint_3<long double>(__k, __nu); }
1366 template<
typename _Tp,
typename _Tpn>
1367 inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type
1370 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type;
1371 return __detail::__comp_ellint_3<__type>(__k, __nu);
1376 {
return __detail::__cyl_bessel_i<float>(__nu, __x); }
1379 cyl_bessel_il(
long double __nu,
long double __x)
1380 {
return __detail::__cyl_bessel_i<long double>(__nu, __x); }
1383 template<
typename _Tpnu,
typename _Tp>
1384 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
1387 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
1388 return __detail::__cyl_bessel_i<__type>(__nu, __x);
1393 {
return __detail::__cyl_bessel_j<float>(__nu, __x); }
1396 cyl_bessel_jl(
long double __nu,
long double __x)
1397 {
return __detail::__cyl_bessel_j<long double>(__nu, __x); }
1400 template<
typename _Tpnu,
typename _Tp>
1401 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
1404 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
1405 return __detail::__cyl_bessel_j<__type>(__nu, __x);
1410 {
return __detail::__cyl_bessel_k<float>(__nu, __x); }
1413 cyl_bessel_kl(
long double __nu,
long double __x)
1414 {
return __detail::__cyl_bessel_k<long double>(__nu, __x); }
1417 template<
typename _Tpnu,
typename _Tp>
1418 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
1421 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
1422 return __detail::__cyl_bessel_k<__type>(__nu, __x);
1427 {
return __detail::__cyl_neumann_n<float>(__nu, __x); }
1430 cyl_neumannl(
long double __nu,
long double __x)
1431 {
return __detail::__cyl_neumann_n<long double>(__nu, __x); }
1434 template<
typename _Tpnu,
typename _Tp>
1435 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
1438 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
1439 return __detail::__cyl_neumann_n<__type>(__nu, __x);
1444 {
return __detail::__ellint_1<float>(__k, __phi); }
1447 ellint_1l(
long double __k,
long double __phi)
1448 {
return __detail::__ellint_1<long double>(__k, __phi); }
1451 template<
typename _Tp,
typename _Tpp>
1452 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
1455 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
1456 return __detail::__ellint_1<__type>(__k, __phi);
1461 {
return __detail::__ellint_2<float>(__k, __phi); }
1464 ellint_2l(
long double __k,
long double __phi)
1465 {
return __detail::__ellint_2<long double>(__k, __phi); }
1468 template<
typename _Tp,
typename _Tpp>
1469 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
1472 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
1473 return __detail::__ellint_2<__type>(__k, __phi);
1477 ellint_3f(
float __k,
float __nu,
float __phi)
1478 {
return __detail::__ellint_3<float>(__k, __nu, __phi); }
1481 ellint_3l(
long double __k,
long double __nu,
long double __phi)
1482 {
return __detail::__ellint_3<long double>(__k, __nu, __phi); }
1485 template<
typename _Tp,
typename _Tpn,
typename _Tpp>
1486 inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type
1487 ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
1489 typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type;
1490 return __detail::__ellint_3<__type>(__k, __nu, __phi);
1495 {
return __detail::__expint<float>(__x); }
1498 expintl(
long double __x)
1499 {
return __detail::__expint<long double>(__x); }
1502 template<
typename _Tp>
1503 inline typename __gnu_cxx::__promote<_Tp>::__type
1506 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1507 return __detail::__expint<__type>(__x);
1511 hermitef(
unsigned int __n,
float __x)
1512 {
return __detail::__poly_hermite<float>(__n, __x); }
1515 hermitel(
unsigned int __n,
long double __x)
1516 {
return __detail::__poly_hermite<long double>(__n, __x); }
1519 template<
typename _Tp>
1520 inline typename __gnu_cxx::__promote<_Tp>::__type
1523 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1524 return __detail::__poly_hermite<__type>(__n, __x);
1529 {
return __detail::__laguerre<float>(__n, __x); }
1532 laguerrel(
unsigned int __n,
long double __x)
1533 {
return __detail::__laguerre<long double>(__n, __x); }
1536 template<
typename _Tp>
1537 inline typename __gnu_cxx::__promote<_Tp>::__type
1540 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1541 return __detail::__laguerre<__type>(__n, __x);
1546 {
return __detail::__poly_legendre_p<float>(__n, __x); }
1549 legendrel(
unsigned int __n,
long double __x)
1550 {
return __detail::__poly_legendre_p<long double>(__n, __x); }
1553 template<
typename _Tp>
1554 inline typename __gnu_cxx::__promote<_Tp>::__type
1557 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1558 return __detail::__poly_legendre_p<__type>(__n, __x);
1563 {
return __detail::__riemann_zeta<float>(__x); }
1566 riemann_zetal(
long double __x)
1567 {
return __detail::__riemann_zeta<long double>(__x); }
1570 template<
typename _Tp>
1571 inline typename __gnu_cxx::__promote<_Tp>::__type
1574 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1575 return __detail::__riemann_zeta<__type>(__x);
1580 {
return __detail::__sph_bessel<float>(__n, __x); }
1583 sph_bessell(
unsigned int __n,
long double __x)
1584 {
return __detail::__sph_bessel<long double>(__n, __x); }
1587 template<
typename _Tp>
1588 inline typename __gnu_cxx::__promote<_Tp>::__type
1591 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1592 return __detail::__sph_bessel<__type>(__n, __x);
1596 sph_legendref(
unsigned int __l,
unsigned int __m,
float __theta)
1597 {
return __detail::__sph_legendre<float>(__l, __m, __theta); }
1600 sph_legendrel(
unsigned int __l,
unsigned int __m,
long double __theta)
1601 {
return __detail::__sph_legendre<long double>(__l, __m, __theta); }
1604 template<
typename _Tp>
1605 inline typename __gnu_cxx::__promote<_Tp>::__type
1608 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1609 return __detail::__sph_legendre<__type>(__l, __m, __theta);
1614 {
return __detail::__sph_neumann<float>(__n, __x); }
1617 sph_neumannl(
unsigned int __n,
long double __x)
1618 {
return __detail::__sph_neumann<long double>(__n, __x); }
1621 template<
typename _Tp>
1622 inline typename __gnu_cxx::__promote<_Tp>::__type
1625 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
1626 return __detail::__sph_neumann<__type>(__n, __x);
1633_GLIBCXX_END_NAMESPACE_VERSION
1638#if _GLIBCXX_USE_STD_SPEC_FUNCS && !defined(__STRICT_ANSI__)
1639namespace std _GLIBCXX_VISIBILITY(default)
1641_GLIBCXX_BEGIN_NAMESPACE_VERSION
1654_GLIBCXX_END_NAMESPACE_VERSION
1661#include <tr1/type_traits>
1663#include <tr1/hypergeometric.tcc>
1665namespace std _GLIBCXX_VISIBILITY(default)
1667_GLIBCXX_BEGIN_NAMESPACE_VERSION
1677 {
return __detail::__conf_hyperg<float>(__a, __c, __x); }
1680 conf_hypergl(
long double __a,
long double __c,
long double __x)
1681 {
return __detail::__conf_hyperg<long double>(__a, __c, __x); }
1684 template<
typename _Tpa,
typename _Tpc,
typename _Tp>
1685 inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type
1688 typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type;
1689 return __detail::__conf_hyperg<__type>(__a, __c, __x);
1693 hypergf(
float __a,
float __b,
float __c,
float __x)
1694 {
return __detail::__hyperg<float>(__a, __b, __c, __x); }
1697 hypergl(
long double __a,
long double __b,
long double __c,
long double __x)
1698 {
return __detail::__hyperg<long double>(__a, __b, __c, __x); }
1701 template<
typename _Tpa,
typename _Tpb,
typename _Tpc,
typename _Tp>
1702 inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type
1703 hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
1705 typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type __type;
1706 return __detail::__hyperg<__type>(__a, __b, __c, __x);
1713_GLIBCXX_END_NAMESPACE_VERSION
constexpr enable_if_t< __and_< __is_duration< _ToDur >, __not_< treat_as_floating_point< typename _ToDur::rep > > >::value, _ToDur > round(const duration< _Rep, _Period > &__d)
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
long double conf_hypergl(long double __a, long double __c, long double __x)
long double sph_bessell(unsigned int __n, long double __x)
float betaf(float __a, float __b)
long double expintl(long double __x)
float cyl_bessel_jf(float __nu, float __x)
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
long double legendrel(unsigned int __l, long double __x)
long double comp_ellint_3l(long double __k, long double __nu)
Return the complete elliptic integral of the third kind for long double modulus k.
long double riemann_zetal(long double __s)
float cyl_bessel_kf(float __nu, float __x)
float comp_ellint_2f(float __k)
long double hermitel(unsigned int __n, long double __x)
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
float ellint_1f(float __k, float __phi)
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
long double sph_neumannl(unsigned int __n, long double __x)
__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
long double comp_ellint_2l(long double __k)
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
float sph_besself(unsigned int __n, float __x)
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
Return the incomplete elliptic integral of the third kind .
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
float cyl_neumannf(float __nu, float __x)
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
long double comp_ellint_1l(long double __k)
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
float sph_neumannf(unsigned int __n, float __x)
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
long double ellint_1l(long double __k, long double __phi)
float comp_ellint_1f(float __k)
long double betal(long double __a, long double __b)
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
float hermitef(unsigned int __n, float __x)
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
long double hypergl(long double __a, long double __b, long double __c, long double __x)
long double ellint_3l(long double __k, long double __nu, long double __phi)
Return the incomplete elliptic integral of the third kind .
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
float cyl_bessel_if(float __nu, float __x)
long double laguerrel(unsigned int __n, long double __x)
long double cyl_bessel_il(long double __nu, long double __x)
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
float conf_hypergf(float __a, float __c, float __x)
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
long double cyl_bessel_kl(long double __nu, long double __x)
float hypergf(float __a, float __b, float __c, float __x)
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
float laguerref(unsigned int __n, float __x)
long double cyl_bessel_jl(long double __nu, long double __x)
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
float legendref(unsigned int __l, float __x)
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
long double cyl_neumannl(long double __nu, long double __x)
float riemann_zetaf(float __s)
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
5.2.1.6 Complete elliptic integrals of the third kind.
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
5.2.1.15 Exponential integrals.
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
5.2.1.2 Associated Legendre functions.
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
5.2.1.4 Complete elliptic integrals of the first kind.
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
5.2.1.21 Spherical Bessel functions.
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
5.2.1.11 Cylindrical Neumann functions.
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
5.2.1.1 Associated Laguerre polynomials.
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
5.2.1.13 Incomplete elliptic integrals of the second kind.
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
5.2.1.9 Cylindrical Bessel functions (of the first kind).
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
5.2.1.8 Regular modified cylindrical Bessel functions.
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __x)
5.2.1.20 Riemann zeta function.
__gnu_cxx::__promote_2< _Tpx, _Tpy >::__type beta(_Tpx __x, _Tpy __y)
5.2.1.3 Beta functions.
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
5.2.1.10 Irregular modified cylindrical Bessel functions.
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
5.2.1.12 Incomplete elliptic integrals of the first kind.
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
5.2.1.5 Complete elliptic integrals of the second kind.
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __n, _Tp __x)
5.2.1.19 Legendre polynomials.
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
5.2.1.16 Hermite polynomials.
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
5.2.1.7 Confluent hypergeometric functions.
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
5.2.1.23 Spherical Neumann functions.
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
5.2.1.22 Spherical associated Legendre functions.
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
5.2.1.18 Laguerre polynomials.
__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
5.2.1.17 Hypergeometric functions.
ISO C++ entities toplevel namespace is std.