Albert van der Horst wrote: > In article <[EMAIL PROTECTED]>, > Bart Ogryczak <[EMAIL PROTECTED]> wrote: >> On 2008-01-18, citizen J. Peng testified: >>> hello, >>> >>> why this happened on my python? >>>>>> a=3.9 >>>>>> a >>> 3.8999999999999999 >>>>> a = 3.9 >>>>> print a >> 3.9 > > This has nothing to do with python. > > Apparently you don't know the first thing about floating point > numbers. I suggest reading the wikipedia entry. > http://en.wikipedia/wiki/floating_point > Don't think you are the first person to make this mistake, by the way. Despite Albert's tone suggesting that *everybody* knows about floating point this is a very common issue among new programmers.
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list