This is the mail archive of the
mailing list for the GCC project.
Re: Third Draft "Unsafe fp optimizations" project description.
- To: toon at moene dot indiv dot nluug dot nl
- Subject: Re: Third Draft "Unsafe fp optimizations" project description.
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Thu, 9 Aug 2001 14:21:21 -0500 (EST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier), gcc at gcc dot gnu dot org
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.