bridge/class-master/depend/pari/src/basemath/polarit2.c
/* x monomial, y t_POL in the same variable */
x monomial, y t_POL in the same variable
x monomial y t_POL in the same variable
static GEN
gcdmonome(GEN x, GEN y)
{
  pari_sp av = avma;
  long dx = degpol(x), e = RgX_valrem(y, &y);
  long i, l = lg(y);
  GEN t, v = cgetg(l, t_VEC);
  gel(v,1) = gel(x,dx+2);
  for (i = 2; i < l; i++) gel(v,i) = gel(y,i);
  t = content(v); 
  t = simplify_shallow(t);
  if (dx < e) e = dx;
  return gerepileupto(av, monomialcopy(t, e, varn(x)));
}
static GEN gcdmonome ( GEN x , GEN y ) { pari_sp av = avma ; long dx = degpol ( x ) , e = RgX_valrem ( y , & y ) ; long i , l = lg ( y ) ; GEN t , v = cgetg ( l , t_VEC ) ; gel ( v , 1 ) = gel ( x , dx + 2 ) ; for ( i = 2 ; i < l ; i ++ ) gel ( v , i ) = gel ( y , i ) ; t = content ( v ) ; t = simplify_shallow ( t ) ; if ( dx < e ) e = dx ; return gerepileupto ( av , monomialcopy ( t , e , varn ( x ) ) ) ; }
x monomial, y t_POL in the same variable
x monomial y t_POL in the same variable
/* gcd(lc(x), cont(y)) */