[Python-bugs-list] [Bug #124791] math.modf, math.floor, math.ceil give misleading result

noreply@sourceforge.net noreply@sourceforge.net
Wed, 6 Dec 2000 17:04:12 -0800


Bug #124791, was updated on 2000-Dec-06 17:04
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: Nobody
Assigned to : Nobody
Summary: math.modf, math.floor, math.ceil give misleading result

Details: c=64
e=1.0/3.0
x=pow(c,e)        We are calculating the cube root of 64
x
4.0                   ...which is 4
math.modf(x)
(1.0,3.0)           This is misleading.  Should be (0.0,4.0) 
This happens in version 1.5.2 on my 486.  

Note the following
y=4.0
math.modf(y)
(0.0,4.0)           All as it should be.

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=124791&group_id=5470