PGAMMA 3CW "01 January 2010" "mathcw-1.00"

Table of contents


NAME

pgammaf, pgamma, pgammal, pgammaw, pgammaq, pgammall, pgammadf, pgammad, pgammadl, pgammadll - polygamma function of order n

SYNOPSIS

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.


DESCRIPTION

Compute the polygamma function of order n, defined as the n-th derivative of the psi function, and equivalently, the (n + 1)-st logarithmic derivative of the gamma function:
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.


RETURN VALUES

Return the polygamma function of order n of x.

If the argument x is +Infinity, return -0 for even order, and +0 for odd order.


ERRORS

If the order n is negative, set errno to EDOM and return a quiet NaN.

If the argument x is -Infinity, set errno to ERANGE and return +Infinity.


SEE ALSO

lgamma(3CW), psi(3CW), tgamma(3CW).