From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30606 invoked by alias); 11 Jun 2011 07:24:00 -0000 Received: (qmail 30584 invoked by uid 22791); 11 Jun 2011 07:23:58 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sv13.net-housting.de (HELO sv13.net-housting.de) (178.248.244.23) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Jun 2011 07:23:43 +0000 Received: from localhost (mailscan.hofmeirmedia.net [172.30.129.51]) by sv13.net-housting.de (Postfix) with ESMTP id 0ACC9280A1C8F; Sat, 11 Jun 2011 09:23:41 +0200 (CEST) Received: from sv13.net-housting.de ([172.30.129.23]) by localhost (mailscan.hofmeirmedia.net [172.30.129.51]) (amavisd-new, port 10024) with ESMTP id OGPgqbRwIGMu; Sat, 11 Jun 2011 09:23:39 +0200 (CEST) Received: from mail-vx0-f175.google.com (mail-vx0-f175.google.com [209.85.220.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by sv13.net-housting.de (Postfix) with ESMTPSA id 9CADE2812AF9A; Sat, 11 Jun 2011 09:23:38 +0200 (CEST) Received: by vxd7 with SMTP id 7so3111610vxd.20 for ; Sat, 11 Jun 2011 00:23:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.73.234 with SMTP id o10mr2826245vdv.174.1307777017638; Sat, 11 Jun 2011 00:23:37 -0700 (PDT) Received: by 10.220.72.135 with HTTP; Sat, 11 Jun 2011 00:23:37 -0700 (PDT) In-Reply-To: References: <4DE8D8D6.5030506@charter.net> <4DF25409.1080509@charter.net> Date: Sat, 11 Jun 2011 09:13:00 -0000 Message-ID: Subject: Re: [patch, libgfortran] PR48906 Wrong rounding results with -m32 From: Thomas Henlich To: Janne Blomqvist Cc: jerry DeLisle , gfortran , gcc patches Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00895.txt.bz2 > I don't agree with this; with the patch we now output 10 significant > digits, whereas 9 is sufficient for a binary->ascii->binary roundtrip. > So please retain the "reduce d by one when E editing is used" thing > for list format and G0. This is just a side effect of using 1PGw.d > format for list format and G0 in order to avoid duplicating code, but > we don't need to follow this particular craziness that is due to how > the scale factor is specified in the standard. I hadn't noticed this, but I agree with Janne. It should be easy to implement: After the switch between F and E editing, we just need to shift the decimal point and decrement the exponent. No new rounding is required, because we keep the number of significant digits.