[
https://issues.apache.org/jira/browse/JENA-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791483#comment-16791483
]
ASF subversion and git services commented on JENA-1679:
-------------------------------------------------------
Commit 66d14eda44dd0f37a9df31ed27c55c26600ff5f8 in jena's branch
refs/heads/master from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=66d14ed ]
Merge pull request #541 from afs/ebv-NaN
JENA-1679: EBV values for NaN (double and float)
> Effective boolean value for "NaN"^^xsd:float/xsd:double should be false
> -----------------------------------------------------------------------
>
> Key: JENA-1679
> URL: https://issues.apache.org/jira/browse/JENA-1679
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 3.10.0
> Environment: Tested on Jena 3.9
> Reporter: Richard Cyganiak
> Assignee: Andy Seaborne
> Priority: Major
> Fix For: Jena 3.11.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> SPARQL 1.1 defines the [effective boolean
> value|https://www.w3.org/TR/sparql11-query/#ebv
> ] (EBV) of the special numeric value NaN as follows:
> {quote}
> If the argument is a numeric type or a typed literal with a datatype derived
> from a numeric type, and it has a valid lexical form, the EBV is false if the
> operand value is NaN or is numerically equal to zero; otherwise the EBV is
> true.
> {quote}
> Jena however treats it as {{true}}. The following queries both return
> {{true}} but should return {{false}} (using {{!(!expr))}} to get the EBV):
> {noformat}
> SELECT (!(!"NaN"^^<http://www.w3.org/2001/XMLSchema#double>) AS ?x) WHERE {}
> SELECT (!(!"NaN"^^<http://www.w3.org/2001/XMLSchema#float>) AS ?x) WHERE {}
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)