RE: "RE: Support of IEEE float; Canonical XML"

>
>Taki,
>
>The precision of the XML Schema datatypes float and double is specified
>and cannot be "lost" in translation. What can be lost in the round trip
>from XML to IEEE floating point back to XML is the accurate
>representation of a value to the specified precision.
>
>Thus, in your example, the decimal representation 0.1 need only be
>translated into enough binary digits to maintain the specified precision
>of the datatype (float or double). Because XML Schema specifies a
>precision that matches the corresponding IEEE representation, the IEEE
>representation has enough binary digits to do the job. On translation
>back into XML, it should be sufficient to use the IEEE round to even
>option and perform the XML Schema canonicalization in order to recover
>the representation 1.0E-1, which is exactly the same value in canonical
>form.

My question at this point is - how do you know which value (1.0E1 or the IEEE rounded value) you started with?  Both would have been mapped to the IEEE rounded value, yes?

The details (in the schema data type spec) of the float and decimal types being "patterned after" IEEE floating point are a bit confusing.  It seems there could be other kinds of cases where something is "lost in translation". 


>
>
>With respect to the user specified datatype, I would like to point out
>that it is never acceptable in a standards process to avoid a difficult
>decision in the body of the standard by falling back on an extension
>option. This discussion should proceed as if the user datatype option
>didn't exist (as indeed it shouldn't, but we will get to that after the
>datatype representations are cleared up. And after that, it will be time
>to tackle compression, which seems to need quite a bit of work.)
>
>Paul
>
>
>> Hi Paul,
>>
>> The problem of numeric precision loss is most likely to occur not when
>the
>> data starts with EXI, but when it originates in XML and gets
>transcoded to EXI
>> then back to XML.
>>
>> The WG observed that any finite-length base-2 number can always be
>converted
>> to an equivalent finite-length base-10 number, but not vice versa.
>There
>> are finite-length base-10 numbers that when converted to base-2 number
>need
>> infinite digits to describe exactly the same numbers.

Received on Thursday, 25 June 2009 13:29:32 UTC