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

◆ lgamma_stirling()

double stan::math::opencl_kernels::lgamma_stirling ( double  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 \]

Parameters
xvalue
Returns
Stirling's approximation to lgamma(x).

Definition at line 30 of file lgamma_stirling.hpp.