This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: float conversion optimizations


> I'm trying to work through your code at
> 
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg00807.html
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg00809.html
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg00810.html
> 
> The first two seem OK for IEEE arithmetic (because of the specific properties
> of the exponent and mantissa in float and double), but in avoiding a
> double rounding (meaning rounding a temporary result to double
> precision for the add and then rounding again to single precision for
> the store) it seems that the third "optimization" can change the
Where actually can the rounding happen?  both operands fits in the
floats and are just extended.  I am not quite sure but I seem to
remember that in such particular case the double rouding will be
equivalent to single rouding, but I may be wrong...

Thanks!
Honza
> results of the code and hence should only be activated if
> -funsafe-math-optimizations.
> 
> Brad


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