Oh, definitely, if refactoring it to simplify will work, I'd do that, too. I just wanted to explain why floating point can be weird (since the question was asked by the OP), and how to get around / take advantage of the weirdness.

Knowledge is power.