Public Comment Number PC-UK0122 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-25 Author: N.M Maclaren Author Affiliation: Self Postal Address: University of Cambridge, Computer Laboratory, New Museums Site, Pembroke Street, Cambridge CB3 3QG, United Kingdom E-mail Address: Telephone Number: +44 1223 334761 Fax Number: +44 1223 334679 Number of individual comments: 1 Comment 1. Category: Normative change to existing feature retaining the original intent Committee Draft subsection: 6.1.2.8.2 Title: Problems with multiple zero representations etc. Detailed description: The current wording forbids the all-ones representation in ones' complement and negative zero in signed magnitude from being trap values. This compounds the original K&R mistake of assuming that integer overflow is ignored, and is slightly in conflict with the stated intention of IEEE 754. But there is a MUCH more serious problem and it is a major quiet change (as the wording stands at present). Return and initial values of zero and unspecified non-zero are defined throughout the standard, but the standard now defines two forms of zero for signed magnitude and ones' complement, which causes serious ambiguity and conflicts. For example, standard practice to test whether a set of bits is set is (value&mask)!=0, which will no longer work! So I suggest changing the descriptions of the sign bit to the following: - the corresponding value with sign bit zero is negated, and it is implementation-defined whether the value with sign bit one and all other bits zero is a trap value or has a value of zero; - the sign bit has value -2N, and it is implementation-defined whether the value with sign bit one and all other bits zero is a trap value or has a value of -2N; - the sign bit has value 1-2N, and it is implementation-defined whether the value with all bits one (including the sign bit) is a trap value or has a value of zero. When other sections of this standard requires a value to be initialised to zero, a function call to return zero or an expression to evaluate to zero, the implementation shall use the value consisting of all bits zero. When they require a function call to return non-zero or an expression to evaluate to non-zero, the implementation shall not use any of the values that may be trap values, whether the implementation has defined them to be trap values or not.