Bulmash initializePoisson

Percentage Accurate: 100.0% → 100.0%
Time: 20.9s
Alternatives: 20
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (+
  (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT))))
  (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    code = (ndchar / (1.0d0 + exp((-(((ec - vef) - edonor) - mu) / kbt)))) + (nachar / (1.0d0 + exp(((((ev + vef) + eaccept) + -mu) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / (1.0 + Math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + Math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	return (NdChar / (1.0 + math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Float64(Float64(Float64(Ec - Vef) - EDonor) - mu)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Float64(Ev + Vef) + EAccept) + Float64(-mu)) / KbT)))))
end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	tmp = (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[((-N[(N[(N[(Ec - Vef), $MachinePrecision] - EDonor), $MachinePrecision] - mu), $MachinePrecision]) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(N[(Ev + Vef), $MachinePrecision] + EAccept), $MachinePrecision] + (-mu)), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (+
  (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT))))
  (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    code = (ndchar / (1.0d0 + exp((-(((ec - vef) - edonor) - mu) / kbt)))) + (nachar / (1.0d0 + exp(((((ev + vef) + eaccept) + -mu) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / (1.0 + Math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + Math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	return (NdChar / (1.0 + math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Float64(Float64(Float64(Ec - Vef) - EDonor) - mu)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Float64(Ev + Vef) + EAccept) + Float64(-mu)) / KbT)))))
end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	tmp = (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[((-N[(N[(N[(Ec - Vef), $MachinePrecision] - EDonor), $MachinePrecision] - mu), $MachinePrecision]) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(N[(Ev + Vef), $MachinePrecision] + EAccept), $MachinePrecision] + (-mu)), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}}
\end{array}

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{NdChar}{\frac{1}{e^{\frac{\left(Ec - \left(mu + EDonor\right)\right) - Vef}{KbT}}} + 1} - \frac{NaChar}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (-
  (/ NdChar (+ (/ 1.0 (exp (/ (- (- Ec (+ mu EDonor)) Vef) KbT))) 1.0))
  (/ NaChar (- -1.0 (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / ((1.0 / exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - exp(((Vef + (EAccept + (Ev - mu))) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    code = (ndchar / ((1.0d0 / exp((((ec - (mu + edonor)) - vef) / kbt))) + 1.0d0)) - (nachar / ((-1.0d0) - exp(((vef + (eaccept + (ev - mu))) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NdChar / ((1.0 / Math.exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	return (NdChar / ((1.0 / math.exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - math.exp(((Vef + (EAccept + (Ev - mu))) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	return Float64(Float64(NdChar / Float64(Float64(1.0 / exp(Float64(Float64(Float64(Ec - Float64(mu + EDonor)) - Vef) / KbT))) + 1.0)) - Float64(NaChar / Float64(-1.0 - exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)))))
end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	tmp = (NdChar / ((1.0 / exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - exp(((Vef + (EAccept + (Ev - mu))) / KbT))));
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(N[(1.0 / N[Exp[N[(N[(N[(Ec - N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] - Vef), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - N[(NaChar / N[(-1.0 - N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{NdChar}{\frac{1}{e^{\frac{\left(Ec - \left(mu + EDonor\right)\right) - Vef}{KbT}}} + 1} - \frac{NaChar}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}
\end{array}
Derivation
  1. Initial program 99.9%

    \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
  2. Simplified99.9%

    \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. frac-2negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    2. distribute-frac-neg2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    3. exp-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. neg-sub0N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    10. associate-+r-N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    12. +-lowering-+.f6499.9%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
  5. Applied egg-rr99.9%

    \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
  6. Final simplification99.9%

    \[\leadsto \frac{NdChar}{\frac{1}{e^{\frac{\left(Ec - \left(mu + EDonor\right)\right) - Vef}{KbT}}} + 1} - \frac{NaChar}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
  7. Add Preprocessing

Alternative 2: 76.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\ t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{if}\;Vef \leq -2.1 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;Vef \leq 2.45 \cdot 10^{+36}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (- (- Ec EDonor) (+ Vef mu)))
        (t_1
         (+
          (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0))
          (/ NaChar (+ (exp (/ Vef KbT)) 1.0)))))
   (if (<= Vef -2.1e+133)
     t_1
     (if (<= Vef 2.45e+36)
       (+
        (/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
        (/
         NdChar
         (+
          (/
           -1.0
           (+
            -1.0
            (/
             (+ (/ (* -0.5 (* t_0 t_0)) KbT) (+ (+ Vef mu) (- EDonor Ec)))
             KbT)))
          1.0)))
       t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (Ec - EDonor) - (Vef + mu);
	double t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0));
	double tmp;
	if (Vef <= -2.1e+133) {
		tmp = t_1;
	} else if (Vef <= 2.45e+36) {
		tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (ec - edonor) - (vef + mu)
    t_1 = (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)) + (nachar / (exp((vef / kbt)) + 1.0d0))
    if (vef <= (-2.1d+133)) then
        tmp = t_1
    else if (vef <= 2.45d+36) then
        tmp = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (((-1.0d0) / ((-1.0d0) + (((((-0.5d0) * (t_0 * t_0)) / kbt) + ((vef + mu) + (edonor - ec))) / kbt))) + 1.0d0))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (Ec - EDonor) - (Vef + mu);
	double t_1 = (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (Math.exp((Vef / KbT)) + 1.0));
	double tmp;
	if (Vef <= -2.1e+133) {
		tmp = t_1;
	} else if (Vef <= 2.45e+36) {
		tmp = (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (Ec - EDonor) - (Vef + mu)
	t_1 = (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (math.exp((Vef / KbT)) + 1.0))
	tmp = 0
	if Vef <= -2.1e+133:
		tmp = t_1
	elif Vef <= 2.45e+36:
		tmp = (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0))
	else:
		tmp = t_1
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(Ec - EDonor) - Float64(Vef + mu))
	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)))
	tmp = 0.0
	if (Vef <= -2.1e+133)
		tmp = t_1;
	elseif (Vef <= 2.45e+36)
		tmp = Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(Float64(-1.0 / Float64(-1.0 + Float64(Float64(Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT) + Float64(Float64(Vef + mu) + Float64(EDonor - Ec))) / KbT))) + 1.0)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (Ec - EDonor) - (Vef + mu);
	t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0));
	tmp = 0.0;
	if (Vef <= -2.1e+133)
		tmp = t_1;
	elseif (Vef <= 2.45e+36)
		tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(Ec - EDonor), $MachinePrecision] - N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -2.1e+133], t$95$1, If[LessEqual[Vef, 2.45e+36], N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[(-1.0 / N[(-1.0 + N[(N[(N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(Vef + mu), $MachinePrecision] + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\
t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -2.1 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;Vef \leq 2.45 \cdot 10^{+36}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Vef < -2.1e133 or 2.4499999999999999e36 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right), KbT\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right)\right) \]
    5. Step-by-step derivation
      1. /-lowering-/.f6484.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right), KbT\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right)\right) \]
    6. Simplified84.5%

      \[\leadsto \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if -2.1e133 < Vef < 2.4499999999999999e36

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified81.7%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -2.1 \cdot 10^{+133}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 2.45 \cdot 10^{+36}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(Vef + mu\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(Vef + mu\right)\right)\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (+
  (/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
  (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    code = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	return (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	return Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0)))
end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0));
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}
\end{array}
Derivation
  1. Initial program 99.9%

    \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
  2. Simplified99.9%

    \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
  3. Add Preprocessing
  4. Final simplification99.9%

    \[\leadsto \frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} \]
  5. Add Preprocessing

Alternative 4: 69.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\ t_1 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;Vef \leq -1.1 \cdot 10^{+184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;Vef \leq 6 \cdot 10^{+233}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (- (- Ec EDonor) (+ Vef mu)))
        (t_1 (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))))
   (if (<= Vef -1.1e+184)
     t_1
     (if (<= Vef 6e+233)
       (+
        (/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
        (/
         NdChar
         (+
          (/
           -1.0
           (+
            -1.0
            (/
             (+ (/ (* -0.5 (* t_0 t_0)) KbT) (+ (+ Vef mu) (- EDonor Ec)))
             KbT)))
          1.0)))
       t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (Ec - EDonor) - (Vef + mu);
	double t_1 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	double tmp;
	if (Vef <= -1.1e+184) {
		tmp = t_1;
	} else if (Vef <= 6e+233) {
		tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (ec - edonor) - (vef + mu)
    t_1 = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
    if (vef <= (-1.1d+184)) then
        tmp = t_1
    else if (vef <= 6d+233) then
        tmp = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (((-1.0d0) / ((-1.0d0) + (((((-0.5d0) * (t_0 * t_0)) / kbt) + ((vef + mu) + (edonor - ec))) / kbt))) + 1.0d0))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (Ec - EDonor) - (Vef + mu);
	double t_1 = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	double tmp;
	if (Vef <= -1.1e+184) {
		tmp = t_1;
	} else if (Vef <= 6e+233) {
		tmp = (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (Ec - EDonor) - (Vef + mu)
	t_1 = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0)
	tmp = 0
	if Vef <= -1.1e+184:
		tmp = t_1
	elif Vef <= 6e+233:
		tmp = (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0))
	else:
		tmp = t_1
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(Ec - EDonor) - Float64(Vef + mu))
	t_1 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0))
	tmp = 0.0
	if (Vef <= -1.1e+184)
		tmp = t_1;
	elseif (Vef <= 6e+233)
		tmp = Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(Float64(-1.0 / Float64(-1.0 + Float64(Float64(Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT) + Float64(Float64(Vef + mu) + Float64(EDonor - Ec))) / KbT))) + 1.0)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (Ec - EDonor) - (Vef + mu);
	t_1 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	tmp = 0.0;
	if (Vef <= -1.1e+184)
		tmp = t_1;
	elseif (Vef <= 6e+233)
		tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(Ec - EDonor), $MachinePrecision] - N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -1.1e+184], t$95$1, If[LessEqual[Vef, 6e+233], N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[(-1.0 / N[(-1.0 + N[(N[(N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(Vef + mu), $MachinePrecision] + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\
t_1 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -1.1 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;Vef \leq 6 \cdot 10^{+233}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Vef < -1.1e184 or 6.00000000000000028e233 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around 0

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      8. +-lowering-+.f6487.7%

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
    6. Simplified87.7%

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}}}} \]

    if -1.1e184 < Vef < 6.00000000000000028e233

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified76.9%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -1.1 \cdot 10^{+184}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 6 \cdot 10^{+233}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(Vef + mu\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(Vef + mu\right)\right)\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{if}\;NdChar \leq -9 \cdot 10^{-162}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NdChar \leq 1.2 \cdot 10^{-126}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 620000000000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{\frac{1}{e^{\frac{\left(\left(Ec - EDonor\right) - mu\right) - Vef}{KbT}}} + 1}\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0
         (+
          NdChar
          (/ NaChar (+ (exp (/ (+ EAccept (- Ev (- mu Vef))) KbT)) 1.0)))))
   (if (<= NdChar -9e-162)
     t_0
     (if (<= NdChar 1.2e-126)
       (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
       (if (<= NdChar 620000000000.0)
         t_0
         (/
          NdChar
          (+ (/ 1.0 (exp (/ (- (- (- Ec EDonor) mu) Vef) KbT))) 1.0)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	double tmp;
	if (NdChar <= -9e-162) {
		tmp = t_0;
	} else if (NdChar <= 1.2e-126) {
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else if (NdChar <= 620000000000.0) {
		tmp = t_0;
	} else {
		tmp = NdChar / ((1.0 / exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0);
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ndchar + (nachar / (exp(((eaccept + (ev - (mu - vef))) / kbt)) + 1.0d0))
    if (ndchar <= (-9d-162)) then
        tmp = t_0
    else if (ndchar <= 1.2d-126) then
        tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
    else if (ndchar <= 620000000000.0d0) then
        tmp = t_0
    else
        tmp = ndchar / ((1.0d0 / exp(((((ec - edonor) - mu) - vef) / kbt))) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (Math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	double tmp;
	if (NdChar <= -9e-162) {
		tmp = t_0;
	} else if (NdChar <= 1.2e-126) {
		tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else if (NdChar <= 620000000000.0) {
		tmp = t_0;
	} else {
		tmp = NdChar / ((1.0 / Math.exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0);
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NdChar + (NaChar / (math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0))
	tmp = 0
	if NdChar <= -9e-162:
		tmp = t_0
	elif NdChar <= 1.2e-126:
		tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0)
	elif NdChar <= 620000000000.0:
		tmp = t_0
	else:
		tmp = NdChar / ((1.0 / math.exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0)
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Float64(EAccept + Float64(Ev - Float64(mu - Vef))) / KbT)) + 1.0)))
	tmp = 0.0
	if (NdChar <= -9e-162)
		tmp = t_0;
	elseif (NdChar <= 1.2e-126)
		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0));
	elseif (NdChar <= 620000000000.0)
		tmp = t_0;
	else
		tmp = Float64(NdChar / Float64(Float64(1.0 / exp(Float64(Float64(Float64(Float64(Ec - EDonor) - mu) - Vef) / KbT))) + 1.0));
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	tmp = 0.0;
	if (NdChar <= -9e-162)
		tmp = t_0;
	elseif (NdChar <= 1.2e-126)
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	elseif (NdChar <= 620000000000.0)
		tmp = t_0;
	else
		tmp = NdChar / ((1.0 / exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0);
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(N[(EAccept + N[(Ev - N[(mu - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -9e-162], t$95$0, If[LessEqual[NdChar, 1.2e-126], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 620000000000.0], t$95$0, N[(NdChar / N[(N[(1.0 / N[Exp[N[(N[(N[(N[(Ec - EDonor), $MachinePrecision] - mu), $MachinePrecision] - Vef), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -9 \cdot 10^{-162}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;NdChar \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\

\mathbf{elif}\;NdChar \leq 620000000000:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{\frac{1}{e^{\frac{\left(\left(Ec - EDonor\right) - mu\right) - Vef}{KbT}}} + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if NdChar < -9.00000000000000045e-162 or 1.20000000000000003e-126 < NdChar < 6.2e11

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr100.0%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified78.3%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6472.6%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified72.6%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]

    if -9.00000000000000045e-162 < NdChar < 1.20000000000000003e-126

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around 0

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      8. +-lowering-+.f6482.0%

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
    6. Simplified82.0%

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}}}} \]

    if 6.2e11 < NdChar

    1. Initial program 99.8%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.8%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6475.6%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified75.6%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\left(EDonor + Vef\right) + \left(mu - Ec\right)}{KbT}}\right)\right)\right) \]
      2. associate-+r-N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\left(\left(EDonor + Vef\right) + mu\right) - Ec}{KbT}}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{KbT}}\right)\right)\right) \]
      4. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\left(Vef + \left(EDonor + mu\right)\right) - Ec}{KbT}}\right)\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\left(Vef + \left(mu + EDonor\right)\right) - Ec}{KbT}}\right)\right)\right) \]
      6. associate-+r-N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(\left(mu + EDonor\right) - Ec\right)}{KbT}}\right)\right)\right) \]
      7. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right) \]
      8. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right) \]
      9. distribute-neg-frac2N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}\right)}\right)\right)\right) \]
      10. rec-expN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{\color{blue}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}\right)}\right)\right)\right) \]
      12. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}\right)\right)\right)\right)\right) \]
      13. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}\right)\right)\right)\right)\right) \]
      14. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(\left(mu + EDonor\right) - Ec\right)}{\mathsf{neg}\left(KbT\right)}\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right), \left(\mathsf{neg}\left(KbT\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr75.6%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{0 - KbT}}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;NdChar \leq -9 \cdot 10^{-162}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 1.2 \cdot 10^{-126}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 620000000000:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{\frac{1}{e^{\frac{\left(\left(Ec - EDonor\right) - mu\right) - Vef}{KbT}}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{if}\;NdChar \leq -2.45 \cdot 10^{-169}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NdChar \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 1.3:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0
         (+
          NdChar
          (/ NaChar (+ (exp (/ (+ EAccept (- Ev (- mu Vef))) KbT)) 1.0)))))
   (if (<= NdChar -2.45e-169)
     t_0
     (if (<= NdChar 3.9e-122)
       (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
       (if (<= NdChar 1.3)
         t_0
         (/ NdChar (+ (exp (/ (+ EDonor (+ Vef (- mu Ec))) KbT)) 1.0)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	double tmp;
	if (NdChar <= -2.45e-169) {
		tmp = t_0;
	} else if (NdChar <= 3.9e-122) {
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else if (NdChar <= 1.3) {
		tmp = t_0;
	} else {
		tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ndchar + (nachar / (exp(((eaccept + (ev - (mu - vef))) / kbt)) + 1.0d0))
    if (ndchar <= (-2.45d-169)) then
        tmp = t_0
    else if (ndchar <= 3.9d-122) then
        tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
    else if (ndchar <= 1.3d0) then
        tmp = t_0
    else
        tmp = ndchar / (exp(((edonor + (vef + (mu - ec))) / kbt)) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (Math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	double tmp;
	if (NdChar <= -2.45e-169) {
		tmp = t_0;
	} else if (NdChar <= 3.9e-122) {
		tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else if (NdChar <= 1.3) {
		tmp = t_0;
	} else {
		tmp = NdChar / (Math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NdChar + (NaChar / (math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0))
	tmp = 0
	if NdChar <= -2.45e-169:
		tmp = t_0
	elif NdChar <= 3.9e-122:
		tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0)
	elif NdChar <= 1.3:
		tmp = t_0
	else:
		tmp = NdChar / (math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0)
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Float64(EAccept + Float64(Ev - Float64(mu - Vef))) / KbT)) + 1.0)))
	tmp = 0.0
	if (NdChar <= -2.45e-169)
		tmp = t_0;
	elseif (NdChar <= 3.9e-122)
		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0));
	elseif (NdChar <= 1.3)
		tmp = t_0;
	else
		tmp = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Vef + Float64(mu - Ec))) / KbT)) + 1.0));
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
	tmp = 0.0;
	if (NdChar <= -2.45e-169)
		tmp = t_0;
	elseif (NdChar <= 3.9e-122)
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	elseif (NdChar <= 1.3)
		tmp = t_0;
	else
		tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(N[(EAccept + N[(Ev - N[(mu - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -2.45e-169], t$95$0, If[LessEqual[NdChar, 3.9e-122], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 1.3], t$95$0, N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -2.45 \cdot 10^{-169}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;NdChar \leq 3.9 \cdot 10^{-122}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\

\mathbf{elif}\;NdChar \leq 1.3:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if NdChar < -2.45e-169 or 3.8999999999999999e-122 < NdChar < 1.30000000000000004

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr100.0%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified78.3%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6472.6%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified72.6%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]

    if -2.45e-169 < NdChar < 3.8999999999999999e-122

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around 0

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      8. +-lowering-+.f6482.0%

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
    6. Simplified82.0%

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}}}} \]

    if 1.30000000000000004 < NdChar

    1. Initial program 99.8%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.8%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6475.6%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified75.6%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;NdChar \leq -2.45 \cdot 10^{-169}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 1.3:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.4% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ t_1 := NdChar + \frac{NaChar}{t\_0}\\ \mathbf{if}\;Vef \leq -0.0005:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;Vef \leq -2.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Ec}{0 - KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 4.5 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 5.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{NdChar}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)) (t_1 (+ NdChar (/ NaChar t_0))))
   (if (<= Vef -0.0005)
     t_1
     (if (<= Vef -2.5e-91)
       (/ NdChar (+ (exp (/ Ec (- 0.0 KbT))) 1.0))
       (if (<= Vef 4.5e+76)
         (+ NdChar (/ NaChar (+ (exp (/ Ev KbT)) 1.0)))
         (if (<= Vef 5.2e+141) (/ NdChar t_0) t_1))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = exp((Vef / KbT)) + 1.0;
	double t_1 = NdChar + (NaChar / t_0);
	double tmp;
	if (Vef <= -0.0005) {
		tmp = t_1;
	} else if (Vef <= -2.5e-91) {
		tmp = NdChar / (exp((Ec / (0.0 - KbT))) + 1.0);
	} else if (Vef <= 4.5e+76) {
		tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
	} else if (Vef <= 5.2e+141) {
		tmp = NdChar / t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = exp((vef / kbt)) + 1.0d0
    t_1 = ndchar + (nachar / t_0)
    if (vef <= (-0.0005d0)) then
        tmp = t_1
    else if (vef <= (-2.5d-91)) then
        tmp = ndchar / (exp((ec / (0.0d0 - kbt))) + 1.0d0)
    else if (vef <= 4.5d+76) then
        tmp = ndchar + (nachar / (exp((ev / kbt)) + 1.0d0))
    else if (vef <= 5.2d+141) then
        tmp = ndchar / t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = Math.exp((Vef / KbT)) + 1.0;
	double t_1 = NdChar + (NaChar / t_0);
	double tmp;
	if (Vef <= -0.0005) {
		tmp = t_1;
	} else if (Vef <= -2.5e-91) {
		tmp = NdChar / (Math.exp((Ec / (0.0 - KbT))) + 1.0);
	} else if (Vef <= 4.5e+76) {
		tmp = NdChar + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
	} else if (Vef <= 5.2e+141) {
		tmp = NdChar / t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = math.exp((Vef / KbT)) + 1.0
	t_1 = NdChar + (NaChar / t_0)
	tmp = 0
	if Vef <= -0.0005:
		tmp = t_1
	elif Vef <= -2.5e-91:
		tmp = NdChar / (math.exp((Ec / (0.0 - KbT))) + 1.0)
	elif Vef <= 4.5e+76:
		tmp = NdChar + (NaChar / (math.exp((Ev / KbT)) + 1.0))
	elif Vef <= 5.2e+141:
		tmp = NdChar / t_0
	else:
		tmp = t_1
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0)
	t_1 = Float64(NdChar + Float64(NaChar / t_0))
	tmp = 0.0
	if (Vef <= -0.0005)
		tmp = t_1;
	elseif (Vef <= -2.5e-91)
		tmp = Float64(NdChar / Float64(exp(Float64(Ec / Float64(0.0 - KbT))) + 1.0));
	elseif (Vef <= 4.5e+76)
		tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)));
	elseif (Vef <= 5.2e+141)
		tmp = Float64(NdChar / t_0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = exp((Vef / KbT)) + 1.0;
	t_1 = NdChar + (NaChar / t_0);
	tmp = 0.0;
	if (Vef <= -0.0005)
		tmp = t_1;
	elseif (Vef <= -2.5e-91)
		tmp = NdChar / (exp((Ec / (0.0 - KbT))) + 1.0);
	elseif (Vef <= 4.5e+76)
		tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
	elseif (Vef <= 5.2e+141)
		tmp = NdChar / t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar + N[(NaChar / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -0.0005], t$95$1, If[LessEqual[Vef, -2.5e-91], N[(NdChar / N[(N[Exp[N[(Ec / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 4.5e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 5.2e+141], N[(NdChar / t$95$0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
t_1 := NdChar + \frac{NaChar}{t\_0}\\
\mathbf{if}\;Vef \leq -0.0005:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;Vef \leq -2.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{Ec}{0 - KbT}} + 1}\\

\mathbf{elif}\;Vef \leq 4.5 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\

\mathbf{elif}\;Vef \leq 5.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Vef < -5.0000000000000001e-4 or 5.1999999999999999e141 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr100.0%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified64.5%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6463.7%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified63.7%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6458.1%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right)\right) \]
    14. Simplified58.1%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if -5.0000000000000001e-4 < Vef < -2.49999999999999999e-91

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6471.6%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified71.6%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Ec around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \frac{Ec}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(\frac{Ec}{KbT}\right)\right)\right)\right)\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{neg.f64}\left(\left(\frac{Ec}{KbT}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f6466.8%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(Ec, KbT\right)\right)\right)\right)\right) \]
    9. Simplified66.8%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{-\frac{Ec}{KbT}}}} \]

    if -2.49999999999999999e-91 < Vef < 4.4999999999999997e76

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified79.2%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6470.1%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified70.1%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in Ev around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Ev}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6449.4%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right)\right) \]
    14. Simplified49.4%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{Ev}{KbT}}}} \]

    if 4.4999999999999997e76 < Vef < 5.1999999999999999e141

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6477.6%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified77.6%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6469.9%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
    9. Simplified69.9%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -0.0005:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq -2.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Ec}{0 - KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 4.5 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 5.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;NaChar \leq -1.9 \cdot 10^{-96}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NaChar \leq 5 \cdot 10^{+29}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))))
   (if (<= NaChar -1.9e-96)
     t_0
     (if (<= NaChar 5e+29)
       (/ NdChar (+ (exp (/ (+ EDonor (+ Vef (- mu Ec))) KbT)) 1.0))
       t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	double tmp;
	if (NaChar <= -1.9e-96) {
		tmp = t_0;
	} else if (NaChar <= 5e+29) {
		tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
    if (nachar <= (-1.9d-96)) then
        tmp = t_0
    else if (nachar <= 5d+29) then
        tmp = ndchar / (exp(((edonor + (vef + (mu - ec))) / kbt)) + 1.0d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	double tmp;
	if (NaChar <= -1.9e-96) {
		tmp = t_0;
	} else if (NaChar <= 5e+29) {
		tmp = NdChar / (Math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0)
	tmp = 0
	if NaChar <= -1.9e-96:
		tmp = t_0
	elif NaChar <= 5e+29:
		tmp = NdChar / (math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0)
	else:
		tmp = t_0
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0))
	tmp = 0.0
	if (NaChar <= -1.9e-96)
		tmp = t_0;
	elseif (NaChar <= 5e+29)
		tmp = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Vef + Float64(mu - Ec))) / KbT)) + 1.0));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	tmp = 0.0;
	if (NaChar <= -1.9e-96)
		tmp = t_0;
	elseif (NaChar <= 5e+29)
		tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -1.9e-96], t$95$0, If[LessEqual[NaChar, 5e+29], N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{if}\;NaChar \leq -1.9 \cdot 10^{-96}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;NaChar \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if NaChar < -1.9e-96 or 5.0000000000000001e29 < NaChar

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around 0

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      8. +-lowering-+.f6472.1%

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
    6. Simplified72.1%

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}}}} \]

    if -1.9e-96 < NaChar < 5.0000000000000001e29

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6470.0%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified70.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;NaChar \leq -1.9 \cdot 10^{-96}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{elif}\;NaChar \leq 5 \cdot 10^{+29}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\ \mathbf{if}\;mu \leq -1.2 \cdot 10^{+177}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;mu \leq 2.15 \cdot 10^{+102}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (+ NdChar (/ NaChar (+ (exp (/ mu (- 0.0 KbT))) 1.0)))))
   (if (<= mu -1.2e+177)
     t_0
     (if (<= mu 2.15e+102)
       (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
       t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
	double tmp;
	if (mu <= -1.2e+177) {
		tmp = t_0;
	} else if (mu <= 2.15e+102) {
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ndchar + (nachar / (exp((mu / (0.0d0 - kbt))) + 1.0d0))
    if (mu <= (-1.2d+177)) then
        tmp = t_0
    else if (mu <= 2.15d+102) then
        tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar + (NaChar / (Math.exp((mu / (0.0 - KbT))) + 1.0));
	double tmp;
	if (mu <= -1.2e+177) {
		tmp = t_0;
	} else if (mu <= 2.15e+102) {
		tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NdChar + (NaChar / (math.exp((mu / (0.0 - KbT))) + 1.0))
	tmp = 0
	if mu <= -1.2e+177:
		tmp = t_0
	elif mu <= 2.15e+102:
		tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0)
	else:
		tmp = t_0
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(mu / Float64(0.0 - KbT))) + 1.0)))
	tmp = 0.0
	if (mu <= -1.2e+177)
		tmp = t_0;
	elseif (mu <= 2.15e+102)
		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
	tmp = 0.0;
	if (mu <= -1.2e+177)
		tmp = t_0;
	elseif (mu <= 2.15e+102)
		tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(mu / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[mu, -1.2e+177], t$95$0, If[LessEqual[mu, 2.15e+102], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\
\mathbf{if}\;mu \leq -1.2 \cdot 10^{+177}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;mu \leq 2.15 \cdot 10^{+102}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if mu < -1.2e177 or 2.15e102 < mu

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr100.0%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified76.0%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6474.9%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified74.9%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in mu around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \frac{mu}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{-1 \cdot mu}{KbT}\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(mu\right)}{KbT}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - mu\right), KbT\right)\right)\right)\right)\right) \]
      5. --lowering--.f6471.9%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, mu\right), KbT\right)\right)\right)\right)\right) \]
    14. Simplified71.9%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{0 - mu}{KbT}}}} \]

    if -1.2e177 < mu < 2.15e102

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around 0

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
      8. +-lowering-+.f6468.0%

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right)\right)\right) \]
    6. Simplified68.0%

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;mu \leq -1.2 \cdot 10^{+177}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\ \mathbf{elif}\;mu \leq 2.15 \cdot 10^{+102}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 44.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\ t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\ \mathbf{elif}\;KbT \leq -2.9 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq 1.6 \cdot 10^{-205}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec))
        (t_1
         (/
          NdChar
          (+
           (/
            -1.0
            (+
             (+
              (+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
              (/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
             (- -1.0 (/ Ec KbT))))
           1.0)))
        (t_2 (* 0.5 (+ NdChar NaChar))))
   (if (<= KbT -1.35e+154)
     (+
      (/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
      (+ (* -0.25 (/ NaChar (/ KbT Vef))) t_2))
     (if (<= KbT -2.9e-71)
       t_1
       (if (<= KbT 1.6e-205)
         (/ NdChar (+ (exp (/ Vef KbT)) 1.0))
         (if (<= KbT 9.6e+150) t_1 t_2))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	double t_2 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.35e+154) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	} else if (KbT <= -2.9e-71) {
		tmp = t_1;
	} else if (KbT <= 1.6e-205) {
		tmp = NdChar / (exp((Vef / KbT)) + 1.0);
	} else if (KbT <= 9.6e+150) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = (edonor + (vef + mu)) - ec
    t_1 = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
    t_2 = 0.5d0 * (ndchar + nachar)
    if (kbt <= (-1.35d+154)) then
        tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_2)
    else if (kbt <= (-2.9d-71)) then
        tmp = t_1
    else if (kbt <= 1.6d-205) then
        tmp = ndchar / (exp((vef / kbt)) + 1.0d0)
    else if (kbt <= 9.6d+150) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	double t_2 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.35e+154) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	} else if (KbT <= -2.9e-71) {
		tmp = t_1;
	} else if (KbT <= 1.6e-205) {
		tmp = NdChar / (Math.exp((Vef / KbT)) + 1.0);
	} else if (KbT <= 9.6e+150) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (EDonor + (Vef + mu)) - Ec
	t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0)
	t_2 = 0.5 * (NdChar + NaChar)
	tmp = 0
	if KbT <= -1.35e+154:
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2)
	elif KbT <= -2.9e-71:
		tmp = t_1
	elif KbT <= 1.6e-205:
		tmp = NdChar / (math.exp((Vef / KbT)) + 1.0)
	elif KbT <= 9.6e+150:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec)
	t_1 = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0))
	t_2 = Float64(0.5 * Float64(NdChar + NaChar))
	tmp = 0.0
	if (KbT <= -1.35e+154)
		tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_2));
	elseif (KbT <= -2.9e-71)
		tmp = t_1;
	elseif (KbT <= 1.6e-205)
		tmp = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0));
	elseif (KbT <= 9.6e+150)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (EDonor + (Vef + mu)) - Ec;
	t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	t_2 = 0.5 * (NdChar + NaChar);
	tmp = 0.0;
	if (KbT <= -1.35e+154)
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	elseif (KbT <= -2.9e-71)
		tmp = t_1;
	elseif (KbT <= 1.6e-205)
		tmp = NdChar / (exp((Vef / KbT)) + 1.0);
	elseif (KbT <= 9.6e+150)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.35e+154], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -2.9e-71], t$95$1, If[LessEqual[KbT, 1.6e-205], N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.6e+150], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\
