title: Printf'ing floating point numbers in C++ gives zeroes
body: <p>I am doing some c++ right now and stumbled on a problem I can't get to wrap my head around.</p>
  
  <p>I am doing a floating point comparison like this:</p>
  
  <pre><code>if(dists.at&lt;float&gt;(i,0) &lt;= 0.80 * dists.at&lt;float&gt;(i,1)) {
    matched = true;
    matches++;
  } else {
    printf((dists.at&lt;float&gt;(i,0) &lt;= 0.80 * dists.at&lt;float&gt;(i,1)) ? "true\n" : "false");
    printf("threw one away because of dist: %f/%f\n", dists.at&lt;float&gt;(i,0),dists.at&lt;float&gt;(i,1));
  }
  </code></pre>
  
  <p>at the first line, the comparison threw a false what means: dists[0] > dists[1]
  When we print the values, the results are this:</p>
  
  <pre><code>falsethrew one away because of dist: 0.000000/0.000000
  falsethrew one away because of dist: 0.000000/0.000000
  </code></pre>
  
  <p>I think it has something to do with the results not being a float or something, but I'm no pro at C++ so I could use some help to find out what these values are.</p>