GAMMA

The GAMMA function returns the gamma function of X . The domain of the function is 0 < X < 34.5.

The gamma function is defined as:

If X is double-precision, the result is double-precision, otherwise the argument is converted to floating-point and the result is floating-point.

Use the LNGAMMA function to obtain the natural logarithm of the gamma function when there is a possibility of overflow.

Calling Sequence

Result = GAMMA( X )

Arguments

X

The expression for which the gamma function will be evaluated.

Example

Plot the gamma function over the range 0.01 to 1.0 with a step size of 100 by entering:

X = FINDGEN(99)/100. + 0.01

PLOT, X, GAMMA(X)

See Also

BETA , IBETA , IGAMMA , LNGAMMA