Python Exponential Integration: Overflow Encountered In Exp
This has probably been asked a million times; but i can't figure out the solution for my specific problem. Here is my code: import numpy as np import matplotlib.pyplot as plt from
Solution 1:
In spite of the fact that the numbers are very big. Answering your question.
You can use the relation (exp(x) - 1) = 1/(exp(x)-1) = exp(-x)/(1 - exp(-x)), to rewrite a = lambda x: (x**(5/3))*np.exp(-x) / (np.exp(-x)-1)
and this gives you zero.
*Also you are using a highly suspicious R_S/R_S
in the formulas for T_d1 and T_d2, c is the light speed? Should not be 3e8 instead of 3e10?
Post a Comment for "Python Exponential Integration: Overflow Encountered In Exp"