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

Re: datatype test case (value spaces, rdfs:subClassOf)

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Fri, 22 Nov 2002 20:42:48 +0000
Message-ID: <3DDE96C8.9000901@hpl.hp.com>
To: Dan Connolly <connolly@w3.org>
CC: Brian McBride <bwm@hplb.hpl.hp.com>, RDF Core <w3c-rdfcore-wg@w3.org>

Brian wrote:
 >This point seems to be
 > subtle enough to have misled DanC.

I am sorry Dan, I've got another one.

Dan wrote:


>   xsd:float rdfs:subClassOf xsd:double.
> 
> That is *not* datatype(xsd:float, xsd:double) entailed
> by the empty graph; the value space of float is *not*
> specified to be a subset of the value space of double.
> So there's no justification ala step 2 above.
> 
> For details, see
> 		Floating-point datatypes are not real datatypes
> 			Mark Reinhold <mr@eng.sun.com>
> 				5 October 1999
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0130.html



Unfortunately the details describe descrepancies between the *mappings* of 
the two datatypes not their *value spaces*.

A proof of (with appropriate knowledge of datatypes).

xsd:float rdfs:subClassOf xsd:double .

xsd:float value space defn:
http://www.w3.org/TR/xmlschema-2/#float
[[
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. In addition to the basic ˇvalue spaceˇ 
described above, the ˇvalue spaceˇ of float also contains the following 
special values: positive and negative zero, positive and negative infinity 
and not-a-number.
]]

xsd:double value space defn:
http://www.w3.org/TR/xmlschema-2/#double
[[
The basic ˇvalue spaceˇ of double consists of the values m × 2^e, where m 
is an integer whose absolute value is less than 2^53, and e is an integer 
between -1075 and 970, inclusive. In addition to the basic ˇvalue spaceˇ 
described above, the ˇvalue spaceˇ of double also contains the following 
special values: positive and negative zero, positive and negative infinity 
and not-a-number.
]]

The special values are the same, and each of the basic values of xsd:float 
is an xsd:double because if |m| < 2^24 then |m|<2^53 and
if -149 <= e <= 104 then -1075 <= e <= 970.

QED.

Moreover we see that

xsd:int rdfs:subClassOf xsd:double .

but not

xsd:int rdfs:subClassOf xsd:float .

by similar reading of the recommendation.

(I am sorry Brian, I know you hate this. I tend to side with Dan in 
principle, but also wonder about why we should want to do this.
I am not sure anyone would implement this).

Frankly worrying about these relationships is implicit in our charter.

Jeremy
Received on Friday, 22 November 2002 15:43:06 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:54:09 EDT