From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32213 invoked by alias); 27 Feb 2003 17:43:11 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32191 invoked by uid 48); 27 Feb 2003 17:43:11 -0000 Date: Thu, 27 Feb 2003 17:43:00 -0000 Message-ID: <20030227174311.32190.qmail@sources.redhat.com> To: Alberto.Ribon@cern.ch, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, Alberto.Ribon@cern.ch, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/9880: setprecision() strange behaviour X-SW-Source: 2003-02/txt/msg01430.txt.bz2 List-Id: Synopsis: setprecision() strange behaviour State-Changed-From-To: open->closed State-Changed-By: bangerth State-Changed-When: Thu Feb 27 17:43:10 2003 State-Changed-Why: Not a bug. Note that not every number with a simple radix-10 representation can be represented exactly as a finite precision floating point number. If you do a floating point assignment, the compiler chooses the closest representable floating point number. If you later output it with only a small number of digits, the exact value of the double gets rounded to what you "expext". If you output all digits, you see the true value of the floating point representation. W. PS: If you find a bug in egcs1.1, gcc2.95 and 3.2, as well as Sun CC 6 and 7, there's a good chance it's just your misunderstanding, not a bug in so many different compilers... http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9880