C316: Psi (Digamma) and Polygamma Functions

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

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

displaymath99

or one of the other polygamma functions

displaymath101

for real arguments tex2html_wrap_inline103 and tex2html_wrap_inline105 .

Note that the Euler constant tex2html_wrap_inline107 (also denoted by tex2html_wrap_inline109 ) and the Catalan constant tex2html_wrap_inline111 can be calculated by using this subprogram.

On CDC and Cray computers, the double-precision version DPSIPG is not available.

Structure:

FUNCTION subprograms
User Entry Names: RPSIPG, DPSIPG
Files Referenced: Unit 6
External References: MTLMTR, ABEND

Usage:

In any arithmetic expression,

RPSIPG(X,K) or DPSIPG(X,K) has the value tex2html_wrap_inline113 ,

where RPSIPG is of type REAL, DPSIPG is of type DOUBLE PRECISION, and where X has the same type as the function name. K is of type INTEGER.

Method:

Rational Chebyshev approximation (k = 0), approximation by truncated Chebyshev series (k > 0), and functional relations.

Accuracy:

RPSIPG (except on CDC and Cray computers) has full single-precision accuracy. For most values of the argument X, DPSIPG (and RPSIPG on CDC and Cray computers) has an accuracy of approximately one significant digit less than the machine precision.

Error handling:

Error C316.1: tex2html_wrap_inline119 or tex2html_wrap_inline121 .
Error C316.2: tex2html_wrap_inline123 .
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. W.J. Cody, A.J. Strecock and H.C. Thather, Jr., Chebyshev approximations for the psi function, Math. Comp. 27 (1973) 123-127.
  2. Y.L. Luke, Mathematical functions and their approximations (Academic Press, New York, l975) 5-6.
tex2html_wrap_inline125

Michel Goossens Tue Jun 4 21:27:27 METDST 1996