| 类 | 描述 |
|---|---|
| BigDecimal |
不变的,任意精度的带符号的十进制数字。
|
| BigInteger |
不可变的任意精度整数。
|
| MathContext |
封装描述数字运算符的某些规则的上下文设置的不可变对象,例如由 BigDecimal类实现的那些规则。
|
| Enum | 描述 |
|---|---|
| RoundingMode |
指定能够丢弃精度的数值运算的
舍入行为 。
|
BigInteger )和任意精度十进制运算( BigDecimal )的类。
BigInteger类似于原始整数类型,除了它提供任意精度,因此对BigInteger的操作不会溢出或丢失精度。
除标准算术运算外, BigInteger还提供了模数运算,GCD计算,原始测试,初级生成,位操作以及其他一些杂项操作。
BigDecimal提供适用于货币计算的任意精度有符号的十进制数等。
BigDecimal给用户完全控制舍入行为,允许用户从全面的八种舍入模式中进行选择。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.