I am trying to calculate the value of pi (just for fun, I know it's already done for millions of decimal places), the program I made works fine, but the problem is that, it is constrained by the accuracy of double values. Is there anyway to create 'extendable' floating point values (ie. it grows bigger as greater precision is reached). If such a library does not already exist, can you please tell me how to go about making it?


Recommended Answers


If you go with MPIR, check out my popular "how to" for installing it: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/ .
(It includes example programs, in both C and C++.)

Jump to Post

All 3 Replies

See http://gmplib.org/ (or use MPIR for Visual C++ and mingw without cygwin)

Thanks a lot for your help.
My problem is solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.