Public Comment Number PC-UK0138 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: 7.7, F.2.1, F.3 Title: Provide IEC 559 required support for signalling NaNs Detailed description: Section 7.7 paragraphs 5 and 6 are seriously incompatible with the spirit of IEEE 754, and could be regarded as being in breach of the letter of IEEE 754 section 6.2, by not providing any way to define a signalling NaN or test for whether a NaN is signalling or quiet. Furthermore, the current C9X situation does not allow a programmer to initialise his data to signalling NaNs (as recommended by IEEE 754). At the very least, there should be a macro SIGNAN for creating one and a macro FP_SIGNAN for flagging one, so I suggest adding: 4a The macro SIGNAN is defined if and only if the implementation supports signalling NaNs for the double type. It expands to a constant expression of type double representing an implementation-defined signalling NaN. The macros SIGNAN_F SIGNAN_L are respectively float and long double analogs of SIGNAN. and adding FP_SIGNAN to paragraph 6, which makes it conform with IEEE 754. This should be done even if SIGNAN is not added. Assuming that the nan function is removed (see 7.7.11.2 The nan function), F.2.1 paragraph 1 needs replacing by:: The NAN, NAN_F, NAN_L, SIGNAN, SIGNAN_F, SIGNAN_L, INFINITY, INFINITY_F and INFINITY_L macros in provide designations for IEC 559 NaNs and infinities. The only support for signalling NaNs required by this standard is that the fpclassify function (7.7.3.1) shall classify them correctly. An implementation shall define the macros SIGNAN, SIGNAN_F and SIGNAN_L only if those values are supported compatibly with IEC 559. In F.3 the last paragraph (starting "The signbit macro") should be simplified by the omission of the exclusion in brackets.