Skip to content Skip to sidebar Skip to footer

Overflow In Exp, Python

can't really figure out why this error RuntimeWarning: overflow encountered in exp is showing up. The function I'm trying to implement is: Id = lambda t_u, yp: Is * (np.exp((Vin(t_

Solution 1:

Vin can return a value as high as 1.0; then you subtract something, resulting in an utterly unknown quantity. You multiply that by 40, subtract 1, and raise epsilon to that power. Depending on the value of yp, there's plenty of room for overflow in this process. A sufficiently negative value for yp will cause the problem without reference to intermediate computations.

numpy.exp(n) overflows for some value in the range 700-800. This suggests that yp is perhaps <= -350.

Post a Comment for "Overflow In Exp, Python"