[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: pitfalls of verifying floating-point computations -- register spills
A damn good question. Let's ignore my usual legalism, and simply
stick with what most (but not all) of SC22WG14 seem to intend.
Assuming that __STDC_IEC_559__ is not set to 1, the compiler is
C90 or C++, etc.
e = (a+b)*c;
That may either reduce the bits after the addition or not, at whim.
In extreme cases, not every execution of the same statement need
do the same thing.
d = a+b;
e = d*c;
That must reduce it, always.
register double t;
t = a+b;
e = t*c;
There are more dissenters here, but the consensus is that register
is merely a form of decoration.
Assuming that __STDC_IEC_559__ is set to 1 and the compiler is C99.
All of the examples must reduce it.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1@xxxxxxxxx
Tel.: +44 1223 334761 Fax: +44 1223 334679