/* the following turns off all simplification of complex quantities except 
   ratios and powers of I; normal simplification can be returned by typing
   Cx:;I:Cx[0,1] */

I:
Cx[$r,$i] :: $r + I $i
/* ratios of I */
$x/I :: -I $x 
$x/($$y I) :: -I $x/$$y
/* powers of I */
($x _= Nc[$x] <0)^($n _= Oddp[2 $n]) :: I^(2 $n) (-$x)^($n)
I^($n _= Evenp[Nc[$n]]) :: (-1)^($n/2)
I^($n _= Oddp[Nc[$n]] & Nc[$n] ~= 1) :: ((-1)^((Nc[$n]-1)/2) I)^($n/Nc[$n])
 
