Computing AAlpha, log(A), and Related Matrix Functions by Contour Integrals