From: Matthew Moss Date: 2008-02-08T08:26:03+09:00 Subject: Re: BigDecimal.new('15.25') == 15.25, false ?? On Feb 7, 6:17 pm, Matthew Moss wrote: > > 15.25 in decimal > > is exactly > > 1111.01 in binary > > No it's not. It is 1111.01 in *fixed* point. Floating-point, however, > is significantly different. Okay, I'm half-right and half-wrong. The floating-point rep is different, but "significantly" may be a bit too much. =) If my calculations are correct, 15.25 in binary is: 0 10000010 11101000000000000000000 S exponent mantissa The 11101 at the front of the mantissa is *most* of the fixed point rep. There is an implicit 1. The exponent is biased by +127.