LNGAMMA
The LNGAMMA function returns the logarithm of the gamma function of Z.
Examples
To find the logarithm of the gamma function of 0.5 and store the result in variable A, enter:
A = LNGAMMA(0.5)
Syntax
Result = LNGAMMA(Z)
Return Value
For negative integers, LNGAMMA returns the correct value of Infinity. If Z is double-precision, the result is double-precision (either double or double complex), otherwise the result is single-precision (either float or complex).
Note: For negative nonintegers, LNGAMMA will also return Infinity. To compute the actual LNGAMMA of a negative noninteger, you should convert your input to complex first.
Arguments
Z
The expression for which the logarithm of the gamma function will be evaluated. Z may be complex.
Keywords
Thread Pool Keywords
This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine.
Version History
Pre 4.0 |
Introduced |
5.6 |
Z argument accepts complex input |