bridge/class-master/depend/pari/src/basemath/F2x.c
/* separate from F2x_divrem for maximal speed. */
separate from F2x_divrem for maximal speed.
separate from F2x_divrem for maximal speed .
GEN
F2x_rem(GEN x, GEN y)
{
  long dx,dy;
  long lx=lg(x);
  dy = F2x_degree(y); if (!dy) return pol0_F2x(x[1]);
  dx = F2x_degree_lg(x,lx);
  x  = F2x_copy(x);
  while (dx>=dy)
  {
    F2x_addshiftip(x,y,dx-dy);
    while (lx>2 && x[lx-1]==0) lx--;
    dx = F2x_degree_lg(x,lx);
  }
  return F2x_renormalize(x, lx);
}
GEN F2x_rem ( GEN x , GEN y ) { long dx , dy ; long lx = lg ( x ) ; dy = F2x_degree ( y ) ; if ( ! dy ) return pol0_F2x ( x [ 1 ] ) ; dx = F2x_degree_lg ( x , lx ) ; x = F2x_copy ( x ) ; while ( dx >= dy ) { F2x_addshiftip ( x , y , dx - dy ) ; while ( lx > 2 && x [ lx - 1 ] == 0 ) lx -- ; dx = F2x_degree_lg ( x , lx ) ; } return F2x_renormalize ( x , lx ) ; }
separate from F2x_divrem for maximal speed.
separate from F2x_divrem for maximal speed .