How do you raise a Java BigInteger to the power of a BigInteger without doing modular arithmetic? -


I'm computing some big integer, and I need to increase BigInteger in the power of another BigInteger. The .pow () method what I want, but assumes an integer in the form of logic. The modpow method takes a BigInteger as a logic, but I do not want to answer a value that I am trying to calculate .

My BigInter is too big to represent as exponent intrrite. Does a person suggest a way to work around this boundary?

You should not try to calculate the power of someone with a very large number of very large numbers . As a result, large amounts of memory will be used in the number if you calculate a.pow (b) then there will be approximately log (a) * b digits in it. If b is too large to fit into an integer, then for very low values ​​of a , the result will be several billion digits.

Try again You are trying to achieve this without this campaign and how to get it.


Comments