Theory of the N-Body Problem
June 9, 1996
gained while it was moving toward it. Without Jupiter being in the right place, the probe
didn't even have enough energy for its orbit to reach Jupiters' distance from the Sun. After
the slingshot effect, it now has enough energy to leave the solar system.
1.5.6 Program Bugs
Errors in implementing programs are inevitable, but it might be hoped that with
thorough testing, all serious programming errors can be eliminated. However, the nature
of the N-body problem is such that it can be surprisingly hard to distinguish programming
bugs from the unavoidable discretization and rounding errors. During the course of devel-
oping XStar, I found numerous bugs that did not have a significant impact
the step size
was small enough. As a result, most bugs simply made a given ODE integration method
appear to be less efficient than it should be. The number of bugs that were found only after
making very careful comparisons between the results of the different methods lead me to
believe that there probably still are some unknown bugs in at least some of the ODE inte-
gration methods implemented in XStar. Besides the possibility of unknown bugs, there are
even a few known bugs that I haven't bothered to fix.
It is therefore important to realize that when two integration methods are com-
pared, the comparison is really between two implementations of the methods with any
number of bugs in either one. This comparison, therefore, can't be the final judge of which
method is better, merely which implementation is better.
Orbit of
Path of space probe
FIGURE 18. An example of the sling shot effect
Previous page    Home    Table of Contents    Next page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
This document is best viewed as n-body.pdf because the translation to html was buggy.