Questions about NCEG

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Jun 1 01:23:26 AEST 1990


In article <1990May30.203146.11442 at twinsun.com> eggert at twinsun.com (Paul Eggert) writes:
>	The C standard supports use of IEEE floating-point.  However, it
>	doesn't require that access be granted to all features of it, just the
>	consistent subset chosen for the C implementation.
>The question is whether an implementation can conform to both ANSI C and IEEE
>754.  For example, IEEE 754 requires that -0.0 and 0.0 be distinguishable.

Yes, but C doesn't.  C can be implemented on top of IEEE 754 conforming
hardware.  As someone else pointed out, the IEEE 754 "user" can be taken
as the C implementation.  There is no requirement that the "user"
actually exploit all the features that IEEE 754 requires be made
available to the "user".

Now, some programmers (for example those involved with NCEG) may well
want to provide some means by which a C programmer who is using a C
implementation on top of an IEEE 754 platform would be able to get his
hands on some of the weird IEEE 754 features other than the default
subset that the implementation uses.  Although I wouldn't recommend
this myself, I understand that some people feel they "need" this.
Such additional access can be provided as extensions in a conforming
C implementation.  Any time a programmer uses such extensions his
program is no longer strictly conforming, so they can alter the
behavior of the implementation in ways that would not be suitable for
support of strictly conforming programs.  I see no problem here.



More information about the Comp.std.c mailing list