New submission from Zbyszek Szmek <zbys...@in.waw.pl>:

http://docs.python.org/dev/faq/design.html#why-are-floating-point-calculations-so-inaccurate

This whole paragraph is wrong since #9337 (Make float.__str__ behave 
identically to float.__repr__).
"""
The str() function prints fewer digits and this often results in the more 
sensible number that was probably intended:
>>> 1.1 - 0.9
0.20000000000000007
>>> print(1.1 - 0.9)
0.2
"""

Applies from 3.2 onwards.

----------
assignee: docs@python
components: Documentation
messages: 155300
nosy: docs@python, zbysz
priority: normal
severity: normal
status: open
title: float rounding examples in FAQ are outdated
versions: Python 3.2, Python 3.3

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

Reply via email to