Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

tgamma, tgammaf, tgammal - compute gamma function

&pagelevel(4)&pagelevel

Definition    

#include <math.h>

double tgamma(double x); (C11)
float tgammaf(float x); (C11)
long double tgammal(long double x); (C11)

These functions compute the mathematical gamma function for a given floating-point number x:

Return val.

tgamma(x)

Value of the gamma function if successful.


HUGE_VAL
HUGE_VALF
HUGE_VALL

depending on the function type, if the correct value causes an overflow.

In addition errno is set to ERANGE (return value is too large).


HUGE_VAL
HUGE_VALF
HUGE_VALL

depending on the function type, if x is a non-positive integer.

In addition errno is set to EDOM (invalid argument).

See also

lgamma, math.h