[Python-bugs-list] [ python-Bugs-808285 ] Bad float->long
conversion on openbsd/sparc
SourceForge.net
noreply at sourceforge.net
Thu Sep 18 15:21:40 EDT 2003
Bugs item #808285, was opened at 2003-09-18 03:30
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=808285&group_id=5470
Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Escoto (bescoto)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bad float->long conversion on openbsd/sparc
Initial Comment:
$ uname -srvpm
OpenBSD 3.3 GENERIC#0 sparc64 SUNW,UltraSPARC-IIi @ 333
MHz, version 0 FPU
$ ./python
Python 2.3 (#1, Sep 17 2003, 21:15:45)
[GCC 2.95.3 20010125 (prerelease, propolice)] on openbsd3
Type "help", "copyright", "credits" or "license" for
more information.
>>> long(1000.0)
0L
>>> long(1000000.0)
00000L
>>> 32767 < long(1000000.0) < 32768
1
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-09-18 21:21
Message:
Logged In: YES
user_id=21627
I see. It is then pretty certain that you are running into a
compiler bug. Sparc64 floating point just does not work
correctly in gcc 2.95.3. Recompiling Python as a 32-bit
application should fix the problem.
----------------------------------------------------------------------
Comment By: Ben Escoto (bescoto)
Date: 2003-09-18 21:12
Message:
Logged In: YES
user_id=218965
$ file python
python: ELF 64-bit MSB executable, Sparc64, version 1, for
OpenBSD, dynamically linked (uses shared libs), not stripped
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-09-18 21:02
Message:
Logged In: YES
user_id=21627
What is the output of "file python"?
----------------------------------------------------------------------
Comment By: Ben Escoto (bescoto)
Date: 2003-09-18 20:37
Message:
Logged In: YES
user_id=218965
Compiler is gcc 2.95.3. How do I tell if it is a "64-bit
build"?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-09-18 20:07
Message:
Logged In: YES
user_id=21627
Is this with a 64-bit build? If so, which compiler was used?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=808285&group_id=5470
More information about the Python-bugs-list
mailing list