Issue 1378305: Import value 1e400 from pyc fails (original) (raw)

Issue1378305

Created on 2005-12-11 21:09 by gjantzen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg27043 - (view) Author: Guenter Jantzen (gjantzen) Date: 2005-12-11 21:09
------------------------------------------- #file: bug.py #sys.version_info (2, 4, 2, 'final', 0) #Platform is Windows XP import sys, bug infinity = 1e400 if __name__ == "__main__": import bug print "Infinity is", bug.infinity ------------------------------------------ This code behaves correct using bug.py - when bug.pyc is not up to date / not exists: Infinity is 1.#INF and behaves wrong using bug.pyc - when bug.pyc is up to date: Infinity is 1.0
msg27044 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2005-12-14 06:10
Logged In: YES user_id=341410 This is a known bug with Python and floating point infinity literals. You can use: infinity = 1e155 * 1e155 I believe this is fixed in the latest Python 2.5 SVN.
msg27045 - (view) Author: Sean Gillespie (sean_gillespie) Date: 2007-03-19 13:24
This does indeed seem to be fixed in Python2.5. I was able to reproduce this with Python2.4 with similar results (Windows XP again). However, in Python2.5, the results are as expected. Python24: > python.exe bug.pyc Infinity is 1.0 Python25: > python.exe bug.pyc Infinity is 1.#INF
msg27046 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-19 16:30
Fixed, then.
History
Date User Action Args
2022-04-11 14:56:14 admin set github: 42679
2005-12-11 21:09:11 gjantzen create