FAQ entry on rounding

Horst von Brand vonbrand@inf.utfsm.cl
Fri Nov 26 05:56:00 GMT 1999


"Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> said:
> Before answering the second report on "mis-computations" regarding
> float/double today in a row, I decided to add a FAQ section on it,
> which you can reference as
> 
> http://egcs.cygnus.com/faq.html#rounding
> 
> I committed it right-away so I can use it. If there is anything wrong
> with the text, let me know or correct it yourself.

I'd add something along the lines of one of your last answers: With
optimization, sometimes the compiler can find out the value of an
expression, and substitute that instead. The computation won't necesarily
be done as during runtime (and different optimization levels might also
compute it differently), so results aren't always exactly the same.
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513


More information about the Gcc-patches mailing list