Provides classes for performing arbitrary-precision integer arithmetic (
BigInteger) and arbitrary-precision decimal arithmetic (
BigIntegeris analogous to the primitive integer types except that it provides arbitrary precision, hence operations on
BigIntegers do not overflow or lose precision. In addition to standard arithmetic operations,
BigIntegerprovides modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations.
BigDecimalprovides arbitrary-precision signed decimal numbers suitable for currency calculations and the like.
BigDecimalgives the user complete control over rounding behavior, allowing the user to choose from a comprehensive set of eight rounding modes.
Class Summary Class Description BigDecimalImmutable, arbitrary-precision signed decimal numbers. BigIntegerImmutable arbitrary-precision integers. MathContextImmutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the
Enum Summary Enum Description RoundingModeSpecifies a rounding behavior for numerical operations capable of discarding precision.