Arithmetic with Polynomials and Rational Expressions