Package | Description |
---|---|
org.teavm.classlib.java.math |
Modifier and Type | Field and Description |
---|---|
static TMathContext |
TMathContext.DECIMAL128
A
MathContext which corresponds to the IEEE 754r quadruple
decimal precision format: 34 digit precision and
TRoundingMode.HALF_EVEN rounding. |
static TMathContext |
TMathContext.DECIMAL32
A
MathContext which corresponds to the IEEE 754r single decimal
precision format: 7 digit precision and TRoundingMode.HALF_EVEN
rounding. |
static TMathContext |
TMathContext.DECIMAL64
A
MathContext which corresponds to the IEEE 754r double decimal
precision format: 16 digit precision and TRoundingMode.HALF_EVEN
rounding. |
static TMathContext |
TMathContext.UNLIMITED
A
MathContext for unlimited precision with
TRoundingMode.HALF_UP rounding. |
Modifier and Type | Method and Description |
---|---|
TBigDecimal |
TBigDecimal.abs(TMathContext mc)
Returns a new
BigDecimal whose value is the absolute value of
this . |
TBigDecimal |
TBigDecimal.add(TBigDecimal augend,
TMathContext mc)
Returns a new
BigDecimal whose value is this + augend . |
TBigDecimal |
TBigDecimal.divide(TBigDecimal divisor,
TMathContext mc)
Returns a new
BigDecimal whose value is this / divisor . |
TBigDecimal[] |
TBigDecimal.divideAndRemainder(TBigDecimal divisor,
TMathContext mc)
Returns a
BigDecimal array which contains the integral part of
this / divisor at index 0 and the remainder this %
divisor at index 1. |
TBigDecimal |
TBigDecimal.divideToIntegralValue(TBigDecimal divisor,
TMathContext mc)
Returns a new
BigDecimal whose value is the integral part of
this / divisor . |
TBigDecimal |
TBigDecimal.multiply(TBigDecimal multiplicand,
TMathContext mc)
Returns a new
BigDecimal whose value is this *
multiplicand . |
TBigDecimal |
TBigDecimal.negate(TMathContext mc)
Returns a new
BigDecimal whose value is the -this . |
TBigDecimal |
TBigDecimal.plus(TMathContext mc)
Returns a new
BigDecimal whose value is +this . |
TBigDecimal |
TBigDecimal.pow(int n,
TMathContext mc)
Returns a new
BigDecimal whose value is this ^ n . |
TBigDecimal |
TBigDecimal.remainder(TBigDecimal divisor,
TMathContext mc)
Returns a new
BigDecimal whose value is this % divisor . |
TBigDecimal |
TBigDecimal.round(TMathContext mc)
Returns a new
BigDecimal whose value is this , rounded
according to the passed context mc . |
TBigDecimal |
TBigDecimal.subtract(TBigDecimal subtrahend,
TMathContext mc)
Returns a new
BigDecimal whose value is this - subtrahend . |
Constructor and Description |
---|
TBigDecimal(char[] in,
int offset,
int len,
TMathContext mc)
Constructs a new
BigDecimal instance from a string representation
given as a character array. |
TBigDecimal(char[] in,
TMathContext mc)
Constructs a new
BigDecimal instance from a string representation
given as a character array. |
TBigDecimal(double val,
TMathContext mc)
Constructs a new
BigDecimal instance from the 64bit double
val . |
TBigDecimal(int val,
TMathContext mc)
Constructs a new
BigDecimal instance from the given int val . |
TBigDecimal(long val,
TMathContext mc)
Constructs a new
BigDecimal instance from the given long val . |
TBigDecimal(String val,
TMathContext mc)
Constructs a new
BigDecimal instance from a string
representation. |
TBigDecimal(TBigInteger unscaledVal,
int scale,
TMathContext mc)
Constructs a new
BigDecimal instance from a given unscaled value
unscaledVal and a given scale. |
TBigDecimal(TBigInteger val,
TMathContext mc)
Constructs a new
BigDecimal instance from the given big integer
val . |
Copyright © 2019. All rights reserved.