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: Fourth Draft "Unsafe fp optimizations" project description.


Linus Torvalds wrote:

[ snip the rest - I agree ]

> >  3. Rearrangements whose effect is a loss of accuracy on a large subset of
> >     the inputs and a complete loss on a small subset of the inputs.
> >
> >  4. Rearrangements whose effect is a loss of accuracy on half of the inputs
> >     and a complete loss on the other half of the inputs.
> 
> I personally think (3) and (4) are exactly the same.  I don't agree with
> your "large part" vs "half" distinction - there is no such thing as
> "half" of the floating point numbers except as a "half of the bit
> representations" kind of thing, but that is completely meaningless.
> 
> It's a matter of loss of range, nothing more.  It's not that "half the
> numbers randomly lose inputs".  With these kinds of transformations you
> usually lose on the order of _one_ bit of the range of the exponent.
> Nothing more, nothing less.  Sure, that's "half the numbers", but let's
> face it, it tends to be a rather extreme "half".

The characterization of the subsets is indeed not great - I had planned
to change it for this draft, but forgot.  (half the inputs could just as
well mean "all fp numbers of odd parity", and it would be totally
obvious that that subset wouldn't be useful at all).

However, I still maintain that there is a useful difference between (3)
and (4).  You can use the transformations under (3) even if your
intermediate results reach {+,-}10^{+,-}35 (single precision), whereas
to use those under (4) your intermediate results should stay within the
{+,-}10^{+,-}17 intervals.

Now it certainly could be the case that by the time we close this open
project, we've thrown (3) and (4) into the same bucket, but for the time
being, I'd rather keep them separate.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


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