You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
You cannot. I've created a fork which uses BigDecimal instead of double as its basis: bdparsii
Using BigDecimal does have its price, it's about 10 times slower to perform the calculations. That's simply the due to the arbitrary precision of BigDecimals, the rest of parsii's fastness is still there.
Note, the port is not production tested, requires java 8 and brings in a dependency: obermuhlner's big-math.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
calculate the following,the result is wroing
Scope scope = new Scope();
Variable a = scope.create("a");
Expression expr = Parser.parse("a + 2.4", scope);
a.setValue(1.2);
double evaluate = expr.evaluate();
System.out.println(evaluate);
the result is 3.5999999999999996
How to calculate use BigDecimal , then result is 3.6 ?
The text was updated successfully, but these errors were encountered: