A
rational number is any number that can be expressed as the
ratio between two integers; i.e. by division or as a fraction. In this case:

Be careful here.

is very close to

(a common approximation for pi) but

does not terminate, it repeats while 3.142857 does terminate. Both are rational but they are not equal.