possible bug in 1.5.1
Jean Meloche
jean at stat.ubc.ca
Sun Apr 25 12:47:14 EDT 1999
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
More information about the Python-list
mailing list