[racket] ATTN: Neil T. Racket/Math digamma (psi) function implementation

From: Ray Racine (ray.racine at gmail.com)
Date: Tue May 7 16:58:54 EDT 2013

Well since I gone this far, I took the unusual step of implementing the
algorithm (more?) correctly this time.

On the Toronto scale, we are mostly accurate for most of the domain  x >

For x<0 the use of psi(1 - x) - psi (x) = pi * cot(pi * x), not so good.

For x > 0, outside the subdomain around the circle x=1.48 where things are
a bit wobbly it is pretty solid.  I don't know if this is a zero of the
polynomial or what the heck is going on there.

;; Improved Impl of digamma

#lang typed/racket/base


J Bernardo,
Psi ( Digamma ) Function,
Algorithm AS 103,
Applied Statistics,
Volume 25, Number 3, pages 315-317, 1976.

Posted on the users mailing list.