BigInteger.pow(BigInteger) ?
Posted
by
PeterW
on Stack Overflow
See other posts from Stack Overflow
or by PeterW
Published on 2011-01-03T05:39:33Z
Indexed on
2011/01/03
5:53 UTC
Read the original article
Hit count: 302
I'm playing with numbers in Java, and want to see how big a number I can make. It is my understanding that BigInteger can hold a number of infinite size, so long as my computer has enough Memory to hold such a number, correct?
My problem is that BigInteger.pow accepts only an int, not another BigInteger, which means I can only use a number up to 2,147,483,647 as the exponent. Is it possible to use the BigInteger class as such?
BigInteger.pow(BigInteger)
Thanks.
© Stack Overflow or respective owner