cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Calculate something more than a var can
Calculate something more than a var can handle
Jan 1, 2013 at 8:32pm UTC
mitocondrio
(7)
Let's say I want to calculate something like PI using some algorithm, but with the number of digits I want to. How can I do it?
Jan 1, 2013 at 8:41pm UTC
Stewbond
(2827)
If you want 32 bits of precision, use a float
If you want 64 bits of precision, use a double
If you want a larger amount of precision, use a big numbers library.
http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
Topic archived. No new replies allowed.