1 #ifndef STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_LMGAMMA_HPP
4 #include <boost/math/tools/promotion.hpp>
6 #include <boost/math/special_functions/gamma.hpp>
55 inline typename boost::math::tools::promote_args<T>::type
58 typename boost::math::tools::promote_args<T>::type result
61 for (
int j = 1; j <= k; ++j)
62 result +=
lgamma(x + (1.0 - j) / 2.0);
fvar< T > lgamma(const fvar< T > &x)
const double LOG_PI_OVER_FOUR
Log pi divided by 4 .
fvar< typename stan::return_type< T, int >::type > lmgamma(int x1, const fvar< T > &x2)