LNGAMMA Function

Evaluates the logarithm of the absolute value of the gamma function log |G(x)|.

Usage

result = LNGAMMA(x)

Input Parameters

x—Point at which the logarithm of the absolute value of the gamma function is to be evaluated.

Returned Value

result—The value of the logarithm of gamma function log |G(x)|.

Input Keywords

Double—If present and nonzero, double precision is used.

Discussion

The logarithm of the absolute value of the gamma function log |G(x)| is computed.

Example

In this example, log |G(3.5)| is computed and printed.

x  =  3.5
ans  =  LNGAMMA(x)
PRINT, 'log gamma(', x, ') =', ans
; PV-WAVE prints: log gamma(      3.50000) =      1.20097

Warning Errors

STAT_NEAR_NEG_INT_WARNThe result is accurate to less than one-half precision because x is too close to a negative integer.

Fatal Errors

STAT_NEGATIVE_INTEGERThe parameter for the function cannot be a negative integer.

STAT_NEAR_NEG_INT_FATALThe parameter for the function is too close to a negative integer.

STAT_LARGE_ABS_ARG_OVERFLOW|x| must not be so large that the result overflows.