Sqrt handles imaginary, and extra checks on inner product