Can anyone explain why the following Ruby routine gives me a 2.0 as a result? I think rounding the floats is the root of the error.
puts(999_999_999_999_999_9.0 - 999_999_999_999_999_8.0);
= 2.0
The same error?
puts(999_999_999_999_999_3.0 - 999_999_999_999_999_2.0);
= 0.0
I'm running Ruby 1.9.3p448 (2013-06-27) [i386-mingw32].