-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rdf:JSON equality of +0 and -0 #91
Comments
This should be the same as asking if |
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. |
+0 and -0 are distinct values, not different. As literal terms, they are indeed different, and as "different" means "not equal". "distinct" means "not identical". "identical" implies "equal" (sans NaNs), thus "different" implies "distinct". "equal" means "equivalent by the relation of equality". "identical" means "equivalent by the relation of identity". XML Schema tells you precisely what it considers those relation to be defined as. There are also numeric types (not in XML Schema though) that consider values 1.0 and 1.00 distinct but equal. This is not some queer notion of equality that language lawyers like to use, this is pretty much what one should want when using the word "equality". If you have a different definition, feel free to elaborate what it is, but you can't argue that the commonly used and standardized definition is wrong because it is different. By the way, "as far as RDF is concerned" is ambiguous ‒ RDF is concerned mostly about the structure of values and graphs that link them together, and at that level, there is no difference between equality and identity of terms (even |
Where RDF says "equal" it mean "identical". +0 and -0 are different values that compare equal in the datatype but that equality is different from RDF equality. |
If you consider term-equality within RDF, that is completely unrelated to anything that may be defined on the
|
The only reasonable interpretation of datatype value equality is to match what SPARQL does in it's operator mappings. For this xsd:float and xsd:double would use The rdf:JSON value space is composed of lists, maps, strings, numbers (double value space) and the literals |
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
The text was updated successfully, but these errors were encountered: