code: func polyDiv(p, q int) int {
  	np := nbit(p)
  	nq := nbit(q)
  	for ; np >= nq; np-- {
  		if p&(1<<(np-1)) != 0 {
  			p ^= q << (np - nq)
  		}
  	}
  	return p
  }
docs: // polyDiv divides the polynomial p by q and returns the remainder.