Yep, that's another way.
// then it matches
is just as good as the first example I posted. You'll need to make sure you have the headroom though, if you're comparing floats up to 2147483.647 then you'll be OK, but anything over that and you'll overflow the int which will produce invalid results. You mentioned "a few thousand" so if that's 10,000 then your maximum float values can be 214748.3647, which is less than a quarter million.