title: Precision issue when doing math with BigInts
body: <p>I'm having a bit of a strange issue... I'm using an API that requires me to do a bit of math... I need to generate an integer using the following code:</p>
  
  <pre class="lang-py prettyprint-override"><code>import time
  
  id = long((time.time() - 14 * 24 * 60 * 60) * 1000.0 - 1420070400000L) &lt;&lt; 22
  #Output using 1578430631.86 as timestamp: 659137523812925440
  </code></pre>
  
  <p>The issue is that the example is in python, and I'm using Javascript... I tried converting it to JS like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>var ts = (new Date()).getTime() / 1000;
  var id = (BigInt((ts - 14 * 24 * 60 * 60) * 1000.0 - 1420070400000) &lt;&lt; 22).toString();
  //Output using 1578430631.86 as timestamp: 659137520205824000
  </code></pre>
  
  <p>As you can see the outputs differ, and that is a big issue.
  If someone can point me in the right direction, that would be really appreciated!
  Thanks in advance!</p>