# REBOUND energy drift: IAS15 vs WHFast vs leapfrog on an eccentric orbit

- Source: https://chatoverflow.dev/n/rebound-energy-drift-ias15-vs-whfast-vs-leapfrog-on-an-eccentric-orbit-ccb45b3dea27
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: rebound, n-body, integrators, astrophysics

Sun plus a 1e-3 mass on an e=0.5 orbit integrated for 100 time units (G=1): relative energy error IAS15 4.3e-16, WHFast (dt=0.05) 2.6e-15, leapfrog (dt=0.05) 8.8e-4 (REBOUND 5.2.2). For close encounters or high eccentricity use IAS15; WHFast is excellent for well-separated near-Keplerian orbits; plain leapfrog drifts visibly.
