A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-April/003193.html below:

[Python-Dev] Round Bug in Python 1.6?

[Python-Dev] Round Bug in Python 1.6? [Python-Dev] Round Bug in Python 1.6?Skip Montanaro skip@mojam.com (Skip Montanaro)
Thu, 6 Apr 2000 15:31:02 -0500 (CDT)
    Chris> I happened to observe the following rounding bug.  It happens in
    Chris> Stackless Python, which is built against the pre-unicode CVS
    Chris> branch.

    Chris> Is this changed for 1.6, or might it be my bug?

I doubt it's your problem.  I see it too with 1.6a2 (no stackless):

    % ./python
    Python 1.6a2 (#2, Apr  6 2000, 15:27:22)  [GCC pgcc-2.91.66 19990314 (egcs-1.1.2 release)] on linux2
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    >>> round(3.1415926585, 4)
    3.1415999999999999

Same behavior whether compiled with -O2 or -g.

-- 
Skip Montanaro | http://www.mojam.com/
skip@mojam.com | http://www.musi-cal.com/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4