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

Syntax

#include <math.h>

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

Description

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 an error occurs.
errno is set to indicate the error.

Errors

tgamma(), tgammaf() and tgammal() will fail if:


ERANGE

Overflow; the return value is too large.


EDOM

x is a non-positive integer.

See also

lgamma(), math.h.