bridge/class-master/depend/pari/src/modules/krasner.c
/* a random element of the finite field */
a random element of the finite field
a random element of the finite field
static GEN
RandomFF(KRASNER_t *data)
{
  long i, l = data->f + 2, p = itou(data->p);
  GEN c = cgetg(l, t_POL);
  c[1] = evalvarn(data->v);
  for (i = 2; i < l; i++) gel(c, i) = utoi(random_Fl(p));
  return ZX_renormalize(c, l);
}
static GEN RandomFF ( KRASNER_t * data ) { long i , l = data -> f + 2 , p = itou ( data -> p ) ; GEN c = cgetg ( l , t_POL ) ; c [ 1 ] = evalvarn ( data -> v ) ; for ( i = 2 ; i < l ; i ++ ) gel ( c , i ) = utoi ( random_Fl ( p ) ) ; return ZX_renormalize ( c , l ) ; }
a random element of the finite field
a random element of the finite field