W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > November 2002

xsd:float and xsd:decimal

From: Jeremy Carroll <jjc@hpl.hp.com>
Date: Fri, 22 Nov 2002 17:57:06 +0100
To: w3c-rdfcore-wg@w3.org

We can imagine a test case like the xsd:decimal/xsd:integer case, which
instead is an "10"^^xsd:float and "10"^^xsd:decimal.

I believe that the Schema spec is clear and authoritative on this; even if
the spec's author is not.

from definition in


The basic ˇvalue spaceˇ of float consists of the values m × 2^e, where m is
an integer whose absolute value is less than 2^24, and e is an integer
between -149 and 104, inclusive.

We set e in this definition to 0, m to the value 10, and we find a value
that corresponds to "10"^^xsd:float. (Admittedly the L2V mapping is not
clarified in the XML schema recommendation).
Thus we find that "10"^^xsd:float has 'the value 10 x 2^0'.
I do not think a reading of that phrase as anything other than the
well-known, commonly used, number ten is merited. If the spec had wanted
some strange non-standard representation of values then that should be clear
from text in the spec.


the definition of xsd:decimal is:
and includes
The ˇvalue spaceˇ of decimal is the set of the values i × 10^-n, where i and
n are integers such that n >= 0.

Again this has a clear standard meaning, and no indication that any
non-standard reading is required or permitted.
Moreover there is a plausible candidate for the value of "10"^^xsd:decimal
being "the value 10 x 10^-0" (otherwise known as that same number ten).

(Actually you could chose i=100 and n=1 equally sensibly, and any path that
suggested that the "value 100 x 10^-1" differs from the "value 10 x 10^-0"
seems to lead to madness, [well a very nonstandard view of numbers]).

Thus, reading the authoritative specs we work out what the values are, and
they are the same. Hence, independent of whether our implementations
actually do it, the relevant entailments are part of RDF datatyping.

Received on Friday, 22 November 2002 11:57:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:18 UTC