C99 | double tgamma (double x);
float tgammaf (float x); long double tgammal (long double x); |
C++11 | double tgamma (double x);
float tgamma (float x); long double tgamma (long double x); double tgamma (T x); // additional overloads for integral types |
C99 | 头文件<tgmath.h> 提供了该函数的泛型类型宏版本。 |
C++11 | 这个头文件(<cmath>)为整型提供了额外的重载:这些重载在计算之前将x转换为double (在T是任何整型时定义)。 |
/* 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; } |
erf | 误差函数 (function ) |
erfc | 互补误差函数 (function ) |
tgamma | 伽马函数 (function ) |