test to see if exp is Rational