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.

Title: Floating-point arithmetic
Type: Stage: resolved
Components: Versions: Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: abarry, goodbad
Priority: normal Keywords:

Created on 2016-02-05 02:54 by goodbad, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg259622 - (view) Author: good.bad (goodbad) Date: 2016-02-05 02:54
print(1 - 0.8)
print(1 - 0.2)

why not 0.2?
msg259623 - (view) Author: Anilyka Barry (abarry) * (Python triager) Date: 2016-02-05 03:00
This is due to how floating point numbers are handled under the hood. See and for some useful read about why Python behaves like this regarding floating point numbers. Both these link state that this isn't a bug in Python, rightly so as it isn't.
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70479
2016-02-05 03:00:43abarrysetstatus: open -> closed

nosy: + abarry
messages: + msg259623

resolution: not a bug
stage: resolved
2016-02-05 02:54:53goodbadcreate