A brief follow-up on IEEE floating-point.

uunet!netcom.com!segfault!rfg uunet!netcom.com!segfault!rfg
Sat Jan 16 00:48:38 PST 1993


It has been called to my attention that I made a rather serious blunder
in my previous posting regarding what seemed to me to be a common IEEE
"bug" in many existing C compilers.

I noted that many C compilers seem to mis-compile constant initializers
like -0.0.  I now feel that I have to retract that statement.

The example code I had posted failed completely (due to my own hasty pre-
paration of the example) to properly illustrate the bug which I felt
existed (in many implementations).  Additionally, upon returning to my
*actual* test case code, I saw that I had made a rather subtle coding
error, and that this error was the true source of problems which I believed
that I was seeing (in compilers).

In short, regarding my allegations of a widespread bug in the compilation of
negative zero... well, er, ah... NEVERMIND.  (I apologize for any confusion
I may have caused.)

The other points I raised in my preceeding posting are still basically
legitimate however.

One correspondent noted to me that the required semantics of the various
*abs functions of ANSI standard C (with respect to sNaN arguments) seem
to be implied by one of the recomendations given in Appendix A of the
IEEE 754 standard (wherein `abs(x)' is defined in terms of `copysign')
but I think that the connection here is weak at best, and thus I am still
strongly convinced of the need for a "binding" document, specifying (in
precise terms) the proper interpretation of the IEEE 754 with respect to
the ANSI C language.  I would however still like to get some other opinions
on the need for such a document.


// Ronald F. Guilmette
//    domain address:	rfgasegfault.uucp
//    uucp address:	...!uunet!netcom.com!segfault!rfg



More information about the Numeric-interest mailing list