numerical evaluation of 2F1



> From: Robert Dodier
>
> i wonder if anyone has some advice about the numerical
> evaluation of the hypergeometric function 2F1.
> i'm willing to consider pretty much any method
> (even if not particularly fast or accurate), since the
> alternative is numerical evaluation of an integral.
> that's not the end of the world, but i'd rather avoid it.

I have been writing some code for numerical evaluation of 1F1
and have a reference for the general case pFq. There are three=20
papers and Fortran code by Nadin, Perger and Bhalla.
See http://www.ece.mtu.edu/faculty/wfp/research/comp_math.html
The evaluation is by direct summation of the defining series,
although for 2F1 with |z|>1 they use the transformation
in Abramowitz and Stegun 15.3.7 to map z to 1/z.

I thought of translating the Fortran code, but most of it is=20
routines for extended precision complex operations.  I have=20
just (tonight) produced some "working" 1F1 code (attached).
It has survived half an hour of testing.  Now I need to
work out how to integrate it into maxima.

(%i1) load("complexfloat.lisp");
(%o1)                          complexfloat.lisp
(%i2) load("1f1.lisp");
(%o2)                              1f1.lisp
(%i3) ?onefone(-1,0.6,0.4);
(%o3)                          .3333333333333333
(%i4) ?onefone(1,1,9);
(%o4)                          8103.083927575384
(%i5) exp(9.0);
(%o5)                          8103.083927575384
(%i6) ?onefone(1+%i,1+%i,10*%i);
(%o6)             - .5440211108893698 %i - .8390715290764524
(%i7) cos(10.0)+%i*sin(10.0);
(%o7)             - .5440211108893698 %i - .8390715290764524
(%i8) a:-15+55*%i;
(%o8)                             55 %i - 15
(%i9) b:20+25*%i;
(%o9)                             25 %i + 20
(%i10) ?onefone(a,b,-100+150*%i);
(%o10)        - 4.926004329884517E-10 %i - 6.927737354370276E-10


NOTICE
This e-mail and any attachments are private and confidential and may
contain privileged information. If you are not an authorised recipient,
the copying or distribution of this e-mail and any attachments is
prohibited and you must not read, print or act in reliance on this
e-mail or attachments.
This notice should not be removed.

Attached file: complexfloat.lisp
Attached file: 1f1.lisp