[Python-bugs-list] [Bug #117484] Float operations/assignments in Python 2.0
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 13 Nov 2000 21:25:09 -0800
Bug #117484, was updated on 2000-Oct-23 03:55
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Closed
Resolution: Wont Fix
Bug Group: Not a Bug
Priority: 5
Summary: Float operations/assignments in Python 2.0
Details: Platform : WinNT 4.0 SP 5
go the interpreter window
>>> x = 5.14
>>> x
5.139998
Could u please explain whats happening?
Wanted to use Python2.0 for test drivers for a financial package?
What do I do?
Thanks,
Kalyan.
Follow-Ups:
Date: 2000-Oct-23 06:34
By: jhylton
Comment:
This isn't a bug; it's the way floating point numbers work in nearly every language and on nearly every platform.
http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=607818947
-------------------------------------------------------
Date: 2000-Nov-13 21:25
By: tim_one
Comment:
Actually, if the bug report is accurate, it *is* a bug: 5.139998 isn't close enough to 5.14. When I try it I get:
>>> x = 5.14
>>> x
5.1399999999999997
>>>
which is reasonable. In the absence of more info, though, I assume the bug report is wrong -- leaving it closed.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=117484&group_id=5470