bridge/class-master/depend/pari/src/basemath/bibli1.c
/********************************************************************/
/**                                                                **/
/**                    COPPERSMITH ALGORITHM                       **/
/**           Finding small roots of univariate equations.         **/
/**                                                                **/
/********************************************************************/
COPPERSMITH ALGORITHM
Finding small roots of univariate equations.
COPPERSMITH ALGORITHM Finding small roots of univariate equations .
static int
check_condition(double beta, double tau, double rho, long d, long delta, long t)
{
  long dim = d*delta + t;
  double cond = d*delta*(delta+1)/2 - beta*delta*dim
    + rho*delta*(delta - 1) / 2
    + rho * t * delta + tau*dim*(dim - 1)/2;
  if (DEBUGLEVEL >= 4)
    err_printf("delta = %d, t = %d, cond = %.1lf\n", delta, t, cond);
  return (cond <= 0);
}
static int check_condition ( double beta , double tau , double rho , long d , long delta , long t ) { long dim = d * delta + t ; double cond = d * delta * ( delta + 1 ) / 2 - beta * delta * dim + rho * delta * ( delta - 1 ) / 2 + rho * t * delta + tau * dim * ( dim - 1 ) / 2 ; if ( DEBUGLEVEL >= 4 ) err_printf ( " \n " , delta , t , cond ) ; return ( cond <= 0 ) ; }
COPPERSMITH ALGORITHM
Finding small roots of univariate equations.
COPPERSMITH ALGORITHM Finding small roots of univariate equations .