t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\

\mathbf{elif}\;KbT \leq -2.9 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;KbT \leq 1.6 \cdot 10^{-205}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\

\mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if KbT < -1.35000000000000003e154

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around -inf

      \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} + \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)} \]
    5. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} \cdot \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(NaChar \cdot \frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right) + \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}\right)}\right)\right) \]
    6. Simplified59.6%

      \[\leadsto \color{blue}{\left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(Vef + \left(mu - Ec\right)\right)\right)}{KbT}\right)} \]
    7. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\frac{KbT}{Vef + \left(\left(EAccept + Ev\right) - mu\right)}} \cdot -0.25\right)} \]
    8. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \color{blue}{\left(\frac{KbT}{Vef}\right)}\right), \frac{-1}{4}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6465.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \mathsf{/.f64}\left(KbT, Vef\right)\right), \frac{-1}{4}\right)\right)\right) \]
    10. Simplified65.8%

      \[\leadsto \frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\color{blue}{\frac{KbT}{Vef}}} \cdot -0.25\right) \]

    if -1.35000000000000003e154 < KbT < -2.8999999999999999e-71 or 1.60000000000000005e-205 < KbT < 9.60000000000000011e150

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified77.6%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)}\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\left(1 + \frac{Ec}{KbT}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{Ec}{KbT}\right)\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \left(\frac{-1}{2} \cdot \color{blue}{\frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}\right), \color{blue}{\left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)}\right)\right)\right)\right)\right) \]
    11. Simplified48.4%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-0.5 \cdot \left(\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)\right)}{KbT \cdot KbT} + \left(\left(\frac{EDonor}{KbT} + \frac{Vef}{KbT}\right) + \frac{mu}{KbT}\right)\right)}}} \]

    if -2.8999999999999999e-71 < KbT < 1.60000000000000005e-205

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified60.6%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6445.2%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
    9. Simplified45.2%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if 9.60000000000000011e150 < KbT

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
    5. Step-by-step derivation
      1. distribute-lft-outN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
      3. +-lowering-+.f6456.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
    6. Simplified56.0%

      \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + 0.5 \cdot \left(NdChar + NaChar\right)\right)\\ \mathbf{elif}\;KbT \leq -2.9 \cdot 10^{-71}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{elif}\;KbT \leq 1.6 \cdot 10^{-205}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\ t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -1.75 \cdot 10^{+157}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\ \mathbf{elif}\;KbT \leq -1.16 \cdot 10^{-132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq 3.2 \cdot 10^{-205}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec))
        (t_1
         (/
          NdChar
          (+
           (/
            -1.0
            (+
             (+
              (+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
              (/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
             (- -1.0 (/ Ec KbT))))
           1.0)))
        (t_2 (* 0.5 (+ NdChar NaChar))))
   (if (<= KbT -1.75e+157)
     (+
      (/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
      (+ (* -0.25 (/ NaChar (/ KbT Vef))) t_2))
     (if (<= KbT -1.16e-132)
       t_1
       (if (<= KbT 3.2e-205)
         (/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
         (if (<= KbT 9.6e+150) t_1 t_2))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	double t_2 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.75e+157) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	} else if (KbT <= -1.16e-132) {
		tmp = t_1;
	} else if (KbT <= 3.2e-205) {
		tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
	} else if (KbT <= 9.6e+150) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = (edonor + (vef + mu)) - ec
    t_1 = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
    t_2 = 0.5d0 * (ndchar + nachar)
    if (kbt <= (-1.75d+157)) then
        tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_2)
    else if (kbt <= (-1.16d-132)) then
        tmp = t_1
    else if (kbt <= 3.2d-205) then
        tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
    else if (kbt <= 9.6d+150) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	double t_2 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.75e+157) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	} else if (KbT <= -1.16e-132) {
		tmp = t_1;
	} else if (KbT <= 3.2e-205) {
		tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
	} else if (KbT <= 9.6e+150) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (EDonor + (Vef + mu)) - Ec
	t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0)
	t_2 = 0.5 * (NdChar + NaChar)
	tmp = 0
	if KbT <= -1.75e+157:
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2)
	elif KbT <= -1.16e-132:
		tmp = t_1
	elif KbT <= 3.2e-205:
		tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0)
	elif KbT <= 9.6e+150:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec)
	t_1 = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0))
	t_2 = Float64(0.5 * Float64(NdChar + NaChar))
	tmp = 0.0
	if (KbT <= -1.75e+157)
		tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_2));
	elseif (KbT <= -1.16e-132)
		tmp = t_1;
	elseif (KbT <= 3.2e-205)
		tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0));
	elseif (KbT <= 9.6e+150)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (EDonor + (Vef + mu)) - Ec;
	t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	t_2 = 0.5 * (NdChar + NaChar);
	tmp = 0.0;
	if (KbT <= -1.75e+157)
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
	elseif (KbT <= -1.16e-132)
		tmp = t_1;
	elseif (KbT <= 3.2e-205)
		tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
	elseif (KbT <= 9.6e+150)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.75e+157], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -1.16e-132], t$95$1, If[LessEqual[KbT, 3.2e-205], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.6e+150], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\
t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.75 \cdot 10^{+157}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\

\mathbf{elif}\;KbT \leq -1.16 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;KbT \leq 3.2 \cdot 10^{-205}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\

\mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if KbT < -1.75000000000000001e157

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around -inf

      \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} + \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)} \]
    5. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} \cdot \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(NaChar \cdot \frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right) + \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}\right)}\right)\right) \]
    6. Simplified59.6%

      \[\leadsto \color{blue}{\left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(Vef + \left(mu - Ec\right)\right)\right)}{KbT}\right)} \]
    7. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\frac{KbT}{Vef + \left(\left(EAccept + Ev\right) - mu\right)}} \cdot -0.25\right)} \]
    8. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \color{blue}{\left(\frac{KbT}{Vef}\right)}\right), \frac{-1}{4}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6465.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \mathsf{/.f64}\left(KbT, Vef\right)\right), \frac{-1}{4}\right)\right)\right) \]
    10. Simplified65.8%

      \[\leadsto \frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\color{blue}{\frac{KbT}{Vef}}} \cdot -0.25\right) \]

    if -1.75000000000000001e157 < KbT < -1.1599999999999999e-132 or 3.20000000000000009e-205 < KbT < 9.60000000000000011e150

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified76.1%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)}\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\left(1 + \frac{Ec}{KbT}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{Ec}{KbT}\right)\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \left(\frac{-1}{2} \cdot \color{blue}{\frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}\right), \color{blue}{\left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)}\right)\right)\right)\right)\right) \]
    11. Simplified45.2%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-0.5 \cdot \left(\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)\right)}{KbT \cdot KbT} + \left(\left(\frac{EDonor}{KbT} + \frac{Vef}{KbT}\right) + \frac{mu}{KbT}\right)\right)}}} \]

    if -1.1599999999999999e-132 < KbT < 3.20000000000000009e-205

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6465.5%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified65.5%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in EDonor around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{EDonor}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6438.3%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EDonor, KbT\right)\right)\right)\right) \]
    9. Simplified38.3%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]

    if 9.60000000000000011e150 < KbT

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
    5. Step-by-step derivation
      1. distribute-lft-outN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
      3. +-lowering-+.f6456.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
    6. Simplified56.0%

      \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification47.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.75 \cdot 10^{+157}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + 0.5 \cdot \left(NdChar + NaChar\right)\right)\\ \mathbf{elif}\;KbT \leq -1.16 \cdot 10^{-132}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{elif}\;KbT \leq 3.2 \cdot 10^{-205}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 51.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ \mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;\frac{NdChar}{t\_0}\\ \mathbf{elif}\;Vef \leq 1.55 \cdot 10^{+160}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;NdChar + \frac{NaChar}{t\_0}\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)))
   (if (<= Vef -9.5e+166)
     (/ NdChar t_0)
     (if (<= Vef 1.55e+160)
       (+ NdChar (/ NaChar (+ (exp (/ mu (- 0.0 KbT))) 1.0)))
       (+ NdChar (/ NaChar t_0))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = exp((Vef / KbT)) + 1.0;
	double tmp;
	if (Vef <= -9.5e+166) {
		tmp = NdChar / t_0;
	} else if (Vef <= 1.55e+160) {
		tmp = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
	} else {
		tmp = NdChar + (NaChar / t_0);
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = exp((vef / kbt)) + 1.0d0
    if (vef <= (-9.5d+166)) then
        tmp = ndchar / t_0
    else if (vef <= 1.55d+160) then
        tmp = ndchar + (nachar / (exp((mu / (0.0d0 - kbt))) + 1.0d0))
    else
        tmp = ndchar + (nachar / t_0)
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = Math.exp((Vef / KbT)) + 1.0;
	double tmp;
	if (Vef <= -9.5e+166) {
		tmp = NdChar / t_0;
	} else if (Vef <= 1.55e+160) {
		tmp = NdChar + (NaChar / (Math.exp((mu / (0.0 - KbT))) + 1.0));
	} else {
		tmp = NdChar + (NaChar / t_0);
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = math.exp((Vef / KbT)) + 1.0
	tmp = 0
	if Vef <= -9.5e+166:
		tmp = NdChar / t_0
	elif Vef <= 1.55e+160:
		tmp = NdChar + (NaChar / (math.exp((mu / (0.0 - KbT))) + 1.0))
	else:
		tmp = NdChar + (NaChar / t_0)
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0)
	tmp = 0.0
	if (Vef <= -9.5e+166)
		tmp = Float64(NdChar / t_0);
	elseif (Vef <= 1.55e+160)
		tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(mu / Float64(0.0 - KbT))) + 1.0)));
	else
		tmp = Float64(NdChar + Float64(NaChar / t_0));
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = exp((Vef / KbT)) + 1.0;
	tmp = 0.0;
	if (Vef <= -9.5e+166)
		tmp = NdChar / t_0;
	elseif (Vef <= 1.55e+160)
		tmp = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
	else
		tmp = NdChar + (NaChar / t_0);
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[Vef, -9.5e+166], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[Vef, 1.55e+160], N[(NdChar + N[(NaChar / N[(N[Exp[N[(mu / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(NdChar + N[(NaChar / t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
\mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\

\mathbf{elif}\;Vef \leq 1.55 \cdot 10^{+160}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;NdChar + \frac{NaChar}{t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Vef < -9.49999999999999984e166

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6458.2%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified58.2%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6455.7%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
    9. Simplified55.7%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if -9.49999999999999984e166 < Vef < 1.5499999999999999e160

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified77.5%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6467.7%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified67.7%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in mu around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \frac{mu}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{-1 \cdot mu}{KbT}\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(mu\right)}{KbT}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - mu\right), KbT\right)\right)\right)\right)\right) \]
      5. --lowering--.f6456.5%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, mu\right), KbT\right)\right)\right)\right)\right) \]
    14. Simplified56.5%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{0 - mu}{KbT}}}} \]

    if 1.5499999999999999e160 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr100.0%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified62.6%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6462.6%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified62.6%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6462.6%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right)\right) \]
    14. Simplified62.6%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 1.55 \cdot 10^{+160}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;Vef \leq 5 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (/ NdChar (+ (exp (/ Vef KbT)) 1.0))))
   (if (<= Vef -9.5e+166)
     t_0
     (if (<= Vef 5e+76) (+ NdChar (/ NaChar (+ (exp (/ Ev KbT)) 1.0))) t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
	double tmp;
	if (Vef <= -9.5e+166) {
		tmp = t_0;
	} else if (Vef <= 5e+76) {
		tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ndchar / (exp((vef / kbt)) + 1.0d0)
    if (vef <= (-9.5d+166)) then
        tmp = t_0
    else if (vef <= 5d+76) then
        tmp = ndchar + (nachar / (exp((ev / kbt)) + 1.0d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar / (Math.exp((Vef / KbT)) + 1.0);
	double tmp;
	if (Vef <= -9.5e+166) {
		tmp = t_0;
	} else if (Vef <= 5e+76) {
		tmp = NdChar + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NdChar / (math.exp((Vef / KbT)) + 1.0)
	tmp = 0
	if Vef <= -9.5e+166:
		tmp = t_0
	elif Vef <= 5e+76:
		tmp = NdChar + (NaChar / (math.exp((Ev / KbT)) + 1.0))
	else:
		tmp = t_0
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0))
	tmp = 0.0
	if (Vef <= -9.5e+166)
		tmp = t_0;
	elseif (Vef <= 5e+76)
		tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
	tmp = 0.0;
	if (Vef <= -9.5e+166)
		tmp = t_0;
	elseif (Vef <= 5e+76)
		tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -9.5e+166], t$95$0, If[LessEqual[Vef, 5e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;Vef \leq 5 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Vef < -9.49999999999999984e166 or 4.99999999999999991e76 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6458.3%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified58.3%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6450.3%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
    9. Simplified50.3%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if -9.49999999999999984e166 < Vef < 4.99999999999999991e76

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified79.2%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6468.7%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified68.7%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in Ev around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Ev}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6448.5%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right)\right) \]
    14. Simplified48.5%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{Ev}{KbT}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 5 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 49.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{if}\;Vef \leq -3.65 \cdot 10^{+168}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;Vef \leq 5.1 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (/ NdChar (+ (exp (/ Vef KbT)) 1.0))))
   (if (<= Vef -3.65e+168)
     t_0
     (if (<= Vef 5.1e+76)
       (+ NdChar (/ NaChar (+ (exp (/ EAccept KbT)) 1.0)))
       t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
	double tmp;
	if (Vef <= -3.65e+168) {
		tmp = t_0;
	} else if (Vef <= 5.1e+76) {
		tmp = NdChar + (NaChar / (exp((EAccept / KbT)) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ndchar / (exp((vef / kbt)) + 1.0d0)
    if (vef <= (-3.65d+168)) then
        tmp = t_0
    else if (vef <= 5.1d+76) then
        tmp = ndchar + (nachar / (exp((eaccept / kbt)) + 1.0d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = NdChar / (Math.exp((Vef / KbT)) + 1.0);
	double tmp;
	if (Vef <= -3.65e+168) {
		tmp = t_0;
	} else if (Vef <= 5.1e+76) {
		tmp = NdChar + (NaChar / (Math.exp((EAccept / KbT)) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = NdChar / (math.exp((Vef / KbT)) + 1.0)
	tmp = 0
	if Vef <= -3.65e+168:
		tmp = t_0
	elif Vef <= 5.1e+76:
		tmp = NdChar + (NaChar / (math.exp((EAccept / KbT)) + 1.0))
	else:
		tmp = t_0
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0))
	tmp = 0.0
	if (Vef <= -3.65e+168)
		tmp = t_0;
	elseif (Vef <= 5.1e+76)
		tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
	tmp = 0.0;
	if (Vef <= -3.65e+168)
		tmp = t_0;
	elseif (Vef <= 5.1e+76)
		tmp = NdChar + (NaChar / (exp((EAccept / KbT)) + 1.0));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -3.65e+168], t$95$0, If[LessEqual[Vef, 5.1e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -3.65 \cdot 10^{+168}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;Vef \leq 5.1 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Vef < -3.6499999999999998e168 or 5.1000000000000002e76 < Vef

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
    5. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}\right)}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right), KbT\right)\right)\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) - Ec\right)\right), KbT\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(\left(Vef + mu\right) + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \left(Vef + \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + -1 \cdot Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu + \left(\mathsf{neg}\left(Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \left(mu - Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. --lowering--.f6458.3%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(mu, Ec\right)\right)\right), KbT\right)\right)\right)\right) \]
    6. Simplified58.3%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}}}} \]
    7. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{Vef}{KbT}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6450.3%

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
    9. Simplified50.3%

      \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]

    if -3.6499999999999998e168 < Vef < 5.1000000000000002e76

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified79.2%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6468.7%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified68.7%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in EAccept around inf

      \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{EAccept}{KbT}\right)}\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6454.6%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right)\right) \]
    14. Simplified54.6%

      \[\leadsto NdChar + \frac{NaChar}{1 + e^{\color{blue}{\frac{EAccept}{KbT}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Vef \leq -3.65 \cdot 10^{+168}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Vef \leq 5.1 \cdot 10^{+76}:\\ \;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 41.7% accurate, 4.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\ t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_1\right)\\ \mathbf{elif}\;KbT \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec)) (t_1 (* 0.5 (+ NdChar NaChar))))
   (if (<= KbT -1.35e+154)
     (+
      (/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
      (+ (* -0.25 (/ NaChar (/ KbT Vef))) t_1))
     (if (<= KbT 1.7e+153)
       (/
        NdChar
        (+
         (/
          -1.0
          (+
           (+
            (+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
            (/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
           (- -1.0 (/ Ec KbT))))
         1.0))
       t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.35e+154) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1);
	} else if (KbT <= 1.7e+153) {
		tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (edonor + (vef + mu)) - ec
    t_1 = 0.5d0 * (ndchar + nachar)
    if (kbt <= (-1.35d+154)) then
        tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_1)
    else if (kbt <= 1.7d+153) then
        tmp = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EDonor + (Vef + mu)) - Ec;
	double t_1 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.35e+154) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1);
	} else if (KbT <= 1.7e+153) {
		tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (EDonor + (Vef + mu)) - Ec
	t_1 = 0.5 * (NdChar + NaChar)
	tmp = 0
	if KbT <= -1.35e+154:
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1)
	elif KbT <= 1.7e+153:
		tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0)
	else:
		tmp = t_1
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec)
	t_1 = Float64(0.5 * Float64(NdChar + NaChar))
	tmp = 0.0
	if (KbT <= -1.35e+154)
		tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_1));
	elseif (KbT <= 1.7e+153)
		tmp = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (EDonor + (Vef + mu)) - Ec;
	t_1 = 0.5 * (NdChar + NaChar);
	tmp = 0.0;
	if (KbT <= -1.35e+154)
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1);
	elseif (KbT <= 1.7e+153)
		tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.35e+154], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.7e+153], N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_1\right)\\

