trigamma(z)
Uses an asymptotic expansion where Re(z) > 5 and a recurrence
formula to such a case where Re(z) <= 5. Accuracy is good.
This function is based upon the function
trigamma
in Venables and
Ripley (1997).
M. Abramowitz and I. A. Stegun (1965)
Handbook of Mathematical Functions.
Dover.
Venables, W. N. and Ripley, B. D. (1997)
Modern Applied Statistics with S-PLUS,
Second Edition.
Springer.
x <- seq(1, 2, .1) matrix(c(x, trigamma(x)), ncol=2)