java.math |
Provides classes for performing arbitrary-precision integer arithmetic
(BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
BigInteger is analogous to Java's 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, BigInteger
provides modular arithmetic, GCD calculation, primality testing, prime
generation, bit manipulation, and a few other miscellaneous operations.
BigDecimal provides arbitrary-precision signed decimal numbers suitable for
currency calculations and the like. BigDecimal gives the user complete
control over rounding behavior, allowing the user to choose from a
comprehensive set of eight rounding modes.
NOTE: java.math.BigDecimal is found in J2ME CDC profiles such
as J2ME Foundation Profile.
@since JDK1.1
|
Java Source File Name | Type | Comment |
BigDecimal.java | Class | Immutable, arbitrary-precision signed decimal numbers. |
BigInteger.java | Class | Immutable arbitrary-precision integers. |
BitSieve.java | Class | A simple bit sieve used for finding prime number candidates. |
MutableBigInteger.java | Class | A class used to represent multiprecision integers that makes efficient
use of allocated space by allowing a number to occupy only part of
an array so that the arrays do not have to be reallocated as often.
When performing an operation with many iterations the array used to
hold a number is only reallocated when necessary and does not have to
be the same size as the number it represents. |
SignedMutableBigInteger.java | Class | A class used to represent multiprecision integers that makes efficient
use of allocated space by allowing a number to occupy only part of
an array so that the arrays do not have to be reallocated as often.
When performing an operation with many iterations the array used to
hold a number is only increased when necessary and does not have to
be the same size as the number it represents. |