in logm some matrix had to be complexified