handling operations between regular numbers and polynomials