# Thread: How BigInteger handels large number?

1. Member
Join Date
Oct 2011
Posts
24
Rep Power
0

## How BigInteger handels large number?

Recently I used BigInteger. I was surprised by the magic does by BigInteger. It can calculates all general function for large numbers. Can anyone tell how this magic is done? how the larger numbers are stored in memory? how much bits are used in such case? Thank you.

2. Moderator
Join Date
Jul 2010
Location
California
Posts
1,641
Rep Power
9

## Re: How BigInteger handels large number?

Recommend starting at the source: java.math: BigInteger.java

3. ## Re: How BigInteger handels large number?

Originally Posted by ravi.joshi53
Can anyone tell how this magic is done?
No, it's a secret because it's magic; reading the source code will turn you into a newt seven times seventyseven times (this makes fivehundred thirtynine times which is too large to fit in a byte, so it's real magic).

kindest regards,

Jos ;-)

4. Member
Join Date
Oct 2011
Posts
24
Rep Power
0

## Re: How BigInteger handels large number?

:) Ok.... Thank you.

5. ## Re: How BigInteger handels large number?

Originally Posted by JosAH
No, it's a secret because it's magic; reading the source code will turn you into a newt seven times seventyseven times (this makes fivehundred thirtynine times which is too large to fit in a byte, so it's real magic).
And please for the love of all things holy, don't let this happen! We already have one Newt too many around here!

6. ## Re: How BigInteger handels large number?

Oh my goodness! See that poor man's diabolical smile on his heavily deformed face! He is doomed eleven times fourtynine times (that also makes fivehundred thirtynine times, so it must be Beelzebub himself, I'm telling you! He must've read the secret source code from the entire SE set of classes! He's the mother of all newts!

kindest regards,

Jos (runs ---------------------------------------------------------------------------------------> that a'way)