public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/32057] Random failure on gfortran.dg/secnds.f
Date: Wed, 30 May 2007 03:37:00 -0000	[thread overview]
Message-ID: <20070530033709.20680.qmail@sourceware.org> (raw)
In-Reply-To: <bug-32057-682@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2007-05-30  3:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23 13:52 [Bug testsuite/32057] New: " hjl at lucon dot org
2007-05-23 14:35 ` [Bug testsuite/32057] " dominiq at lps dot ens dot fr
2007-05-23 15:06 ` kargl at gcc dot gnu dot org
2007-05-28 19:53 ` dominiq at lps dot ens dot fr
2007-05-28 22:15 ` tkoenig at gcc dot gnu dot org
2007-05-29 20:25 ` dominiq at lps dot ens dot fr
2007-05-30  2:10 ` jvdelisle at gcc dot gnu dot org
2007-05-30  3:37 ` jvdelisle at gcc dot gnu dot org [this message]
2007-05-30 21:35 ` dominiq at lps dot ens dot fr
2007-06-03 17:07 ` pinskia at gcc dot gnu dot org
2007-06-04  8:37 ` pinskia at gcc dot gnu dot org
2007-06-04 16:11 ` pinskia at gcc dot gnu dot org
2007-06-06  0:54 ` jvdelisle at gcc dot gnu dot org
2007-06-06  1:26 ` jvdelisle at gcc dot gnu dot org
2007-06-19 17:11 ` rob1weld at aol dot com
2007-06-20 22:33 ` rob1weld at aol dot com
2007-06-21  1:06 ` jvdelisle at gcc dot gnu dot org
2007-06-25  3:03 ` jvdelisle at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070530033709.20680.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).