title: Round float in C in STM32F
body: <p>I'd like to round two float values two only two decimals.</p>
  <p>This is the array of floats:</p>
  <pre><code>float result[2];
  </code></pre>
  <p>This is the rounding operation:</p>
  <pre><code>result[0] = roundf( result[0] * 100 ) / 100;
  result[1] = roundf( result[1] * 100 ) / 100;
  </code></pre>
  <p>For the value of :</p>
  <blockquote>
  <p>-3.99520659</p>
  </blockquote>
  <p>I expect -4, and I get -4</p>
  <p>But For the value of :</p>
  <blockquote>
  <p>8.07999992</p>
  </blockquote>
  <p>I expect 8, but I get the same number.</p>
  <p>For other ocasions I'd like the numbers to look like 3.4 o -2.1</p>
  <p>What can I do?</p>
  <p>Thanks!</p>