47 #ifndef _GLIBCXX_TR1_BETA_FUNCTION_TCC
48 #define _GLIBCXX_TR1_BETA_FUNCTION_TCC 1
73 template<
typename _Tp>
79 #if _GLIBCXX_USE_C99_MATH_TR1
82 __bet = std::tr1::tgamma(__x)
83 / std::tr1::tgamma(__x + __y);
84 __bet *= std::tr1::tgamma(__y);
88 __bet = std::tr1::tgamma(__y)
89 / std::tr1::tgamma(__x + __y);
90 __bet *= std::tr1::tgamma(__x);
121 template<
typename _Tp>
125 #if _GLIBCXX_USE_C99_MATH_TR1
126 _Tp __bet = std::tr1::lgamma(__x)
127 + std::tr1::lgamma(__y)
128 - std::tr1::lgamma(__x + __y);
152 template<
typename _Tp>
157 _Tp __bet = (__x + __y) / (__x * __y);
159 unsigned int __max_iter = 1000000;
160 for (
unsigned int __k = 1; __k < __max_iter; ++__k)
162 _Tp __term = (_Tp(1) + (__x + __y) / __k)
163 / ((_Tp(1) + __x / __k) * (_Tp(1) + __y / __k));
183 template<
typename _Tp>
187 if (__isnan(__x) || __isnan(__y))
197 #endif // __GLIBCXX_TR1_BETA_FUNCTION_TCC
_Tp __beta_lgamma(_Tp __x, _Tp __y)
Return the beta function using the log gamma functions.
_Tp __beta_gamma(_Tp __x, _Tp __y)
Return the beta function: .
_Tp __log_gamma(const _Tp __x)
Return . This will return values even for . To recover the sign of for any argument use __log_gamma_...
_Tp __beta(_Tp __x, _Tp __y)
Return the beta function .
_Tp __beta_product(_Tp __x, _Tp __y)
Return the beta function using the product form.
_Tp __gamma(const _Tp __x)
Return .
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.