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.

yeah that apfloat thing looks nice, thanks man.