C317: Psi (Digamma) and Polygamma Functions for Complex Argument

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 15.11.1995
Language: Fortran Revised:

Function subprograms CPSIPG and WPSIPG calculate either the logarithmic derivative of the gamma function (the psi, or digamma, function)

displaymath94

or one of the other polygamma functions

displaymath96

for complex arguments tex2html_wrap_inline98 and k = 0,1,2,3,4.

The double-precision version WPSIPG is available only on computers which support a COMPLEX*16 Fortran data type.

Structure:

FUNCTION subprograms
User Entry Names: CPSIPG, WPSIPG
Files Referenced: Unit 6
External References: MTLMTR, ABEND

Usage:

In any arithmetic expression,

CPSIPG(Z,K) or WPSIPG(Z,K) has the value tex2html_wrap_inline102 ,

where CPSIPG is of type COMPLEX, WPSIPG is of type COMPLEX*16, and where Z has the same type as the function name. K is of type INTEGER.

Method:

The method for tex2html_wrap_inline104 described in Ref. 1 is adapted accordingly.

Accuracy:

CPSIPG (except on CDC and Cray computers) has full single-precision accuracy. For most values of the argument Z, WPSIPG (and CPSIPG on CDC and Cray computers) has an accuracy of approximately two significant digit less than the machine precision.

Error handling:

Error C317.1: tex2html_wrap_inline106 or tex2html_wrap_inline108 .
Error C317.2: tex2html_wrap_inline110 .
In both cases, the function value is set to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. K.S. Kölbig, Programs for computing the logarithm of the gamma function, and the digamma function, for complex arguments, Computer Phys. Comm. 4 (1972) 221-226.
tex2html_wrap_inline112

Michel Goossens Tue Jun 4 21:30:20 METDST 1996