Java Reference
In-Depth Information
Table 22-3
Methods in the BigInteger Class (continued)
RETURNS
METHOD/ACTION
BigInteger max(BigInteger val)
Returns the maximum of this BigInteger and val
BigInteger min(BigInteger val)
Returns the minimum of this BigInteger and val
BigInteger mod(BigInteger m)
Returns a BigInteger whose value is (this
mod m)
BigInteger modInverse(BigInteger m)
Returns a BigInteger whose value is (this-1 mod
m)
BigInteger modPow(BigInteger exponent, BigInteger m)
Returns a BigInteger whose value is
(thisexponent mod m)
BigInteger multiply(BigInteger val)
Returns a BigInteger whose value is (this * val)
BigInteger negate()
Returns a BigInteger whose value is (-this)
BigInteger not()
Returns a BigInteger whose value is (~this)
BigInteger or(BigInteger val)
Returns a BigInteger whose value is (this | val)
BigInteger pow(int exponent)
Returns a BigInteger whose value is
(this.exponent)
BigInteger remainder(BigInteger val)
Returns a BigInteger whose value is (this % val)
BigInteger setBit(int n)
Returns a BigInteger whose value is equivalent
to this BigIntegerwith the designated bit set
BigInteger shiftLeft(int n)
Returns a BigInteger whose value is (this < n)
BigInteger
shiftRight(int n)
Returns a BigInteger whose value is (this > n)
int
signum()
Returns the sign of this BigInteger
BigInteger
subtract(BigInteger val)
Returns a BigInteger whose value is (this - val)
boolean
testBit(int n)
Returns true if and only if the designated bit is
set
Byte[]
toByteArray()
Returns a byte array containing the two's-
complement representation of this BigInteger
(continues)
Search WWH ::




Custom Search