#ifdef ANSIC float atanf( float xx ) #else float atanf(xx) double xx; #endif
{ float x, y, z; int sign;
x = xx;
/* make argument positive and save the sign */ if( xx < 0.0 )
{
sign = -1;
x = -xx;
} else
{
sign = 1;
x = xx;
} /* range reduction */ if( x > 2.414213562373095 ) /* tan 3pi/8 */
{
y = PIO2F;
x = -( 1.0/x );
}
elseif( x > 0.4142135623730950 ) /* tan pi/8 */
{
y = PIO4F;
x = (x-1.0)/(x+1.0);
} else
y = 0.0;
z = x * x;
y +=
((( 8.05374449538e-2 * z
- 1.38776856032E-1) * z
+ 1.99777106478E-1) * z
- 3.33329491539E-1) * z * x
+ x;
if( sign < 0 )
y = -y;
return( y );
}
#if ANSIC float atan2f( float y, float x ) #else float atan2f( x, y ) double x, y; #endif
{ float z, w; int code;
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.