Replaced the naive floating-point comparison test

The magnitude of the numbers is now taken into consideration (the previous comparison test fails for values with large exponents and for small values close to zero).

Note:
 * There are no checks made for overflow by division
 * The tolerance level is still arbitrarily chosen (0.005f)