title: How are a float and a double compared?
body: <pre><code>float x=1.1;
  
  if(x==1.1) //This condition evaluates to false, since a float is being compared to a double.
  
  float x=1.25;
  
  if(x==1.25) //This condition evaluates to true, since 1.25 is not a recurring binary number.
  </code></pre>
  
  <p>However, I want to know how a <code>float</code> and a <code>double</code> are actually compared? </p>
  
  <p>Is the <code>float</code> promoted to a <code>double</code> (by adding leading 0s) and then compared?</p>