New submission from Michał Jan Warecki:

This should speak for itself:

>>> 3*4.35
13.049999999999999
>>> 

The error is reproducible, and applies to all decimal numbers ending with 
\.[0-9]5, and \.[0-4] as well as \.[6-9], when multiplied by 3. Examples:

>>> 3*4.1
12.299999999999999
>>> 3*4.4
13.200000000000001
>>> 3*4.6
13.799999999999999
>>> 3*4.8
14.399999999999999
>>> 3*4.9
14.700000000000001
>>> 4*3.1
12.4
>>> 4*4.1
16.4
>>> 3*4.1
12.299999999999999
>>> 6*4.1
24.599999999999998
>>> 6*4.4
26.400000000000002
>>>

----------
components: Macintosh
messages: 252828
nosy: Michał Jan Warecki, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Roundoff error on OS X
type: behavior
versions: Python 2.7, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25378>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to