bridge/class-master/depend/pari/src/basemath/polarit2.c
/*******************************************************************/
/*                                                                 */
/*                         GENERIC GCD                             */
/*                                                                 */
/*******************************************************************/
/* x is a COMPLEX or a QUAD */
GENERIC GCD

x is a COMPLEX or a QUAD
GENERIC GCD x is a COMPLEX or a QUAD
static GEN
triv_cont_gcd(GEN x, GEN y)
{
  pari_sp av = avma;
  GEN c;
  if (typ(x)==t_COMPLEX)
  {
    GEN a = gel(x,1), b = gel(x,2);
    if (typ(a) == t_REAL || typ(b) == t_REAL) return gen_1;
    c = ggcd(a,b);
  }
  else
    c = ggcd(gel(x,2),gel(x,3));
  return gerepileupto(av, ggcd(c,y));
}
static GEN triv_cont_gcd ( GEN x , GEN y ) { pari_sp av = avma ; GEN c ; if ( typ ( x ) == t_COMPLEX ) { GEN a = gel ( x , 1 ) , b = gel ( x , 2 ) ; if ( typ ( a ) == t_REAL || typ ( b ) == t_REAL ) return gen_1 ; c = ggcd ( a , b ) ; } else c = ggcd ( gel ( x , 2 ) , gel ( x , 3 ) ) ; return gerepileupto ( av , ggcd ( c , y ) ) ; }
GENERIC GCD
GENERIC GCD