# How BigInteger handels large number?

• 03-23-2012, 11:56 PM
ravi.joshi53
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.
• 03-24-2012, 01:07 AM
doWhile
Re: How BigInteger handels large number?
Recommend starting at the source: java.math: BigInteger.java
• 03-24-2012, 10:40 AM
JosAH
Re: How BigInteger handels large number?
Quote:

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 ;-)
• 03-24-2012, 03:32 PM
ravi.joshi53
Re: How BigInteger handels large number?
:) Ok.... Thank you.
• 03-24-2012, 03:43 PM
Fubarable
Re: How BigInteger handels large number?
Quote:

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!

Attachment 3337
• 03-25-2012, 12:05 AM
JosAH
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)