[Python-bugs-list] [ python-Bugs-538361 ] packing double yields garbage
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 02 Apr 2002 10:47:58 -0800
Bugs item #538361, was opened at 2002-04-02 12:54
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=538361&group_id=5470
Category: Python Library
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Carifio (carifio)
Assigned to: Nobody/Anonymous (nobody)
Summary: packing double yields garbage
Initial Comment:
On RH Linux 6.2/alpha (kernal 2.2.14-6.0), egcs-
2.91.66, python 2.2.1c2. I build python
from source and test_struct.py dies with
a floating point exception. I believe I've
found out why:
>>> import struct
>>> s = struct.pack("d", 3.14e20)
>>> struct.unpack("d", s)
(1.69270791053e-307,)
----------------------------------------------------------------------
>Comment By: Mike Carifio (carifio)
Date: 2002-04-02 13:47
Message:
Logged In: YES
user_id=503643
I also tried this on RH7.*/alpha/2.4.something kernel
and gcc 2.95.something and got the same error. Actually,
it started with test_struct.py core dumping. I don't
actually need to pack doubles. I was just being a good
doobie.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2002-04-02 13:33
Message:
Logged In: YES
user_id=6656
Hmm, that looks broke.
However, I don't see this behaviour on sf's compile farm with
221c1; I'm building 221c2 now, but I'd be amazed if it's
different.
That machine has kernel 2.4.something and gcc 2.95.something,
so is it possible that this is a now-fixed bug in one those
(most likely the compiler)?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=538361&group_id=5470