title: Format of complex number in Python
body: <p>I am wondering about the way Python (3.3.0) prints complex numbers.  I am looking for an explanation, not a way to change the print.</p>
  
  <p>Example:</p>
  
  <pre><code>&gt;&gt;&gt; complex(1,1)-complex(1,1)
  0j
  </code></pre>
  
  <p>Why doesn't it just print "0"?  My guess is: to keep the output of type complex.</p>
  
  <p>Next example:</p>
  
  <pre><code>&gt;&gt;&gt; complex(0,1)*-1
  (-0-1j)
  </code></pre>
  
  <p>Well, a simple "-1j" or "(-1j)" would have done.  And why "-0"??  Isn't that the same as +0?  It doesn't seem to be a rounding problem:</p>
  
  <pre><code>&gt;&gt;&gt; (complex(0,1)*-1).real == 0.0
  True
  </code></pre>
  
  <p>And when the imaginary part gets positive, the -0 vanishes:</p>
  
  <pre><code>&gt;&gt;&gt; complex(0,1)
  1j
  &gt;&gt;&gt; complex(0,1)*-1
  (-0-1j)
  &gt;&gt;&gt; complex(0,1)*-1*-1
  1j
  </code></pre>
  
  <p>Yet another example:</p>
  
  <pre><code>&gt;&gt;&gt; complex(0,1)*complex(0,1)*-1
  (1-0j)
  &gt;&gt;&gt; complex(0,1)*complex(0,1)*-1*-1
  (-1+0j)
  &gt;&gt;&gt; (complex(0,1)*complex(0,1)*-1).imag
  -0.0
  </code></pre>
  
  <p>Am I missing something here?</p>