From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7959 invoked by alias); 9 Oct 2002 23:02:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 7952 invoked from network); 9 Oct 2002 23:02:19 -0000 Received: from unknown (HELO smtp-1.his.com) (216.194.225.82) by sources.redhat.com with SMTP; 9 Oct 2002 23:02:19 -0000 Received: from mail.his.com (root@mail.his.com [216.194.225.77]) by smtp-1.his.com (8.12.3/8.12.3) with ESMTP id g99N2IXr049931 for ; Wed, 9 Oct 2002 19:02:19 -0400 (EDT) (envelope-from blime@his.com) Received: from his.com (max1ka-5.his.com [216.194.229.5]) by mail.his.com (8.11.6/8.10.1) with ESMTP id g99N2HF06128 for ; Wed, 9 Oct 2002 19:02:17 -0400 (EDT) Message-ID: <3DA4B4EF.5DB13B31@his.com> Date: Wed, 09 Oct 2002 16:02:00 -0000 From: Emil Block Organization: Blime Incorporated X-Accept-Language: en MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Formatted Read Accuracy Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00098.txt.bz2 Thanks for all the inputs! I have confirmed with a debuger (and write statements) that "line" indeed contains 67.9936, and after the read the value is 67.9935989 with G77 and is 67.9936 with F77. Another example with G77 -- input 53.5139 becomes 53.5139008, a larger value! Both compiers are using single precision. The numbers are correctly read with the Sun F77 compiler used on the same source code. This is only two examples of hundreds of numbers that are read and G77 adds "change" in the fifth thru seventh decimal places on all the numbers when using the F9.4 specifier. It appears that the F77 compiler rounds off the numbers, and places zeroes in any field greater than specified by the the format statement. I have tried several formats and the result is the same. I have resolved several differences between the 2 compilers using the source code for a very large simulation, and this is the only remaining different in behavior. I don't understand why the number should be different with the G77 compiler. I would appreciate any inputs on where in the G77 compiler source code this occurs, and which compiler is conforming to the standard. Blime