public Polynomial div(Polynomial poly) { if (!poly.isConstantPoly()) throw new IllegalArgumentException( "Can currently only divide by numbers and not polynomials"); int deg = coeffs.length - 1; Number lcoeffs[] = new Number[deg + 1]; for (int i = 0; i < deg + 1; ++i) lcoeffs[i] = ((HasDivI) baseRing).div(coeffs[i], poly.getCoeff(0)); return valueOf(lcoeffs); }