int qtanh( x, y )
QELT *x, *y;
{
QELT e[NQ], r[NQ], j[NQ], xx[NQ], m2[NQ]; int i, n, sign; long lj;
sign = x[0];
qmov( x, r );
r[0] = 0; if( qcmp(r, qone) >= 0 )
{ /* This subroutine is used by the exponential function routine. *tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x)) *Noteqexp()callsqtanh,butwithanargumentlessthan(1+log2)/2.
*/
qexp( r, e );
qdiv( e, qone, r );
qsub( r, e, xx );
qadd( r, e, j );
qdiv( j, xx, y ); goto done;
}
qmov( qtwo, m2 );
qneg( m2 );
/* Adjust loop count for convergence to working precision. */
n = NBITS/9 + 1; /*10;*/
lj = 2 * n + 1;
ltoq( &lj, j );
qmov( j, e );
qmul( x, x, xx );
/* continued fraction */
for( i=0; i<n; i++)
{
qdiv( e, xx, r );
qadd( m2, j, j );
qadd( r, j, e );
}
qdiv( e, x, y );
done: if( sign != 0 )
y[0] = -1; return0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-27)
¤
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.