[Python-bugs-list] [ python-Bugs-808285 ] Bad float->long
conversion on openbsd/sparc
SourceForge.net
noreply at sourceforge.net
Sun Sep 21 16:22:37 EDT 2003
Bugs item #808285, was opened at 2003-09-17 18:30
Message generated for change (Comment added) made by bescoto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=808285&group_id=5470
Category: Python Interpreter Core
Group: 3rd Party
Status: Closed
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: Ben Escoto (bescoto)
Date: 2003-09-21 13:22
Message:
Logged In: YES
user_id=218965
Yes, you are right, upgrading to GCC 3.2.2 fixes the problem.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-09-18 13:59
Message:
Logged In: YES
user_id=21627
That depends on the exact way how the compiler is installed.
Ask your system vendor. Reading the manual page might also help.
Closing as third-party.
----------------------------------------------------------------------
Comment By: Ben Escoto (bescoto)
Date: 2003-09-18 13:22
Message:
Logged In: YES
user_id=218965
Ahh. Probably a stupid question, but how do I recompile as
32 bit?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-09-18 12: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 12: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 12:02
Message:
Logged In: YES
user_id=21627
What is the output of "file python"?
----------------------------------------------------------------------
Comment By: Ben Escoto (bescoto)
Date: 2003-09-18 11: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 11: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