bridge/class-master/depend/pari/src/modules/krasner.c
/* Compute roots of pol in the residue field. Use table look-up if possible */
Compute roots of pol in the residue field. Use table look-up if possible
Compute roots of pol in the residue field . Use table look - up if possible
static GEN
Quick_FqX_roots(KRASNER_t *data, GEN pol)
{
  GEN rts;
  ulong ind = 0;
  if (data->f == 1)
    pol = FpXY_evalx(pol, gen_0, data->p);
  else
    pol = FqX_red(pol, data->T, data->p);
  if (data->roottable)
  {
    ind = ZXY_z_eval(pol, data->q[2], data->p[2]);
    if (gel(data->roottable, ind)) return gel(data->roottable, ind);
  }
  rts = FqX_roots(pol, data->T, data->p);
  if (ind) gel(data->roottable, ind) = gclone(rts);
  return rts;
}
static GEN Quick_FqX_roots ( KRASNER_t * data , GEN pol ) { GEN rts ; ulong ind = 0 ; if ( data -> f == 1 ) pol = FpXY_evalx ( pol , gen_0 , data -> p ) ; else pol = FqX_red ( pol , data -> T , data -> p ) ; if ( data -> roottable ) { ind = ZXY_z_eval ( pol , data -> q [ 2 ] , data -> p [ 2 ] ) ; if ( gel ( data -> roottable , ind ) ) return gel ( data -> roottable , ind ) ; } rts = FqX_roots ( pol , data -> T , data -> p ) ; if ( ind ) gel ( data -> roottable , ind ) = gclone ( rts ) ; return rts ; }
Compute roots of pol in the residue field.
Compute roots of pol in the residue field .