1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP 2 #define STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP 5 #include <boost/math/tools/promotion.hpp> 55 inline typename boost::math::tools::promote_args<T>::type
lmgamma(
int k, T x) {
56 typename boost::math::tools::promote_args<T>::type result
59 for (
int j = 1; j <= k; ++j)
60 result +=
lgamma(x + (1.0 - j) / 2.0);
fvar< T > lgamma(const fvar< T > &x)
Return the natural logarithm of the gamma function applied to the specified argument.
const double LOG_PI_OVER_FOUR
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)