title: Why is int(x-1) == x True in Python 3.7 with some values of x?
body: <p>In Python 3.7     <code>int(x-1) == x</code> is   <code>True</code>  for <code>x = 5e+17</code>
  Why is this so and how do I prevent this bug?</p>
  
  <p>To reproduce, paste this into your Python console:</p>
  
  <pre><code>int(5e+17-1) == 5e+17
  &gt;True
  </code></pre>
  
  <p>(I am using <code>int</code> because x is the result of a division and I need to parse it as int.)</p>