W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

Canonical representation of float and double

From: <zongaro@ca.ibm.com>
Date: Tue, 20 Mar 2001 14:49:01 -0500
To: xmlschema-dev@w3.org
Message-ID: <OFD18D0685.9F83B992-ON85256A15.0062D5E1@torolab.ibm.com>


     The definition of the canonical lexical representation for the float
data type in the Schema Datatypes PR is as follows (
http://www.w3.org/TR/xmlschema-2/#float): Canonical representation

   The canonical representation for float is defined by prohibiting certain
   options from the Lexical representation ( Specifically, the
   exponent must be indicated by "E". Leading zeroes are prohibited in the
   exponent. For the mantissa, the preceding optional "+" sign is
   prohibited and the decimal point is required.  Leading and trailing
   zeroes are prohibited subject to the following: number representations
   must be normalized such that there is a single digit to the left of the
   decimal point and at least a single digit to the right of the decimal

     Both lexical values 1.0E0 and 1.000000000001E0 appear to conform to
the requirements of the canonical representation, but they both map to the
same value in the value space.  According to the definition of Canonical
Lexical Representation (2.3.1 -
http://www.w3.org/TR/xmlschema-2/#canonical-lexical-representation), the
mapping between the canonical representation and the value space should be
one-to-one.  I think the requirements on the canonical representation for
float need to be more stringent.

     In addition, I believe it needs to be explicitly stated that the
optional "+" preceding the exponent is prohibited in the canonical

     The double type has these same problems.


Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
Received on Tuesday, 20 March 2001 14:48:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC