bridge/class-master/depend/pari/src/basemath/base2.c
/* minimum extension valuation: L/E */
minimum extension valuation: L/E
minimum extension valuation : L / E
static void
vstar(GEN p,GEN h, long *L, long *E)
{
  long first, j, k, v, w, m = degpol(h);
  first = 1; k = 1; v = 0;
  for (j=1; j<=m; j++)
  {
    GEN c = gel(h, m-j+2);
    if (signe(c))
    {
      w = Z_pval(c,p);
      if (first || w*k < v*j) { v = w; k = j; }
      first = 0;
    }
  }
  w = (long)ugcd(v,k);
  *L = v/w;
  *E = k/w;
}
static void vstar ( GEN p , GEN h , long * L , long * E ) { long first , j , k , v , w , m = degpol ( h ) ; first = 1 ; k = 1 ; v = 0 ; for ( j = 1 ; j <= m ; j ++ ) { GEN c = gel ( h , m - j + 2 ) ; if ( signe ( c ) ) { w = Z_pval ( c , p ) ; if ( first || w * k < v * j ) { v = w ; k = j ; } first = 0 ; } } w = ( long ) ugcd ( v , k ) ; * L = v / w ; * E = k / w ; }
minimum extension valuation: L/E
minimum extension valuation : L / E
/* v/k = min_j ( v_p(h_{m-j}) / j ) */