123.4+2=125.40000000000001

Peter Koppatz pkop at brb.midat.de
Wed Jun 21 07:12:13 EDT 2000


>>> 123.4+2
125.40000000000001   # is this OK?
>>> print 123.4+2
125.4
>>>

On my calculator: 123.4+2 = 125.4 !?
I am using Python 1.6a2

Peter





More information about the Python-list mailing list