Hey guys, I've got a question about variable maximum values, not just in C++, but in programming in general.
Days ago I programed the Karatsuba algorithm, which is used for integer multiplication with big numbers, since it's faster than the traditional multiplication method. I've had problems testing it's efficiency because of the max values of long long int.
My question is: when huge calculations are done (I'm think about cryptography, NASA, university investigations, financial markets, etc). How do they solve the problem of max values? Do they use different languages that are capable of handling them? They somehow avoid the limitations while using languages like C++?
> Do they use different languages that are capable of handling them?
> They somehow avoid the limitations while using languages like C++?
The basic limitation arises from the processor, not the programming language. Mathematical operations on numbers larger than what the processor instructions can support is performed using algorithms implemented in software.
These algorithms may be available as built-ins, may be part of the standard library, may be available in a third-party library, or may be just a set of functions in the program.