cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float pgammaf (int n, float x); extern double pgamma (int n, double x); extern long double pgammal (int n, long double x); extern __float80 pgammaw (int n, __float80 x); extern __float128 pgammaq (int n, __float128 x); extern long_long_double pgammall (int n, long_long_double x); extern decimal_float pgammadf (int n, decimal_float x); extern decimal_double pgammad (int n, decimal_double x); extern decimal_long_double pgammadl (int n, decimal_long_double x); extern decimal_long_long_double pgammadll (int n, decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
pgamma(0,x) = psi(x)" , pgamma(n,x) = d**n psi(x) / dx**n" , pgamma(n,x) = (d**(n + 1) tgamma(x) / dx**(n + 1)) / tgamma(x)" .
For positive x, the polygamma functions are negative for even n, and positive for odd n. They all tend to zero as either n or x increases.
For negative x, their behavior is much more complicated, with poles at x = 0, -1, -2, -3, .... Polygamma functions of even orders have roots (zeros) for x roughly midway between consecutive negative integers. Those of odd orders have no real roots.
If the argument x is +Infinity, return -0 for even order, and +0 for odd order.
If the argument x is -Infinity, set errno to ERANGE and return +Infinity.