Author(s): K.S. Kölbig | Library: MATHLIB or Fortran Computer Library |
Submitter: | Submitted: 07.06.1992 |
Language: Fortran | Revised: 15.03.1993 |
Function subprograms GAMMA, DGAMMA and QGAMMA calculate the gamma function
for real argument x > 0.
The quadruple-precision version QGAMMA is available only on computers which support a REAL*16 Fortran data type.
Structure:
FUNCTION subprograms
User Entry Names: GAMMA, DGAMMA, QGAMMA
Files Referenced: Unit 6
External References: MTLMTR, ABEND
Usage:
In any arithmetic expression,
GAMMA(X), DGAMMA(X) or QGAMMA(X) has the value ,
Method:
Approximation by truncated Chebyshev series and functional relations.
Accuracy:
The system-supplied version (see Notes) has full machine accuracy. The CERN version of GAMMA (except on CDC and Cray computers) has full single-precision accuracy. The CERN version of DGAMMA, QGAMMA (and of GAMMA, DGAMMA on CDC and Cray computers) have an accuracy which is approximately one digit less than machine precision.
Error handling:
Error C302.1: . The function value is set equal to zero, and a message is written on Unit 6 unless subroutine MTLSET (N002) has been called.
Notes:
If the function GAMMA or DGAMMA is available in the system-supplied Fortran mathematical library, the system-supplied function will be loaded instead of the CERN version.
References: