double tgamma ( double x); float tgammaf ( float x);long double tgammal (long double x);
double tgamma ( double x); float tgamma ( float x);long double tgamma (long double x); double tgamma (T x); // additional overloads for integral types
<cmath> ) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type ).1
2
3
4
5
6
7
8
9
10
11
12
/* tgamma example */
#include <stdio.h> /* printf */
#include <math.h> /* tgamma */
int main ()
{
double param, result;
param = 0.5;
result = tgamma (param);
printf ("tgamma(%f) = %f\n", param, result );
return 0;
}
tgamma (0.500000) = 1.772454