Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

Guardian Native C Library Calls (g - i) gamma(3)
RETURN VALUES
Upon successful completion, the gamma() function returns the logarithmic gamma of x.
For IEEE oating-point values, if the value of x is NaN, NaN is returned. If the value of x is
positive innity, NaN is returned. If the value of x is negative innity, 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 overow, HUGE_VAL is returned.
If the correct value would cause underow, 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 innity.
RELATED INFORMATION
Functions: exp(3), fp_class(3), isnan(3), lgamma(3).
STANDARDS CONFORMANCE
The XPG4 Version 2 specication leaves some features to the implementing vendor to dene.
The following features are affected in the HP implementation:
errno is not set to [ERANGE] when the result would overow or underow.
527192-005 Hewlett-Packard Company 33