Namespace:
Imsl.Math
Assembly:
ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
public static double Gamma( double x ) |
Visual Basic (Declaration) |
---|
Public Shared Function Gamma ( _ x As Double _ ) As Double |
Visual C++ |
---|
public: static double Gamma( double x ) |
Parameters
- x
- Type: System..::.Double
A double value.
Return Value
A double value specifying the Gamma function of x. If x is a negative integer, the result is NaN.
Remarks
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.