next up previous contents
Next: Exception Handling Up: Systems Aspects, from D. Previous: Programming Language Features   Contents

Optimizers

Consider the following code for estimating the machine

If the compiler "optimizes" (eps+1 > 1) to (eps > 0) the code will compute the largest number which is rounded to 0.

Optimizers should be careful when applying mathematical algebraic identities to FP variables. If, during the optimization process, the expression is changed to , the meaning of the computation is different.

Converting constants like from decimal to binary at compile time can change the semantic (a conversion at run time obeys the current value of the IEEE rounding modes, and eventually raise the inexact and underflow flags).

Semantics can be changed during common subexpression elimination. In the code

is not a common subexpression, since it is computed with different rounding modes.



Adrian Sandu 2001-08-26