This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Draft "Unsafe fp optimizations" project description.


dewar@gnat.com wrote:
> 
> > Example: A/B/C -> A/(B*C).  Will overflow for about half of the
possible choices for B and C for
> > which the original didn't overflow.
> 
> That's quite wrong, you have to be close to max_real, half is way way
> overstating the case.

I think what Toon meant was something like: if you throw all the
possible distinct values for a given FP representation into a sack, and
pick the operands at random from the sack, there's roughly a 50/50
chance that B*C will overflow or underflow.

The usefulness of the transformation derives from the fact that this is
rarely how operands are actually arrived at. :-)

-- 
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
"Unix has always lurked provocatively in the background of the operating
system wars, like the Russian Army."                  -- Neal Stephenson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]