bridge/class-master/depend/pari/src/basemath/polarit3.c
/* return a t_POL (in variable v >= 0) whose coeffs are the coeffs of b,
 * in variable v. This is an incorrect PARI object if initially varn(b) << v.
 * We could return a vector of coeffs, but it is convenient to have degpol()
 * and friends available. Even in that case, it will behave nicely with all
 * functions treating a polynomial as a vector of coeffs (eg poleval).
 * FOR INTERNAL USE! */
return a t_POL (in variable v >= 0) whose coeffs are the coeffs of b,
in variable v. This is an incorrect PARI object if initially varn(b) << v.
We could return a vector of coeffs, but it is convenient to have degpol()
and friends available. Even in that case, it will behave nicely with all
functions treating a polynomial as a vector of coeffs .
FOR INTERNAL USE!
return a t_POL ( in variable v > = 0 ) whose coeffs are the coeffs of b in variable v . This is an incorrect PARI object if initially varn ( b ) << v . We could return a vector of coeffs but it is convenient to have degpol () and friends available . Even in that case it will behave nicely with all functions treating a polynomial as a vector of coeffs . FOR INTERNAL USE!
GEN
swap_vars(GEN b0, long v)
{
  long i, n = RgX_degree(b0, v);
  GEN b, x;
  if (n < 0) return pol_0(v);
  b = cgetg(n+3, t_POL); x = b + 2;
  b[1] = evalsigne(1) | evalvarn(v);
  for (i=0; i<=n; i++) gel(x,i) = polcoef_i(b0, i, v);
  return b;
}
GEN swap_vars ( GEN b0 , long v ) { long i , n = RgX_degree ( b0 , v ) ; GEN b , x ; if ( n < 0 ) return pol_0 ( v ) ; b = cgetg ( n + 3 , t_POL ) ; x = b + 2 ; b [ 1 ] = evalsigne ( 1 ) | evalvarn ( v ) ; for ( i = 0 ; i <= n ; i ++ ) gel ( x , i ) = polcoef_i ( b0 , i , v ) ; return b ; }
return a t_POL (in variable v >= 0) whose coeffs are the coeffs of b,
 in variable v. This is an incorrect PARI object if initially varn(b) << v.
 We could return a vector of coeffs, but it is convenient to have degpol()
 and friends available.
return a t_POL ( in variable v > = 0 ) whose coeffs are the coeffs of b in variable v . This is an incorrect PARI object if initially varn ( b ) << v . We could return a vector of coeffs but it is convenient to have degpol () and friends available .