I know this thread is liable to be closed soon, but donning my "coder hat" again, I'd like to offer a comment or two on a previous post from philippeb8, on his program to calculate "h" :-
Can I ask, is that the result of your first run of the program, or averaged over several. You're making extensive use of random numbers, so the results are not going to be the same every time.
Over several runs, I get values ranging from 5.23892e+19 to 5.24295e+19, with an average of 5.24133e+19. Giving your result to 6 significant digits is pointless when it's only accurate to 2. The same applies to most of the values you've shown throughout this thread, giving them to ridiculous accuracy which neither measurements nor calculations can achieve.
This is a common problem for people who implicitly trust what their computer tells them, and output their results to multiple decimal places, without considering accuracy, repeatability, or even having a feel for the scale and range of the expected results. That kind of thinking can, and has, led to mishaps and accidents in many fields.
I have a number of concerns about the posted code as well :-
The use of the standard library random number generator is not a good idea in any serious calculation. I'm not sure exactly what you're expecting from it, but it has a very limited range, and a pretty much linear distribution, which is very, very seldom found in nature. It's OK as a testing tool, but no substitue for a well designed and tested RNG.
I'm guessing you haven't considered the value of RAND_MAX very carefully either - on most implementations it's 0x7fff, or 32767, which means you're only ever going to get 32767 different values from your function - and again, this is a common misconception of people not aware of what's going on "under the hood", thinking they'll get an almost limitless sequence of completely different numbers. Don't confuse sequence length with range of values. You're generating the same 32767 values, over and over again (roughly 2,400 times) in your loop. They'll come in a different order, and slightly different distribution each time you run it, but it's not really random at all...
What exactly are you trying to calculate here? I've gone back through the thread trying to identify the constants used, and the one that puzzles me the most is the 80000000 used for the loop limit (and why are you using a long long? it fits in an int...). I'm guessing you want to generate h as the sum of many masses at random-ish distances, but why 80 million? (I'm also puzzled by the random numbers being in the range 4 to 2001, but that's not such a big concern.)
Since you're summing values, the loop count has a direct bearing on the result, e.g using 70 million "objects", h = 4.6e+019, while with 90 million it's 5.9e+019.
As far as I can see, what you've written isn't a simulator, it's just a strange calculation app, which converts arbitrary values into other arbitrary values, neither input nor output having much relationship to the real world.
I think you need to go back to basics and try to work out a mathematical model of your theory first, then, once you have something testable, start developing a possible simulation. Doing it backwards is never going to provide something workable.





