Public Comment Number PC-UK0145 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, 7.7.6.14 Title: Efficiency of the ilogb function Detailed description: I am distinctly unhappy with this. As a person who has written portable special function code (including things like sin/cos), I badly needed something like this to localise the system dependencies. But NOT this specification, on the grounds of severe inefficiency. There are two reasonable approaches, and C9X has fallen between them: 1) To have a composite function that returns the type of value, its sign and (only if it is finite and non-zero) its exponent and mantissa. 2) To have separate functions for each level of classification, with later ones being defined only for appropriate arguments. I suggest simply dropping the requirements to return particular values for zero, infinities and NaNs - i.e. remove the text "; it computes the value FP_ILOGB0 ... if x is a NaN", and scrapping 7.7 Mathematics paragraph 8 entirely. This could be implemented a lot more efficiently and hence would be vastly more useful. It remains compatible with LIA-1 exponentF.