Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ lgamma_stirling()

template<typename T >
return_type_t< T > stan::math::lgamma_stirling ( const T  x)

Return the Stirling approximation to the lgamma function.

\[ \mbox{lgamma_stirling}(x) = \frac{1}{2} \log(2\pi) + (x-\frac{1}{2})*\log(x) - x \]

Template Parameters
Ttype of value
Parameters
xvalue
Returns
Stirling's approximation to lgamma(x).

Definition at line 26 of file lgamma_stirling.hpp.