I was wondering if there might not be a class that would allow as much accuracy a开发者_开发百科s there is memory. With overloaded operators in order to do arithmetic on it as if it was a normal number.
Ex:
BigNumber num;
num = 8;
for(int i = 0; i < 5000000; ++i)
{
num *= num;
}
Thanks
There are plenty libraries for that, like GMP (it provides also a C++ interface) or cbignum.
You'll probably find as many libraries of this kind as you wish.
精彩评论