--
Michael D. Berger
m.d.ber...@ieee.org
http://www.rosemike.net/
  

> -----Original Message-----
> From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On 
> Behalf Of Tim Prince
> Sent: Sunday, May 08, 2011 11:38
> To: gcc@gcc.gnu.org
> Subject: Re: numerical results differ after irrelevant code change
[...]
> > How does the extra precision lead to the variable result?
> > Also, is there a way to prevent it?  It is a pain in 
> regression testing.
> >
> If you don't need to support CPUs over 10 years old, consider
> -march=pentium4 -mfpmath=sse or use the 64-bit OS and gcc.
> Note the resemblance of your quoted differences to 
> DBL_EPSILON from <float.h>.  That's 1 ULP relative to 1.0.  I 
> have a hard time imagining the nature of real applications 
> which don't need to tolerate differences of 1 ULP.
> 
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.

Thanks,
Mike.

Reply via email to