[Contents] [Previous Section] [Next Section] [Index]


lgamma-Computes the Logarithm of the gamma Function

Interface

F_TYPE lgamma (F_TYPE x) 

Description

lgamma() returns the logarithm of the absolute value of gamma of x, or ln(|G(x)|), where G is the gamma function. The sign of gamma of x is returned in the external integer variable signgam as +1 or -1. The x parameter cannot be 0 or a negative integer.

gamma() returns the natural log of the gamma function and so is functionally equivalent to lgamma(). Because of this, gamma() is marked TO BE WITHDRAWN in the X/Open Portability Guide, Revision 4 (XPG4).

Exceptions


Exceptional Argument       Routine Behavior

|x| = infinity             Invalid argument

x = 0, -1, -2, -3, ...     Invalid argument

|x| > lgamma_max_float     Overflow



See Also

Appendix A, Critical Floating-Point Values


[Contents] [Previous Section] [Next Section] [Index]