title: OverflowError: long int too large to convert to float in python
body: <p>I tried to calculate poisson distribution in python as below:</p>
  
  <pre><code>p = math.pow(3,idx)
  depart = math.exp(-3) * p 
  depart = depart / math.factorial(idx)
  </code></pre>
  
  <p>idx ranges from 0</p>
  
  <p>But I got <code>OverflowError: long int too large to convert to float</code></p>
  
  <p>I tried to convert depart to <code>float</code> but no results.</p>