C303: Gamma Function for Real Argument

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 07.06 1992
Language: Fortran Revised:

Function subprograms GAMMF and DGAMMF calculate the gamma function

displaymath80

for real argument tex2html_wrap_inline82 .

On CDC and Cray computers, the double-precision version DGAMMF is not available.

Structure:

FUNCTION subprograms
User Entry Names: GAMMF, DGAMMF
Files Referenced: Unit 6
External References: MTLMTR, ABEND

Usage:

In any arithmetic expression,

GAMMF(X) or DGAMMF(X) has the value tex2html_wrap_inline84 ,

where GAMMF is of type REAL, DGAMMF is of type DOUBLE PRECISION, and X has the same type as the function name.

Method:

Approximation by truncated Chebyshev series and functional relations.

Accuracy:

GAMMF (except on CDC and Cray computers) has full single-precision accuracy. DGAMMF (and of GAMMF on CDC and Cray computers) has an accuracy which is approximately one digit less than machine precision.

Error handling:

Error C303.1: tex2html_wrap_inline86 The function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. Y.L. Luke, Mathematical functions and their approximations, (Academic Press, New York 1975) 4.
tex2html_wrap_inline88

Michel Goossens Tue Jun 4 21:01:34 METDST 1996