Bugs item #1492293, was opened at 2006-05-20 20:34 Message generated for change (Comment added) made by tim_one You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1492293&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: David Abrahams (david_abrahams) Assigned to: Nobody/Anonymous (nobody) Summary: Wierd Floating Point on FreeBSD4 Initial Comment: This is just about the weirdest thing I've ever seen. Python 2.4.2 (#1, Jan 17 2006, 09:30:19) [GCC 2.95.2 19991024 (release)] on freebsd4 ---- nan.py ---- inf = 1e300000 nan = inf/inf print nan ---- nan.py ---- ---- tst.py ---- import nan ---- tst.py ---- % python -c "import nan" NaN % python -c "import tst" NaN Now I edit tst.py ---- tst.py ---- # import nan ---- tst.py ---- % python -c "import nan" Traceback (most recent call last): File "<string>", line 1, in ? File "nan.py", line 2, in ? nan = inf/inf ZeroDivisionError: float division % python -c "import tst" Traceback (most recent call last): File "<string>", line 1, in ? File "tst.py", line 1, in ? import nan File "nan.py", line 2, in ? nan = inf/inf ZeroDivisionError: float division % rm *.pyc % python -c "import tst" NaN % python -c "import nan" Traceback (most recent call last): File "<string>", line 1, in ? File "nan.py", line 2, in ? nan = inf/inf ZeroDivisionError: float division % python -c "import tst" Traceback (most recent call last): File "<string>", line 1, in ? File "tst.py", line 1, in ? import nan File "nan.py", line 2, in ? nan = inf/inf ZeroDivisionError: float division ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2006-05-21 11:09 Message: Logged In: YES user_id=31435 Python doesn't know anything about IEEE special values, and in particular what the marshal format (used for code objects) does with infinities and NaNs is a platform-dependent accident. Try changing inf = 1e300000 to inf = 1e300 * 1e300 to stop Python from _trying_ to marshal/unmarshal a floating infinity on that box. I bet your problems will go away then. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1492293&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com