IGAMMA function computes the
incomplete gamma function.
IGAMMA uses either a power series representation or a continued fractions method. If
is less than or equal to
+1, a power series representation is used. If
is greater than
+1, a continued fractions method is used.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Result = IGAMMA(
A positive integer, single-, or double-precision floating-point scalar that specifies the parametric exponent of the integrand.
An integer, single-, or double-precision floating-point scalar that spe`eFcifies the upper limit of integration.
Set this keyword to a named variable that will contain the method used to compute the incomplete gamma function. A value of 0 indicates that a power series representation was used. A value of 1 indicates that a continued fractions method was used.
Compute the incomplete gamma function for the corresponding elements of A and X.
Define an array of parametric exponents.
A = [0.10, 0.50, 1.00, 1.10, 6.00, 26.00]
Define the upper limits of integration.
X = [0.0316228, 0.0707107, 5.00000, 1.04881, 2.44949, 25.4951]
Allocate an array to store the results.
result = FLTARR(N_ELEMENTS(A))
Compute the incomplete gamma functions. Note that the result for each element in the input arrays must be computed individually.
FOR K = 0, N_ELEMENTS(A)-1 DO $
result[K] = IGAMMA(A[K], X[K])
[0.742026, 0.293128, 0.993262, 0.607646, 0.0387318, 0.486387]