New research reveals how Mayan astronomers built a precise eclipse prediction system using complex lunar mathematics.