I get a Overflow error when i try this calculation, but i cant figure out why.
1-math.exp(-4*1000000*-0.0641515994108)
Try np.exp() instead of math.exp()
Numpy handles overflows more gracefully, np.exp(999) results in inf and 1. / (1. + np.exp(999)) therefore simply results in zero
import math import numpy as np print(1-np.exp(-4*1000000*-0.0641515994108))