Header <tgmath.h> provides a type-generic macro version of this function.
Additional overloads are provided in this header (<cmath>) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type).
Parameters
x
Parameter for the gamma function.
Return Value
Gamma function of x.
If the magnitude of x is too large, an overflow range error occurs. If too small, an underflow range error may occur.
If x is zero or a negative integer for which the function is asymptotic, it may cause a domain error or a pole error (or none, depending on implementation).