/* Power series summation for confluent hypergeometric function */
staticlongdouble hy1f1pl( a, b, x, err ) longdouble a, b, x; longdouble *err;
{ longdouble n, a0, sum, t, u, temp; longdouble an, bn, maxt, pcanc;
/* set up for power series summation */
an = a;
bn = b;
a0 = 1.0L;
sum = 1.0L;
n = 1.0L;
t = 1.0L;
maxt = 0.0L;
while( t > MACHEPL )
{ if( bn == 0 ) /* check bn first since if both */
{
mtherr( "hypergl", SING ); return( MAXNUML ); /* an and bn are zero it is */
} if( an == 0 ) /* a singularity */ return( sum ); if( n > 200 ) goto pdone;
u = x * ( an / (bn * n) );
if( a < 0 )
temp = expl(t) / gammal(a); else
temp = expl( t - lgaml(a) );
h2 *= temp;
err2 *= temp;
if( x < 0.0L )
asum = h1; else
asum = h2;
acanc = fabsl(err1) + fabsl(err2);
if( b < 0.0L )
{
temp = gammal(b);
asum *= temp;
acanc *= fabsl(temp);
}
if( asum != 0.0L )
acanc /= fabsl(asum);
acanc *= 30.0L; /* fudge factor, since error of asymptotic formula
* often seems this much larger than advertised */
adone:
*err = acanc; return( asum );
}
/* hyp2f0() */
longdouble hyp2f0l( a, b, x, type, err ) longdouble a, b, x; int type; /* determines what converging factor to use */ longdouble *err;
{ longdouble a0, alast, t, tlast, maxt; longdouble n, an, bn, u, sum, temp;
an = a;
bn = b;
a0 = 1.0e0L;
alast = 1.0e0L;
sum = 0.0L;
n = 1.0e0L;
t = 1.0e0L;
tlast = 1.0e9L;
maxt = 0.0L;
do
{ if( an == 0.0L ) goto pdone; if( bn == 0.0L ) goto pdone;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.