Tailrec optimized PolynomialRing a bit