This is the mail archive of the gcc@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: -ffast-math and floating point reordering


On Fri, Mar 26, 2004 at 01:22:14PM -0500, Robert Dewar wrote:
> Joe Buck wrote:
> > On Thu, Mar 25, 2004 at 01:03:39AM -0500, Robert Dewar wrote:
> > What is "model interval"?
> 
> Brief answer (long answer is too long). When the result of an
> fpt operation is exactly representable, the model interval is
> the set consisting of this one number.
> 
> When the result is not exactly representable, then the model
> interval is the range of results between the two representable
> values surrounding the true real result, including the end
> points.
> 
> Generally any value within the model interval can be returned,
> either end point, or, using temporary excess precision, some
> value in between.
> 
> An optimization like reassociation is permitted only if the
> result is within the model interval of the original result
> as defined by the canonical semantics.

Thanks for the explanation.  This appears to be just a hair looser than
C99 with __STDC_IEC_599__, because with IEEE floating point the rounding
direction is specified, and this suggests that Ada allows any operation to
round in either direction.

However, I doubt that there are any associative-operator rearrangements
that are permitted by this rule in Ada but not permitted in C (given that
the as-if rule permits any transformation that does not change the
result).


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