[New-bugs-announce] [issue7912] Error in additon of decimal numbers

James Sparenberg report at bugs.python.org
Thu Feb 11 19:40:17 CET 2010


New submission from James Sparenberg <linuxrebel at gmail.com>:

Python produces rounding errors when adding decimals.

ython 2.6.4 (r264:75706, Dec  7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 13.04 + 158.00
171.03999999999999
>>> 13 +158
171
>>> 13.04 + 158.00
171.03999999999999
>>> 13.04 + 158
171.03999999999999
>>> 13.04 + 0
13.039999999999999
>>> 13.05 + 0
13.050000000000001
>>>

----------
components: None
messages: 99230
nosy: James.Sparenberg
severity: normal
status: open
title: Error in additon of decimal numbers
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7912>
_______________________________________


More information about the New-bugs-announce mailing list