Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (g - h) gamma(3)
RETURN VALUES
Upon successful completion, the gamma( ) function returns the logarithmic gamma of x.
For IEEE floating-point values, if the value of x is NaN, NaN is returned. If the value of x is
positive infinity, NaN is returned. If the value of x is negative infinity, HUGE_VAL is returned
and errno is set to [EDOM].
If the value of x is 0.0 (zero), HUGE_VAL is returned and errno is set to [EDOM]. If the value
of x is a nonpositive integer, HUGE_VAL is returned and errno is set to [EDOM].
If the correct value would cause overflow, HUGE_VAL is returned.
If the correct value would cause underflow, 0.0 (zero) is returned.
ERRORS
If any of the following conditions occurs, the gamma( ) function sets errno to the corresponding
value:
[EDOM] The value of x is 0.0, (zero), a nonpositive integer, or negative infinity.
RELATED INFORMATION
Functions: exp(3), fp_class(3), isnan(3), lgamma(3).
STANDARDS CONFORMANCE
The XPG4 Version 2 specification leaves some features to the implementing vendor to define.
The following features are affected in the HP implementation:
• errno is not set to [ERANGE] when the result would overflow or underflow.
527187-017 Hewlett-Packard Company 3−5