bridge/class-master/depend/pari/src/basemath/base2.c
/* E and F cannot decrease; return 1 if O = Zp[phi], 2 if we can get a
 * decomposition and 0 otherwise */
E and F cannot decrease; return 1 if O = Zp[phi], 2 if we can get a
decomposition and 0 otherwise
E and F cannot decrease ; return 1 if O = Zp [ phi ] 2 if we can get a decomposition and 0 otherwise
static long
progress(decomp_t *S, GEN *ppa, long *pE)
{
  long E = *pE, F;
  GEN pa = *ppa;
  S->phi0 = NULL; 
  for(;;)
  {
    long l, La, Ea; 
    GEN pia  = getprime(S, NULL, S->chi, S->nu, &La, &Ea, E,0);
    if (pia) { 
      pa = (typ(pia) == t_POL)? RgX_RgXQ_eval(pia, S->phi, S->f): pia;
      E = Ea;
      if (La == 1) break; 
    }
    S->phi = typ(pa) == t_INT? RgX_Rg_add_shallow(S->phi, pa)
                             : RgX_add(S->phi, pa);
    S->chi = mycaract(S, S->f, S->phi, S->psf, S->pdf);
    S->nu = get_nu(S->chi, S->p, &l);
    if (l > 1) return 2;
    if (!update_phi(S)) return 1; 
    if (pia) break;
  }
  *pE = E; *ppa = pa; F = degpol(S->nu);
  if (DEBUGLEVEL>4) err_printf("  (E, F) = (%ld,%ld)\n", E, F);
  if (E * F == degpol(S->f)) return 1;
  if (loop(S, E)) return 2;
  if (!update_phi(S)) return 1;
  return 0;
}
static long progress ( decomp_t * S , GEN * ppa , long * pE ) { long E = * pE , F ; GEN pa = * ppa ; S -> phi0 = NULL ; for ( ; ; ) { long l , La , Ea ; GEN pia = getprime ( S , NULL , S -> chi , S -> nu , & La , & Ea , E , 0 ) ; if ( pia ) { pa = ( typ ( pia ) == t_POL ) ? RgX_RgXQ_eval ( pia , S -> phi , S -> f ) : pia ; E = Ea ; if ( La == 1 ) break ; } S -> phi = typ ( pa ) == t_INT ? RgX_Rg_add_shallow ( S -> phi , pa ) : RgX_add ( S -> phi , pa ) ; S -> chi = mycaract ( S , S -> f , S -> phi , S -> psf , S -> pdf ) ; S -> nu = get_nu ( S -> chi , S -> p , & l ) ; if ( l > 1 ) return 2 ; if ( ! update_phi ( S ) ) return 1 ; if ( pia ) break ; } * pE = E ; * ppa = pa ; F = degpol ( S -> nu ) ; if ( DEBUGLEVEL > 4 ) err_printf ( " \n " , E , F ) ; if ( E * F == degpol ( S -> f ) ) return 1 ; if ( loop ( S , E ) ) return 2 ; if ( ! update_phi ( S ) ) return 1 ; return 0 ; }
E and F cannot decrease; return 1 if O = Zp[phi], 2 if we can get a
 decomposition and 0 otherwise
E and F cannot decrease ; return 1 if O = Zp [ phi ] 2 if we can get a decomposition and 0 otherwise
/* no delayed composition */ /* N.B If E = 0, getprime cannot return NULL */ /* success, we break out in THIS loop */ /* no need to change phi so that nu = pia */ /* phi += prime elt */ /* recompute char. poly. chi from scratch */ /* unramified */