title: Comparing Same Float Values In C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1839422/strange-output-in-comparison-of-float-with-float-literal">strange output in comparison of float with float literal</a>  </p>
  </blockquote>
  
  
  
  <p>When I am trying to compare 2 same <code>float</code> values it doesn't print "equal values" in the following code : </p>
  
  <pre><code>void main()
  {
      float a = 0.7;
      clrscr();
      if (a &lt; 0.7)
          printf("value :  %f",a);
      else if (a == 0.7)
          printf("equal values");
      else
          printf("hello");
      getch();
  }
  </code></pre>
  
  <p>Thanks in advance.</p>