note
BrowserUk
<blockquote><i>I don't know in details how exactly using floating point numbers to do so causes problem, but clearly it did cause problems for KSP.</i></blockquote>
<p>I'm afraid that sums up the problem with your idea. You are positing a solution to a problem that you do not fully understand.
<p>Almost all problems with floating point math are down to programming errors that accumulate, because intermediate values are wrongly rounded or truncated.
<P>64-bit precision floating point math, with its 17 (16.94!) digits of decimal accuracy is more than capable of representing any given point within the Solar System in meters to the nearest millimetre. Problems only arise when absolute positional values are calculated by accumulating successive positions and their rounding errors.
<p>That is to say: the naive way to track an objects position is to initialise it with a known starting point -- say the top of a rocket stack at some lat/long here on earth -- and then modify its position every time period (say, once per second) using the last known position as the input to the next time cycle.
<P>The problem with this is that at each stage, tiny absolute representation errors can occur. Individually, these tiny errors in the 17 (decimal) significant digit are inconsequential; but each time the calculation is repeated, they can build up to the point of significance.
<p>There are many techniques for avoiding those accumulated errors -- a whole branch of mathematics is dedicated to exactly that, which I do not know well enough to attempt a summary of here.
<p>Even if the game required greater accuracy that could be achieved with 64-bit FP, moving to infinite precision irrational math as a response would be to take a sledgehammer to crack a nut. A simple move to 80-bit (21 significant digits) or 128-bit (34 sig. fig.) is a relatively simple change with minimal performance impact, that ensures that rounding errors would take trillions of repetitions - 1 trillion calculations at 1 per second represents a game time of ~11.6 million years! -- before they accumulate to anything significant.
<P>But even that is overkill for a game. If the math is done correctly, 64-bit FP is more than good enough for real life problems like manned space flight and modeling nuclear weapons. It is certainly good enough for games where the speed of computation is far more critical than the accuracy.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'</div>
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.
<p align=right> [http://thebottomline.cpaaustralia.com.au/|RIP Neil Armstrong]</p></div>
</font>
</div></div>
1009200
1009370