Patch gcc-4.0 should not apply mathematical associative rules for addition or multiplication

Richard Henderson rth@redhat.com
Thu Oct 7 21:42:00 GMT 2004


On Thu, Oct 07, 2004 at 02:18:45PM -0700, Fariborz Jahanian wrote:
> Can we rely on math routines in real.c to tell us the 'exact' from 
> 'inextact' ops?

Yes, in that if we find a bug it's considered a bug in real.c.
But I am aware of no such problems at the moment.

Note that you have to check more than just the result of do_multiply,
since that only returns true if bits are lost in the internal 
representation.  You also have to check for inexact results when
rounding the result to the target format.

Also, rather than exporting do_multiply, as I'm guessing you're
about to do, make real_arithmetic return true for inexact.


r~



More information about the Gcc-patches mailing list