Package | Description |
---|---|
org.teavm.classlib.java.math |
Modifier and Type | Field and Description |
---|---|
static TBigInteger |
TBigInteger.ONE
The
BigInteger constant 1. |
static TBigInteger |
TBigInteger.TEN
The
BigInteger constant 10. |
static TBigInteger |
TBigInteger.ZERO
The
BigInteger constant 0. |
Modifier and Type | Method and Description |
---|---|
TBigInteger |
TBigInteger.abs()
Returns a (new)
BigInteger whose value is the absolute value of
this . |
TBigInteger |
TBigInteger.add(TBigInteger val)
Returns a new
BigInteger whose value is this + val . |
TBigInteger |
TBigInteger.and(TBigInteger val)
Returns a new
BigInteger whose value is this & val . |
TBigInteger |
TBigInteger.andNot(TBigInteger val)
Returns a new
BigInteger whose value is this & ~val . |
TBigInteger |
TBigInteger.clearBit(int n)
Returns a new
BigInteger which has the same binary representation
as this but with the bit at position n cleared. |
TBigInteger |
TBigInteger.divide(TBigInteger divisor)
Returns a new
BigInteger whose value is this / divisor . |
TBigInteger[] |
TBigInteger.divideAndRemainder(TBigInteger divisor)
Returns a
BigInteger array which contains this / divisor
at index 0 and this % divisor at index 1. |
TBigInteger |
TBigInteger.flipBit(int n)
Returns a new
BigInteger which has the same binary representation
as this but with the bit at position n flipped. |
TBigInteger |
TBigInteger.gcd(TBigInteger val)
Returns a new
BigInteger whose value is greatest common divisor
of this and val . |
TBigInteger |
TBigInteger.max(TBigInteger val)
Returns the maximum of this
BigInteger and val . |
TBigInteger |
TBigInteger.min(TBigInteger val)
Returns the minimum of this
BigInteger and val . |
TBigInteger |
TBigInteger.mod(TBigInteger m)
Returns a new
BigInteger whose value is this mod m . |
TBigInteger |
TBigInteger.modInverse(TBigInteger m)
Returns a new
BigInteger whose value is 1/this mod m . |
TBigInteger |
TBigInteger.modPow(TBigInteger exponent,
TBigInteger m)
Returns a new
BigInteger whose value is this^exponent mod
m . |
TBigInteger |
TBigInteger.multiply(TBigInteger val)
Returns a new
BigInteger whose value is this * val . |
TBigInteger |
TBigInteger.negate()
Returns a new
BigInteger whose value is the -this . |
TBigInteger |
TBigInteger.nextProbablePrime()
Returns the smallest integer x >
this which is probably prime as
a BigInteger instance. |
TBigInteger |
TBigInteger.not()
Returns a new
BigInteger whose value is ~this . |
TBigInteger |
TBigInteger.or(TBigInteger val)
Returns a new
BigInteger whose value is this | val . |
TBigInteger |
TBigInteger.pow(int exp)
Returns a new
BigInteger whose value is this ^ exp . |
static TBigInteger |
TBigInteger.probablePrime(int bitLength,
Random rnd)
Returns a random positive
BigInteger instance in the range [0,
2^(bitLength)-1] which is probably prime. |
TBigInteger |
TBigInteger.remainder(TBigInteger divisor)
Returns a new
BigInteger whose value is this % divisor . |
TBigInteger |
TBigInteger.setBit(int n)
Returns a new
BigInteger which has the same binary representation
as this but with the bit at position n set. |
TBigInteger |
TBigInteger.shiftLeft(int n)
Returns a new
BigInteger whose value is this << n . |
TBigInteger |
TBigInteger.shiftRight(int n)
Returns a new
BigInteger whose value is this >> n . |
TBigInteger |
TBigInteger.subtract(TBigInteger val)
Returns a new
BigInteger whose value is this - val . |
TBigInteger |
TBigDecimal.toBigInteger()
Returns this
BigDecimal as a big integer instance. |
TBigInteger |
TBigDecimal.toBigIntegerExact()
Returns this
BigDecimal as a big integer instance if it has no
fractional part. |
TBigInteger |
TBigDecimal.unscaledValue()
Returns the unscaled value (mantissa) of this
BigDecimal instance
as a BigInteger . |
static TBigInteger |
TBigInteger.valueOf(long val) |
TBigInteger |
TBigInteger.xor(TBigInteger val)
Returns a new
BigInteger whose value is this ^ val . |
Modifier and Type | Method and Description |
---|---|
TBigInteger |
TBigInteger.add(TBigInteger val)
Returns a new
BigInteger whose value is this + val . |
TBigInteger |
TBigInteger.and(TBigInteger val)
Returns a new
BigInteger whose value is this & val . |
TBigInteger |
TBigInteger.andNot(TBigInteger val)
Returns a new
BigInteger whose value is this & ~val . |
int |
TBigInteger.compareTo(TBigInteger val)
Compares this
BigInteger with val . |
TBigInteger |
TBigInteger.divide(TBigInteger divisor)
Returns a new
BigInteger whose value is this / divisor . |
TBigInteger[] |
TBigInteger.divideAndRemainder(TBigInteger divisor)
Returns a
BigInteger array which contains this / divisor
at index 0 and this % divisor at index 1. |
TBigInteger |
TBigInteger.gcd(TBigInteger val)
Returns a new
BigInteger whose value is greatest common divisor
of this and val . |
TBigInteger |
TBigInteger.max(TBigInteger val)
Returns the maximum of this
BigInteger and val . |
TBigInteger |
TBigInteger.min(TBigInteger val)
Returns the minimum of this
BigInteger and val . |
TBigInteger |
TBigInteger.mod(TBigInteger m)
Returns a new
BigInteger whose value is this mod m . |
TBigInteger |
TBigInteger.modInverse(TBigInteger m)
Returns a new
BigInteger whose value is 1/this mod m . |
TBigInteger |
TBigInteger.modPow(TBigInteger exponent,
TBigInteger m)
Returns a new
BigInteger whose value is this^exponent mod
m . |
TBigInteger |
TBigInteger.multiply(TBigInteger val)
Returns a new
BigInteger whose value is this * val . |
TBigInteger |
TBigInteger.or(TBigInteger val)
Returns a new
BigInteger whose value is this | val . |
TBigInteger |
TBigInteger.remainder(TBigInteger divisor)
Returns a new
BigInteger whose value is this % divisor . |
TBigInteger |
TBigInteger.subtract(TBigInteger val)
Returns a new
BigInteger whose value is this - val . |
TBigInteger |
TBigInteger.xor(TBigInteger val)
Returns a new
BigInteger whose value is this ^ val . |
Constructor and Description |
---|
TBigDecimal(TBigInteger val)
Constructs a new
BigDecimal instance from the given big integer
val . |
TBigDecimal(TBigInteger unscaledVal,
int scale)
Constructs a new
BigDecimal instance from a given unscaled value
unscaledVal and a given scale. |
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.