Improvement of the method of diagonal Padé approximants for perturbative series in gauge theories