We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7825fdf commit 71653a3Copy full SHA for 71653a3
1 file changed
stan/math/opencl/kernels/device_functions/lbeta.hpp
@@ -109,7 +109,8 @@ static const char* lbeta_device_function
109
double stirling_diff = lgamma_stirling_diff(x)
110
+ lgamma_stirling_diff(y)
111
- lgamma_stirling_diff(x + y);
112
- double stirling = (x - 0.5) * (log(x) - log_xpy) + y * log1p(-x_over_xy)
+ double stirling = (x - 0.5) * (log(x) - log_xpy)
113
+ + y * log1p(-x_over_xy)
114
+ 0.5 * (M_LN2 + log(M_PI)) - 0.5 * log(y);
115
return stirling + stirling_diff;
116
}
0 commit comments