May 8th, 2010, 05:09 AM
Is it possible to create an integer variable that can store more than 64 bits of information?
May 8th, 2010, 06:00 AM
Yes, it is possible, that won't be an actual build-in integer (because for example: 128bit integer you create a class that has 4 32bit int members and operate with that) but with operator overloading you can make it act like an build-in int.
Take a look here: http://en.wikipedia.org/wiki/Bignum there are some links to libraries that implement this so you don't have to implement it yourself.
Last edited by Zlatomir; May 8th, 2010 at 06:03 AM.
May 8th, 2010, 10:25 AM
GMP is the most widely used for large numbers. The precision is arbitrary. The floating point class is precise up to 41 billion digits.
I'm pretty sure it's integer classes don't have a limit (other than your RAM of course.)
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.