We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Test public void test() throws Exception { ExpressRunner runner = new ExpressRunner(true, true); DefaultContext<String, Object> context = new DefaultContext<>(); context.put("a", 5006d); context.put("b", 7d); context.put("c", 28d); Object r = runner.execute("a * b / c", context, null, true, true); Object r2 = runner.execute("a / c * b", context, null, true, true); System.out.println(r); System.out.println(r2); System.out.println(5006d * 7d / 28d); System.out.println(5006d / 28d * 7d); } 得到结果 1251.5000000000 1251.49999999990 1251.5 1251.5
为什么先乘后除 和 先除后乘 结果不一致呢
3.3.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
为什么先乘后除 和 先除后乘 结果不一致呢
3.3.4
The text was updated successfully, but these errors were encountered: