commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank (JIRA)" <>
Subject [jira] [Created] (JEXL-143) Huge numbers are rounded
Date Sun, 27 Oct 2013 13:10:30 GMT
Frank created JEXL-143:

             Summary: Huge numbers are rounded 
                 Key: JEXL-143
             Project: Commons JEXL
          Issue Type: Improvement
    Affects Versions: 2.1.1
         Environment: Ubunu 12.04, android studio 0.2.10
            Reporter: Frank

When calculating huge numbers, which are still in the long range the result is wrong (or getting
rounded somehow), e.g.
Expression e = jexl.createExpression("2^62");
JexlContext context = new MapContext();
String res = String.valueOf(e.evaluate(context));

returns `4611686018427388000` but it should be `4611686018427387904`

This message was sent by Atlassian JIRA

View raw message