Does retyping an email to confirm really mitigate errors?

I've seen a lot of sites ask for email confirmation on the page, mostly by retyping the same email.

Does this reduce error rates or just infuriate users and what are the best ways to reduce errors for users when typing their email address (or contact number)?