BigDecimal是标准的类,在编译器中不需要特殊支持,它可以表示任意精度的小数,并对它们进行计算。
BigDecimal is a standard class, with no special support in the compiler, to represent arbitrary-precision decimal Numbers and perform arithmetic on them.
它在各种各样的计算机系统上运行,尤其擅长于涉及任意长度整数和小数、图、矩阵和多项式代数的算术。
It runs on a variety of computer systems and is especially good at arithmetic involving arbitrary-length integers and fractions, graphics, and matrix and polynomial algebra.
在内部,可以用任意精度任何范围的值和一个换算因子来表示BigDecimal,换算因子表示左移小数点多少位,从而得到所期望范围内的值。
Internally, BigDecimal is represented as an arbitrary-precision unscaled value and a scale factor, which represents how many places to move the decimal point left to obtain the scaled value.
应用推荐