40 lines
910 B
Plaintext
40 lines
910 B
Plaintext
From: jean at stat.ubc.ca (Jean Meloche)
|
|
Date: Sun, 25 Apr 1999 16:47:14 +0000
|
|
Subject: possible bug in 1.5.1
|
|
Message-ID: <37234712.2E95BC37@stat.ubc.ca>
|
|
X-UID: 1419
|
|
|
|
I am using python to import a SAS database into a
|
|
relational database and I'm running into some trouble
|
|
with the real number Infinity. I've had trouble with
|
|
it before... SAS uses -Infinity to signal exceptional
|
|
cases.
|
|
|
|
One of my functions tests to a Infinity field:
|
|
|
|
Infinity=1e1000
|
|
if rec['HC4']==Infinity: do_something
|
|
|
|
The code fails because *sometimes* Infinity takes
|
|
value Inf and *sometimes* it takes value 0.0...
|
|
I've also added the line
|
|
|
|
print 1e1000
|
|
|
|
and it sometimes print Inf and sometimes print 0.0.
|
|
|
|
How can I create a Infinite float in python with
|
|
certainty? I'm using a RedHat 5.2 system on Intel.
|
|
|
|
|
|
Many thanks and please reply to
|
|
|
|
jean at stat.ubc.ca
|
|
|
|
--
|
|
Jean Meloche
|
|
|
|
|
|
|
|
|