added some special handling in powers of complex numbers