[Python-bugs-list] [Bug #127072] log, exp & sqrt (math) function innaccuracies
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 30 Dec 2000 18:16:15 -0800
Bug #127072, was updated on 2000-Dec-29 05:50
Here is a current snapshot of the bug.
Project: Python
Category: Extension Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: salmoni
Assigned to : tim_one
Summary: log, exp & sqrt (math) function innaccuracies
Details: Perform:
y = int(math.exp(math.log(math.sqrt(2) * math.sqrt(2))))
nb,
exp(log(x)) = x
sqrt(x) * sqrt(x) = x
This produces 0 when the answer should be 1 - the floating point number is
0.99999999999999956 but it should be 1.0
This was reproduced on Windows (95) and Linux (RedHat 6.0) both using
Python 2.0.
Alan James Salmoni
Follow-Ups:
Date: 2000-Dec-30 18:16
By: fdrake
Comment:
Tim's the math guy, so this is his.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=127072&group_id=5470