✅ upper bound of BigInteger Type
The docs say there is no upper bound for the BigInteger type, it is only dependant on our hardware.
That answer is not really enough for me to understand so I thought it would help me understand if I calculate the upper bound for lets say 8 GB of RAM available / free .
I've come up with different approaches to calculate this and I'm afraid all my calculations are wrong.
if anyone could please provide a correct calculation for this i would be very thankful.
An example of what I've tried:
8GB Ram = 8 * 1024^3 bytes = 8.589.934.592 bytes
thus we can store 2.147.483.648 int32s or 1.073.741.824 int64s?
so we can store a number up to
That answer is not really enough for me to understand so I thought it would help me understand if I calculate the upper bound for lets say 8 GB of RAM available / free .
I've come up with different approaches to calculate this and I'm afraid all my calculations are wrong.
if anyone could please provide a correct calculation for this i would be very thankful.
An example of what I've tried:
8GB Ram = 8 * 1024^3 bytes = 8.589.934.592 bytes
thus we can store 2.147.483.648 int32s or 1.073.741.824 int64s?
so we can store a number up to
2^(2.147.483.648*32) or 2^(1.073.741.824*64) in the BigInteger?