bridge/class-master/depend/pari/src/basemath/polarit2.c
/*Assume x is a polynomial and y is not */
Assume x is a polynomial and y is not
Assume x is a polynomial and y is not
static GEN
scalar_bezout(GEN x, GEN y, GEN *U, GEN *V)
{
  long vx = varn(x);
  int xis0 = signe(x)==0, yis0 = gequal0(y);
  if (xis0 && yis0) { *U = *V = pol_0(vx); return pol_0(vx); }
  if (yis0) { *U=pol_1(vx); *V = pol_0(vx); return RgX_copy(x);}
  *U=pol_0(vx); *V= ginv(y); return pol_1(vx);
}
static GEN scalar_bezout ( GEN x , GEN y , GEN * U , GEN * V ) { long vx = varn ( x ) ; int xis0 = signe ( x ) == 0 , yis0 = gequal0 ( y ) ; if ( xis0 && yis0 ) { * U = * V = pol_0 ( vx ) ; return pol_0 ( vx ) ; } if ( yis0 ) { * U = pol_1 ( vx ) ; * V = pol_0 ( vx ) ; return RgX_copy ( x ) ; } * U = pol_0 ( vx ) ; * V = ginv ( y ) ; return pol_1 ( vx ) ; }
Assume x is a polynomial and y is not
Assume x is a polynomial and y is not