Copyright © 2006 IEEE. All rights reserved.
Interpretation Number: 015
Topic: Defect in XSH strtold/wcstold ()
Relevant Sections: exponent parts
7 Defect Report concerning (number and title of International Standard
or DIS final text, if applicable):
The System Interfaces Volume of IEEE Std 1003.1-2001
------------------------------------------------------------------------
8 Qualifier (e.g. error, omission, clarification required):
3. Clarification
------------------------------------------------------------------------
9 References in document (e.g. page, clause, figure, and/or table
numbers):
Page: 1441,1611 Line: 44617-44620,49614-49617 Section: strtod()
XSHft6 Enhancement Request Number 7
------------------------------------------------------------------------
10 Nature of defect (complete, concise explanation of the perceived
problem):
XSH6's description of the strtod(), strtof(), and strtold() functions
on P1441 and of the wcstod(), wcstof(), and wcstold() functions on
P1611 are taken directly from the C standard subclauses 7.20.1.3 and
7.24.4.1.1, respectively. When these descriptions were incorporated
into XSH6, however, the explanation that the terms "optional exponent
part" and "optional binary exponent part" were defined in C standard
subclause 6.4.4.2 was dropped. (Since interstandard subclause
references should be avoided, dropping the subclause reference was
correct.) Unfortunately, however, IEEE Std 1003.1-2001 does not define
these terms at all in this context. The strings to be recognized by
these functions are similar to, but not identical to the 1999 C
standard's definitions of floating constants. (Exceptions are noted on
P1441-1442, L44631-44644 and P1611-1612, L49629-49642.)
Note that the references to "If the subject sequence has the expected
form for a floating-point number" on P1441, L44631 and on P1611, L49629
are not referring to subclause 6.4.4.2 in the 1999 C Standard; they are
referring to the forms described on P1441, L44615-44630 and on P1611,
L49612-49628.
For the XSH specification of these functions to be complete, the terms
"exponent part" and "binary exponent part" need to be defined.
------------------------------------------------------------------------
11 Solution proposed by the submitter (optional):
Change:
character, then an optional exponent part
on P1441, L44617-44618 to:
character; then an optional exponent part consisting of the
character 'e' or the character 'E', optionally followed by a
'+' or '-' character, and then followed by one or more decimal
digits
Change P1441, L44620 from:
character, then an optional binary exponent part
to:
character; then an optional binary exponent part consisting of
the character 'p' or the character 'P', optionally followed by
a '+' or '-' character, and then followed by one or more
decimal digits
Change:
character, then an optional exponent part
on P1611, L49614-49615
to:
character; then an optional exponent part consisting of the
wide character L'e' or the wide character L'E', optionally
followed by a L'+' or L'-' wide character, and then one or more
decimal digits
Change P1611, L49617 from:
character, then an optional binary exponent part
to:
character; then an optional binary exponent part consisting of
the wide character L'p' or the wide character L'P', optionally
followed by a L'+' or L'-' wide character, and then followed by
one or more decimal digits
------------------------------------------------------------------------
Interpretation response
------------------------
The standard states that the current requirements
and conforming implementations must
conform to this. However, concerns have been raised about this
which are being referred to the sponsor
Rationale:
-------------
None.
_____________________________________________________________________________
Back to IEEE Standards Interpretations for IEEE Std 1003.1-2001