too long float

Albert van der Horst albert at spenarnc.xs4all.nl
Sat Feb 2 11:37:59 EST 2008


In article <slrnfp6ri0.lip.B.Ogryczak at localhost.localdomain>,
Bart Ogryczak  <z-niusow at bart.w-wa.pl> 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

Groetjes Albert


>
>bart
>--
>"PLEASE DO *NOT* EDIT or poldek will hate you." - packages.dir (PLD)
>http://candajon.azorragarse.info/ http://azorragarse.candajon.info/


--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst




More information about the Python-list mailing list