title: Why doesn't conversion to int work on large float numbers in python?
body: <p>When I pass large <code>float</code> numbers into <code>int</code> or <code>math.ceil</code> or <code>math.float</code> the conversion in inaccurate.</p>
  <pre><code>&gt;&gt;&gt; int(1000000000000000000000000.11)
  999999999999999983222784
  &gt;&gt;&gt; ceil(10000000000000000000000000000.11)
  9999999999999999583119736832
  </code></pre>
  <p>When I pass a large int to it, it works fine. This might be because it checks the type of number and finds it to be <code>int</code>.</p>
  <pre><code>&gt;&gt;&gt; int(9000000000000000000000000000000000000000000000000000000)
  9000000000000000000000000000000000000000000000000000000
  </code></pre>
  <p>I have looked at <a href="https://stackoverflow.com/questions/42235122/how-to-convert-large-float-values-to-int">this</a> answer and found a workaround but I don't know <strong>why</strong> it behaves like this.</p>