This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: numerical results differ after irrelevant code change
- From: Robert Dewar <dewar at adacore dot com>
- To: "Michael D. Berger" <m dot d dot berger at ieee dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 08 May 2011 13:01:36 -0400
- Subject: Re: numerical results differ after irrelevant code change
- References: <0LKV00LE7YOIGA5H@vms173005.mailsrvcs.net>
On 5/8/2011 12:48 PM, Michael D. Berger wrote:
I made the changes you suggest. While I was previously getting
-1.16e-16 and -1.03e-16 depending presence of an "extra"
class member, I now get 1.11e-16 (sic not -). But it is now independent of
the extra class member, which is excellent. Hopefully, things will stay
that way.
This is a fairly big change to make in your program, since it
completely alters the fpt semantics, but probably in a desirable
way. Sounds like you don't have any real careful analysis of the
reliability of the results or needed precision anyway, you just
don't like the non-repeatability, and indeed the change to
restrict the precision to 64-bits should work to solve that
problem.