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

[xmlschema-dev] <none>

From: <zongaro@ca.ibm.com>
Date: Thu, 22 Mar 2001 14:52:42 -0500
To: <xmlschema-dev@w3.org>
Message-ID: <OFB954A91B.5892D4F4-ON85256A17.006CEA79@torolab.ibm.com>


Hi Ashok,

     Thanks for your response.

     Although the "+" sign is prohibited from the mantissa, there doesn't
appear to be any restriction against "+" in the exponent, which is the case
I was asking about.  Thus, it appears that both 1.5E+1 and 1.5E1 meet the
criteria for the canonical representation, but my guess is that it was not
intended that 1.5E+1 be permitted.

     In addition, the lexical values 1.0E0 and 1.000000000001E0 don't
appear to break the rule against trailing zeros in the mantissa, so I still
believe that they both meet the conditions for the canonical
representation.  That in spite of the fact that they both map to the same
value in the value space.  It will obviously be trickier to state rules
that avoid this issue.

     Sorry if there's anything I've misunderstood.

Thanks,

Henry
------------------------------------------------------------------------
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
mailto:zongaro@ca.ibm.com


"Ashok Malhotra" <ashokma@microsoft.com>@w3.org on 2001/03/21 11:53:21 PM

Please respond to "Ashok Malhotra" <ashokma@microsoft.com>

Sent by:  w3c-xml-schema-ig-request@w3.org


To:   Henry Zongaro/Toronto/IBM@IBMCA, <w3c-xml-schema-ig@w3.org>,
      <xmlschema-dev@s3.org>
cc:
Subject:  RE: Canonical representation of float and double


Section 3.2.3.2 of the spec says;
"The canonical representation for float is defined by prohibiting
certain options from the Lexical representation (3.2.3.1).
Specifically, the preceding optional "+" sign is prohibited from the
mantissa. The exponent must be indicated by "E" and number
representations must be normalized such that for non-zero numbers there
is a single non-zero digit to the left of the decimal point. Leading and
trailing zeroes are disallowed in the mantissa and leading zeroes are
disallowed in the exponent. "

So, the preceding + sign is prohibited and trailing zeroes are
prohibited
in the mantissa.  This seems to be what you are asking for.
Ashok


-----Original Message-----
From: zongaro@ca.ibm.com [mailto:zongaro@ca.ibm.com]
Sent: Wednesday, March 21, 2001 11:24 AM
To: w3c-xml-schema-ig@w3.org
Subject: Canonical representation of float and double



Hello,

     I posted the following to xmlschema-dev@w3.org yesterday, but I
thought I should cross-post here, in case anyone on this list isn't
monitoring the other.

Thanks,

Henry
------------------------------------------------------------------------
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
mailto:zongaro@ca.ibm.com


---------------------- Forwarded by Henry Zongaro/Toronto/IBM on
2001/03/21
02:22 PM ---------------------------

Henry Zongaro/Toronto/IBM@IBMCA@w3.org on 2001/03/20 02:49:01 PM

Please respond to Henry Zongaro/Toronto/IBM@IBMCA

Sent by:  xmlschema-dev-request@w3.org


To:   xmlschema-dev@w3.org
cc:
Subject:  Canonical representation of float and double



Hello,

     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):


   3.2.4.2 Canonical representation

   The canonical representation for float is defined by prohibiting
certain
   options from the Lexical representation (3.2.4.1). 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
   point.


     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
representation.

     The double type has these same problems.

Thanks,

Henry
------------------------------------------------------------------------
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
mailto:zongaro@ca.ibm.com
Received on Thursday, 22 March 2001 14:52:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT