code: func removeBigIntFactors(d, factor *big.Int) (result *big.Int, times int32) {
  	q := big.NewInt(0)
  	m := big.NewInt(0)
  	for d.Cmp(bigZero) != 0 {
  		q.DivMod(d, factor, m)
  		if m.Cmp(bigZero) != 0 {
  			break
  		}
  		times++
  		d, q = q, d
  	}
  	return d, times
  }
docs: // removeBigIntFactors divides in a loop; the return values have the property that
  // d == result * factor ^ times
  // d may be modified in place.
  // If d == 0, then the return values will be (0, 0)