title: js parseInt() one off (large number)
body: <p>When I run the following:</p>
  
  <pre><code>parseInt('96589218797811259658921879781126'.slice(0, 16), 10);
  </code></pre>
  
  <p>the output is</p>
  
  <pre><code>9658921879781124
  </code></pre>
  
  <p>whereas the expected is, as you can see:</p>
  
  <pre><code>9658921879781125
  </code></pre>
  
  <p>What is the cause? I understand vaguely in googling around that there are <a href="http://2ality.com/2012/07/large-integers.html" rel="nofollow noreferrer">issues with large numbers</a> in JS and that this indeed appears to be above that threshold, but I don't know what to do about it, or what is happening in this specific case. Thank you.</p>
  
  <p>Edit: Thanks for the answers, I see that depending on an integer this size is bad news. The reason for using an integer is because I need to increment by one, then compare to the rest of the string. In this case, the first half of the string should equal the second half after incrementing the first half by one. What is an alternative approach?</p>