From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20099 invoked by alias); 6 Jun 2011 12:48:34 -0000 Received: (qmail 20087 invoked by uid 22791); 6 Jun 2011 12:48:33 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 12:48:19 +0000 From: "thenlich at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/48906] Wrong rounding results with -m32 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thenlich at users dot sourceforge.net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Mon, 06 Jun 2011 12:48:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00428.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48906 --- Comment #29 from Thomas Henlich = 2011-06-06 12:47:58 UTC --- (In reply to comment #27) > > > > print "(-2pg12.3)", 0.02 ! 0.200E-01 expected 0.002E+01 > > print "(-1pg12.3)", 0.02 ! 0.200E-01 expected 0.020E+00 > > print "(0pg12.3)", 0.02 ! 0.200E-01 > > print "(1pg12.3)", 0.02 ! 0.200E-01 expected 2.000E-02 < Too many sig= nificant digits? > > print "(2pg12.3)", 0.02 ! 0.200E-01 expected 20.00E-03 < Too many sign= ificant digits? >=20 > Should these last two cases by 2.00E-02 and 20.0E-03 ? Otherwise we seem = to be=20 > adding an extra significant digit. >=20 > Help me understand this. Don't worry, it's not your fault... Say goodbye to the world of common sens= e, welcome to the world of the Fortran standard! ;-) "The scale factor k controls the decimal normalization (10.3.2, 10.8.5). I= f =E2=88=92d < k <=3D 0, the output field contains exactly |k| leading zeros and d =E2= =88=92 |k| significant digits after the decimal symbol. If 0 < k < d + 2, the output f= ield contains exactly k significant digits to the left of the decimal symbol and= d =E2=88=92 k + 1 significant digits to the right of the decimal symbol. Other values o= f k are not permitted."