Python3 failing big division?
<p>Straight to the point...</p>

<p>By using a website like <a href="http://www.javascripter.net/math/calculators/100digitbigintcalculator.htm" rel="nofollow">this</a></p>

<p>I can perform the division</p>

<pre><code>521867179249063104431771532319014802773340606735040694338278785354627691365941164783141053870302908448515826940518729762675345436448874794321999883308020735915961604709858819996385388187935859640654596335746881134780531452843909715448234514762462143856204913946601253808724104934316876333775771684458187648281797991584927160155639951080324566002195236407608721860154059967443327355489731291105400056189691357913203235154988726468260641765071983123570916184780526935910110174741817085928010767101123823291935770762480197142805725028939936563200000000000000000000000000000000000000000000000000
</code></pre>

<p>over</p>

<pre><code>788657867364790503552363213932185062295135977687173263294742533244359449963403342920304284011984623904177212138919638830257642790242637105061926624952829931113462857270763317237396988943922445621451664240254033291864131227428294853277524242407573903240321257405579568660226031904170324062351700858796178922222789623703897374720000000000000000000000000000000000000000000000000
</code></pre>

<p>which becomes</p>

<pre><code>661715556065930365627163346132458831897321703017638669364788134708891795956726411057801285583913163781806953211915554723373931451847059830252175887712457307547649354135460619296383882957897161889636280577155889117185
</code></pre>

<p>I perform the same operation in python, I get</p>

<pre><code>661715556065930359197186982471212353583889520695638616110586544529019733927881270928911271177789723412658535123976620081599644618300461938312003378924403625257962695989873267296634026151114440358844358704274123784192
</code></pre>

<p>The first 16 numbers are correct, the rest is just a mess. How could this be? I'm using <code>int(a/b)</code> to remove the scientific notification <code>+e**</code>, perhaps this is causing it...</p>

<pre><code>    Python 3.4.4 |Continuum Analytics, Inc.| (default, Feb 16 2016, 09:54:04) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
    &gt;&gt;&gt; a = 521867179249063104431771532319014802773340606735040694338278785354627691365941164783141053870302908448515826940518729762675345436448874794321999883308020735915961604709858819996385388187935859640654596335746881134780531452843909715448234514762462143856204913946601253808724104934316876333775771684458187648281797991584927160155639951080324566002195236407608721860154059967443327355489731291105400056189691357913203235154988726468260641765071983123570916184780526935910110174741817085928010767101123823291935770762480197142805725028939936563200000000000000000000000000000000000000000000000000
    &gt;&gt;&gt; b = 788657867364790503552363213932185062295135977687173263294742533244359449963403342920304284011984623904177212138919638830257642790242637105061926624952829931113462857270763317237396988943922445621451664240254033291864131227428294853277524242407573903240321257405579568660226031904170324062351700858796178922222789623703897374720000000000000000000000000000000000000000000000000
    &gt;&gt;&gt; a // b
    661715556065930365627163346132458831897321703017638669364788134708891795956726411057801285583913163781806953211915554723373931451847059830252175887712457307547649354135460619296383882957897161889636280577155889117185
</code></pre>

<p>In <strong>python3</strong>, <strong>integer-division</strong> is done by <code>//</code> operator.</p>

<p>Here's the relevant <a href="https://www.python.org/dev/peps/pep-0238/" rel="nofollow">PEP 238</a></p>

python