Here's the setting:
For my undergraduate dissertation, I want to test the reactive algorithms used in the LHC. Basically the first step is this: given some 4-momentum
p[0] = nullvector(45.0000000000106,33.03951484238976,14.97124733712793,26.6317895033428)
I want to simulate experimental data by adding some (e.g. 50) randomly generated 4-vectors to the last three components of order 10 ^ (- 12), so that they are small (which is where physics is interesting), but significantly higher than the accuracy of double swimming 15 decimal places. So a quick and dirty solution is this:
seed=time(NULL);
srand(seed);
random=(rand()%9001)*1.0E-15;
random=random+1E-12;
printf("%.15E\n",random);
This gives me random numbers between 1E-12 and 10E-12 (= 1E-11) with three decimal places max, so in "real" doubles it gives me 15 decimal places.
: ?
PS: ? ( ;))