Strange error in python3 when doing big int calculation
<p>I was trying to do this in Python 3.5.2:</p>

<pre><code>int(204221389795918291262976/10000)
</code></pre>

<p>but got the unexpected result: <code>20422138979591827456</code></p>

<p>It's working fine in Python 2.7.12, result is: <code>20422138979591829126L</code></p>

<p>Any idea why Python 3 gave me the wrong result?</p>

<p>In python 3 you have to use integer division <code>//</code> explicitly or else float division will apply even between 2 integers.</p>

<p>That's one of the major changes between python 2 and python 3</p>

<p>In your example: (will work both in python 2 and python 3 so it's backwards compatible!)</p>

<pre><code>int(204221389795918291262976//10000)
20422138979591829126
</code></pre>

<p>BTW if you want to make this bug work with python 2 it is also possible :)</p>

<pre><code>from __future__ import division
</code></pre>

python python-3.x