This article describes a gravitational N-body integration algorithm conserv
ing linear and angular momentum and time-reversal symmetry. Forces are dyna
mically partitioned based on interbody separation, so that the long-range f
orces are evaluated relatively rarely, and close approaches are treated by
an efficient regularization technique. The method incorporates an automatic
stepsize adjustment based on a Sundman time-transformation. Although the s
cheme is formally second order, the most intensive computations (the close-
approach dynamics) are executed at higher order, thus improving the overall
accuracy. Numerical experiments indicate that the method can effectively t
reat few-body gravitational problems with two-body close approaches, and it
compares favorably with other schemes presented in the literature.