类 | 描述 |
---|---|
BigDecimal |
不可变的,任意精度有符号的十进制数。
|
BigInteger |
可变的任意精度整数。
|
MathContext |
不可变对象封装描述数值算子的某些规则的背景设置,如由
BigDecimal 类中实现这些。
|
Enum | 描述 |
---|---|
RoundingMode |
指定一个数值运算精度舍入行为能够丢弃。
|
BigInteger
)和任意精度的小数运算(
BigDecimal
)。
BigInteger
是类似于原始的整数类型,它除了提供任意精度,因此操作上
BigInteger
s不会溢出或丢失精度。除了标准的算术运算,
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.