bridge/class-master/depend/pari/src/basemath/F2x.c
/* shift polynomial + gerepile */
/* Do not set evalvarn. Cf Flx_shiftip */
shift polynomial + gerepile
Do not set evalvarn.
shift polynomial + gerepile Do not set evalvarn .
static GEN
F2x_shiftip(pari_sp av, GEN x, long v)
{
  long i, lx = lg(x), ly;
  GEN y;
  if (!v || lx==2) return gerepileuptoleaf(av, x);
  ly = lx + v;
  (void)new_chunk(ly); 
  x += lx; y = (GEN)av;
  for (i = 2; i<lx; i++) *--y = *--x;
  for (i = 0; i< v; i++) *--y = 0;
  y -= 2; y[0] = evaltyp(t_VECSMALL) | evallg(ly);
  avma = (pari_sp)y; return y;
}
static GEN F2x_shiftip ( pari_sp av , GEN x , long v ) { long i , lx = lg ( x ) , ly ; GEN y ; if ( ! v || lx == 2 ) return gerepileuptoleaf ( av , x ) ; ly = lx + v ; ( void ) new_chunk ( ly ) ; x += lx ; y = ( GEN ) av ; for ( i = 2 ; i < lx ; i ++ ) * -- y = * -- x ; for ( i = 0 ; i < v ; i ++ ) * -- y = 0 ; y -= 2 ; y [ 0 ] = evaltyp ( t_VECSMALL ) | evallg ( ly ) ; avma = ( pari_sp ) y ; return y ; }
shift polynomial + gerepile
Do not set evalvarn.
shift polynomial + gerepile Do not set evalvarn .
/* check that result fits */