Question

Like the title says I'm in need of someway to store and compute with Integers in excess of 500,000 digits in C++. The operations that this program needs are: Divide(Integer), add, subtract, and modulus. Does anyone know of a library out there that can help me accomplish this?

Was it helpful?

Solution

GMP is what you want. There is no practical size limit to processing large integers or floating point numbers. GMP is capable of processing billions of digits, so you are well within the realistic range. It is primarily dependent on your system's architecture and available memory limitations.

http://gmplib.org/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top