IMSL Statistics Reference Guide > Utilities > LNGAMMA Function (PV-WAVE Advantage)
  

LNGAMMA Function (PV-WAVE Advantage)
Evaluates the logarithm of the absolute value of the gamma function log |Γ(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 |Γ(x)|.
Input 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.
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.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.