Closed
Description
Problem
it is possible that at extremely small voltages there may be machine precision error of less than 1 part per million because the single diode model has the term exp(x) - 1
which has an increasing error as x → 0 because exp(x)
→ 1, so 1 - 1 is a very, very small number close to zero.
Solution
Use np.expm1(x)
instead of np.exp(x) - 1
as suggested in this comment
Additional context
#409