[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16222048#comment-16222048 ] vikas garg commented on JEXL-242: - yeah i have checked that. Java is returning the results correctly. don't know somehow jexl is not returning it accurately > 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16222015#comment-16222015 ] vikas garg commented on JEXL-242: - is there any document , comment or code which can explain this inconsistency ? or how much it can vary ? > 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=16222009#comment-16222009 ] vikas garg edited comment on JEXL-242 at 10/27/17 9:32 AM: --- [~dmitri_blinov] I don't think so. Even in java if you do this simple addition this will return the exact value. Jexl is working fine if the value is like 0.06 + 0.03 = 0.09 it is behaving incorrectly only for 0.05 value. That should not happen. It should have consistency. was (Author: gargvk10): I don't think so. Even in java if you do this simple addition this will return the exact value. Jexl is working fine if the value is like 0.06 + 0.03 = 0.09 it is behaving incorrectly only for 0.05 value. That should not happen. It should have consistency. > 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=16222009#comment-16222009 ] vikas garg edited comment on JEXL-242 at 10/27/17 9:31 AM: --- I don't think so. Even in java if you do this simple addition this will return the exact value. Jexl is working fine if the value is like 0.06 + 0.03 = 0.09 it is behaving incorrectly only for 0.05 value. That should not happen. It should have consistency. was (Author: gargvk10): I don't think so. Even in jave if you do this simple addition this will return the exact value. Jexl is working fine if the value is like 0.06 + 0.03 = 0.09 it is behaving incorrectly only for 0.05 value. That should not happen. It should have consistency. > 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16222009#comment-16222009 ] vikas garg commented on JEXL-242: - I don't think so. Even in jave if you do this simple addition this will return the exact value. Jexl is working fine if the value is like 0.06 + 0.03 = 0.09 it is behaving incorrectly only for 0.05 value. That should not happen. It should have consistency. > 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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; final JexlContext context = new MapContext(); context.set("a",a); context.set("b",b); JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); Double c = jsp.evaluate(context); The value returned by evaluation is -48.055 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; 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.055 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; > final JexlContext context = new MapContext(); > context.set("a",a); > context.set("b",b); > JexlEngine JEXL_ENGINE = new JexlBuilder().strict(true).silent(true).create(); > JexlExpression jsp = JEXL_ENGINE.createExpression("a+b"); > Double c = jsp.evaluate(context); > The value returned by evaluation is -48.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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.055 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.055 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.055 instead of -48.06 > There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (JEXL-242) invalid jexl calculation while doing sum for particular value
vikas garg created JEXL-242: --- Summary: 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; Double c = this.expressionToEvaluate.evaluate(expression); The value returned by evaluation is -48.055 instead of -48.06 There seems some precision issue in calculation -- This message was sent by Atlassian JIRA (v6.4.14#64029)