How do you raise a Java BigInteger to the power of a BigInteger without doing modular arithmetic?
Posted
by angstrom91
on Stack Overflow
See other posts from Stack Overflow
or by angstrom91
Published on 2010-05-15T07:14:14Z
Indexed on
2010/05/15
7:24 UTC
Read the original article
Hit count: 263
java
|biginteger
I'm doing some large integer computing, and I need to raise a BigInteger to the power of another BigInteger. The .pow() method does what I want, but takes an int value as an argument. The .modPow method takes a BigInteger as an argument, but I do not want an answer congruent to the value I'm trying to compute.
My BigInteger exponent is too large to be represented as an int, can someone suggest a way to work around this limitation?
© Stack Overflow or respective owner