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: Second Draft "Unsafe fp optimizations" project description.

Toon Moene <> writes:

> wrote:
> > <<E.g., if we want to say that optimization -fblah will cause overflow
> > when the inputs to the (transformed) expression are in the subset X of
> > all representable floating point numbers, we have to assume a model - my
> > suggestion is to use the IEEE-754 model.
> > >>
> > But this is meaningless, there *is* no "IEEE-754" model for evaluation of
> > floating-point expressions in high level languages. So this model needs
> > a lot of filling out. I refer again to Sam Figueroa's PhD thesis which is
> > all about such models.
> Ah, OK - I see what you mean now.  I have some hours on Friday to visit
> the nearest University Library (University of Utrecht).  Presumably
> they  do not have that thesis, but there probably is a book that
> discusses/uses his results.  Do you have a suggestion ?  Thanks.

While it's true that IEEE754 doesn't explain how it maps onto high
level languages, this is at least partly because IEEE754 predates the
C standard.

C99 does include a whole appendix that explains the mapping between
IEEE754 and C, which is what we should be trying to conform to in the
default mode on those chips where it is reasonable (probably not x86
or cray).  I believe this appendix is what people mean when they say
"the IEEE-754 model" in the context of C.

- Geoffrey Keating <>

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