/* Test for domain */ if( x <= 0.0L )
{ if( x == 0.0L )
mtherr( fname, SING ); else
mtherr( fname, DOMAIN ); return( -16384.0L );
}
/* separate mantissa from exponent */
/* Note, frexp is used so that denormal numbers *willbehandledproperly.
*/
x = frexpl( x, &e );
/* logarithm using log(x) = z + z**3 P(z)/Q(z), *wherez=2(x-1)/x+1)
*/ if( (e > 2) || (e < -2) )
{ if( x < SQRTH )
{ /* 2( 2x-1 )/( 2x+1 ) */
e -= 1;
z = x - 0.5L;
y = 0.5L * z + 0.5L;
} else
{ /* 2 (x-1)/(x+1) */
z = x - 0.5L;
z -= 0.5L;
y = 0.5L * x + 0.5L;
}
x = z / y;
z = x*x;
y = x * ( z * polevll( z, R, 5 ) / p1evll( z, S, 6 ) ); goto done;
}
/* logarithm using log(1+x) = x - .5x**2 + x**3 P(x)/Q(x) */
if( x < SQRTH )
{
e -= 1;
x = ldexpl( x, 1 ) - 1.0L; /* 2x - 1 */
} else
{
x = x - 1.0L;
}
z = x*x;
y = x * ( z * polevll( x, P, 12 ) / p1evll( x, Q, 12 ) );
y = y - ldexpl( z, -1 ); /* -0.5x^2 + ... */
done:
/* Multiply log of fraction by log2(e) *andbase2exponentby1 * ****CAUTION*** * *Thissequenceofoperationsiscriticalanditmay *behorriblydefeatedbysomecompileroptimizers.
*/
z = y * LOG2EA;
z += x * LOG2EA;
z += y;
z += x;
z += e; return( z );
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-17)
¤
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.