28 static double cof[6] = {76.18009172947146,-86.50532032941677,
29 24.01409824083091, -1.231739572450155,
30 0.1208650973866179e-2, -0.5395239384953e-5};
34 tmp -= (x + 0.5) * std::log(tmp);
35 double ser = 1.000000000190015;
37 for ( j = 0; j <= 5; j++ ) {
41 return -tmp + std::log(2.5066282746310005*ser);
static double gammln(double x)