You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2023/11/28 20:46:00 UTC
[jira] [Comment Edited] (JEXL-417) JexlArithmetic looses precision during arithmetic operator execution
[ https://issues.apache.org/jira/browse/JEXL-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17790745#comment-17790745 ]
Henri Biestro edited comment on JEXL-417 at 11/28/23 8:45 PM:
--------------------------------------------------------------
Commit [5ab46d|https://github.com/apache/commons-jexl/commit/5ab46d9935c992eab7ab7dce4f1fde196976c789] and [d894074|https://github.com/apache/commons-jexl/commit/d894074fb485c8f23ca5111ad1470dc6018bc9fb]
was (Author: henrib):
Commit [5ab46d|https://github.com/apache/commons-jexl/commit/5ab46d9935c992eab7ab7dce4f1fde196976c789] and [d894074||https://github.com/apache/commons-jexl/commit/d894074fb485c8f23ca5111ad1470dc6018bc9fb]
> JexlArithmetic looses precision during arithmetic operator execution
> --------------------------------------------------------------------
>
> Key: JEXL-417
> URL: https://issues.apache.org/jira/browse/JEXL-417
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.3.1
>
>
> When a an argument/variable is a BigDecimal or BigInteger, JEXL may try and convert it to double/long during arithmetic operator execution leading to unexpected results.
> See [discussion|https://lists.apache.org/thread/h673m554ncjg06f5pqhjjtvy1qk3o2jt]
> {code:java}(56.1B - 12) / 12 = 3.66666B != 3{code}
> User intent about precision should be maintained.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)