Barton Willis wrote:
> I evaluated psi[0](1.78095) using webMathematica, Maple 10, and Maxima
> 5.14.0 to 50
> digits:
>
> Created by webMathematica
> 0.27085244394958037219241274879122247322668078991599
> Maple
> 0.27085617938915025987352993092362827661833339343790
> Maxima
> 0.2708561793891502598735299309236282766183333934379b-1
>
> (1) What's the story?
You mean that Mma returns something different? I think you need to say
1.780950000<lots more zeroes>0. Something about how mma does some kind
of significance arithmetic or something. I get something close to
Maple's value then.
>
> (2) Does anybody have a reference to how our psi function works? It
> seems to use a modified asymptotic expansion.
I looked at bffac a while back that is the asymptotic series for log
gamma. A peek at bfpsi shows that it is probably also the asymptotic
series for psi. Probably A&S 6.3.18.
(We should document these routines.)
>
> (3) Does our psi function work in the complex plane? --- you do need
> to rectform the output.
If it is A&S 6.3.18, it should work in |arg z| < pi. But I see that the
code for bfpsi0 (in bffac) says:
if z < 0 then bfloat(%pi*cot(%pi*(-z)))+bfpsi0(1-z,fpprec)
That z < 0 should probably be realpart(z) < 0 so we can apply the
reflection formula.
But psi[0](1b0 + 3b0*%i) produces same answer as webMathmetica does.
bfpsi0 probably needs a few carefully placed calls to expand or
rectform, like in cbffac.
My 2 cents, anyway,
Ray