Computes the gamma.
#include <math.h> double tgamma (x) double x; float tgammaf (x) float x; long double tgammal (x) long double x;
The tgamma, tgammaf, and tgammal subroutines compute the gamma function of x.
An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these subroutines. Upon return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
x | Specifies the value to be computed. |
Upon successful completion, the tgamma, tgammaf, and tgammal subroutines return Gamma(x).
If x is a negative integer, a domain error occurs, and either a NaN (if supported), or an implementation-defined value is returned.
If the correct value would cause overflow, a range error occurs and the tgamma, tgammaf, and tgammal subroutines return the value of the macro HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively.
If x is NaN, a NaN is returned.
If x is +Inf, x is returned.
If x is ±0, a pole error occurs, and the tgamma, tgammaf, and tgammal subroutines return ±HUGE_VAL, ±HUGE_VALF, and ±HUGE_VALL, respectively.
If x is -Inf, a domain error occurs, and either a NaN (if supported), or an implementation-defined value is returned.
feclearexcept Subroutine, fetestexcept Subroutine, and lgamma, lgammal, or gamma Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1.
math.h in AIX 5L Version 5.2 Files Reference.