Open pfps opened 3 weeks ago
This should be the same as asking if "+0"^^xsd:double
is equal to "-0"^^xsd:double
. For the XML Schema Datatypes says "Equality is identity, except that 0 = −0 (although they are not identical) ...." so "+0"^^xsd:double
== "-0"^^xsd:double
. By that reasoning, "+0"^^rdf:json
== "-0"^^rdf:json
, as the value space for JSON numbers is xsd:double.
On the contrary. As far as the value spaces of rdf:JSON and xsd:double are concerned +0 and -0 are different values, and thus not identical and thus, as far as RDF is concerned, not equal. There might be a SPARQL relationship called equality that says that +0 and -0 are equal, but that is a different relationship and why using "equality" for the relationship in the RDF value space is probably not a good idea.
Somewhat similar concerns exist for rdf:HTML and rdf:XMLLiteral. Their value spaces are DOM trees considered as trees, not data structures. So two different structures in memory are the same element of the value space if they compare as equal even though the data structures might have different internal pointers.
Is +0 equal to -0 or not? Equality of IEEE floating point double would indicate so but equality for rdf;JSON says they have to be the same value which means that they are not equal. If the latter is desired there should be a note along the lines of