Why convert to to float and then compare to an integer? How does `to_f` handle `1.2.3`?