/* Power series summation for confluent hypergeometric function */
staticdouble hy1f1p( a, b, x, err ) double a, b, x; double *err;
{ double n, a0, sum, t, u, temp; double an, bn, maxt, pcanc;
/* set up for power series summation */
an = a;
bn = b;
a0 = 1.0;
sum = 1.0;
n = 1.0;
t = 1.0;
maxt = 0.0;
while( t > MACHEP )
{ if( bn == 0 ) /* check bn first since if both */
{
mtherr( "hyperg", SING ); return( MAXNUM ); /* 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 = exp(t) / gamma(a); else
temp = exp( t - lgam(a) );
h2 *= temp;
err2 *= temp;
if( x < 0.0 )
asum = h1; else
asum = h2;
acanc = fabs(err1) + fabs(err2);
if( b < 0 )
{
temp = gamma(b);
asum *= temp;
acanc *= fabs(temp);
}
if( asum != 0.0 )
acanc /= fabs(asum);
acanc *= 30.0; /* fudge factor, since error of asymptotic formula
* often seems this much larger than advertised */
adone:
*err = acanc; return( asum );
}
/* hyp2f0() */
double hyp2f0( a, b, x, type, err ) double a, b, x; int type; /* determines what converging factor to use */ double *err;
{ double a0, alast, t, tlast, maxt; double n, an, bn, u, sum, temp;
an = a;
bn = b;
a0 = 1.0e0;
alast = 1.0e0;
sum = 0.0;
n = 1.0e0;
t = 1.0e0;
tlast = 1.0e9;
maxt = 0.0;
do
{ if( an == 0 ) goto pdone; if( bn == 0 ) 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.