Author(s): K.S. Kölbig | Library: MATHLIB |
Submitter: | Submitted: 01.05.1990 |
Language: Fortran | Revised: 01.12.1994 |
Function subprograms RGAPNC, DGAPNC and RGAGNC, DGAGNC calculate the incomplete gamma function
and the complementary incomplete gamma function
respectively, for real arguments and a. M(a,b,x) is Kummer's function (see Ref. 3).
On CDC and Cray computers, the double-precision versions DGAPNC and DGAGNC are not available.
Structure:
FUNCTION subprograms
Uses Entry Names:
RGAPNC, RGAGNC, DGAPNC, DGAGNC
Obsolete User Entry Names: GAPNC RGAPNC,
GAGNC RGAGNC
Files Referenced: Unit 6
External References: ALGAMA, DLGAMA,
MTLMTR, ABEND
Usage:
In any arithmetic expression,
RGAPNC(A,X) or DGAPNC(A,X)
has the value ,
RGAGNC(A,X) or DGAGNC(A,X)
has the value ,
Method:
The method is described in Ref. 1.
Accuracy:
RGAPNC and RGAGNC (except on CDC and Cray computers) have full single-precision accuracy. For most values of the arguments, DGAPNC, DGAGNC (and RGAPNC, RGAGNC on CDC and Cray computers) have an accuracy of approximately two significant digits less than the machine precision.
Restrictions:
For P(a,x): Either (i) , or (ii) and
.
For G(a,x): Either (i) , or (ii) and
.
Error handling:
Error C334.1: .
Error C334.2: For RGAPNC and DGAPNC:
and ;
for RGAGNC and DGAGNC: .
Error C334.3: Problems with convergence (unlikely).
In all cases,
the function value is set equal to zero, and a message is written on
Unit 6, unless subroutine MTLSET (N002) has been called.
Notes:
When speed is more important than accuracy, e.g. for applications in statistics, use GAMDIS (G106) for computing P(a,x). Note, however, that in this case the arguments A and X must be interchanged.
The subprograms are based on a Fortran program for the incomplete gamma functions published in Ref. 2.
References: