[squeak-dev] Some strange behavior

Lawson English lenglish5 at cox.net
Fri Oct 29 00:57:28 UTC 2010


On 10/28/10 2:46 PM, Mateusz Grotek wrote:
>> The fact that Squeak prints 6 * 0.2 as 1.2 and not as 1.2000000000000002
>> is a result of the particular algorithm that is being used for printing
>> floats as decimal numbers.
>>
>> Cheers,
>> Hans-Martin
>>
>>
> Yes, that was something I wondered. Thanks.
>
>
The moral is: don't use floating point math to do accounting...


Lawson



More information about the Squeak-dev mailing list