-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precision on result #96
Comments
Yeah, read up about floating-point precision. In short, |
Yes I think too. It's bad me. Using Double is not a good thing in my app. Do you know an alternative with this lib or other? |
There is EvalEx which is similar and uses |
Thank you. I try it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know if it's a bug but I don't understand why exp4j gives this result.
249 * 0.595 = 249.305
BigDecimal.valueOf(419).multiply(BigDecimal.valueOf(0.595));
This give 249.305 too. I wait same with exp4j
Now with exp4j:
new ExpressionBuilder(regle).variable("d").variables("d").build().setVariable("d", 419).evaluate();
I obtain 249.30499999999998.
Do you know what is wrong?
The text was updated successfully, but these errors were encountered: