Java java.math MathContext fields, constructors, methods, implement or subclass

Example usage for Java java.math MathContext fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.math MathContext.

The text is from its open source code.

Field

MathContextUNLIMITED
A MathContext object whose settings have the values required for unlimited precision arithmetic.
MathContextDECIMAL32
A MathContext object with a precision setting matching the IEEE 754R Decimal32 format, 7 digits, and a rounding mode of RoundingMode#HALF_EVEN HALF_EVEN , the IEEE 754R default.
MathContextDECIMAL64
A MathContext object with a precision setting matching the IEEE 754R Decimal64 format, 16 digits, and a rounding mode of RoundingMode#HALF_EVEN HALF_EVEN , the IEEE 754R default.
MathContextDECIMAL128
A MathContext object with a precision setting matching the IEEE 754R Decimal128 format, 34 digits, and a rounding mode of RoundingMode#HALF_EVEN HALF_EVEN , the IEEE 754R default.

Constructor

MathContext(int setPrecision)
Constructs a new MathContext with the specified precision and the RoundingMode#HALF_UP HALF_UP rounding mode.
MathContext(String val)
Constructs a new MathContext from a string.
MathContext(int setPrecision, RoundingMode setRoundingMode)
Constructs a new MathContext with a specified precision and rounding mode.

Method

intgetPrecision()
Returns the precision setting.
RoundingModegetRoundingMode()
Returns the roundingMode setting.