A precise determination of the running coupling in the SU(3) Yang-Mills theory