Identifying numbers as rational or irrational