From: Michael Neumann Date: 2004-05-13T02:24:04+09:00 Subject: Re: Major Addition Bug? On Thu, May 13, 2004 at 02:07:52AM +0900, Sean O'Dell wrote: > On Wednesday 12 May 2004 09:53, ts wrote: > > >>>>> "S" == Sean O'Dell writes: > > > > S> raise "false" if ((625.91 + 900.00 + 22.00) != 1547.91) > > > > Well, this is well known > > Well known? I had no idea this bug existed until I wrote a line of code that > double-checked the arithmetic from a different app. I have code all over > doing simple arithmetic like this. Ruby can't add 3 simple numbers? I don't > mean to be disproportionately negative, but that shakes my faith more than a > little. It's just simple arithmetic. How old is this bug? When is it > getting fixed? Try the same in Python. It's the same. In Ruby you can use BigDecimal: require 'bigdecimal' BigDecimal.new("625.91") + 900 + 22 == BigDecimal.new("1547.91") # => true Regards, Michael