Draft "Unsafe fp optimizations" project description.
Ross Smith
ross.s@ihug.co.nz
Sat Aug 4 17:13:00 GMT 2001
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
More information about the Gcc
mailing list