Very Large numbers

I'm making a game and need some very large numbers.

My goal is to be able to at least hold 30 digits of accuracy (28 to be exact), but I'm not sure if double is actually able to hold it. I've been looking at the accuracy for the double and it says it holds up to ~15 digits of accuracy, but looking around it seems to be able to hold more.

Should I make another data holder or is double big enough? If double isn't big enough how many should I use in the composite struct?
Last edited on
What operations do you need to perform with these numbers? You may be able to get away with writing a small bignum class.
I'm looking to use it for gravity calculations and resource limiting calculations. So the basic four (+-*/) plus square root, throw in an = for initialization, and that's about it.
Then it may be best to just use something like GMP.
I've never heard of GMP. What is it?
It's a library for processing numbers of abritrary precision, so it does exactly what you want.
Cool, Thank you. I'll look into it.
Topic archived. No new replies allowed.