You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "vikas garg (JIRA)" <ji...@apache.org> on 2017/10/27 09:15:00 UTC
[jira] [Updated] (JEXL-242) invalid jexl calculation while doing
sum for particular value
[ https://issues.apache.org/jira/browse/JEXL-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
vikas garg updated JEXL-242:
----------------------------
Description:
For a particular value of 0.05 , jexl is returning value unxepectedly
I have face an issue with following calcualtion:
Double a = -40.05;
Double b = -8.01;
JexlExpression expression = a+b;
final JexlContext context = new MapContext();
context.set("a",a);
context.set("b",b);
Double c = this.expression.evaluate(context);
The value returned by evaluation is -48.059999999999995 instead of -48.06
There seems some precision issue in calculation
was:
For a particular value of 0.05 , jexl is returning value unxepectedly
I have face an issue with following calcualtion:
Double a = -40.05;
Double b = -8.01;
JexlExpression expression = a+b;
Double c = this.expressionToEvaluate.evaluate(expression);
The value returned by evaluation is -48.059999999999995 instead of -48.06
There seems some precision issue in calculation
> invalid jexl calculation while doing sum for particular value
> -------------------------------------------------------------
>
> Key: JEXL-242
> URL: https://issues.apache.org/jira/browse/JEXL-242
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: vikas garg
> Priority: Blocker
>
> For a particular value of 0.05 , jexl is returning value unxepectedly
> I have face an issue with following calcualtion:
> Double a = -40.05;
> Double b = -8.01;
> JexlExpression expression = a+b;
> final JexlContext context = new MapContext();
> context.set("a",a);
> context.set("b",b);
> Double c = this.expression.evaluate(context);
> The value returned by evaluation is -48.059999999999995 instead of -48.06
> There seems some precision issue in calculation
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)