[ 
https://issues.apache.org/jira/browse/MARMOTTA-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rinciog Octavian updated MARMOTTA-627:
--------------------------------------
    Description: 
Hy,

I'm trying to calculate some distances and I need to make some arithmetic 
operations with number below 1.

Unfortunately, this kind of operation seems not to work with the latest version 
of Apache Marmotta (I'm using Apache Marmotta built from repo).

For example, the following query returns -39.5!!!!

SELECT  (  (4.5-4.4)*0.1 as ?c) 
WHERE {}

I've tried many combinations with xsd:decimal, xsd:float, xsd:double, but the 
answer is or 1.000 or -39.5.

Another example: 

SELECT  (0.1*0.1 as ?c) 
WHERE {}

returns 1.00

Thank you,


  was:
Hy,

I'm trying to calculate some distances and I need to make some arithmetic 
operations with number below 1.

Unfortunately, this kind of operation seems not to work with the latest version 
of Apache Marmotta (I'm using Apache Marmotta built from repo).

For example, the following query returns -39.5!!!!

SELECT  (  (4.5-4.4)*0.1 as ?c) 
WHERE {}

I've tried many combinations with xsd:decimal, xsd:float, xsd:double, but the 
answer is or 1.000 or -39.5.

Another example: 

SELECT  (0.1*0.1 as ?c) 
WHERE {}

return 1.00

Thank you,



> Arithmetic operation in Sparql query not working properly
> ---------------------------------------------------------
>
>                 Key: MARMOTTA-627
>                 URL: https://issues.apache.org/jira/browse/MARMOTTA-627
>             Project: Marmotta
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>         Environment: Postgresql: 9.3.10
> Server version: Apache Tomcat/7.0.52 (Ubuntu)
> OS Name:        Ubuntu 14.04
> OS Version:     3.13.0-74-generic
> Architecture:   amd64
> JVM Version:    1.7.0_91-b02
> JVM Vendor:     Oracle Corporation
> Marmotta: 3.4.0
>            Reporter: Rinciog Octavian
>            Priority: Blocker
>              Labels: Arithmetic, Bug, Critical
>
> Hy,
> I'm trying to calculate some distances and I need to make some arithmetic 
> operations with number below 1.
> Unfortunately, this kind of operation seems not to work with the latest 
> version of Apache Marmotta (I'm using Apache Marmotta built from repo).
> For example, the following query returns -39.5!!!!
> SELECT  (  (4.5-4.4)*0.1 as ?c) 
> WHERE {}
> I've tried many combinations with xsd:decimal, xsd:float, xsd:double, but the 
> answer is or 1.000 or -39.5.
> Another example: 
> SELECT  (0.1*0.1 as ?c) 
> WHERE {}
> returns 1.00
> Thank you,



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to