Barton Willis wrote:
> In bffac.mac, there is a big float gamma function bffac (author Bill
> Gosper).
> I was testing this function with complex inputs -- the output isn't in
> rectangular form (it's a big mess). So I was wondering: Is bffac
> algorithmically
> correct for (all) complex inputs? If so, maybe we could insert some calls
> to rectform
> into the code? Example:
>
> (%i49) float2bf : true$
> (%i50) load(bffac)$
>
> (%i51) bffac(-5.0 + %i,25);
>
> < long mess deleted >
>
> (%i52) rectform(%);
> (%o52) 1.262948529867786b-2-7.163743828758051b-4*%i
>
A&S says abs(gamma(%i*y)) = sqrt(%pi/(y*sinh(%pi*y)).
abs(rectform(bffac(5b0*%i,16))) -> 2.175875548187084b-3
But it should be 4.3517510963741685e-4
And gamma(5.0*%i) -> 3.399328988721385e-4 %i - 2.717038835061503e-4,
which has the magnitude 4.3517510963741857e-4.
Seems like bffac is not correct for complex args.
Ray