You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For xsd:double and xsd:float, `+0`, `-0` and `0` are same value.
6068
+
</p>
6057
6069
<div id="sameValue-NaN" class="note">
6058
6070
<p>
6059
6071
The <a href="#OperatorMapping">Operator Mapping</a> for "`=`"
@@ -6063,24 +6075,17 @@ <h5>sameValue</h5>
6063
6075
However, `sameTerm("NaN"^^xsd:double, "NaN"^^xsd:double)` is true.
6064
6076
The function `sameValue` defines `sameValue("NaN"^^xsd:double, "NaN"^^xsd:double)`
6065
6077
to be true because the arguments are the same element of the value space.
6078
+
Similarly, the function `sameValue` defines `sameValue("NaN"^^xsd:float, "NaN"^^xsd:float)`
6079
+
to be true.
6080
+
6066
6081
</p>
6067
6082
<p>
6068
-
`sameValue` treats the values of `"NaN"^^xsd:double` and `"NaN"^^xsd:float` as being
6069
-
the same. `sameValue("NaN"^^xsd:double, "NaN"^^xsd:float)` is `true`.
6083
+
`sameValue` treats the values of `"NaN"^^xsd:double` and `"NaN"^^xsd:float`
6084
+
as being the same value.
6085
+
`sameValue("NaN"^^xsd:double, "NaN"^^xsd:float)` and
6086
+
`sameValue("NaN"^^xsd:float, "NaN"^^xsd:double)` are both `true`.
6070
6087
</p>
6071
6088
</div>
6072
-
<p id="sameValue-zeros" class="note">
6073
-
For xsd:double and xsd:float, `+0`, `-0` and `0` are same value.
6074
-
</p>
6075
-
<p id="func-sameValue-note1" class="note">
6076
-
An extended implementation may support additional datatypes for literals. An
6077
-
implementation processing a query that tests for equivalence of literals with non-recognized datatypes
6078
-
(and non-identical lexical form and datatype IRI) returns an error, indicating that it
6079
-
is unable to determine whether or not the values of the compared literals are equivalent. For example, an
6080
-
unextended implementation will produce an error when testing either <span class="queryExcerpt"><code>"iiii"^^my:romanNumeral =
6081
-
"iv"^^my:romanNumeral</code></span> or <span class="queryExcerpt"><code>"iiii"^^my:romanNumeral !=
6082
-
"iv"^^my:romanNumeral</code></span>.
6083
-
</p>
6084
6089
6085
6090
<p>Examples:</p>
6086
6091
<div class="result">
@@ -6109,8 +6114,13 @@ <h5>sameValue</h5>
6109
6114
</tbody>
6110
6115
</table>
6111
6116
</div>
6112
-
<p id="sameValue-old-name" class="note">
6113
-
This function was called `RDFterm-equal` up until SPARQL 1.1.
6117
+
<p id="func-sameValue-note1" class="note">
6118
+
An extended implementation may support additional datatypes for literals. An
6119
+
implementation processing a query that tests for equivalence of literals with non-recognized datatypes
6120
+
(and non-identical lexical form and datatype IRI) returns an error, indicating that it
6121
+
is unable to determine whether or not the values of the compared literals are equivalent. For example, an
6122
+
unextended implementation will produce an error when testing <span class="queryExcerpt"><code>"iiii"^^my:romanNumeral =
6123
+
"iv"^^my:romanNumeral</code></span>.
6114
6124
</p>
6115
6125
</section>
6116
6126
@@ -12796,6 +12806,9 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
12796
12806
<li>Forbid duplicated variables in `VALUES`.</li>
12797
12807
<li>Add in-between term type ORDER BY support for triple terms in <a href="#modOrderBy" class="sectionRef"></a>.</li>
12798
12808
<li>Fixes the previously informal definition of `EXISTS` by adding a formal definition in <a href="#func-filter-exists" class="sectionRef"></a>, which includes extending the <a href="#defn_eval" class="evalFct">eval</a> function with a solution mapping <var>μ<sub>ctx</sub></var> as third argument.</li>
12809
+
<li>Rename function `RDFterm-equal` as <a href="#func-sameValue"></a> and
12810
+
expand the definition to cover literal arguments of differing datatypes where the
12811
+
values are known to be equal or to be not equal.</li>
12799
12812
</ul>
12800
12813
</li>
12801
12814
<li>
@@ -12847,7 +12860,8 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
12847
12860
<li><a href="https://www.w3.org/2013/sparql-errata#editorial-query-2">editorial-query-2</a>: Missing space in <a href="#defn_algJoin">Join definition</a></li>
12848
12861
<li><a href="https://www.w3.org/2013/sparql-errata#editorial-query-3">editorial-query-3</a>: Incorrect link for DELETE DATA in <a href="#grammarBNodes" class="sectionRef"></a></li>
12849
12862
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-1">clarification-query-1</a>: Fix explanation of IN and NOT IN in <a href="#func-in" class="sectionRef"></a> and <a href="#func-not-in" class="sectionRef"></a></li>
12850
-
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-2">clarification-query-2</a>: Remove unneeded reference to the semantics above in <a href="#operatorExtensibility" class="sectionRef"></a></li>
12863
+
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-2">clarification-query-2</a>: Remove unneeded reference to the semantics above in <a href="#operatorExtensibility"
12864
+
class="sectionRef"></a></li>
12851
12865
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-3">clarification-query-3</a>: Rephrase equality definition in <a href="#func-sameValue" class="sectionRef"></a></li>
12852
12866
<li><a href="https://www.w3.org/2013/sparql-errata#errata-query-1">errata-query-1</a>: Let V be an empty set instead of empty multiset in <a href="#defn_evalALP">Function ALP definition</a></li>
12853
12867
<li><a href="https://www.w3.org/2013/sparql-errata#errata-query-2">errata-query-2</a>: Fix grammar of PropertyListPathNotEmpty in <a href="#grammar" class="sectionRef"></a></li>
0 commit comments