Arithmetic with Polynomials and Rational Functions (APR)