bridge/class-master/depend/pari/src/basemath/base2.c
/* flag != 0 iff we're looking for the p-adic factorization,
   in which case it is the p-adic precision we want */
flag != 0 iff we're looking for the p-adic factorization,
in which case it is the p-adic precision we want
flag ! = 0 iff we ' re looking for the p - adic factorization in which case it is the p - adic precision we want
static GEN
maxord_i(decomp_t *S, GEN p, GEN f, long mf, GEN w, long flag)
{
  long oE, n = lg(w)-1; 
  GEN opa, D = ZpX_reduced_resultant_fast(f, ZX_deriv(f), p, mf);
  S->pisprime = -1;
  S->p = p;
  S->mf = mf;
  S->nu = gel(w,n);
  S->df = Z_pval(D, p);
  S->pdf = powiu(p, S->df);
  S->phi = pol_x(varn(f));
  S->chi = S->f = f;
  if (n > 1) return Decomp(S, flag); 
  if (DEBUGLEVEL>4)
    err_printf("  entering Nilord: %Ps^%ld\n  f = %Ps, nu = %Ps\n",
               p, S->df, S->f, S->nu);
  else if (DEBUGLEVEL>2) err_printf("  entering Nilord\n");
  S->psf = S->psc = mulii(sqri(D), p);
  S->vpsf = S->vpsc = 2*S->df + 1;
  S->prc = mulii(D, p);
  S->chi = FpX_red(S->f, S->psc);
  S->pmf = powiu(p, S->mf+1);
  S->precns = NULL;
  for(opa = NULL, oE = 0;;)
  {
    long n = progress(S, &opa, &oE);
    if (n == 1) return flag? NULL: dbasis(p, S->f, S->mf, S->phi, S->chi);
    if (n == 2) return Decomp(S, flag);
  }
}
static GEN maxord_i ( decomp_t * S , GEN p , GEN f , long mf , GEN w , long flag ) { long oE , n = lg ( w ) - 1 ; GEN opa , D = ZpX_reduced_resultant_fast ( f , ZX_deriv ( f ) , p , mf ) ; S -> pisprime = -1 ; S -> p = p ; S -> mf = mf ; S -> nu = gel ( w , n ) ; S -> df = Z_pval ( D , p ) ; S -> pdf = powiu ( p , S -> df ) ; S -> phi = pol_x ( varn ( f ) ) ; S -> chi = S -> f = f ; if ( n > 1 ) return Decomp ( S , flag ) ; if ( DEBUGLEVEL > 4 ) err_printf ( " \n \n " , p , S -> df , S -> f , S -> nu ) ; else if ( DEBUGLEVEL > 2 ) err_printf ( " \n " ) ; S -> psf = S -> psc = mulii ( sqri ( D ) , p ) ; S -> vpsf = S -> vpsc = 2 * S -> df + 1 ; S -> prc = mulii ( D , p ) ; S -> chi = FpX_red ( S -> f , S -> psc ) ; S -> pmf = powiu ( p , S -> mf + 1 ) ; S -> precns = NULL ; for ( opa = NULL , oE = 0 ; ; ) { long n = progress ( S , & opa , & oE ) ; if ( n == 1 ) return flag ? NULL : dbasis ( p , S -> f , S -> mf , S -> phi , S -> chi ) ; if ( n == 2 ) return Decomp ( S , flag ) ; } }
flag != 0 iff we're looking for the p-adic factorization,
in which case it is the p-adic precision we want
flag ! = 0 iff we ' re looking for the p - adic factorization in which case it is the p - adic precision we want
/* factor of largest degree */ /* FIXME: use bezout_lift_fact */