Unlimited-precision integer library

D

Dave Theese

Hello all,

Can anybody recommend a freely-available library that provides
unlimited-precision integers? All of the standard arithmetic operations
would need to be supported as well as construction from a std::string and
representation as a std::string. For example, something along these lines:

unlimited_int
foo("68234626834978347342978234978432967234843857234582346234982437984237894
23798234982439842398");
cout << foo + 1 << endl;

Thanks in advance!
Dave

P.S. I believe such a library is under development in Boost, but is not yet
available. My desire would be to use this with the rational number library
from Boost, and then in turn use that with a matrix manipulation library to
do unlimited-precision matrix operations. Taking inverses, doing Gaussian
elimination, etc... can result in some mighty ugly rationals...
 
F

Frank Schmitt

Dave Theese said:
Hello all,

Can anybody recommend a freely-available library that provides
unlimited-precision integers? All of the standard arithmetic operations
would need to be supported as well as construction from a std::string and
representation as a std::string. For example, something along these lines:

unlimited_int
foo("68234626834978347342978234978432967234843857234582346234982437984237894
23798234982439842398");
cout << foo + 1 << endl;

Have you checked the Available C++ Libraries FAQ? It's posted here regularly.
Also, you might want to check out GMP (http://www.swox.com/gmp/).

HTH & kind regards
frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top