今天在计算库存消耗百分比(消耗的库存/总库存)的时候遇到了一个错误,java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result....
Binary numbers can be multiplied using two methods,
1. BigDecimal num1 = new BigDecimal(2.225667);//这种写法不允许,会造成精度损失