title: What is the maximum accuracy of a number given 'n' decimal places
body: <p>Finding out the maximum 64bit int is easy - <a href="https://stackoverflow.com/questions/307179/what-is-javascripts-highest-integer-value-that-a-number-can-go-to-without-losin">What is JavaScript&#39;s highest integer value that a number can go to without losing precision?</a></p>
  <p>I want to know the maximum size the number can be given a certain amount of decimal places for currencies.</p>
  <p>For instance:</p>
  <pre><code>0.99999999 // 8 decimal places
  99999999.99999999 // accurate
  999999999.99999999 // no longer accurate, becomes 1000000000
  </code></pre>
  <p>So for 8 places the number is &quot;around&quot; a billion.</p>
  <p>How can I precisely know this number, and also for other decimal places like 2 and 4? Thanks</p>