+ 2
How to perform arithmetic operations between a BigInteger and a normal integer?
5 Answers
+ 2
try using BigInteger.valueOf(yourInt)
+ 2
bigint1.add(bigint2)
bigint1.divide(bigint2)
bigint1.multiply(bigint2)
bigint1.subtract(bigint2)
see
https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html
+ 2
to sum up:
bigint1.add(BigInteger.valueOf(yourInt))
+ 1
yea but i am asking about the arithmetic operations :)
+ 1
that is with two big ints ...i am saying about one bigint and a normal int