© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
43 replies
Thalnos

✅ 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
2^(2.147.483.648*32)
2^(2.147.483.648*32)
or
2^(1.073.741.824*64)
2^(1.073.741.824*64)
in the BigInteger?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Out of bound error
C#CC# / help
4y ago
Calculating square root of any number using a lower and upper bound that guesses towards solution.
C#CC# / help
4y ago
✅ How to speed up execution of BigInteger.Pow?
C#CC# / help
17mo ago
cannot convert from 'TypeA' to 'TypeB' with generics
C#CC# / help
2y ago