8 #include "PythiaStdlib.h"
17 double GammaCoef[9] = {
18 0.99999999999980993, 676.5203681218851, -1259.1392167224028,
19 771.32342877765313, -176.61502916214059, 12.507343278686905,
20 -0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7};
22 double GammaReal(
double x) {
25 if (x < 0.5)
return M_PI / (sin(M_PI * x) * GammaReal(1 - x));
29 double gamma = GammaCoef[0];
30 for (
int i = 1; i < 9; ++i) gamma += GammaCoef[i] / (z + i);
34 gamma *= sqrt(2. * M_PI) * pow(t, z + 0.5) * exp(-t);