IMSL_LNGAMMA

Syntax | Return Value | Arguments | Keywords | Discussion | Example | Errors | Version History

The IMSL_LNGAMMA function evaluates the logarithm of the absolute value of the gamma function log|Γ(x)|.

Note
This routine requires an IDL Advanced Math and Stats license. For more information, contact your ITT Visual Information Solutions sales or technical support representative.

Syntax

Result = IMSL_LNGAMMA(x [, /DOUBLE])

Return Value

The value of the logarithm of gamma function log|Γ(x)|.

Arguments

x

Expression for which the logarithm of the absolute value of the gamma function is to be evaluated.

Keywords

DOUBLE

If present and nonzero, double precision is used.

Discussion

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

Example

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

PM, IMSL_LNGAMMA(3.5) 
      1.20097 

Errors

Warning Errors

MATH_NEAR_NEG_INT_WARN—Result is accurate to less than one-half precision because x is too close to a negative integer.

Fatal Errors

MATH_NEGATIVE_INTEGER—Parameter for the function cannot be a negative integer.

MATH_NEAR_NEG_INT_FATAL—Parameter for the function is too close to a negative integer.

MATH_LARGE_ABS_ARG_OVERFLOW—Parameter |x| must not be so large that the result overflows.

Version History

6.4

Introduced