Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Java Platform, Standard Edition
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== java.math === The {{Javadoc:SE|package=java.math|java/math}} package supports [[Arbitrary-precision arithmetic|multiprecision arithmetic]] (including modular arithmetic operations) and provides multiprecision prime number generators used for cryptographic key generation. The main classes of the package are: * {{Javadoc:SE|java/math|BigDecimal}} β provides arbitrary-precision signed decimal numbers. <code>BigDecimal</code> gives the user control over rounding behavior through <code>RoundingMode</code>. * {{Javadoc:SE|java/math|BigInteger}} β provides arbitrary-precision integers. Operations on <code>BigInteger</code> do not [[Arithmetic overflow|overflow]] or lose precision. In addition to standard arithmetic operations, it provides [[modular arithmetic]], [[Greatest common divisor|GCD]] calculation, [[primality testing]], [[prime number]] generation, [[bit]] manipulation, and other miscellaneous operations. * {{Javadoc:SE|java/math|MathContext}} β encapsulate the context settings that describe certain rules for numerical operators. * {{Javadoc:SE|java/math|RoundingMode}} β an enumeration that provides eight rounding behaviors.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)