bridge/class-master/depend/pari/src/modules/krasner.c
/* Compute the number of conjugates fields of the field given by fdata */
Compute the number of conjugates fields of the field given by fdata
Compute the number of conjugates fields of the field given by fdata
static void
NbConjugateFields(KRASNER_t *data, FAD_t *fdata)
{
  GEN pol = fdata->eis;
  long j, nb;
  pari_sp av = avma;
  if (RgX_is_ZX(pol)) { 
    fdata->cj = data->e / RootCountingAlgorithm(data, fdata, pol, 0);
    avma = av; return;
  }
  nb = 0;
  for (j = 1; j <= data->f; j++)
  { 
    GEN p1 = FqX_FpXQ_eval(pol, fdata->z, fdata->top, data->pr);
    nb += RootCountingAlgorithm(data, fdata, p1, 0);
    if (j < data->f)
      pol = FqX_FpXQ_eval(pol, data->frob, data->T, data->pr);
  }
  avma = av;
  fdata->cj = data->e * data->f / nb;
  return;
}
static void NbConjugateFields ( KRASNER_t * data , FAD_t * fdata ) { GEN pol = fdata -> eis ; long j , nb ; pari_sp av = avma ; if ( RgX_is_ZX ( pol ) ) { fdata -> cj = data -> e / RootCountingAlgorithm ( data , fdata , pol , 0 ) ; avma = av ; return ; } nb = 0 ; for ( j = 1 ; j <= data -> f ; j ++ ) { GEN p1 = FqX_FpXQ_eval ( pol , fdata -> z , fdata -> top , data -> pr ) ; nb += RootCountingAlgorithm ( data , fdata , p1 , 0 ) ; if ( j < data -> f ) pol = FqX_FpXQ_eval ( pol , data -> frob , data -> T , data -> pr ) ; } avma = av ; fdata -> cj = data -> e * data -> f / nb ; return ; }
Compute the number of conjugates fields of the field given by fdata
Compute the number of conjugates fields of the field given by fdata
/* split for efficiency; contains the case f = 1 */ /* Transform to pol. in z to pol. in a */ /* Look at the roots of conjugates polynomials */