title: Why does Gnu Octave have negative zeroes?
body: <p>This is an odd one I'm puzzled about.  I recently noticed at the Gnu Octave prompt, it's possible to enter in negative zeroes, like so:</p>
  
  <pre><code>octave:2&gt; abomination = -0
  </code></pre>
  
  <p>And it remembers it, too:</p>
  
  <pre><code>octave:3&gt; abomination
  abomination = -0
  </code></pre>
  
  <p>In the interest of sanity, negative zero does equal regular zero.  But I also noticed that the sign has some other effects.  Like these:</p>
  
  <pre><code>octave:6&gt; 4 * 0
  ans = 0
  octave:7&gt; 4 * -0
  ans = -0
  octave:8&gt; 4 / 0
  warning: division by zero
  ans = Inf
  octave:9&gt; 4 / -0
  warning: division by zero
  ans = -Inf
  </code></pre>
  
  <p>As one can see, the sign is preserved through certain operations.  But my question is why.  This seems like a radical departure from standard mathematics, where zero is essentially without sign.  Are there some attractive mathematical properties for having this?  Does this matter in certain fields of mathematics?</p>
  
  <p>FYI: Matlab, which octave is modeled after, does not have negative zeros.  Any attempts to use them are treated as regular zeros.</p>
  
  <p>EDIT:
  Matlab does have negative zeros, but they are not displayed in the default output.</p>