Since you're in C++, I think it's best to create your own large integer class (e.g. CVeryLargeInt). The CVeryLargeInt can daisy chain several int64 encapsulated in a class conatining an ibt64 and a int position, which will be the position in the number. The daisychaining is done through aggregation.
The very big downside to this solution is that you will have to do some serious (operator overloading) implementation on all operations you want to do on these very large ints (e.g. overload the +, -, *, ...., off course you can write overloads using other overloads, e.g. write a * using the +).
What do you need these large numbers for anyway? And how important is precision in your large numbers? I would go for floats, if possible, since it's very rare that precision is important using such large numbers.




Reply With Quote