title: Why is BigDecimal.equals specified to compare both value and scale individually?
body: <p>This is not a question about how to compare two <code>BigDecimal</code> objects - I know that you can use <code>compareTo</code> instead of <code>equals</code> to do that, since <code>equals</code> is documented as:</p>
  
  <blockquote>
    <p>Unlike compareTo, this method considers two BigDecimal objects equal only if they are equal in value and scale (thus 2.0 is not equal to 2.00 when compared by this method).</p>
  </blockquote>
  
  <p>The question is: why has the <code>equals</code> been specified in this seemingly counter-intuitive manner? That is, why is it <strong>important</strong> to be able to distinguish between 2.0 and 2.00?</p>
  
  <p>It seems likely that there must be a reason for this, since the <code>Comparable</code> documentation, which specifies the <code>compareTo</code> method, states: </p>
  
  <blockquote>
    <p>It is strongly recommended (though not required) that natural orderings be consistent with equals</p>
  </blockquote>
  
  <p>I imagine there must be a good reason for ignoring this recommendation.</p>