This is the mail archive of the 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: Third Draft "Unsafe fp optimizations" project description.

Just a few small suggestions:

   * Those who need full precision in order to guarantee the results.

"who" -> "that" and "the results" -> "acceptable results"

   * Those which are less sensible to occasional loss of accuracy.

"which" -> "that" and "sensible" -> "sensitive"

   * All temporaries generated for a single expression [should] always [be]

"[should] always [be]" -> "[should be]"

  2. Rearrangements whose only effect is a loss of accuracy.

     Rationale: Users might be able to bound the effect of this

     Example: A*A*...*A -> different order of evaluation (compare a*a*a*a
     with t=a*a; t=t*t). Savings: Potentially many multiplies, at the cost
     of some temporaries.

Although I cannot come up with an example where "((A*A)*A)*A" overflows
and "t=A*A; t*t" does not (or vice versa), I doubt that there are *any*
transformations that can change the value of an expression that do not,
for some inputs, cause the result to overflow or underflow to zero when
the original result did not (and vice versa).

Finally, I suggest that the document say explicity that gcc
reserves the right to apply any transformation that does not change
the value of an expression or the settings of the exception flags
under IEEE 754 arithmetic.  

Brad Lucier

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