\mathbf{elif}\;KbT \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if KbT < -1.35000000000000003e154

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around -inf

      \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} + \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)} \]
    5. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} \cdot \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(NaChar \cdot \frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right) + \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}\right)}\right)\right) \]
    6. Simplified59.6%

      \[\leadsto \color{blue}{\left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(Vef + \left(mu - Ec\right)\right)\right)}{KbT}\right)} \]
    7. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\frac{KbT}{Vef + \left(\left(EAccept + Ev\right) - mu\right)}} \cdot -0.25\right)} \]
    8. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \color{blue}{\left(\frac{KbT}{Vef}\right)}\right), \frac{-1}{4}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6465.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \mathsf{/.f64}\left(KbT, Vef\right)\right), \frac{-1}{4}\right)\right)\right) \]
    10. Simplified65.8%

      \[\leadsto \frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\color{blue}{\frac{KbT}{Vef}}} \cdot -0.25\right) \]

    if -1.35000000000000003e154 < KbT < 1.6999999999999999e153

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified73.0%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{\left(1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)}\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\left(1 + \frac{Ec}{KbT}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)}\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{Ec}{KbT}\right)\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \left(\frac{-1}{2} \cdot \color{blue}{\frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}} + \left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(Ec, KbT\right)\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{{KbT}^{2}}\right), \color{blue}{\left(\frac{EDonor}{KbT} + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right)}\right)\right)\right)\right)\right) \]
    11. Simplified39.2%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + \frac{1}{\left(1 + \frac{Ec}{KbT}\right) - \left(\frac{-0.5 \cdot \left(\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)\right)}{KbT \cdot KbT} + \left(\left(\frac{EDonor}{KbT} + \frac{Vef}{KbT}\right) + \frac{mu}{KbT}\right)\right)}}} \]

    if 1.6999999999999999e153 < KbT

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
    5. Step-by-step derivation
      1. distribute-lft-outN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
      3. +-lowering-+.f6456.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
    6. Simplified56.0%

      \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + 0.5 \cdot \left(NdChar + NaChar\right)\right)\\ \mathbf{elif}\;KbT \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 43.1% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -1.5 \cdot 10^{+180}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_0\right)\\ \mathbf{elif}\;KbT \leq 1.35 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (* 0.5 (+ NdChar NaChar))))
   (if (<= KbT -1.5e+180)
     (+
      (/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
      (+ (* -0.25 (/ NaChar (/ KbT Vef))) t_0))
     (if (<= KbT 1.35e+69) NdChar t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.5e+180) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0);
	} else if (KbT <= 1.35e+69) {
		tmp = NdChar;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
    real(8), intent (in) :: ndchar
    real(8), intent (in) :: ec
    real(8), intent (in) :: vef
    real(8), intent (in) :: edonor
    real(8), intent (in) :: mu
    real(8), intent (in) :: kbt
    real(8), intent (in) :: nachar
    real(8), intent (in) :: ev
    real(8), intent (in) :: eaccept
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 0.5d0 * (ndchar + nachar)
    if (kbt <= (-1.5d+180)) then
        tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_0)
    else if (kbt <= 1.35d+69) then
        tmp = ndchar
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = 0.5 * (NdChar + NaChar);
	double tmp;
	if (KbT <= -1.5e+180) {
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0);
	} else if (KbT <= 1.35e+69) {
		tmp = NdChar;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = 0.5 * (NdChar + NaChar)
	tmp = 0
	if KbT <= -1.5e+180:
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0)
	elif KbT <= 1.35e+69:
		tmp = NdChar
	else:
		tmp = t_0
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(0.5 * Float64(NdChar + NaChar))
	tmp = 0.0
	if (KbT <= -1.5e+180)
		tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_0));
	elseif (KbT <= 1.35e+69)
		tmp = NdChar;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = 0.5 * (NdChar + NaChar);
	tmp = 0.0;
	if (KbT <= -1.5e+180)
		tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0);
	elseif (KbT <= 1.35e+69)
		tmp = NdChar;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.5e+180], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.35e+69], NdChar, t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_0\right)\\

