IEEE floating-point... testing the "binding"... your help requested

Doug Gwyn (ACISD/MCSB) uunet!BRL.MIL!gwyn
Thu Apr 1 12:17:35 PST 1993


One thing that keeps worrying me is this notion that conformance to both
IEEE 754 and the C standard implies that the programmer can force
exceptions etc.  This is not true!  The 754 spec is for underlying
hardware operations and representations.  So far as the C language is
concerned there is no more need to make this level accessible to the
program than to make the test-and-branch instruction accessible; or in
other words the binding of the C language to the IEEE 754 realization
only loosely constrains the implementation.  What apparently a lot of
NCEG folks are attempting to do is to tightly constrain that binding,
but in my opinion that runs into problems in that in order to do the
job right one has to introduce a considerably more complex abstract
machine than the C standard currently employs, and from past experience
I wouldn't think that all the details of the augmented abstract machine
are going to be properly dealt with.  We had a hard enough time nailing
down relevant aspects of the much simpler machine in the actual standard.

I think it would be useful for the C binding to 754 to impose tighter
constraints in SOME areas, for example requiring the math functions to
return values that are close to the mathematically right answers.  But,
for example, I don't think the programmer needs to be able to specify
rounding modes because for that to make sense he will also need to be
able to force expression evaluation order to some well-defined choice
which the C standard doesn't currently impose, and in adding requirements
like that one runs a significant risk of badly breaking the C language spec.



More information about the Numeric-interest mailing list