BigDecimal的用法
不可变的,任意精度的,有符号十进制数。
BigDecimal valueOf(double val)
说明文档:
public static BigDecimal valueOf(double val) {
// Reminder: a zero double returns '0.0', so we cannot fastpath
// to use the constant ZERO. This might be important enough to
// justify a factory approach, a cache, or a few private
// constants, later.
return new BigDecimal(Double.toString(val));
}