BigInteger
初始化:
BigInteger bigInt = new BigInteger("2");
int 转 BigInteger
BigInteger bigInt = BigInteger.valueOf(1);
BigInteger 转 int
bigInt.intValue()
加法
bigInt1.add(bigInt2)
减法
bigInt1.subtract(bigInt2)
乘法
bigInt1.multiply(bigInt2)
除法
bigInt1.divide(bigInt2)
取商
bigInt1.divideAndRemainder(bigInt2)[0]
取余数
bigInt1.divideAndRemainder(bigInt2)[1]
次方
bigInt1.pow(2)
相反数
bigInt1.negate()