floating point

Henry Cejtin henry@sourcelight.com
Mon, 13 Aug 2001 15:03:44 -0500


I  decided to look some more at why gcc was generating such bad code, and now
I am slightly nervous.  There is a `-ffast-math' option which they  warn  you
should  NOT  be  turned  on  by  any  optimization  level  because  it is not
sufficiently ANSI or IEEE compliant.  Then you turn it  on,  the  code  looks
like MLton's does now.

If you look at the info pages, they talk about one of the things this does is
allow the compiler to assume that args to sqrt are non-negative and  that  no
arg  is  a  NaN.   I  don't see why this would matter since I assume, perhaps
incorrectly, that if the arg is negative or NaN  then  the  sqrt  instruction
would give me a NaN result.

Any  way,  whet are the requirements, if any, for SML?  I don't see any thing
in the standard except for the  usual  pointer  to  the  still-does-not-exist
basis book.