1 #ifndef STAN__MATH__FUNCTIONS__LMGAMMA_HPP
2 #define STAN__MATH__FUNCTIONS__LMGAMMA_HPP
4 #include <boost/math/tools/promotion.hpp>
6 #include <boost/math/special_functions/gamma.hpp>
56 inline typename boost::math::tools::promote_args<T>::type
59 typename boost::math::tools::promote_args<T>::type result
62 for (
int j = 1; j <= k; ++j)
63 result +=
lgamma(x + (1.0 - j) / 2.0);
fvar< T > lgamma(const fvar< T > &x)
boost::math::tools::promote_args< T >::type lmgamma(const int k, T x)
Return the natural logarithm of the multivariate gamma function with the speciifed dimensions and arg...
const double LOG_PI_OVER_FOUR