I'm doing a simple subtraction between 2 decimals in ruby, but am getting a suprisingly odd result. If I run the following in IRB, I would have expected to get 0.011. I realize I can do (0.942 - 0.931).round(3) to get the answer I'm expecting, but am wondering why ruby returns the result it does.
1.9.3-p551 :004 > (0.942 - 0.931)
=> 0.010999999999999899