I am trying to compute 2^1000 (2 to the power of 1000) using c#. I need the value to all places. I've been scratching my head for a while now because I can't seem to figure out a way to achieve this in c#.
Is there some kind of type that will store a number 300+ digits long, that I'm missing? :)
Thanks
Floating point allows computers to store very large numbers and also decimals, but the format still has a specific number of bits, and that limits the range of floating point values and mathematical operations just as with integers.
Yes, but only in .NET 4.0 - System.Numerics.BigInteger
.
If you can use .NET 4.0, I'd go for that. Otherwise, I'm sure there are third party libraries around. Let me know if you want me to try to find some.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With