\mathbf{elif}\;KbT \leq 1.35 \cdot 10^{+69}:\\
\;\;\;\;NdChar\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if KbT < -1.50000000000000001e180

    1. Initial program 100.0%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Taylor expanded in KbT around -inf

      \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} + \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)} \]
    5. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} \cdot \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(NaChar \cdot \frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      8. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right) + \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}\right)}\right)\right) \]
    6. Simplified64.1%

      \[\leadsto \color{blue}{\left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(Vef + \left(mu - Ec\right)\right)\right)}{KbT}\right)} \]
    7. Applied egg-rr70.4%

      \[\leadsto \color{blue}{\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\frac{KbT}{Vef + \left(\left(EAccept + Ev\right) - mu\right)}} \cdot -0.25\right)} \]
    8. Taylor expanded in Vef around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \color{blue}{\left(\frac{KbT}{Vef}\right)}\right), \frac{-1}{4}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6470.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(NdChar, \frac{-1}{4}\right), \mathsf{/.f64}\left(KbT, \mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(mu, \mathsf{\_.f64}\left(EDonor, Ec\right)\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NdChar, NaChar\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(NaChar, \mathsf{/.f64}\left(KbT, Vef\right)\right), \frac{-1}{4}\right)\right)\right) \]
    10. Simplified70.7%

      \[\leadsto \frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(0.5 \cdot \left(NdChar + NaChar\right) + \frac{NaChar}{\color{blue}{\frac{KbT}{Vef}}} \cdot -0.25\right) \]

    if -1.50000000000000001e180 < KbT < 1.3499999999999999e69

    1. Initial program 99.9%

      \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. distribute-frac-neg2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. associate-+r-N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    6. Taylor expanded in KbT around -inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    8. Simplified72.2%

      \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
    9. Taylor expanded in Ec around inf

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      10. --lowering--.f6467.5%

        \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
    11. Simplified67.5%

      \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
    12. Taylor expanded in NdChar around inf

      \[\leadsto \color{blue}{NdChar} \]
    13. Step-by-step derivation
      1. Simplified38.5%

        \[\leadsto \color{blue}{NdChar} \]

      if 1.3499999999999999e69 < KbT

      1. Initial program 100.0%

        \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
      2. Simplified100.0%

        \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
      3. Add Preprocessing
      4. Taylor expanded in KbT around inf

        \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
      5. Step-by-step derivation
        1. distribute-lft-outN/A

          \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
        3. +-lowering-+.f6448.2%

          \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
      6. Simplified48.2%

        \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
    14. Recombined 3 regimes into one program.
    15. Final simplification43.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.5 \cdot 10^{+180}:\\ \;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + 0.5 \cdot \left(NdChar + NaChar\right)\right)\\ \mathbf{elif}\;KbT \leq 1.35 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
    16. Add Preprocessing

    Alternative 17: 43.0% accurate, 7.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -2.1 \cdot 10^{+180}:\\ \;\;\;\;-0.25 \cdot \left(NaChar \cdot \frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}\right) + \left(t\_0 + -0.25 \cdot \left(NdChar \cdot \frac{mu}{KbT}\right)\right)\\ \mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
     :precision binary64
     (let* ((t_0 (* 0.5 (+ NdChar NaChar))))
       (if (<= KbT -2.1e+180)
         (+
          (* -0.25 (* NaChar (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)))
          (+ t_0 (* -0.25 (* NdChar (/ mu KbT)))))
         (if (<= KbT 2.5e+69) NdChar t_0))))
    double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
    	double t_0 = 0.5 * (NdChar + NaChar);
    	double tmp;
    	if (KbT <= -2.1e+180) {
    		tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))));
    	} else if (KbT <= 2.5e+69) {
    		tmp = NdChar;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
        real(8), intent (in) :: ndchar
        real(8), intent (in) :: ec
        real(8), intent (in) :: vef
        real(8), intent (in) :: edonor
        real(8), intent (in) :: mu
        real(8), intent (in) :: kbt
        real(8), intent (in) :: nachar
        real(8), intent (in) :: ev
        real(8), intent (in) :: eaccept
        real(8) :: t_0
        real(8) :: tmp
        t_0 = 0.5d0 * (ndchar + nachar)
        if (kbt <= (-2.1d+180)) then
            tmp = ((-0.25d0) * (nachar * (((vef + (eaccept + ev)) - mu) / kbt))) + (t_0 + ((-0.25d0) * (ndchar * (mu / kbt))))
        else if (kbt <= 2.5d+69) then
            tmp = ndchar
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
    	double t_0 = 0.5 * (NdChar + NaChar);
    	double tmp;
    	if (KbT <= -2.1e+180) {
    		tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))));
    	} else if (KbT <= 2.5e+69) {
    		tmp = NdChar;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
    	t_0 = 0.5 * (NdChar + NaChar)
    	tmp = 0
    	if KbT <= -2.1e+180:
    		tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))))
    	elif KbT <= 2.5e+69:
    		tmp = NdChar
    	else:
    		tmp = t_0
    	return tmp
    
    function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
    	t_0 = Float64(0.5 * Float64(NdChar + NaChar))
    	tmp = 0.0
    	if (KbT <= -2.1e+180)
    		tmp = Float64(Float64(-0.25 * Float64(NaChar * Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT))) + Float64(t_0 + Float64(-0.25 * Float64(NdChar * Float64(mu / KbT)))));
    	elseif (KbT <= 2.5e+69)
    		tmp = NdChar;
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
    	t_0 = 0.5 * (NdChar + NaChar);
    	tmp = 0.0;
    	if (KbT <= -2.1e+180)
    		tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))));
    	elseif (KbT <= 2.5e+69)
    		tmp = NdChar;
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.1e+180], N[(N[(-0.25 * N[(NaChar * N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + N[(-0.25 * N[(NdChar * N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.5e+69], NdChar, t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
    \mathbf{if}\;KbT \leq -2.1 \cdot 10^{+180}:\\
    \;\;\;\;-0.25 \cdot \left(NaChar \cdot \frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}\right) + \left(t\_0 + -0.25 \cdot \left(NdChar \cdot \frac{mu}{KbT}\right)\right)\\
    
    \mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+69}:\\
    \;\;\;\;NdChar\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if KbT < -2.1e180

      1. Initial program 100.0%

        \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
      2. Simplified100.0%

        \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
      3. Add Preprocessing
      4. Taylor expanded in KbT around -inf

        \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} + \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)} \]
      5. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot \frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT} \cdot \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{NaChar \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        4. associate-/l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(NaChar \cdot \frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right), \frac{-1}{4}\right), \left(\color{blue}{\frac{-1}{4}} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(EAccept + \left(Ev + Vef\right)\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        8. associate-+r+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(EAccept + Ev\right) + Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right) + \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}\right)\right) \]
        12. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}\right)}\right)\right) \]
      6. Simplified64.1%

        \[\leadsto \color{blue}{\left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(Vef + \left(mu - Ec\right)\right)\right)}{KbT}\right)} \]
      7. Taylor expanded in mu around inf

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, NdChar\right)\right), \color{blue}{\left(\frac{-1}{4} \cdot \frac{NdChar \cdot mu}{KbT}\right)}\right)\right) \]
      8. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, NdChar\right)\right), \mathsf{*.f64}\left(\frac{-1}{4}, \color{blue}{\left(\frac{NdChar \cdot mu}{KbT}\right)}\right)\right)\right) \]
        2. associate-/l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, NdChar\right)\right), \mathsf{*.f64}\left(\frac{-1}{4}, \left(NdChar \cdot \color{blue}{\frac{mu}{KbT}}\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, NdChar\right)\right), \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(NdChar, \color{blue}{\left(\frac{mu}{KbT}\right)}\right)\right)\right)\right) \]
        4. /-lowering-/.f6469.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(NaChar, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), Vef\right), mu\right), KbT\right)\right), \frac{-1}{4}\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, NdChar\right)\right), \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(NdChar, \mathsf{/.f64}\left(mu, \color{blue}{KbT}\right)\right)\right)\right)\right) \]
      9. Simplified69.0%

        \[\leadsto \left(NaChar \cdot \frac{\left(\left(EAccept + Ev\right) + Vef\right) - mu}{KbT}\right) \cdot -0.25 + \left(0.5 \cdot \left(NaChar + NdChar\right) + \color{blue}{-0.25 \cdot \left(NdChar \cdot \frac{mu}{KbT}\right)}\right) \]

      if -2.1e180 < KbT < 2.50000000000000018e69

      1. Initial program 99.9%

        \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
      2. Simplified99.9%

        \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
      3. Add Preprocessing
      4. Step-by-step derivation
        1. frac-2negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        2. distribute-frac-neg2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        3. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        5. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        7. neg-sub0N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        10. associate-+r-N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        12. +-lowering-+.f6499.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      5. Applied egg-rr99.9%

        \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
      6. Taylor expanded in KbT around -inf

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        2. mul-1-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        3. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      8. Simplified72.2%

        \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
      9. Taylor expanded in Ec around inf

        \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
      10. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
        4. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
        6. associate--l+N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
        8. associate--l+N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        10. --lowering--.f6467.5%

          \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
      11. Simplified67.5%

        \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
      12. Taylor expanded in NdChar around inf

        \[\leadsto \color{blue}{NdChar} \]
      13. Step-by-step derivation
        1. Simplified38.5%

          \[\leadsto \color{blue}{NdChar} \]

        if 2.50000000000000018e69 < KbT

        1. Initial program 100.0%

          \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
        2. Simplified100.0%

          \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
        3. Add Preprocessing
        4. Taylor expanded in KbT around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
        5. Step-by-step derivation
          1. distribute-lft-outN/A

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
          3. +-lowering-+.f6448.2%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
        6. Simplified48.2%

          \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
      14. Recombined 3 regimes into one program.
      15. Final simplification43.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -2.1 \cdot 10^{+180}:\\ \;\;\;\;-0.25 \cdot \left(NaChar \cdot \frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}\right) + \left(0.5 \cdot \left(NdChar + NaChar\right) + -0.25 \cdot \left(NdChar \cdot \frac{mu}{KbT}\right)\right)\\ \mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
      16. Add Preprocessing

      Alternative 18: 43.1% accurate, 15.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -2.75 \cdot 10^{+180}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
       :precision binary64
       (let* ((t_0 (* 0.5 (+ NdChar NaChar))))
         (if (<= KbT -2.75e+180) t_0 (if (<= KbT 6.2e+69) NdChar t_0))))
      double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
      	double t_0 = 0.5 * (NdChar + NaChar);
      	double tmp;
      	if (KbT <= -2.75e+180) {
      		tmp = t_0;
      	} else if (KbT <= 6.2e+69) {
      		tmp = NdChar;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
          real(8), intent (in) :: ndchar
          real(8), intent (in) :: ec
          real(8), intent (in) :: vef
          real(8), intent (in) :: edonor
          real(8), intent (in) :: mu
          real(8), intent (in) :: kbt
          real(8), intent (in) :: nachar
          real(8), intent (in) :: ev
          real(8), intent (in) :: eaccept
          real(8) :: t_0
          real(8) :: tmp
          t_0 = 0.5d0 * (ndchar + nachar)
          if (kbt <= (-2.75d+180)) then
              tmp = t_0
          else if (kbt <= 6.2d+69) then
              tmp = ndchar
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
      	double t_0 = 0.5 * (NdChar + NaChar);
      	double tmp;
      	if (KbT <= -2.75e+180) {
      		tmp = t_0;
      	} else if (KbT <= 6.2e+69) {
      		tmp = NdChar;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
      	t_0 = 0.5 * (NdChar + NaChar)
      	tmp = 0
      	if KbT <= -2.75e+180:
      		tmp = t_0
      	elif KbT <= 6.2e+69:
      		tmp = NdChar
      	else:
      		tmp = t_0
      	return tmp
      
      function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
      	t_0 = Float64(0.5 * Float64(NdChar + NaChar))
      	tmp = 0.0
      	if (KbT <= -2.75e+180)
      		tmp = t_0;
      	elseif (KbT <= 6.2e+69)
      		tmp = NdChar;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
      	t_0 = 0.5 * (NdChar + NaChar);
      	tmp = 0.0;
      	if (KbT <= -2.75e+180)
      		tmp = t_0;
      	elseif (KbT <= 6.2e+69)
      		tmp = NdChar;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.75e+180], t$95$0, If[LessEqual[KbT, 6.2e+69], NdChar, t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
      \mathbf{if}\;KbT \leq -2.75 \cdot 10^{+180}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\
      \;\;\;\;NdChar\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if KbT < -2.7500000000000001e180 or 6.1999999999999997e69 < KbT

        1. Initial program 100.0%

          \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
        2. Simplified100.0%

          \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
        3. Add Preprocessing
        4. Taylor expanded in KbT around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
        5. Step-by-step derivation
          1. distribute-lft-outN/A

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
          3. +-lowering-+.f6454.4%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
        6. Simplified54.4%

          \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

        if -2.7500000000000001e180 < KbT < 6.1999999999999997e69

        1. Initial program 99.9%

          \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
        2. Simplified99.9%

          \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. frac-2negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          2. distribute-frac-neg2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          3. exp-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          5. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          7. neg-sub0N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          10. associate-+r-N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          12. +-lowering-+.f6499.9%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        5. Applied egg-rr99.9%

          \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
        6. Taylor expanded in KbT around -inf

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          2. mul-1-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          3. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        8. Simplified72.2%

          \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
        9. Taylor expanded in Ec around inf

          \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
        10. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
          4. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
          6. associate--l+N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
          8. associate--l+N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          10. --lowering--.f6467.5%

            \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
        11. Simplified67.5%

          \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
        12. Taylor expanded in NdChar around inf

          \[\leadsto \color{blue}{NdChar} \]
        13. Step-by-step derivation
          1. Simplified38.5%

            \[\leadsto \color{blue}{NdChar} \]
        14. Recombined 2 regimes into one program.
        15. Final simplification43.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -2.75 \cdot 10^{+180}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
        16. Add Preprocessing

        Alternative 19: 36.0% accurate, 17.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;KbT \leq -1.8 \cdot 10^{+191}:\\ \;\;\;\;NaChar \cdot 0.5\\ \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;NaChar \cdot 0.5\\ \end{array} \end{array} \]
        (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
         :precision binary64
         (if (<= KbT -1.8e+191)
           (* NaChar 0.5)
           (if (<= KbT 6.2e+69) NdChar (* NaChar 0.5))))
        double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
        	double tmp;
        	if (KbT <= -1.8e+191) {
        		tmp = NaChar * 0.5;
        	} else if (KbT <= 6.2e+69) {
        		tmp = NdChar;
        	} else {
        		tmp = NaChar * 0.5;
        	}
        	return tmp;
        }
        
        real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
            real(8), intent (in) :: ndchar
            real(8), intent (in) :: ec
            real(8), intent (in) :: vef
            real(8), intent (in) :: edonor
            real(8), intent (in) :: mu
            real(8), intent (in) :: kbt
            real(8), intent (in) :: nachar
            real(8), intent (in) :: ev
            real(8), intent (in) :: eaccept
            real(8) :: tmp
            if (kbt <= (-1.8d+191)) then
                tmp = nachar * 0.5d0
            else if (kbt <= 6.2d+69) then
                tmp = ndchar
            else
                tmp = nachar * 0.5d0
            end if
            code = tmp
        end function
        
        public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
        	double tmp;
        	if (KbT <= -1.8e+191) {
        		tmp = NaChar * 0.5;
        	} else if (KbT <= 6.2e+69) {
        		tmp = NdChar;
        	} else {
        		tmp = NaChar * 0.5;
        	}
        	return tmp;
        }
        
        def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
        	tmp = 0
        	if KbT <= -1.8e+191:
        		tmp = NaChar * 0.5
        	elif KbT <= 6.2e+69:
        		tmp = NdChar
        	else:
        		tmp = NaChar * 0.5
        	return tmp
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	tmp = 0.0
        	if (KbT <= -1.8e+191)
        		tmp = Float64(NaChar * 0.5);
        	elseif (KbT <= 6.2e+69)
        		tmp = NdChar;
        	else
        		tmp = Float64(NaChar * 0.5);
        	end
        	return tmp
        end
        
        function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	tmp = 0.0;
        	if (KbT <= -1.8e+191)
        		tmp = NaChar * 0.5;
        	elseif (KbT <= 6.2e+69)
        		tmp = NdChar;
        	else
        		tmp = NaChar * 0.5;
        	end
        	tmp_2 = tmp;
        end
        
        code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -1.8e+191], N[(NaChar * 0.5), $MachinePrecision], If[LessEqual[KbT, 6.2e+69], NdChar, N[(NaChar * 0.5), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;KbT \leq -1.8 \cdot 10^{+191}:\\
        \;\;\;\;NaChar \cdot 0.5\\
        
        \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\
        \;\;\;\;NdChar\\
        
        \mathbf{else}:\\
        \;\;\;\;NaChar \cdot 0.5\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if KbT < -1.8e191 or 6.1999999999999997e69 < KbT

          1. Initial program 100.0%

            \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
          2. Simplified100.0%

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
          3. Add Preprocessing
          4. Taylor expanded in KbT around inf

            \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar} \]
          5. Step-by-step derivation
            1. distribute-lft-outN/A

              \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(NaChar + NdChar\right)}\right) \]
            3. +-lowering-+.f6454.7%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(NaChar, \color{blue}{NdChar}\right)\right) \]
          6. Simplified54.7%

            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
          7. Taylor expanded in NaChar around inf

            \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar} \]
          8. Step-by-step derivation
            1. *-lowering-*.f6442.0%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{NaChar}\right) \]
          9. Simplified42.0%

            \[\leadsto \color{blue}{0.5 \cdot NaChar} \]

          if -1.8e191 < KbT < 6.1999999999999997e69

          1. Initial program 99.9%

            \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
          2. Simplified99.9%

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
          3. Add Preprocessing
          4. Step-by-step derivation
            1. frac-2negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            2. distribute-frac-neg2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            3. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            5. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            7. neg-sub0N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            10. associate-+r-N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            11. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            12. +-lowering-+.f6499.9%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          5. Applied egg-rr99.9%

            \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
          6. Taylor expanded in KbT around -inf

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            3. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          8. Simplified72.7%

            \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
          9. Taylor expanded in Ec around inf

            \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          10. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
            4. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
            6. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
            8. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            10. --lowering--.f6467.6%

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          11. Simplified67.6%

            \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
          12. Taylor expanded in NdChar around inf

            \[\leadsto \color{blue}{NdChar} \]
          13. Step-by-step derivation
            1. Simplified38.5%

              \[\leadsto \color{blue}{NdChar} \]
          14. Recombined 2 regimes into one program.
          15. Final simplification39.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.8 \cdot 10^{+191}:\\ \;\;\;\;NaChar \cdot 0.5\\ \mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;NdChar\\ \mathbf{else}:\\ \;\;\;\;NaChar \cdot 0.5\\ \end{array} \]
          16. Add Preprocessing

          Alternative 20: 33.0% accurate, 229.0× speedup?

          \[\begin{array}{l} \\ NdChar \end{array} \]
          (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
           :precision binary64
           NdChar)
          double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
          	return NdChar;
          }
          
          real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
              real(8), intent (in) :: ndchar
              real(8), intent (in) :: ec
              real(8), intent (in) :: vef
              real(8), intent (in) :: edonor
              real(8), intent (in) :: mu
              real(8), intent (in) :: kbt
              real(8), intent (in) :: nachar
              real(8), intent (in) :: ev
              real(8), intent (in) :: eaccept
              code = ndchar
          end function
          
          public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
          	return NdChar;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	return NdChar
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	return NdChar
          end
          
          function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	tmp = NdChar;
          end
          
          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := NdChar
          
          \begin{array}{l}
          
          \\
          NdChar
          \end{array}
          
          Derivation
          1. Initial program 99.9%

            \[\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}} \]
          2. Simplified99.9%

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}} \]
          3. Add Preprocessing
          4. Step-by-step derivation
            1. frac-2negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{\mathsf{neg}\left(KbT\right)}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            2. distribute-frac-neg2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(e^{\mathsf{neg}\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            3. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \left(\frac{1}{e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left(e^{\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}}\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            5. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            7. neg-sub0N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(Vef + \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(mu + \left(EDonor - Ec\right)\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            10. associate-+r-N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \left(\left(mu + EDonor\right) - Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            11. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(mu + EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            12. +-lowering-+.f6499.9%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, EDonor\right), Ec\right)\right)\right), KbT\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          5. Applied egg-rr99.9%

            \[\leadsto \frac{NdChar}{1 + \color{blue}{\frac{1}{e^{\frac{0 - \left(Vef + \left(\left(mu + EDonor\right) - Ec\right)\right)}{KbT}}}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
          6. Taylor expanded in KbT around -inf

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(-1 \cdot \frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            3. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\left(\frac{-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right) + \frac{-1}{2} \cdot \frac{{\left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          8. Simplified72.2%

            \[\leadsto \frac{NdChar}{1 + \frac{1}{\color{blue}{1 + \left(-\frac{\frac{-0.5 \cdot \left(\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right) \cdot \left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT} + \left(-\left(\left(Ec - EDonor\right) - \left(mu + Vef\right)\right)\right)}{KbT}\right)}}} + \frac{NaChar}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \]
          9. Taylor expanded in Ec around inf

            \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          10. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \color{blue}{\left(\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}\right)}\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \color{blue}{\left(1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}\right)}\right)\right)\right) \]
            4. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}\right)\right)\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right), KbT\right)\right)\right)\right)\right) \]
            6. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(\left(Ev + Vef\right) - mu\right)\right), KbT\right)\right)\right)\right)\right) \]
            8. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \left(Ev + \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
            10. --lowering--.f6465.1%

              \[\leadsto \mathsf{+.f64}\left(NdChar, \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right)\right) \]
          11. Simplified65.1%

            \[\leadsto \color{blue}{NdChar + \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}}}} \]
          12. Taylor expanded in NdChar around inf

            \[\leadsto \color{blue}{NdChar} \]
          13. Step-by-step derivation
            1. Simplified31.0%

              \[\leadsto \color{blue}{NdChar} \]
            2. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2024161 
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
              :name "Bulmash initializePoisson"
              :precision binary64
              (+ (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT)))) (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))