Package java.math
BigInteger
) and arbitrary-precision decimal
arithmetic (BigDecimal
).See: Description
-
Class Summary Class Description BigDecimal Immutable, arbitrary-precision signed decimal numbers.BigInteger Immutable arbitrary-precision integers.MathContext Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by theBigDecimal
class. -
Enum Summary Enum Description RoundingMode Specifies a rounding behavior for numerical operations capable of discarding precision.
Package java.math Description
BigInteger
) and arbitrary-precision decimal
arithmetic (BigDecimal
). BigInteger
is analogous
to the primitive integer types except that it provides arbitrary
precision, hence operations on BigInteger
s 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.- Since:
- JDK1.1
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-java/math/package-summary.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.