Calculate modulus of complex number (#650)