You said using equivalence for floats that store integers is fine. here is a link: . The point of my example was to show that that is not the case for numbers that are easily stored by an int that's the same size as a float.
I do not recommend using floating point numbers for integer math. I am saying that if you have integers stored in floating point representation, equality comparisons are fine.