CMS 3D CMS Logo

Functions
GammaLn.cc File Reference
#include "CommonTools/Statistics/src/GammaLn.h"
#include <cmath>

Go to the source code of this file.

Functions

float GammaLn (float z)
 

Function Documentation

◆ GammaLn()

float GammaLn ( float  z)

Returns the value ln( gamma(z) ) for z > 0

Definition at line 4 of file GammaLn.cc.

4  {
5  const static double coefficients[6] = {76.18009172947146,
6  -86.50532032941677,
7  24.01409824083091,
8  -1.231739572450155,
9  0.1208650973866179e-2,
10  -0.5395239384953e-5};
11 
12  double temp = z + 5.5;
13  temp -= (z + 0.5) * log(temp);
14  double y = z;
15  double series = 1.000000000190015;
16  for (int term = 0; term < 6; term++)
17  series += coefficients[term] / ++y;
18  return -temp + log(2.5066282746310005 * series / z);
19 }

References dqm-mbProfile::log, groupFilesInBlocks::temp, detailsBasic3DVector::y, and detailsBasic3DVector::z.

Referenced by IncompleteGammaComplement::ln(), and IncompleteGammaComplement::value().

detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17