nag_real_polygamma (s14aec) evaluates an approximation to the
th derivative of the psi function
given by
where
is real with
and
. For negative non-integer values of
, the recurrence relationship
is used. The value of
is obtained by a call to a function based on PSIFN in
Amos (1983).
Note that
is also known as the
polygamma function. Specifically,
is often referred to as the
digamma function and
as the
trigamma function in the literature. Further details can be found in
Abramowitz and Stegun (1972).
Amos D E (1983) Algorithm 610: A portable FORTRAN subroutine for derivatives of the psi function ACM Trans. Math. Software 9 494–502
All constants in the underlying functions are given to approximately 18 digits of precision. If
denotes the number of digits of precision in the floating point arithmetic being used, then clearly the maximum number in the results obtained is limited by
. Empirical tests by
Amos (1983) have shown that the maximum relative error is a loss of approximately two decimal places of precision. Further tests with the function
have shown somewhat improved accuracy, except at points near the positive zero of
at
, where only absolute accuracy can be obtained.
None.