Using ruby version 2.0.0p247 or 1.9.3p286
In irb console
9.99 * 100 = 999.0
and
29.99 * 100 = 2999.0
but
19.99 * 100 = 1998.9999999999998
Can anyone explain what is going on here? I get that it could be a bug in ruby core but surely the logic is the same for the above 3 calculations?