Classes | |
| struct | JunctionPair |
| One junction network: the exponential law over one or two antiparallel legs. More... | |
Functions | |
| double | safe_exp (double x) |
| exp(x) with the argument clamped into the safe range. | |
| double | exprel (double x) |
| (exp(x) − 1) / x, with the removable singularity at 0 handled. | |
Variables | |
| constexpr double | kThermalVoltage = 0.02585 |
| Thermal voltage k·T/q at 300 K, in volts. | |
| constexpr double | kMaxExponent = 80.0 |
| Ceiling on an exponent argument, so a transient overshoot cannot produce inf. | |
|
inline |
(exp(x) − 1) / x, with the removable singularity at 0 handled.
Two Taylor terms are already below double precision at the cutoff, so the branch is exact rather than approximate where it matters.
|
inline |
exp(x) with the argument clamped into the safe range.
|
inlineconstexpr |
Ceiling on an exponent argument, so a transient overshoot cannot produce inf.
exp(80) ≈ 5.5e34 is far past any current a real collector load will admit, and well short of exp's overflow near 709.
|
inlineconstexpr |
Thermal voltage k·T/q at 300 K, in volts.
A physical constant derived from k/q = 8.617e-5 V/K, not a fitted value.