[ python-Bugs-1492293 ] Wierd Floating Point on FreeBSD4

SourceForge.net noreply at sourceforge.net
Sun May 21 02:34:04 CEST 2006


Bugs item #1492293, was opened at 2006-05-20 19:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
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


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1492293&group_id=5470


More information about the Python-bugs-list mailing list