title: C++ Float Division and Precision
body: <p>I know that 511 divided by 512 actually equals 0.998046875. I also know that the precision of floats is 7 digits. My question is, when I do this math in C++ (GCC) the result I get is 0.998047, which is a rounded value. I'd prefer to just get the truncated value of 0.998046, how can I do that?</p>
  
  <pre><code>  float a = 511.0f;
    float b = 512.0f;
    float c = a / b;
  </code></pre>