The IGAMMA function computes the incomplete gamma function.

IGAMMA uses either a power series representation or a continued fractions method. If *
X*
is less than or equal to *
A*
+1, a power series representation is used. If *
X*
is greater than *
A*
+1, a continued fractions method is used.

This routine is written in the IDL language. Its source code can be found in the file ```
igamma.pro
```

in the ```
lib
```

subdirectory of the IDL distribution.

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]