#ifdef ANSIC float ellikf( float phia, float ma ) #else float ellikf( phia, ma ) double phia, ma; #endif
{ float phi, m, a, b, c, temp; float t; int d, mod, sign;
phi = phia;
m = ma; if( m == 0.0 ) return( phi ); if( phi < 0.0 )
{
phi = -phi;
sign = -1;
} else
sign = 0;
a = 1.0;
b = 1.0 - m; if( b == 0.0 ) return( logf( tanf( 0.5*(PIO2F + phi) ) ) );
b = sqrtf(b);
c = sqrtf(m);
d = 1;
t = tanf( phi );
mod = (phi + PIO2F)/PIF;
while( fabsf(c/a) > MACHEPF )
{
temp = b/a;
phi = phi + atanf(t*temp) + mod * PIF;
mod = (phi + PIO2F)/PIF;
t = t * ( 1.0 + temp )/( 1.0 - temp * t * t );
c = ( a - b )/2.0;
temp = sqrtf( a * b );
a = ( a + b )/2.0;
b = temp;
d += d;
}
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.