123.3 + 0.1 is 123.3999999999 ?

Grant Edwards grante at visi.com
Tue Jun 3 00:02:36 EDT 2003


In article <3EDC1074.CA05EC23 at alcyone.com>, Erik Max Francis wrote:
> Grant Edwards wrote:
> 
>> In article <895e4ce2.0306021736.13c657a5 at posting.google.com>, D.W.
>> wrote:
>> 
>> > Good article.  It is correct when it says that this happens in any
>> > language.  I always thought it was common knowledge among
>> > programmers
>> > that "1" could be stored as 0.99999999999999999...
>> 
>> Wha?   I defy you to find a system where 1 isn't stored exactly.
> 
> I suspect he's being facetious, since 0.999... = 1.

Right.  But it's never _stored_ as an infinite number of nines.  Nor could
it be.

-- 
Grant Edwards                   grante             Yow!  Clear the
                                  at               laundromat!! This
                               visi.com            whirl-o-matic just had a
                                                   nuclear meltdown!!




More information about the Python-list mailing list