The ancient calculator that predicted eclipses