title: Python OverflowError: math range error
body: <p>Similar to <a href="https://stackoverflow.com/questions/4050907/python-overflowerror-math-range-error">Python: OverflowError: math range error</a>. Below is my code, along with the error (and variable values) I get when I try to debug. Doing math manually in python console works fine. Is it because sigma is an int? For what it's worth, the MSE variable is generated by summing a numpy array, and the simga variable is just "100" hardcoded. </p>
  
  <pre><code>def normalize_error(sigma, mse):
      return math.exp(-mse/(2*(sigma**2)))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ngJ4j.png" alt="enter image description here"></p>