First lets see an example of big integer.
BigInteger b1 = new BigInteger("293847293847938798");
BigInteger b2 = BigInteger.valueOf(1298L);
b1 = b1.add(b2);
b1 = b1.subtract(b2);
b1 = b1.multiply(b2);
b1 = b1.divide(b2);
b1 = b1.negete();
int exponent = 3;
b1=b1.pow(exponent);
Now lets see an example of big decimal.
int exponent = 3;
b1=b1.pow(exponent);
Now lets see an example of big decimal.
Bigdecimal b1 = new Bigdecimal("348950394.943859438");
Bigdecimal b2 = Bigdecimal.valueOf(1298L);
b1 = b1.add(b2);
b1 = b1.subtract(b2);
b1 = b1.multiply(b2);
b1 = b1.divide(b2);
b1 = b1.negete();
No comments:
Post a Comment