public class BigInteger extends Object
Modifier and Type | Field and Description |
---|---|
static BigInteger |
ONE |
static BigInteger |
ZERO |
Constructor and Description |
---|
BigInteger(byte[] bval) |
BigInteger(int sign,
byte[] mag) |
BigInteger(int bitLength,
int certainty,
Random rnd) |
BigInteger(int numBits,
Random rnd) |
BigInteger(String sval) |
BigInteger(String sval,
int rdx) |
public static final BigInteger ZERO
public static final BigInteger ONE
public BigInteger(String sval) throws NumberFormatException
NumberFormatException
public BigInteger(String sval, int rdx) throws NumberFormatException
NumberFormatException
public BigInteger(byte[] bval) throws NumberFormatException
NumberFormatException
public BigInteger(int sign, byte[] mag) throws NumberFormatException
NumberFormatException
public BigInteger(int numBits, Random rnd) throws IllegalArgumentException
IllegalArgumentException
public BigInteger(int bitLength, int certainty, Random rnd) throws ArithmeticException
ArithmeticException
public BigInteger abs()
public BigInteger add(BigInteger val) throws ArithmeticException
ArithmeticException
public BigInteger and(BigInteger value)
public BigInteger andNot(BigInteger value)
public int bitCount()
public int bitLength()
public int compareTo(Object o)
public int compareTo(BigInteger val)
public BigInteger divide(BigInteger val) throws ArithmeticException
ArithmeticException
public BigInteger[] divideAndRemainder(BigInteger val) throws ArithmeticException
ArithmeticException
public boolean equals(Object val)
Object
public BigInteger gcd(BigInteger val)
public int hashCode()
Object
public int intValue()
public byte byteValue()
public boolean isProbablePrime(int certainty)
From Knuth Vol 2, pg 395.
public long longValue()
public BigInteger max(BigInteger val)
public BigInteger min(BigInteger val)
public BigInteger mod(BigInteger m) throws ArithmeticException
ArithmeticException
public BigInteger modInverse(BigInteger m) throws ArithmeticException
ArithmeticException
public BigInteger modPow(BigInteger exponent, BigInteger m) throws ArithmeticException
ArithmeticException
public BigInteger multiply(BigInteger val)
public BigInteger negate()
public BigInteger not()
public BigInteger pow(int exp) throws ArithmeticException
ArithmeticException
public static BigInteger probablePrime(int bitLength, Random random)
public BigInteger remainder(BigInteger n) throws ArithmeticException
ArithmeticException
public BigInteger shiftLeft(int n)
public BigInteger shiftRight(int n)
public int signum()
public BigInteger subtract(BigInteger val)
public byte[] toByteArray()
public BigInteger xor(BigInteger val)
public BigInteger or(BigInteger value)
public BigInteger setBit(int n) throws ArithmeticException
ArithmeticException
public BigInteger clearBit(int n) throws ArithmeticException
ArithmeticException
public BigInteger flipBit(int n) throws ArithmeticException
ArithmeticException
public String toString()
Object
public String toString(int rdx)
public static BigInteger valueOf(long val)
public int getLowestSetBit()
public boolean testBit(int n) throws ArithmeticException
ArithmeticException