Business Computing, loss of accuracy problems

When business computing, be sure to use the String BigDecimal constructor. Otherwise it will lose precision digital mess, behind

Here Insert Picture Description
As shown in FIG, Test3, is correct, it returns 0.06, while the former two
return is similar to the
Here Insert Picture Description
values

Published 30 original articles · won praise 0 · Views 454

Guess you like

Origin blog.csdn.net/weixin_44841849/article/details/104816592