-
Notifications
You must be signed in to change notification settings - Fork 17
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
xsd:decimal parsed as xsd:double #108
Comments
A bug and it is now fixed. |
sorry for nitpicking @josd, but another little issue seems to be present with shorthand syntax @prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://www.example.org/> .
:foo :bar "10.5"^^xsd:decimal, 11.5 , 4.2E9.
{
:foo :bar ?value .
([] ?datatype) log:dtlit ?value
}
=>
{
?value a ?datatype
} .
gives
I think the second value should be decimal and not double |
I see your point but when you have numerals that are the result of a calculation eye can't do better than
for which eye will pass
Another reasoner might do better and pass
We just want to indice that we have a double precision number with a precision of |
this is understandable when calculations are involved. But in my example, I can see no calculation besides parsing. Also, if the same data:
is loaded from a separate file with the |
the changes on May 1 (v10.5.9) apparently had an impact on the @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
@prefix : <http://example/org/> .
:example1 rdf:value (3.0 7.0) .
:example2 rdf:value ("3.0"^^xsd:decimal "7.0"^^xsd:decimal) .
{
?example rdf:value ?value .
?value math:max ?max .
}
=>
{
?example :max ?max
} . with v10.5.8 we get, as expected: @prefix : <http://example/org/>.
:example1 :max 7.0 .
:example2 :max 7.0 . But with version v10.5.9 I get ** ERROR ** eam ** error(type_error(evaluable,<http://www.w3.org/2001/XMLSchema#decimal> / 0),context(system:(is)/2,_4652)) The error is due to Sorry @josd, I keep bothering you with these kinds of little issues, the fact is that the eye reasoner is such an awesome tool and I'm using it for everything :-) |
Thank you very much @giacomociti for your observation and also for your kind words ;-) The |
here I am again :-D The above fix for # data.ttl
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example/org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:example2 rdf:value (3.0 7.0) .
:example3 rdf:value ("3.0"^^xsd:decimal "7.0"^^xsd:decimal) . # rules.n3
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
@prefix : <http://example/org/> .
{
?example rdf:value ?value .
?value math:max ?max .
}
=>
{
?example :max ?max
} .
I get no results if I use eye --nope --quiet --pass-only-new rules.n3 --turtle data.ttl It works fine without the |
Thank you very much @giacomociti for finding👍 The
|
the following
derives
:foo :type xsd:double
. Is it on purpose or it's a bug?The text was updated successfully, but these errors were encountered: