2、 Float类型占32位,有效数字约6至7位,数值范围介于-3.4E+38到3.4E+38之间。 3、 双精度浮点型,占用64位,有效数字约15至16位,数值范围在-1.7乘以10的负308次方到1.7乘以10的正308次方之间。 4、 根据应用需求,浮点变量可选择声明为 float 或 double 类型。两者主要 ...
In a previous blog post, I looked at the subtle handling required to handle double with BigDecimal. As I discussed in that post, using the BigDecimal(double) constructor rarely does what one would ...