IEEE Standards Interpretations for IEEE Std 1003.1™-2001 IEEE Standard for Information Technology - Portable Operating System Interface (POSIX®)
Copyright © 2006 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #15
Topic: Defect in XSH strtold/wcstold () Relevant Sections: exponent parts
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 184.108.40.206 and 220.127.116.11.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 18.104.22.168 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 22.214.171.124 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.
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
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 for Interpretation