浮点数不精确,不能比较


如果相比较浮点数,就用BigDecimal,BigInteger。
他们可以处理任意长度的值,BigDecimal处理任意精度的浮点数运算,BigInteger处理任意精度的整数运算。


猜你喜欢

转载自blog.csdn.net/qq_40803626/article/details/81046332