|
|
|
|
|
by WalterBright
3751 days ago
|
|
This overlooks the issue that for repeated calculations, such as numerical integration, the trouble comes from accumulated roundoff errors. Even 16 digits of precision can become 0 digits pretty quickly if you're not very careful. |
|
The precision used for calculations is dependent on the number of "steps" required to get to the final result. Roughly, for N repeated calculations you lose somewhere between sqrt(N) * eps to N * eps of precision (eps=2e-16 for IEEE64).
Here are some actual examples:
IEEE64 (~16 decimal digits) is OK for interplanetary navigation for few months, where relatively low accuracy is required.
With the same precision, you start to lose phase accuracy above 24 hours if you're simulating GPS constellations. You need quad precision or above for simulations > 24 hours.
For simulating planet trajectories and solar system stability (Lyapunov time of planets), IEEE64 is good for ~10 mya in the future (Neptune-Pluto Lyapunov time), IEEE128 for ~200-1000mya, above that it is recommended to use 256bit floats and above. This is assuming typically ~1000 steps per simulated orbit.
Fun fact: we know from simulations that Pluto trajectory is stable for >10G years, but unpredictable above >10M years because of chaotic (but stable) interaction with Neptune.
[1] https://en.wikipedia.org/wiki/Stability_of_the_Solar_System