Sean O'Rourke wrote: > ... all it buys you is a few bits of precision when your ints > and floats are both 64-bit, and slower comparisons all the time. > IMHO it's a wash, so I did it this way.
I would point out that integers have infinite precision. More than a few bits' difference, I'd say. But you're right. As long as the conversion from int to float is done just before the comparison -- i.e. no intervening floating-point ops on the numbers -- then the result of comparison should always be right, no precision issue. (I'm just talking about in the int-vs-int case.) So, never mind. :-) -- JohnDouglasPorter __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com