bridge/class-master/depend/pari/src/basemath/FpX_factor.c
/* assume Tp a squarefree product of r > 1 irred. factors of degree d */
assume Tp a squarefree product of r > 1 irred. factors of degree d
assume Tp a squarefree product of r > 1 irred . factors of degree d
static void
FpX_edf(GEN Tp, GEN XP, long d, GEN p, GEN V, long idx)
{
  long n = degpol(Tp), r = n/d, vT = varn(Tp), ct = 0;
  GEN T, h, t;
  pari_timer ti;
  T = FpX_get_red(Tp, p);
  XP = FpX_rem(XP, T, p);
  if (DEBUGLEVEL>=7) timer_start(&ti);
  do
  {
    GEN g = random_FpX(n, vT, p);
    t = gel(FpXQ_auttrace(mkvec2(XP, g), d, T, p), 2);
    if (DEBUGLEVEL>=7) timer_printf(&ti,"FpX_edf: FpXQ_auttrace");
    h = FpXQ_minpoly(t, T, p);
    if (DEBUGLEVEL>=7) timer_printf(&ti,"FpX_edf: FpXQ_minpoly");
    if (++ct == 10 && !BPSW_psp(p)) pari_err_PRIME("FpX_edf",p);
  } while (degpol(h) != r);
  FpX_edf_rec(T, h, t, d, shifti(p, -1), p, V, idx);
}
static void FpX_edf ( GEN Tp , GEN XP , long d , GEN p , GEN V , long idx ) { long n = degpol ( Tp ) , r = n / d , vT = varn ( Tp ) , ct = 0 ; GEN T , h , t ; pari_timer ti ; T = FpX_get_red ( Tp , p ) ; XP = FpX_rem ( XP , T , p ) ; if ( DEBUGLEVEL >= 7 ) timer_start ( & ti ) ; do { GEN g = random_FpX ( n , vT , p ) ; t = gel ( FpXQ_auttrace ( mkvec2 ( XP , g ) , d , T , p ) , 2 ) ; if ( DEBUGLEVEL >= 7 ) timer_printf ( & ti , " " ) ; h = FpXQ_minpoly ( t , T , p ) ; if ( DEBUGLEVEL >= 7 ) timer_printf ( & ti , " " ) ; if ( ++ ct == 10 && ! BPSW_psp ( p ) ) pari_err_PRIME ( " " , p ) ; } while ( degpol ( h ) != r ) ; FpX_edf_rec ( T , h , t , d , shifti ( p , -1 ) , p , V , idx ) ; }
assume Tp a squarefree product of r > 1 irred.
assume Tp a squarefree product of r > 1 irred .