classification
Title: result error for 2/5 and 4/5
Type: crash Stage:
Components: IDLE, Windows Versions: Python 3.0
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, hiweed
Priority: normal Keywords:

Created on 2008-06-23 10:57 by hiweed, last changed 2008-06-23 11:02 by amaury.forgeotdarc. This issue is now closed.

Messages (2)
msg68620 - (view) Author: Hiweed (hiweed) Date: 2008-06-23 10:57
On IDLE 3.0b1 (Windows XP SP3):
 - type 2/5 you'll get 0.40000000000000002 instead of 0.4
 - type 4/5 you'll get 0.80000000000000004 instead of 0.8
msg68621 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-06-23 11:02
This is normal, and due to the floating point representation of numbers.
Please see
http://www.python.org/doc/faq/general/#why-are-floating-point-calculations-so-inaccurate
History
Date User Action Args
2008-06-23 11:02:08amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
messages: + msg68621
nosy: + amaury.forgeotdarc
2008-06-23 10:57:35hiweedcreate