From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20736 invoked by alias); 30 May 2007 03:37:18 -0000 Received: (qmail 20681 invoked by uid 48); 30 May 2007 03:37:09 -0000 Date: Wed, 30 May 2007 03:37:00 -0000 Message-ID: <20070530033709.20680.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug testsuite/32057] Random failure on gfortran.dg/secnds.f In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" 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: 2007-05/txt/msg02671.txt.bz2 ------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-05-30 03:37 ------- I modified the program given in comment #4 to display the exact values at the end of the cycle along with the three methods. Method "a" and method "c" give identical results. Method "b" has a different phase and its the end point sooner. The exact true value is shown in the fourth column of the output below. -- snippet -- a = 3600.0*real(m)+ 60.0*real(l) + real(k) + 0.001*real(j) b = 0.001*real(j) + real(k) + 60.0*real(l) + 3600.0*real(m) c = real(3600*m + 60*l + k) c = c + real(j)/1000.0 exact1 = 3600*m + 60*l + k exact2 = j write(6,100)a, b, c, exact1, exact2 100 format (3(f11.5,2x),i5,".",i3) Result: 86399.98438 86399.98438 86399.98438 86399.988 86399.99219 86399.99219 86399.99219 86399.989 86399.99219 86399.99219 86399.99219 86399.990 86399.99219 86399.99219 86399.99219 86399.991 86399.99219 86399.99219 86399.99219 86399.992 86399.99219 86399.99219 86399.99219 86399.993 86399.99219 86399.99219 86399.99219 86399.994 86399.99219 86399.99219 86399.99219 86399.995 86399.99219 86400.00000 86399.99219 86399.996 86400.00000 86400.00000 86400.00000 86399.997 86400.00000 86400.00000 86400.00000 86399.998 86400.00000 86400.00000 86400.00000 86399.999 a and c are actually a little more accurate at the end. Its also interesting that this deviation between the methods appears to happen only near the end of the sequence. I have visually scanned in quite a few places and all three are identical until this point. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32057