This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: .1 + .2 == .3 should be True
Type: behavior Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Rodrigo Souto, eric.smith
Priority: normal Keywords:

Created on 2015-10-07 12:58 by Rodrigo Souto, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg252470 - (view) Author: Rodrigo Souto (Rodrigo Souto) Date: 2015-10-07 12:58
print(.1 + .2 == .3)  should be True like the others

>>> print(.1 + .2 == .3)
False
>>> print(.1 + .3 == .4)
True
>>> print(.1 + .4 == .5)
True
>>> print(.1 + .1 == .2)
True
msg252471 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-10-07 13:05
This is not a bug. See: https://docs.python.org/3.5/tutorial/floatingpoint.html
History
Date User Action Args
2022-04-11 14:58:22adminsetgithub: 69520
2015-10-07 13:05:36eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg252471

resolution: not a bug
stage: resolved
2015-10-07 12:58:52Rodrigo Soutocreate