title: round numbers in js
body: <p>I would like to round <code>45.19202405202648</code> to 3 decimal places.</p>
  
  <p>I tried :</p>
  
  <pre><code>n.toFixed(3);
  </code></pre>
  
  <p>also <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round</a></p>
  
  <pre><code>Math.round10(n, -3);
  myNamespace.round(n, 3);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Math.round(n * 1000 + Number.EPSILON ) / 1000;
  </code></pre>
  
  <p>but these solutions returns <code>45.19199999999999</code> insted of <code>45.192</code></p>
  
  <p><strong>EDIT :</strong> Real question is if I do <code>65.19202405202648.toFixed(3) - 20</code> I get <code>45.19199999999999</code></p>
  
  <p>Thanks for your help</p>