public void testPolynomials() {
Variable x = Numbers.variable("x");
// Logger.dump(new ExpressionParser().parse("2x^2 - 5x"));
// System.exit(1);
// Polynomial a = Polynomial.create(new ExpressionParser().parse("x^3 - 2x^2 - 4"), x);
Polynomial a = Polynomial.create(new ExpressionParser().parse("x^3 - 2*x^2 - 4"), x);
Polynomial b = Polynomial.create(new ExpressionParser().parse("x - 3"), x);
OrderedPair quotient = a.euclideanDivision(b);
System.out.printf("(%s) : (%s) = %s%n", a, b, quotient);
Polynomial q = Polynomial.create(new ExpressionParser().parse("x^2 + x + 3"), x);
Polynomial r = Polynomial.create(N.create(5), x);
assertEquals(quotient, new OrderedPair(q, r));
}