title: Why does >= operator work as > operator in C when compared with 0.9
body: <p>I was working with C and tried this :-</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
       float b=0.8,a=0.6;
       if(a&amp;&amp;b&gt;=0.8)
       printf("\nclass")  ;
       else
       printf("\nb");
       return 0;
  }
  </code></pre>
  
  <p>And the output came :-</p>
  
  <pre><code>class
  </code></pre>
  
  <p>But when I changed the value of b to 0.9 and expression in if to a&amp;&amp;b>=0.9 :- </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
       float b=0.9,a=0.6;
       if(a&amp;&amp;b&gt;=0.9)
       printf("\nclass")  ;
       else
       printf("\nb");
       return 0;
  }
  </code></pre>
  
  <p>then output was:-</p>
  
  <pre><code>b
  </code></pre>
  
  <p>Can anyone explain why >= operator started to act as > operator when the value of b was 0.9 ?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Something to add as some guys think I am wasting their time :-
  I also tried to debug it as :-</p>
  
  <pre><code>    #include&lt;stdio.h&gt;
  int main()
  {
  float b=0.9,a=0.6;
  printf(" int a   -   %d\n", (int)a);
  printf("int b -    %d\n", (int)b);
  printf("a&amp;&amp;b  -   %d\n", a&amp;&amp;b);
  printf("b&gt;=0.9  -  %d\n", b&gt;=0.9);
  if(a&amp;&amp;b&gt;=0.9)
  printf("\nclass");
  else
  printf("\nb");
  return 0;   
  }
  </code></pre>
  
  <p>Now the O/p was :-</p>
  
  <pre><code>int a   -   0
  int b -    0
  a&amp;&amp;b  -   1
  b&gt;=0.9  -  0
  </code></pre>
  
  <p>Now please that "Precedence Guy" tell me what order of precedence would be followed in a single >= operator. </p>