bridge/class-master/depend/pari/src/basemath/FpX_factor.c
/* Generic driver to computes the roots of f modulo pp, using 'Roots' when
 * pp is a small prime.
 * if (gpwrap), check types thoroughly and return t_INTMODs, otherwise
 * assume that f is an FpX, pp a prime and return t_INTs */
Generic driver to computes the roots of f modulo pp, using 'Roots' when
pp is a small prime.
if (gpwrap), check types thoroughly and return t_INTMODs, otherwise
assume that f is an FpX, pp a prime and return t_INTs
Generic driver to computes the roots of f modulo pp using ' Roots ' when pp is a small prime . if ( gpwrap ) check types thoroughly and return t_INTMODs otherwise assume that f is an FpX pp a prime and return t_INTs
static GEN
rootmod_aux(GEN f, GEN pp)
{
  GEN y;
  switch(lg(f))
  {
    case 2: pari_err_ROOTS0("rootmod");
    case 3: return cgetg(1,t_COL);
  }
  if (typ(f) == t_VECSMALL)
  {
    ulong p = pp[2];
    if (p == 2)
      y = Flx_root_mod_2(f);
    else
    {
      if (!odd(p)) pari_err_PRIME("rootmod",utoi(p));
      y = Flx_roots_i(f, p);
    }
    y = Flc_to_ZC(y);
  }
  else
    y = FpX_roots_i(f, pp);
  return y;
}
static GEN rootmod_aux ( GEN f , GEN pp ) { GEN y ; switch ( lg ( f ) ) { case 2 : pari_err_ROOTS0 ( " " ) ; case 3 : return cgetg ( 1 , t_COL ) ; } if ( typ ( f ) == t_VECSMALL ) { ulong p = pp [ 2 ] ; if ( p == 2 ) y = Flx_root_mod_2 ( f ) ; else { if ( ! odd ( p ) ) pari_err_PRIME ( " " , utoi ( p ) ) ; y = Flx_roots_i ( f , p ) ; } y = Flc_to_ZC ( y ) ; } else y = FpX_roots_i ( f , pp ) ; return y ; }
Generic driver to computes the roots of f modulo pp, using 'Roots' when
 pp is a small prime.
Generic driver to computes the roots of f modulo pp using ' Roots ' when pp is a small prime .