From: Paolo Bonzini Date: 2008-02-09T02:04:56+09:00 Subject: Re: BigDecimal.new('15.25') == 15.25, false ?? > Seems like a finite number of bits to me ;-) However, the > construction of 15.25 as a literal is likely something roughly (1*10^1 > + 5*10^0) + (2*10^-1 + 5*10^-2) and those intermediate fractional > terms are problematic. It can be computed as (1*10^3 + 5*10^2 + 2*10^1 + 5*10^0) / 10^2 to avoid those terms. I could bet that's the bug. Note that x / 10^2 is *not* the same as x * 10^-2; division is more precise because it does not need an infinite number of bits to represent the divisor. Paolo, who's relieved to see other people making the same mistakes as him