Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] acrg_v1_0.gz(2 Kbytes)
Manuscript Title: Programs for computing the logarithm of the gamma function and the digamma function for complex argument.
Authors: K.S. Kolbig
Program title: CLOGAM AND CDIGAM
Catalogue identifier: ACRG_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 4(1972)221
Programming language: Fortran.
Computer: CDC 6600.
Operating system: CDC SCOPE.
RAM: 4K words
Word size: 60
Keywords: General purpose, Nuclear physics, Atomic physics, Gamma function, Logarithm of gamma Function, Digamma function, Asymptotic expansion, Psi function, Phase shift, Schrodinger, Scattering.
Classification: 4.7.

Nature of problem:
The gamma function, its logarithm, and its logarithmic derivative appear in a wide range of physical applications. We mention here only the Veneziano model and its generalizations in high-energy physics, and the Coulomb phase shift for complex energies.

Solution method:
For Re z>= 7, the asymptotic expansions are used to compute 1n gamma(z) and psi(z). For other regions of the z plane, suitable functional relations are used. Care is taken that Im 1n Gamma(z) is computed correctly, and not merely modulo 2 phi.

Restrictions:
As the tests show, an accuracy of 12-14 significant digits is normally obtained.

Running time:
Typical running times (in micro seconds on the CDC 6600) are given in table 1.
                       Table 1                                          
 --------------------------------------------------------------------    
                  1n Gamma(z) (CLOGAM) psi(z) (CDIGAM)                   
 --------------------------------------------------------------------    
       Re z < -6             580               570                       
 -6<=  Re z < 0              790               650                       
  0<=  Re z < 7              630               390                       
  7<=  Re z                  330               300                       
 --------------------------------------------------------------------