Returns the Gamma function of a double
.
double
value. A double
value specifying the Gamma function of x. If x is a negative integer, the result is NaN.
The Gamma function, , is defined to be
For , the above definition is extended by analytic continuation.
The Gamma function is not defined for integers less than or equal to zero. Also, the argument x must be greater than so that does not underflow, and x must be less than 171.64 so that does not overflow. The underflow limit occurs first for arguments that are close to large negative half integers. Even though other arguments away from these half integers may yield machine-representable values of , such arguments are considered illegal. Users who need such values should use the Log Gamma. Finally, the argument should not be so close to a negative integer that the result is less accurate than half precision.
Sfun Class | Imsl.Math Namespace | Example