title: Why does +0.0 > -0.0 not hold for IEEE754 floats?
body: <p>IEEE754 floating point numbers have the concept of a <a href="https://en.wikipedia.org/wiki/Signed_zero" rel="nofollow noreferrer">signed zero</a>, i.e. there are two different bit patterns for <code>-0.0</code> and <code>+0.0</code>, which can be understood as one-sided limits: ±0 := lim<sub><em>δ</em>→0</sub> ±<em>δ</em>.   The standard provides these numbers for consistency with the (signed) infinities <code>+Inf</code> and <code>-Inf</code> (<code>1./±0.</code> gives <code>±Inf</code>), and there is some evidence that it helps reduce roundoff errors.</p>
  
  <p>It is clear from the limit that while they are different entities, they <em>compare</em> to the same value, i.e, <code>+0.0 == -0.0</code> holds.  However, from the limit I would also think that the following thing should hold: <code>+0.0 &gt; -0.0</code>, since it holds for any small <em>δ</em>.  This however is <em>not true</em>.  Since this property would occasionally be useful (think about distinguishing the two zeros, for example),  is there any compelling reason why the standards committee chose not to do that?</p>