FW: numerical results differ after irrelevant code change
Michael D. Berger
m.d.berger@ieee.org
Sun May 8 19:01:00 GMT 2011
> -----Original Message-----
> From: Robert Dewar [mailto:dewar@adacore.com]
> Sent: Sunday, May 08, 2011 13:02
> To: Michael D. Berger
> Cc: gcc@gcc.gnu.org
> Subject: Re: numerical results differ after irrelevant code change
>
> 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.
>
As I should have said originally, I just did the
-march=pentium4 -mfpmath=sse, I didn't change
to a 64 bit system. Will that get the repeatabiility?
It has on the brief test I did.
Thanks,
Mike.
More information about the Gcc
mailing list