[issue4061] summing two numbers-strange answer

Benjamin Peterson report at bugs.python.org
Tue Oct 7 04:00:17 CEST 2008


Benjamin Peterson <musiccomposition at gmail.com> added the comment:

On Mon, Oct 6, 2008 at 8:54 PM, Raymond Hettinger
<report at bugs.python.org> wrote:
>
> Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
>
> FWIW, what you're seeing is related to "representation error" not "poor
> precision".  The numbers 2.3, 6.3, and 8.6 cannot be exactly represented
> in binary floating point.  When you think about it, this is no more
> surprising than knowing the fractions 1/3 and 2/3 cannot be exactly
> represented in either decimal or binary floating point.

Please excuse my poor terminology!

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


More information about the Python-bugs-list mailing list