From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18713 invoked by alias); 23 Apr 2011 16:33:17 -0000 Received: (qmail 18705 invoked by uid 22791); 23 Apr 2011 16:33:17 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_JV 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; Sat, 23 Apr 2011 16:33:02 +0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/48615] Invalid UP/DOWN rounding with E and ES descriptors 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: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: AssignedTo 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" MIME-Version: 1.0 Date: Sat, 23 Apr 2011 16:33: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-04/txt/msg02446.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48615 Jerry DeLisle changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot |jvdelisle at gcc dot |gnu.org |gnu.org --- Comment #5 from Jerry DeLisle 2011-04-23 16:32:16 UTC --- Created attachment 24082 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24082 Preliminary patch Here is just a experimental patch. Yes we could do some things in output float. I will think a bit on that. The patch also has adjustments to default widths. The default widths require quite a few test suite adjustments, which I have in my tree and will post later to pr48488. I believe the intent of this code block in write_float was to reduce the number of digits converted in the later snprintf calls as a simple optimization.