I’m just starting out with the Ruby language, and appear to either be
doing something wrong, or have run into a rather basic math bug. When
running “irb”, simple math additions seem to sometimes have weird
results. for instance.
1.9.3-p125 :022 > 120.02+82
1.9.3-p125 :023 > 120.03+82
This anomoly seems to be repeatable on a friends box as well. At first,
I was only able to trigger this with a 3 digit number starting with a 1,
with .08 after, plus a 2 digit number. However, checked a few other
combinations have also had this kind of issue.
Now since I’m quite new to this, I realize that this could of course be
something I’m doing wrong, but obviously, since I’m tyring to learn, I’d
like to know why I’m getting these results. Thanks in advance guys.