  Reliable studies of the long-term dynamics of planetary systems require
numerical integrators that are accurate and fast. The challenge is often
formidable because the chaotic nature of many systems requires relative
numerical error bounds at or close to machine precision (~1e-16,
double-precision arithmetic), otherwise numerical chaos may dominate over
physical chaos. Currently, the speed/accuracy demands are usually only met by
symplectic integrators. For example, the most up-to-date long-term astronomical
solutions for the solar system in the past (widely used in, e.g.,
astrochronology and high-precision geological dating) have been obtained using
symplectic integrators. Yet, the source codes of these integrators are
unavailable. Here I present the symplectic integrator orbitN (lean version 1.0)
with the primary goal of generating accurate and reproducible long-term orbital
solutions for near-Keplerian planetary systems (here the solar system) with a
dominant mass M0. Among other features, orbitN-1.0 includes M0's quadrupole
moment, a lunar contribution, and post-Newtonian corrections (1PN) due to M0
(fast symplectic implementation). To reduce numerical roundoff errors, Kahan
compensated summation was implemented. I use orbitN to provide insight into the
effect of various processes on the long-term chaos in the solar system.
Notably, 1PN corrections have the opposite effect on chaoticity/stability on
100-Myr vs. Gyr-time scale. For the current application, orbitN is about as
fast or faster (factor 1.15-2.6) than comparable integrators, depending on
hardware. The orbitN source code (C) is available at github.com/rezeebe/orbitN.
