fast matrix square root algorithm