Handling large numbers in C++?

kasperasky picture kasperasky · Sep 22, 2008 · Viewed 57.8k times · Source

What is the best way to handle large numeric inputs in C++ (for example 10^100)?

For algorithms I usually switch over to ruby and I sometimes use strings.

Any other good methods?

Answer

hometoast picture hometoast · Sep 22, 2008

It sounds like you're looking for a way to enter Arbitrary Precision numbers. here are two libraries you could use: GMP and MAPM