[Python-bugs-list] [ python-Bugs-422203 ] math.sqrt() broken on parisc-linux
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 11 May 2001 13:03:01 -0700
Bugs item #422203, was updated on 2001-05-07 22:15
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=422203&group_id=5470
Category: Extension Modules
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: dann frazier (dannf)
Assigned to: Tim Peters (tim_one)
Summary: math.sqrt() broken on parisc-linux
Initial Comment:
python 2.0
Debian GNU/Linux on PA-RISC
package: python2-base_2.0-7
for any integer x, math.sqrt(x.0) seems to equal 0.0
----
sebadoh:/tmp# python2
Python 2.0 (#0, Apr 27 2001, 03:16:35)
[GCC 3.0 20010315 (prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.
>>> import math
>>> math.sqrt(2.0)
0.0
>>> math.sqrt(2)
1.4142135623730951
----
the C equivalent (math.h) reports the correct answer.
sebadoh:/tmp# uname -a
Linux sebadoh 2.4.0 #1 Mon May 7 12:41:27 MDT 2001
parisc unknown
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-05-11 13:03
Message:
Logged In: YES
user_id=31435
If we don't get more info here soon, I'm going to just
close this.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-05-07 22:27
Message:
Logged In: YES
user_id=31435
Try recompiling with optimization off? Python is written
in C, and calls the same libm sqrt function you call when
you write a C program. It's very straightforward. Nobody
else has reported this problem, so there's something unique
about your platform, and a buggy compiler is always the
first guess when that occurs.
Also try a current version of Python (2.1 is current; 2.0
is no longer supported officially, although a volunteer may
produce a bugfix release for it).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=422203&group_id=5470