bridge/class-master/depend/pari/src/modules/krasner.c
/* return pol*ipi/p (mod top, pp) if it has integral coefficient, NULL
   otherwise. The result is reduced mod top, pp */
return pol*ipi/p (mod top, pp) if it has integral coefficient, NULL
otherwise. The result is reduced mod top, pp
return pol * ipi / p ( mod top pp ) if it has integral coefficient NULL otherwise . The result is reduced mod top pp
static GEN
DivideByPi(FAD_t *fdata, GEN pp, GEN ppp, GEN pol)
{
  GEN P;
  long i, l;
  pari_sp av = avma;
  if (!signe(pol)) return pol;
  P = Fq_mul(pol, fdata->ipi, fdata->top, ppp); 
  l  = lg(P);
  for (i = 2; i < l; i++)
  {
    GEN r;
    gel(P,i) = dvmdii(gel(P,i), fdata->p, &r);
    if (r != gen_0) { avma = av; return NULL; }
  }
  return FpX_red(P, pp);
}
static GEN DivideByPi ( FAD_t * fdata , GEN pp , GEN ppp , GEN pol ) { GEN P ; long i , l ; pari_sp av = avma ; if ( ! signe ( pol ) ) return pol ; P = Fq_mul ( pol , fdata -> ipi , fdata -> top , ppp ) ; l = lg ( P ) ; for ( i = 2 ; i < l ; i ++ ) { GEN r ; gel ( P , i ) = dvmdii ( gel ( P , i ) , fdata -> p , & r ) ; if ( r != gen_0 ) { avma = av ; return NULL ; } } return FpX_red ( P , pp ) ; }
return pol*ipi/p (mod top, pp) if it has integral coefficient, NULL
otherwise.
return pol * ipi / p ( mod top pp ) if it has integral coefficient NULL otherwise .
/* "pol" is a t_INT or an FpX: signe() works for both */ /* FpX */