Is this the best datatype to use for doing calculations for extremely large numbers such as computing pi . Or am I going to need to create my own algorithm for handling extremely large numbers? how does software like superpi handle such a large number, im assuming its all split up and they have appropriate code for dealing with exactly that.

Also when I do calculations with long doubles sometimes I get this weird code that gets outputted on cout instead of the number. It doesnt always happen and im wondering what it is.

Recommended Answers

All 2 Replies

No, in that case it's likely to use another datatype ...

The following links might help you:
http://www.nongnu.org/hpalib/
http://www.apfloat.org/apfloat/ (I think this is the best :))

If you want more information on this topic you can always try searching Google for 'C++ high precision' or something ...

yeah that apfloat thing looks nice, thanks man.

Be a part of the DaniWeb community

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