ratio equality should be compared as float,not int