int mtherr(), qincb(), qlgam(); double incbi(); externdouble MACHEP;
int qincbi( a, b, yy, ans )
QELT a[], b[], yy[], ans[];
{ int dir;
/* Estimate starting value by double precision routine. */
qtoe( a, dz.s );
da = dz.d;
qtoe( b, dz.s );
db = dz.d;
qtoe( yy, dz.s );
dy = dz.d;
dx = incbi( da, db, dy );
dz.d = dx;
etoq( dz.s, xx );
while( qcmp( y, yy ) <= 0 )
{
t[1] += 1;
qadd( t, qone, u );
qmul( xx, u, u ); if( qcmp (u, qone) >= 0 )
{
qmov( qone, xh );
qmov( qone, yh ); goto iterate;
}
qincb( a, b, u, y );
}
qmov( u, xh );
qmov( y, yh ); goto iterate;
findlow:
while( qcmp( y, yy ) >= 0 )
{
t[1] += 1;
qsub( t, qone, u );
qmul( xx, u, u ); if( qcmp (u, qzero) <= 0 )
{
qmov( qzero, xh );
qmov( qzero, yh ); goto iterate;
}
qincb( a, b, u, y );
}
qmov( u, xl );
qmov( y, yl );
iterate:
qsub( xl, xh, t );
qmul( d, t, t );
qadd( xl, t, xx ); if( qcmp( xx, qone ) >= 0 )
{
qmov( qone, t );
t[1] -= NBITS;
qsub( t, qone, xx );
}
qincb( a, b, xx, y );
if( qcmp( y, yy ) < 0 )
{ /* New lower limit. */
qmov( xx, xl );
qmov( y, yl ); if( dir < 0 )
{
qmov( qhalf, d );
dir = 0;
} elseif( dir > 1 )
{ /* Accelerate toward high limit. */
d[1] -= 1;
qadd( qhalf, d, d );
} else
{ /* New guess at relative location of solution. */
qsub( y, yy, t );
qsub( yl, yh, u );
qdiv( u, t, d );
dir += 1;
}
} else
{ /* New upper limit. */
qmov( xx, xh );
qmov( y, yh ); if( dir > 0 )
{
dir = 0;
qmov( qhalf, d );
} elseif( dir < -1 )
{ /* Accelerate toward low limit. */
d[1] -= 1;
} else
{ /* Guess location of solution. */
qsub( yy, y, t );
qsub( yl, yh, u );
qdiv( u, t, d );
}
dir -= 1;
}
/* Exit test */
qsub( xl, xh, t );
qadd( xl, xh, u ); if( ((int)u[1] - (int) t[1]) > BITSPREC ) goto done;
qsub( y, yy, t ); if( ((int)yy[1] - (int) t[1]) > BITSPREC ) goto done; goto iterate;
done:
qmov( xx, ans ); return0;
}
Messung V0.5 in Prozent
¤ 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.0.15Bemerkung:
(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.