title: comparing float/double values using == operator
body: <p>The code review tool I use complains with the below when I start comparing two float values using equality operator. What is the correct way and how to do it? Is there a helper function (commons-*) out there which I can reuse? </p>
  
  <p><strong>Description</strong></p>
  
  <p>Cannot compare floating-point values using the equals (==) operator</p>
  
  <p><strong>Explanation</strong></p>
  
  <p>Comparing floating-point values by using either the equality (==) or inequality (!=) operators is not always accurate because of rounding errors.</p>
  
  <p><strong>Recommendation</strong></p>
  
  <p>Compare the two float values to see if they are close in value.</p>
  
  <pre><code>float a;
  float b;
  
  if(a==b)
  {
  ..
  }
  </code></pre>