Bulmash initializePoisson

Percentage Accurate: 99.9% → 99.9%
Time: 22.2s
Alternatives: 31
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 31 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: 99.9% 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: 99.9% accurate, 1.0× speedup?

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

\\
\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{-1}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot NaChar
\end{array}
Derivation
  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. clear-numN/A

      \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
    2. associate-/r/N/A

      \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
    6. exp-lowering-exp.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
    8. +-lowering-+.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
    10. --lowering--.f64100.0%

      \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
  5. Applied egg-rr100.0%

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

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

Alternative 2: 68.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(EAccept + Ev\right) + \left(Vef - mu\right)\\ t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ t_2 := t\_1 + \frac{NaChar}{2 + \frac{t\_0 + \frac{-0.5 \cdot \left(t\_0 \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ t_3 := t\_1 + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{if}\;KbT \leq -6.6 \cdot 10^{+106}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;KbT \leq -3.7 \cdot 10^{-196}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;KbT \leq 2.9 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{t\_0}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+199}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (+ (+ EAccept Ev) (- Vef mu)))
        (t_1 (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0)))
        (t_2
         (+
          t_1
          (/
           NaChar
           (+
            2.0
            (/
             (+ t_0 (/ (* -0.5 (* t_0 (- (- mu Vef) (+ EAccept Ev)))) KbT))
             KbT)))))
        (t_3 (+ t_1 (/ NaChar (+ (exp (/ Vef KbT)) 1.0)))))
   (if (<= KbT -6.6e+106)
     t_3
     (if (<= KbT -3.7e-196)
       t_2
       (if (<= KbT 2.9e-19)
         (/ NaChar (+ (exp (/ t_0 KbT)) 1.0))
         (if (<= KbT 1.25e+199) t_2 t_3))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EAccept + Ev) + (Vef - mu);
	double t_1 = NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	double t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	double t_3 = t_1 + (NaChar / (exp((Vef / KbT)) + 1.0));
	double tmp;
	if (KbT <= -6.6e+106) {
		tmp = t_3;
	} else if (KbT <= -3.7e-196) {
		tmp = t_2;
	} else if (KbT <= 2.9e-19) {
		tmp = NaChar / (exp((t_0 / KbT)) + 1.0);
	} else if (KbT <= 1.25e+199) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_0 = (eaccept + ev) + (vef - mu)
    t_1 = ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)
    t_2 = t_1 + (nachar / (2.0d0 + ((t_0 + (((-0.5d0) * (t_0 * ((mu - vef) - (eaccept + ev)))) / kbt)) / kbt)))
    t_3 = t_1 + (nachar / (exp((vef / kbt)) + 1.0d0))
    if (kbt <= (-6.6d+106)) then
        tmp = t_3
    else if (kbt <= (-3.7d-196)) then
        tmp = t_2
    else if (kbt <= 2.9d-19) then
        tmp = nachar / (exp((t_0 / kbt)) + 1.0d0)
    else if (kbt <= 1.25d+199) then
        tmp = t_2
    else
        tmp = t_3
    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 = (EAccept + Ev) + (Vef - mu);
	double t_1 = NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	double t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	double t_3 = t_1 + (NaChar / (Math.exp((Vef / KbT)) + 1.0));
	double tmp;
	if (KbT <= -6.6e+106) {
		tmp = t_3;
	} else if (KbT <= -3.7e-196) {
		tmp = t_2;
	} else if (KbT <= 2.9e-19) {
		tmp = NaChar / (Math.exp((t_0 / KbT)) + 1.0);
	} else if (KbT <= 1.25e+199) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (EAccept + Ev) + (Vef - mu)
	t_1 = NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)
	t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)))
	t_3 = t_1 + (NaChar / (math.exp((Vef / KbT)) + 1.0))
	tmp = 0
	if KbT <= -6.6e+106:
		tmp = t_3
	elif KbT <= -3.7e-196:
		tmp = t_2
	elif KbT <= 2.9e-19:
		tmp = NaChar / (math.exp((t_0 / KbT)) + 1.0)
	elif KbT <= 1.25e+199:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(EAccept + Ev) + Float64(Vef - mu))
	t_1 = Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0))
	t_2 = Float64(t_1 + Float64(NaChar / Float64(2.0 + Float64(Float64(t_0 + Float64(Float64(-0.5 * Float64(t_0 * Float64(Float64(mu - Vef) - Float64(EAccept + Ev)))) / KbT)) / KbT))))
	t_3 = Float64(t_1 + Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)))
	tmp = 0.0
	if (KbT <= -6.6e+106)
		tmp = t_3;
	elseif (KbT <= -3.7e-196)
		tmp = t_2;
	elseif (KbT <= 2.9e-19)
		tmp = Float64(NaChar / Float64(exp(Float64(t_0 / KbT)) + 1.0));
	elseif (KbT <= 1.25e+199)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (EAccept + Ev) + (Vef - mu);
	t_1 = NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	t_3 = t_1 + (NaChar / (exp((Vef / KbT)) + 1.0));
	tmp = 0.0;
	if (KbT <= -6.6e+106)
		tmp = t_3;
	elseif (KbT <= -3.7e-196)
		tmp = t_2;
	elseif (KbT <= 2.9e-19)
		tmp = NaChar / (exp((t_0 / KbT)) + 1.0);
	elseif (KbT <= 1.25e+199)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(NaChar / N[(2.0 + N[(N[(t$95$0 + N[(N[(-0.5 * N[(t$95$0 * N[(N[(mu - Vef), $MachinePrecision] - N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -6.6e+106], t$95$3, If[LessEqual[KbT, -3.7e-196], t$95$2, If[LessEqual[KbT, 2.9e-19], N[(NaChar / N[(N[Exp[N[(t$95$0 / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.25e+199], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(EAccept + Ev\right) + \left(Vef - mu\right)\\
t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\
t_2 := t\_1 + \frac{NaChar}{2 + \frac{t\_0 + \frac{-0.5 \cdot \left(t\_0 \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\
t_3 := t\_1 + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;KbT \leq -6.6 \cdot 10^{+106}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;KbT \leq -3.7 \cdot 10^{-196}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;KbT \leq 2.9 \cdot 10^{-19}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{t\_0}{KbT}} + 1}\\

\mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+199}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if KbT < -6.60000000000000015e106 or 1.25e199 < KbT

    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 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-/.f6492.3%

        \[\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. Simplified92.3%

      \[\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 -6.60000000000000015e106 < KbT < -3.7000000000000001e-196 or 2.9e-19 < KbT < 1.25e199

    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 \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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
    5. Step-by-step derivation
      1. mul-1-negN/A

        \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
    6. Simplified74.3%

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

    if -3.7000000000000001e-196 < KbT < 2.9e-19

    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. associate--l+N/A

        \[\leadsto \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) \]
      6. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      8. mul-1-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
      11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
      13. sub-negN/A

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -6.6 \cdot 10^{+106}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq -3.7 \cdot 10^{-196}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + \frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{elif}\;KbT \leq 2.9 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+199}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + \frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ \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: 99.9% accurate, 1.0× speedup?

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

\\
\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1}
\end{array}
Derivation
  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. Final simplification100.0%

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

Alternative 4: 67.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(EAccept + Ev\right) + \left(Vef - mu\right)\\ t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\ t_2 := t\_1 + \frac{NaChar}{2 + \frac{t\_0 + \frac{-0.5 \cdot \left(t\_0 \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ t_3 := t\_1 + \frac{NaChar}{2}\\ \mathbf{if}\;KbT \leq -9 \cdot 10^{+172}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;KbT \leq -8 \cdot 10^{-196}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;KbT \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{t\_0}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 2.95 \cdot 10^{+199}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (let* ((t_0 (+ (+ EAccept Ev) (- Vef mu)))
        (t_1 (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0)))
        (t_2
         (+
          t_1
          (/
           NaChar
           (+
            2.0
            (/
             (+ t_0 (/ (* -0.5 (* t_0 (- (- mu Vef) (+ EAccept Ev)))) KbT))
             KbT)))))
        (t_3 (+ t_1 (/ NaChar 2.0))))
   (if (<= KbT -9e+172)
     t_3
     (if (<= KbT -8e-196)
       t_2
       (if (<= KbT 1.65e-18)
         (/ NaChar (+ (exp (/ t_0 KbT)) 1.0))
         (if (<= KbT 2.95e+199) t_2 t_3))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	double t_0 = (EAccept + Ev) + (Vef - mu);
	double t_1 = NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	double t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	double t_3 = t_1 + (NaChar / 2.0);
	double tmp;
	if (KbT <= -9e+172) {
		tmp = t_3;
	} else if (KbT <= -8e-196) {
		tmp = t_2;
	} else if (KbT <= 1.65e-18) {
		tmp = NaChar / (exp((t_0 / KbT)) + 1.0);
	} else if (KbT <= 2.95e+199) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_0 = (eaccept + ev) + (vef - mu)
    t_1 = ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)
    t_2 = t_1 + (nachar / (2.0d0 + ((t_0 + (((-0.5d0) * (t_0 * ((mu - vef) - (eaccept + ev)))) / kbt)) / kbt)))
    t_3 = t_1 + (nachar / 2.0d0)
    if (kbt <= (-9d+172)) then
        tmp = t_3
    else if (kbt <= (-8d-196)) then
        tmp = t_2
    else if (kbt <= 1.65d-18) then
        tmp = nachar / (exp((t_0 / kbt)) + 1.0d0)
    else if (kbt <= 2.95d+199) then
        tmp = t_2
    else
        tmp = t_3
    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 = (EAccept + Ev) + (Vef - mu);
	double t_1 = NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	double t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	double t_3 = t_1 + (NaChar / 2.0);
	double tmp;
	if (KbT <= -9e+172) {
		tmp = t_3;
	} else if (KbT <= -8e-196) {
		tmp = t_2;
	} else if (KbT <= 1.65e-18) {
		tmp = NaChar / (Math.exp((t_0 / KbT)) + 1.0);
	} else if (KbT <= 2.95e+199) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
	t_0 = (EAccept + Ev) + (Vef - mu)
	t_1 = NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)
	t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)))
	t_3 = t_1 + (NaChar / 2.0)
	tmp = 0
	if KbT <= -9e+172:
		tmp = t_3
	elif KbT <= -8e-196:
		tmp = t_2
	elif KbT <= 1.65e-18:
		tmp = NaChar / (math.exp((t_0 / KbT)) + 1.0)
	elif KbT <= 2.95e+199:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = Float64(Float64(EAccept + Ev) + Float64(Vef - mu))
	t_1 = Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0))
	t_2 = Float64(t_1 + Float64(NaChar / Float64(2.0 + Float64(Float64(t_0 + Float64(Float64(-0.5 * Float64(t_0 * Float64(Float64(mu - Vef) - Float64(EAccept + Ev)))) / KbT)) / KbT))))
	t_3 = Float64(t_1 + Float64(NaChar / 2.0))
	tmp = 0.0
	if (KbT <= -9e+172)
		tmp = t_3;
	elseif (KbT <= -8e-196)
		tmp = t_2;
	elseif (KbT <= 1.65e-18)
		tmp = Float64(NaChar / Float64(exp(Float64(t_0 / KbT)) + 1.0));
	elseif (KbT <= 2.95e+199)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	t_0 = (EAccept + Ev) + (Vef - mu);
	t_1 = NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0);
	t_2 = t_1 + (NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)));
	t_3 = t_1 + (NaChar / 2.0);
	tmp = 0.0;
	if (KbT <= -9e+172)
		tmp = t_3;
	elseif (KbT <= -8e-196)
		tmp = t_2;
	elseif (KbT <= 1.65e-18)
		tmp = NaChar / (exp((t_0 / KbT)) + 1.0);
	elseif (KbT <= 2.95e+199)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(NaChar / N[(2.0 + N[(N[(t$95$0 + N[(N[(-0.5 * N[(t$95$0 * N[(N[(mu - Vef), $MachinePrecision] - N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(NaChar / 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -9e+172], t$95$3, If[LessEqual[KbT, -8e-196], t$95$2, If[LessEqual[KbT, 1.65e-18], N[(NaChar / N[(N[Exp[N[(t$95$0 / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.95e+199], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(EAccept + Ev\right) + \left(Vef - mu\right)\\
t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\
t_2 := t\_1 + \frac{NaChar}{2 + \frac{t\_0 + \frac{-0.5 \cdot \left(t\_0 \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\
t_3 := t\_1 + \frac{NaChar}{2}\\
\mathbf{if}\;KbT \leq -9 \cdot 10^{+172}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;KbT \leq -8 \cdot 10^{-196}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;KbT \leq 1.65 \cdot 10^{-18}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{t\_0}{KbT}} + 1}\\

\mathbf{elif}\;KbT \leq 2.95 \cdot 10^{+199}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if KbT < -9.0000000000000004e172 or 2.94999999999999998e199 < KbT

    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 KbT 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, \color{blue}{2}\right)\right) \]
    5. Step-by-step derivation
      1. Simplified89.0%

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

      if -9.0000000000000004e172 < KbT < -8.0000000000000004e-196 or 1.6500000000000001e-18 < KbT < 2.94999999999999998e199

      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 \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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
      5. Step-by-step derivation
        1. mul-1-negN/A

          \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
        2. unsub-negN/A

          \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
        3. --lowering--.f64N/A

          \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
      6. Simplified75.2%

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

      if -8.0000000000000004e-196 < KbT < 1.6500000000000001e-18

      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. associate--l+N/A

          \[\leadsto \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) \]
        6. sub-negN/A

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

          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
        8. mul-1-negN/A

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

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

          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
        11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
        12. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
        13. sub-negN/A

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -9 \cdot 10^{+172}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\ \mathbf{elif}\;KbT \leq -8 \cdot 10^{-196}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + \frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{elif}\;KbT \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 2.95 \cdot 10^{+199}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + \frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\ \end{array} \]
    8. Add Preprocessing

    Alternative 5: 65.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\ \mathbf{if}\;KbT \leq -4.5 \cdot 10^{+148}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq -8 \cdot 10^{-197}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 3.4 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 5.2 \cdot 10^{+131}:\\ \;\;\;\;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 (/ NdChar (+ (exp (/ (- (+ mu (+ Vef EDonor)) Ec) KbT)) 1.0)))
            (t_1
             (+
              (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0))
              (/ NaChar 2.0))))
       (if (<= KbT -4.5e+148)
         t_1
         (if (<= KbT -8e-197)
           t_0
           (if (<= KbT 3.4e-18)
             (/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0))
             (if (<= KbT 5.2e+131) 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 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
    	double t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / 2.0);
    	double tmp;
    	if (KbT <= -4.5e+148) {
    		tmp = t_1;
    	} else if (KbT <= -8e-197) {
    		tmp = t_0;
    	} else if (KbT <= 3.4e-18) {
    		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
    	} else if (KbT <= 5.2e+131) {
    		tmp = 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 = ndchar / (exp((((mu + (vef + edonor)) - ec) / kbt)) + 1.0d0)
        t_1 = (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)) + (nachar / 2.0d0)
        if (kbt <= (-4.5d+148)) then
            tmp = t_1
        else if (kbt <= (-8d-197)) then
            tmp = t_0
        else if (kbt <= 3.4d-18) then
            tmp = nachar / (exp((((eaccept + ev) + (vef - mu)) / kbt)) + 1.0d0)
        else if (kbt <= 5.2d+131) then
            tmp = 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 = NdChar / (Math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
    	double t_1 = (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / 2.0);
    	double tmp;
    	if (KbT <= -4.5e+148) {
    		tmp = t_1;
    	} else if (KbT <= -8e-197) {
    		tmp = t_0;
    	} else if (KbT <= 3.4e-18) {
    		tmp = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
    	} else if (KbT <= 5.2e+131) {
    		tmp = t_0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
    	t_0 = NdChar / (math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0)
    	t_1 = (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / 2.0)
    	tmp = 0
    	if KbT <= -4.5e+148:
    		tmp = t_1
    	elif KbT <= -8e-197:
    		tmp = t_0
    	elif KbT <= 3.4e-18:
    		tmp = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0)
    	elif KbT <= 5.2e+131:
    		tmp = t_0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
    	t_0 = Float64(NdChar / Float64(exp(Float64(Float64(Float64(mu + Float64(Vef + EDonor)) - Ec) / KbT)) + 1.0))
    	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0)) + Float64(NaChar / 2.0))
    	tmp = 0.0
    	if (KbT <= -4.5e+148)
    		tmp = t_1;
    	elseif (KbT <= -8e-197)
    		tmp = t_0;
    	elseif (KbT <= 3.4e-18)
    		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0));
    	elseif (KbT <= 5.2e+131)
    		tmp = 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 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
    	t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / 2.0);
    	tmp = 0.0;
    	if (KbT <= -4.5e+148)
    		tmp = t_1;
    	elseif (KbT <= -8e-197)
    		tmp = t_0;
    	elseif (KbT <= 3.4e-18)
    		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
    	elseif (KbT <= 5.2e+131)
    		tmp = 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[(NdChar / N[(N[Exp[N[(N[(N[(mu + N[(Vef + EDonor), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $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 / 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -4.5e+148], t$95$1, If[LessEqual[KbT, -8e-197], t$95$0, If[LessEqual[KbT, 3.4e-18], N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 5.2e+131], t$95$0, t$95$1]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\
    t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\
    \mathbf{if}\;KbT \leq -4.5 \cdot 10^{+148}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;KbT \leq -8 \cdot 10^{-197}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;KbT \leq 3.4 \cdot 10^{-18}:\\
    \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
    
    \mathbf{elif}\;KbT \leq 5.2 \cdot 10^{+131}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if KbT < -4.49999999999999994e148 or 5.2e131 < KbT

      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 KbT 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, \color{blue}{2}\right)\right) \]
      5. Step-by-step derivation
        1. Simplified81.3%

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

        if -4.49999999999999994e148 < KbT < -7.9999999999999999e-197 or 3.40000000000000001e-18 < KbT < 5.2e131

        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. --lowering--.f64N/A

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

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

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

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

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

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

        if -7.9999999999999999e-197 < KbT < 3.40000000000000001e-18

        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. associate--l+N/A

            \[\leadsto \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) \]
          6. sub-negN/A

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

            \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
          8. mul-1-negN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
          11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
          12. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
          13. sub-negN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -4.5 \cdot 10^{+148}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\ \mathbf{elif}\;KbT \leq -8 \cdot 10^{-197}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 3.4 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 5.2 \cdot 10^{+131}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{2}\\ \end{array} \]
      8. Add Preprocessing

      Alternative 6: 65.5% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ t_1 := \frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{2}\\ \mathbf{if}\;KbT \leq -3.75 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq -7.2 \cdot 10^{-196}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 8.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+136}:\\ \;\;\;\;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 (/ NdChar (+ (exp (/ (- (+ mu (+ Vef EDonor)) Ec) KbT)) 1.0)))
              (t_1
               (+
                (/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
                (/ NdChar 2.0))))
         (if (<= KbT -3.75e+149)
           t_1
           (if (<= KbT -7.2e-196)
             t_0
             (if (<= KbT 8.2e-19)
               (/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0))
               (if (<= KbT 1.25e+136) 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 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
      	double t_1 = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / 2.0);
      	double tmp;
      	if (KbT <= -3.75e+149) {
      		tmp = t_1;
      	} else if (KbT <= -7.2e-196) {
      		tmp = t_0;
      	} else if (KbT <= 8.2e-19) {
      		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
      	} else if (KbT <= 1.25e+136) {
      		tmp = 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 = ndchar / (exp((((mu + (vef + edonor)) - ec) / kbt)) + 1.0d0)
          t_1 = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / 2.0d0)
          if (kbt <= (-3.75d+149)) then
              tmp = t_1
          else if (kbt <= (-7.2d-196)) then
              tmp = t_0
          else if (kbt <= 8.2d-19) then
              tmp = nachar / (exp((((eaccept + ev) + (vef - mu)) / kbt)) + 1.0d0)
          else if (kbt <= 1.25d+136) then
              tmp = 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 = NdChar / (Math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
      	double t_1 = (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / 2.0);
      	double tmp;
      	if (KbT <= -3.75e+149) {
      		tmp = t_1;
      	} else if (KbT <= -7.2e-196) {
      		tmp = t_0;
      	} else if (KbT <= 8.2e-19) {
      		tmp = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
      	} else if (KbT <= 1.25e+136) {
      		tmp = t_0;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
      	t_0 = NdChar / (math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0)
      	t_1 = (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / 2.0)
      	tmp = 0
      	if KbT <= -3.75e+149:
      		tmp = t_1
      	elif KbT <= -7.2e-196:
      		tmp = t_0
      	elif KbT <= 8.2e-19:
      		tmp = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0)
      	elif KbT <= 1.25e+136:
      		tmp = t_0
      	else:
      		tmp = t_1
      	return tmp
      
      function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
      	t_0 = Float64(NdChar / Float64(exp(Float64(Float64(Float64(mu + Float64(Vef + EDonor)) - Ec) / KbT)) + 1.0))
      	t_1 = Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / 2.0))
      	tmp = 0.0
      	if (KbT <= -3.75e+149)
      		tmp = t_1;
      	elseif (KbT <= -7.2e-196)
      		tmp = t_0;
      	elseif (KbT <= 8.2e-19)
      		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0));
      	elseif (KbT <= 1.25e+136)
      		tmp = 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 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
      	t_1 = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / 2.0);
      	tmp = 0.0;
      	if (KbT <= -3.75e+149)
      		tmp = t_1;
      	elseif (KbT <= -7.2e-196)
      		tmp = t_0;
      	elseif (KbT <= 8.2e-19)
      		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
      	elseif (KbT <= 1.25e+136)
      		tmp = 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[(NdChar / N[(N[Exp[N[(N[(N[(mu + N[(Vef + EDonor), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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 / 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.75e+149], t$95$1, If[LessEqual[KbT, -7.2e-196], t$95$0, If[LessEqual[KbT, 8.2e-19], N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.25e+136], t$95$0, t$95$1]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\
      t_1 := \frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{2}\\
      \mathbf{if}\;KbT \leq -3.75 \cdot 10^{+149}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;KbT \leq -7.2 \cdot 10^{-196}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;KbT \leq 8.2 \cdot 10^{-19}:\\
      \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
      
      \mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+136}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if KbT < -3.75000000000000016e149 or 1.25e136 < KbT

        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 KbT around inf

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.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. Step-by-step derivation
          1. Simplified79.1%

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

          if -3.75000000000000016e149 < KbT < -7.2000000000000001e-196 or 8.1999999999999997e-19 < KbT < 1.25e136

          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. --lowering--.f64N/A

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

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

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

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

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

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

          if -7.2000000000000001e-196 < KbT < 8.1999999999999997e-19

          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. associate--l+N/A

              \[\leadsto \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) \]
            6. sub-negN/A

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
            8. mul-1-negN/A

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
            11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
            12. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
            13. sub-negN/A

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -3.75 \cdot 10^{+149}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{2}\\ \mathbf{elif}\;KbT \leq -7.2 \cdot 10^{-196}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 8.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{elif}\;KbT \leq 1.25 \cdot 10^{+136}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{2}\\ \end{array} \]
        8. Add Preprocessing

        Alternative 7: 42.6% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ \mathbf{if}\;mu \leq -5.2 \cdot 10^{+191}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq -3.8 \cdot 10^{-114}:\\ \;\;\;\;\frac{NaChar}{t\_0}\\ \mathbf{elif}\;mu \leq 4.5 \cdot 10^{-238}:\\ \;\;\;\;\frac{NdChar}{t\_0}\\ \mathbf{elif}\;mu \leq 3.15 \cdot 10^{-146}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 2.45 \cdot 10^{+117}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{0 - \frac{mu}{KbT}} + 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)))
           (if (<= mu -5.2e+191)
             (/ NdChar (+ (exp (/ mu KbT)) 1.0))
             (if (<= mu -3.8e-114)
               (/ NaChar t_0)
               (if (<= mu 4.5e-238)
                 (/ NdChar t_0)
                 (if (<= mu 3.15e-146)
                   (/ NaChar (+ (exp (/ EAccept KbT)) 1.0))
                   (if (<= mu 2.45e+117)
                     (/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
                     (/ NaChar (+ (exp (- 0.0 (/ mu 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 = exp((Vef / KbT)) + 1.0;
        	double tmp;
        	if (mu <= -5.2e+191) {
        		tmp = NdChar / (exp((mu / KbT)) + 1.0);
        	} else if (mu <= -3.8e-114) {
        		tmp = NaChar / t_0;
        	} else if (mu <= 4.5e-238) {
        		tmp = NdChar / t_0;
        	} else if (mu <= 3.15e-146) {
        		tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
        	} else if (mu <= 2.45e+117) {
        		tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
        	} else {
        		tmp = NaChar / (exp((0.0 - (mu / 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 = exp((vef / kbt)) + 1.0d0
            if (mu <= (-5.2d+191)) then
                tmp = ndchar / (exp((mu / kbt)) + 1.0d0)
            else if (mu <= (-3.8d-114)) then
                tmp = nachar / t_0
            else if (mu <= 4.5d-238) then
                tmp = ndchar / t_0
            else if (mu <= 3.15d-146) then
                tmp = nachar / (exp((eaccept / kbt)) + 1.0d0)
            else if (mu <= 2.45d+117) then
                tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
            else
                tmp = nachar / (exp((0.0d0 - (mu / 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 = Math.exp((Vef / KbT)) + 1.0;
        	double tmp;
        	if (mu <= -5.2e+191) {
        		tmp = NdChar / (Math.exp((mu / KbT)) + 1.0);
        	} else if (mu <= -3.8e-114) {
        		tmp = NaChar / t_0;
        	} else if (mu <= 4.5e-238) {
        		tmp = NdChar / t_0;
        	} else if (mu <= 3.15e-146) {
        		tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
        	} else if (mu <= 2.45e+117) {
        		tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
        	} else {
        		tmp = NaChar / (Math.exp((0.0 - (mu / KbT))) + 1.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 mu <= -5.2e+191:
        		tmp = NdChar / (math.exp((mu / KbT)) + 1.0)
        	elif mu <= -3.8e-114:
        		tmp = NaChar / t_0
        	elif mu <= 4.5e-238:
        		tmp = NdChar / t_0
        	elif mu <= 3.15e-146:
        		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0)
        	elif mu <= 2.45e+117:
        		tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0)
        	else:
        		tmp = NaChar / (math.exp((0.0 - (mu / KbT))) + 1.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 (mu <= -5.2e+191)
        		tmp = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0));
        	elseif (mu <= -3.8e-114)
        		tmp = Float64(NaChar / t_0);
        	elseif (mu <= 4.5e-238)
        		tmp = Float64(NdChar / t_0);
        	elseif (mu <= 3.15e-146)
        		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0));
        	elseif (mu <= 2.45e+117)
        		tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0));
        	else
        		tmp = Float64(NaChar / Float64(exp(Float64(0.0 - Float64(mu / KbT))) + 1.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 (mu <= -5.2e+191)
        		tmp = NdChar / (exp((mu / KbT)) + 1.0);
        	elseif (mu <= -3.8e-114)
        		tmp = NaChar / t_0;
        	elseif (mu <= 4.5e-238)
        		tmp = NdChar / t_0;
        	elseif (mu <= 3.15e-146)
        		tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
        	elseif (mu <= 2.45e+117)
        		tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
        	else
        		tmp = NaChar / (exp((0.0 - (mu / KbT))) + 1.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[mu, -5.2e+191], N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[mu, -3.8e-114], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 4.5e-238], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 3.15e-146], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[mu, 2.45e+117], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NaChar / N[(N[Exp[N[(0.0 - N[(mu / KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := e^{\frac{Vef}{KbT}} + 1\\
        \mathbf{if}\;mu \leq -5.2 \cdot 10^{+191}:\\
        \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
        
        \mathbf{elif}\;mu \leq -3.8 \cdot 10^{-114}:\\
        \;\;\;\;\frac{NaChar}{t\_0}\\
        
        \mathbf{elif}\;mu \leq 4.5 \cdot 10^{-238}:\\
        \;\;\;\;\frac{NdChar}{t\_0}\\
        
        \mathbf{elif}\;mu \leq 3.15 \cdot 10^{-146}:\\
        \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
        
        \mathbf{elif}\;mu \leq 2.45 \cdot 10^{+117}:\\
        \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{NaChar}{e^{0 - \frac{mu}{KbT}} + 1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 6 regimes
        2. if mu < -5.2000000000000001e191

          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. --lowering--.f64N/A

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(Vef + EDonor\right), mu\right), Ec\right), KbT\right)\right)\right)\right) \]
            9. +-lowering-+.f6474.4%

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

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

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

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

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

          if -5.2000000000000001e191 < mu < -3.7999999999999998e-114

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f6499.9%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr99.9%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6467.0%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
          11. Simplified49.0%

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

          if -3.7999999999999998e-114 < mu < 4.49999999999999996e-238

          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. --lowering--.f64N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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.3%

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

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

          if 4.49999999999999996e-238 < mu < 3.1499999999999999e-146

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6474.8%

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

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

            \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{EAccept}{KbT}\right)}\right)\right)\right) \]
          10. Step-by-step derivation
            1. /-lowering-/.f6466.2%

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
          11. Simplified66.2%

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

          if 3.1499999999999999e-146 < mu < 2.45e117

          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. --lowering--.f64N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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-/.f6444.5%

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

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

          if 2.45e117 < 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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6466.5%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{mu}{KbT}\right)\right)\right)\right)\right) \]
            2. /-lowering-/.f6452.1%

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(mu, KbT\right)\right)\right)\right)\right) \]
          11. Simplified52.1%

            \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{-1 \cdot \frac{mu}{KbT}}}} \]
        3. Recombined 6 regimes into one program.
        4. Final simplification54.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;mu \leq -5.2 \cdot 10^{+191}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq -3.8 \cdot 10^{-114}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 4.5 \cdot 10^{-238}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 3.15 \cdot 10^{-146}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 2.45 \cdot 10^{+117}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{0 - \frac{mu}{KbT}} + 1}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 8: 38.9% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ t_1 := \frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{if}\;Ev \leq -1.22 \cdot 10^{+75}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq -9.6 \cdot 10^{-57}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;Ev \leq -9.5 \cdot 10^{-162}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;Ev \leq -3.6 \cdot 10^{-274}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;Ev \leq 3.1 \cdot 10^{-262}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \end{array} \]
        (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
         :precision binary64
         (let* ((t_0 (/ NaChar (+ (exp (/ Vef KbT)) 1.0)))
                (t_1 (/ NdChar (+ (exp (/ EDonor KbT)) 1.0))))
           (if (<= Ev -1.22e+75)
             (/ NaChar (+ (exp (/ Ev KbT)) 1.0))
             (if (<= Ev -9.6e-57)
               t_0
               (if (<= Ev -9.5e-162)
                 t_1
                 (if (<= Ev -3.6e-274)
                   t_0
                   (if (<= Ev 3.1e-262)
                     t_1
                     (/ NaChar (+ (exp (/ EAccept 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 = NaChar / (exp((Vef / KbT)) + 1.0);
        	double t_1 = NdChar / (exp((EDonor / KbT)) + 1.0);
        	double tmp;
        	if (Ev <= -1.22e+75) {
        		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
        	} else if (Ev <= -9.6e-57) {
        		tmp = t_0;
        	} else if (Ev <= -9.5e-162) {
        		tmp = t_1;
        	} else if (Ev <= -3.6e-274) {
        		tmp = t_0;
        	} else if (Ev <= 3.1e-262) {
        		tmp = t_1;
        	} else {
        		tmp = NaChar / (exp((EAccept / 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) :: t_1
            real(8) :: tmp
            t_0 = nachar / (exp((vef / kbt)) + 1.0d0)
            t_1 = ndchar / (exp((edonor / kbt)) + 1.0d0)
            if (ev <= (-1.22d+75)) then
                tmp = nachar / (exp((ev / kbt)) + 1.0d0)
            else if (ev <= (-9.6d-57)) then
                tmp = t_0
            else if (ev <= (-9.5d-162)) then
                tmp = t_1
            else if (ev <= (-3.6d-274)) then
                tmp = t_0
            else if (ev <= 3.1d-262) then
                tmp = t_1
            else
                tmp = nachar / (exp((eaccept / 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 = NaChar / (Math.exp((Vef / KbT)) + 1.0);
        	double t_1 = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
        	double tmp;
        	if (Ev <= -1.22e+75) {
        		tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
        	} else if (Ev <= -9.6e-57) {
        		tmp = t_0;
        	} else if (Ev <= -9.5e-162) {
        		tmp = t_1;
        	} else if (Ev <= -3.6e-274) {
        		tmp = t_0;
        	} else if (Ev <= 3.1e-262) {
        		tmp = t_1;
        	} else {
        		tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
        	}
        	return tmp;
        }
        
        def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
        	t_0 = NaChar / (math.exp((Vef / KbT)) + 1.0)
        	t_1 = NdChar / (math.exp((EDonor / KbT)) + 1.0)
        	tmp = 0
        	if Ev <= -1.22e+75:
        		tmp = NaChar / (math.exp((Ev / KbT)) + 1.0)
        	elif Ev <= -9.6e-57:
        		tmp = t_0
        	elif Ev <= -9.5e-162:
        		tmp = t_1
        	elif Ev <= -3.6e-274:
        		tmp = t_0
        	elif Ev <= 3.1e-262:
        		tmp = t_1
        	else:
        		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0)
        	return tmp
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0))
        	t_1 = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0))
        	tmp = 0.0
        	if (Ev <= -1.22e+75)
        		tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0));
        	elseif (Ev <= -9.6e-57)
        		tmp = t_0;
        	elseif (Ev <= -9.5e-162)
        		tmp = t_1;
        	elseif (Ev <= -3.6e-274)
        		tmp = t_0;
        	elseif (Ev <= 3.1e-262)
        		tmp = t_1;
        	else
        		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0));
        	end
        	return tmp
        end
        
        function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = NaChar / (exp((Vef / KbT)) + 1.0);
        	t_1 = NdChar / (exp((EDonor / KbT)) + 1.0);
        	tmp = 0.0;
        	if (Ev <= -1.22e+75)
        		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
        	elseif (Ev <= -9.6e-57)
        		tmp = t_0;
        	elseif (Ev <= -9.5e-162)
        		tmp = t_1;
        	elseif (Ev <= -3.6e-274)
        		tmp = t_0;
        	elseif (Ev <= 3.1e-262)
        		tmp = t_1;
        	else
        		tmp = NaChar / (exp((EAccept / KbT)) + 1.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[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Ev, -1.22e+75], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ev, -9.6e-57], t$95$0, If[LessEqual[Ev, -9.5e-162], t$95$1, If[LessEqual[Ev, -3.6e-274], t$95$0, If[LessEqual[Ev, 3.1e-262], t$95$1, N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
        t_1 := \frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
        \mathbf{if}\;Ev \leq -1.22 \cdot 10^{+75}:\\
        \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
        
        \mathbf{elif}\;Ev \leq -9.6 \cdot 10^{-57}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;Ev \leq -9.5 \cdot 10^{-162}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;Ev \leq -3.6 \cdot 10^{-274}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;Ev \leq 3.1 \cdot 10^{-262}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if Ev < -1.2199999999999999e75

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6458.0%

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

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

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

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

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

          if -1.2199999999999999e75 < Ev < -9.60000000000000025e-57 or -9.5000000000000004e-162 < Ev < -3.59999999999999983e-274

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6463.9%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
          11. Simplified45.8%

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

          if -9.60000000000000025e-57 < Ev < -9.5000000000000004e-162 or -3.59999999999999983e-274 < Ev < 3.0999999999999998e-262

          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. --lowering--.f64N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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-/.f6444.0%

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

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

          if 3.0999999999999998e-262 < Ev

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6459.2%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
          11. Simplified39.1%

            \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{EAccept}{KbT}}}} \]
        3. Recombined 4 regimes into one program.
        4. Final simplification43.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;Ev \leq -1.22 \cdot 10^{+75}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq -9.6 \cdot 10^{-57}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq -9.5 \cdot 10^{-162}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq -3.6 \cdot 10^{-274}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq 3.1 \cdot 10^{-262}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 65.4% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ t_1 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\ \mathbf{if}\;NdChar \leq -1.55 \cdot 10^{+130}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NdChar \leq -0.053:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;NdChar \leq 4.6 \cdot 10^{+74}:\\ \;\;\;\;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 (/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0)))
                (t_1 (/ NdChar (+ (exp (/ (- (+ mu (+ Vef EDonor)) Ec) KbT)) 1.0))))
           (if (<= NdChar -1.55e+130)
             t_0
             (if (<= NdChar -0.053) t_1 (if (<= NdChar 4.6e+74) 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 = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
        	double t_1 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
        	double tmp;
        	if (NdChar <= -1.55e+130) {
        		tmp = t_0;
        	} else if (NdChar <= -0.053) {
        		tmp = t_1;
        	} else if (NdChar <= 4.6e+74) {
        		tmp = 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 = nachar / (exp((((eaccept + ev) + (vef - mu)) / kbt)) + 1.0d0)
            t_1 = ndchar / (exp((((mu + (vef + edonor)) - ec) / kbt)) + 1.0d0)
            if (ndchar <= (-1.55d+130)) then
                tmp = t_0
            else if (ndchar <= (-0.053d0)) then
                tmp = t_1
            else if (ndchar <= 4.6d+74) then
                tmp = 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 = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
        	double t_1 = NdChar / (Math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
        	double tmp;
        	if (NdChar <= -1.55e+130) {
        		tmp = t_0;
        	} else if (NdChar <= -0.053) {
        		tmp = t_1;
        	} else if (NdChar <= 4.6e+74) {
        		tmp = t_0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
        	t_0 = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0)
        	t_1 = NdChar / (math.exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0)
        	tmp = 0
        	if NdChar <= -1.55e+130:
        		tmp = t_0
        	elif NdChar <= -0.053:
        		tmp = t_1
        	elif NdChar <= 4.6e+74:
        		tmp = t_0
        	else:
        		tmp = t_1
        	return tmp
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0))
        	t_1 = Float64(NdChar / Float64(exp(Float64(Float64(Float64(mu + Float64(Vef + EDonor)) - Ec) / KbT)) + 1.0))
        	tmp = 0.0
        	if (NdChar <= -1.55e+130)
        		tmp = t_0;
        	elseif (NdChar <= -0.053)
        		tmp = t_1;
        	elseif (NdChar <= 4.6e+74)
        		tmp = 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 = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
        	t_1 = NdChar / (exp((((mu + (Vef + EDonor)) - Ec) / KbT)) + 1.0);
        	tmp = 0.0;
        	if (NdChar <= -1.55e+130)
        		tmp = t_0;
        	elseif (NdChar <= -0.053)
        		tmp = t_1;
        	elseif (NdChar <= 4.6e+74)
        		tmp = 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[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[Exp[N[(N[(N[(mu + N[(Vef + EDonor), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -1.55e+130], t$95$0, If[LessEqual[NdChar, -0.053], t$95$1, If[LessEqual[NdChar, 4.6e+74], t$95$0, t$95$1]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
        t_1 := \frac{NdChar}{e^{\frac{\left(mu + \left(Vef + EDonor\right)\right) - Ec}{KbT}} + 1}\\
        \mathbf{if}\;NdChar \leq -1.55 \cdot 10^{+130}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;NdChar \leq -0.053:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;NdChar \leq 4.6 \cdot 10^{+74}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if NdChar < -1.55e130 or -0.0529999999999999985 < NdChar < 4.5999999999999997e74

          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. associate--l+N/A

              \[\leadsto \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) \]
            6. sub-negN/A

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
            8. mul-1-negN/A

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
            11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
            12. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
            13. sub-negN/A

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

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

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

          if -1.55e130 < NdChar < -0.0529999999999999985 or 4.5999999999999997e74 < NdChar

          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. --lowering--.f64N/A

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

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

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

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

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

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

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

        Alternative 10: 41.7% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ t_1 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{if}\;mu \leq -2.1 \cdot 10^{+196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;mu \leq -1.25 \cdot 10^{-114}:\\ \;\;\;\;\frac{NaChar}{t\_0}\\ \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-238}:\\ \;\;\;\;\frac{NdChar}{t\_0}\\ \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-80}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{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 (+ (exp (/ Vef KbT)) 1.0))
                (t_1 (/ NdChar (+ (exp (/ mu KbT)) 1.0))))
           (if (<= mu -2.1e+196)
             t_1
             (if (<= mu -1.25e-114)
               (/ NaChar t_0)
               (if (<= mu 3.8e-238)
                 (/ NdChar t_0)
                 (if (<= mu 3.8e-80) (/ NaChar (+ (exp (/ EAccept 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 = exp((Vef / KbT)) + 1.0;
        	double t_1 = NdChar / (exp((mu / KbT)) + 1.0);
        	double tmp;
        	if (mu <= -2.1e+196) {
        		tmp = t_1;
        	} else if (mu <= -1.25e-114) {
        		tmp = NaChar / t_0;
        	} else if (mu <= 3.8e-238) {
        		tmp = NdChar / t_0;
        	} else if (mu <= 3.8e-80) {
        		tmp = NaChar / (exp((EAccept / 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 = exp((vef / kbt)) + 1.0d0
            t_1 = ndchar / (exp((mu / kbt)) + 1.0d0)
            if (mu <= (-2.1d+196)) then
                tmp = t_1
            else if (mu <= (-1.25d-114)) then
                tmp = nachar / t_0
            else if (mu <= 3.8d-238) then
                tmp = ndchar / t_0
            else if (mu <= 3.8d-80) then
                tmp = nachar / (exp((eaccept / 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 = Math.exp((Vef / KbT)) + 1.0;
        	double t_1 = NdChar / (Math.exp((mu / KbT)) + 1.0);
        	double tmp;
        	if (mu <= -2.1e+196) {
        		tmp = t_1;
        	} else if (mu <= -1.25e-114) {
        		tmp = NaChar / t_0;
        	} else if (mu <= 3.8e-238) {
        		tmp = NdChar / t_0;
        	} else if (mu <= 3.8e-80) {
        		tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.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 / (math.exp((mu / KbT)) + 1.0)
        	tmp = 0
        	if mu <= -2.1e+196:
        		tmp = t_1
        	elif mu <= -1.25e-114:
        		tmp = NaChar / t_0
        	elif mu <= 3.8e-238:
        		tmp = NdChar / t_0
        	elif mu <= 3.8e-80:
        		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.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(exp(Float64(mu / KbT)) + 1.0))
        	tmp = 0.0
        	if (mu <= -2.1e+196)
        		tmp = t_1;
        	elseif (mu <= -1.25e-114)
        		tmp = Float64(NaChar / t_0);
        	elseif (mu <= 3.8e-238)
        		tmp = Float64(NdChar / t_0);
        	elseif (mu <= 3.8e-80)
        		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / 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 = exp((Vef / KbT)) + 1.0;
        	t_1 = NdChar / (exp((mu / KbT)) + 1.0);
        	tmp = 0.0;
        	if (mu <= -2.1e+196)
        		tmp = t_1;
        	elseif (mu <= -1.25e-114)
        		tmp = NaChar / t_0;
        	elseif (mu <= 3.8e-238)
        		tmp = NdChar / t_0;
        	elseif (mu <= 3.8e-80)
        		tmp = NaChar / (exp((EAccept / 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[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[mu, -2.1e+196], t$95$1, If[LessEqual[mu, -1.25e-114], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 3.8e-238], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 3.8e-80], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := e^{\frac{Vef}{KbT}} + 1\\
        t_1 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
        \mathbf{if}\;mu \leq -2.1 \cdot 10^{+196}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;mu \leq -1.25 \cdot 10^{-114}:\\
        \;\;\;\;\frac{NaChar}{t\_0}\\
        
        \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-238}:\\
        \;\;\;\;\frac{NdChar}{t\_0}\\
        
        \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-80}:\\
        \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if mu < -2.10000000000000015e196 or 3.79999999999999967e-80 < 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. 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. --lowering--.f64N/A

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(Vef + EDonor\right), mu\right), Ec\right), KbT\right)\right)\right)\right) \]
            9. +-lowering-+.f6462.7%

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

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

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

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

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

          if -2.10000000000000015e196 < mu < -1.24999999999999997e-114

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f6499.9%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr99.9%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6467.0%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
          11. Simplified49.0%

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

          if -1.24999999999999997e-114 < mu < 3.7999999999999997e-238

          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. --lowering--.f64N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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.3%

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

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

          if 3.7999999999999997e-238 < mu < 3.79999999999999967e-80

          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. clear-numN/A

              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
            2. associate-/r/N/A

              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            10. --lowering--.f64100.0%

              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
          5. Applied egg-rr100.0%

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

            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
            7. +-lowering-+.f6468.9%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
          11. Simplified60.1%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;mu \leq -2.1 \cdot 10^{+196}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq -1.25 \cdot 10^{-114}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-238}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;mu \leq 3.8 \cdot 10^{-80}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 11: 40.5% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := EDonor + \left(Vef + mu\right)\\ t_1 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ t_2 := t\_0 - Ec\\ \mathbf{if}\;KbT \leq -3.6 \cdot 10^{+144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq -4.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{t\_2 + -0.5 \cdot \frac{t\_2 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\ \mathbf{elif}\;KbT \leq 1.02 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{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 (+ EDonor (+ Vef mu)))
                (t_1
                 (+
                  (/ NdChar 2.0)
                  (/
                   NaChar
                   (+
                    2.0
                    (/
                     (+
                      (+ (+ EAccept Ev) (- Vef mu))
                      (*
                       -0.5
                       (*
                        (+ EAccept (+ Ev (- Vef mu)))
                        (/ (- (- (- mu Vef) Ev) EAccept) KbT))))
                     KbT)))))
                (t_2 (- t_0 Ec)))
           (if (<= KbT -3.6e+144)
             t_1
             (if (<= KbT -4.2e-61)
               (/ NdChar (+ 2.0 (/ (+ t_2 (* -0.5 (/ (* t_2 (- Ec t_0)) KbT))) KbT)))
               (if (<= KbT 1.02e-19) (/ NaChar (+ (exp (/ EAccept 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);
        	double t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
        	double t_2 = t_0 - Ec;
        	double tmp;
        	if (KbT <= -3.6e+144) {
        		tmp = t_1;
        	} else if (KbT <= -4.2e-61) {
        		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
        	} else if (KbT <= 1.02e-19) {
        		tmp = NaChar / (exp((EAccept / 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) :: t_2
            real(8) :: tmp
            t_0 = edonor + (vef + mu)
            t_1 = (ndchar / 2.0d0) + (nachar / (2.0d0 + ((((eaccept + ev) + (vef - mu)) + ((-0.5d0) * ((eaccept + (ev + (vef - mu))) * ((((mu - vef) - ev) - eaccept) / kbt)))) / kbt)))
            t_2 = t_0 - ec
            if (kbt <= (-3.6d+144)) then
                tmp = t_1
            else if (kbt <= (-4.2d-61)) then
                tmp = ndchar / (2.0d0 + ((t_2 + ((-0.5d0) * ((t_2 * (ec - t_0)) / kbt))) / kbt))
            else if (kbt <= 1.02d-19) then
                tmp = nachar / (exp((eaccept / 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);
        	double t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
        	double t_2 = t_0 - Ec;
        	double tmp;
        	if (KbT <= -3.6e+144) {
        		tmp = t_1;
        	} else if (KbT <= -4.2e-61) {
        		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
        	} else if (KbT <= 1.02e-19) {
        		tmp = NaChar / (Math.exp((EAccept / 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)
        	t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)))
        	t_2 = t_0 - Ec
        	tmp = 0
        	if KbT <= -3.6e+144:
        		tmp = t_1
        	elif KbT <= -4.2e-61:
        		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT))
        	elif KbT <= 1.02e-19:
        		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(EDonor + Float64(Vef + mu))
        	t_1 = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) + Float64(-0.5 * Float64(Float64(EAccept + Float64(Ev + Float64(Vef - mu))) * Float64(Float64(Float64(Float64(mu - Vef) - Ev) - EAccept) / KbT)))) / KbT))))
        	t_2 = Float64(t_0 - Ec)
        	tmp = 0.0
        	if (KbT <= -3.6e+144)
        		tmp = t_1;
        	elseif (KbT <= -4.2e-61)
        		tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(t_2 + Float64(-0.5 * Float64(Float64(t_2 * Float64(Ec - t_0)) / KbT))) / KbT)));
        	elseif (KbT <= 1.02e-19)
        		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / 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);
        	t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
        	t_2 = t_0 - Ec;
        	tmp = 0.0;
        	if (KbT <= -3.6e+144)
        		tmp = t_1;
        	elseif (KbT <= -4.2e-61)
        		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
        	elseif (KbT <= 1.02e-19)
        		tmp = NaChar / (exp((EAccept / 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[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(EAccept + N[(Ev + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(mu - Vef), $MachinePrecision] - Ev), $MachinePrecision] - EAccept), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - Ec), $MachinePrecision]}, If[LessEqual[KbT, -3.6e+144], t$95$1, If[LessEqual[KbT, -4.2e-61], N[(NdChar / N[(2.0 + N[(N[(t$95$2 + N[(-0.5 * N[(N[(t$95$2 * N[(Ec - t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.02e-19], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := EDonor + \left(Vef + mu\right)\\
        t_1 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\
        t_2 := t\_0 - Ec\\
        \mathbf{if}\;KbT \leq -3.6 \cdot 10^{+144}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;KbT \leq -4.2 \cdot 10^{-61}:\\
        \;\;\;\;\frac{NdChar}{2 + \frac{t\_2 + -0.5 \cdot \frac{t\_2 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\
        
        \mathbf{elif}\;KbT \leq 1.02 \cdot 10^{-19}:\\
        \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if KbT < -3.5999999999999997e144 or 1.02000000000000004e-19 < KbT

          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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
          5. Step-by-step derivation
            1. mul-1-negN/A

              \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
            2. unsub-negN/A

              \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
            3. --lowering--.f64N/A

              \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
          6. Simplified70.9%

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
          8. Step-by-step derivation
            1. Simplified40.7%

              \[\leadsto \frac{NdChar}{\color{blue}{2}} + \frac{NaChar}{2 - \frac{\frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)\right)}{KbT} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]
            2. Step-by-step derivation
              1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
              14. --lowering--.f6455.7%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
            3. Applied egg-rr55.7%

              \[\leadsto \frac{NdChar}{2} + \frac{NaChar}{2 - \frac{\color{blue}{\left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}\right) \cdot -0.5} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]

            if -3.5999999999999997e144 < KbT < -4.1999999999999998e-61

            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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(2, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right) \]
            9. Simplified39.0%

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

            if -4.1999999999999998e-61 < KbT < 1.02000000000000004e-19

            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. clear-numN/A

                \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
              2. associate-/r/N/A

                \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
              6. exp-lowering-exp.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
              7. /-lowering-/.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              9. +-lowering-+.f64N/A

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              10. --lowering--.f64100.0%

                \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
            5. Applied egg-rr100.0%

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

              \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
            7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
              7. +-lowering-+.f6467.4%

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

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

              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{EAccept}{KbT}\right)}\right)\right)\right) \]
            10. Step-by-step derivation
              1. /-lowering-/.f6440.7%

                \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
            11. Simplified40.7%

              \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{EAccept}{KbT}}}} \]
          9. Recombined 3 regimes into one program.
          10. Final simplification46.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -3.6 \cdot 10^{+144}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \mathbf{elif}\;KbT \leq -4.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + -0.5 \cdot \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{elif}\;KbT \leq 1.02 \cdot 10^{-19}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \end{array} \]
          11. Add Preprocessing

          Alternative 12: 57.2% accurate, 1.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \mathbf{if}\;KbT \leq -2.65 \cdot 10^{+122}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 4.6 \cdot 10^{+196}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + Ev\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 2.0)
                    (/
                     NaChar
                     (+
                      2.0
                      (/
                       (+
                        (+ (+ EAccept Ev) (- Vef mu))
                        (*
                         -0.5
                         (*
                          (+ EAccept (+ Ev (- Vef mu)))
                          (/ (- (- (- mu Vef) Ev) EAccept) KbT))))
                       KbT))))))
             (if (<= KbT -2.65e+122)
               t_0
               (if (<= KbT 4.6e+196)
                 (/ NaChar (+ (exp (/ (- (+ Vef 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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
          	double tmp;
          	if (KbT <= -2.65e+122) {
          		tmp = t_0;
          	} else if (KbT <= 4.6e+196) {
          		tmp = NaChar / (exp((((Vef + 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 / 2.0d0) + (nachar / (2.0d0 + ((((eaccept + ev) + (vef - mu)) + ((-0.5d0) * ((eaccept + (ev + (vef - mu))) * ((((mu - vef) - ev) - eaccept) / kbt)))) / kbt)))
              if (kbt <= (-2.65d+122)) then
                  tmp = t_0
              else if (kbt <= 4.6d+196) then
                  tmp = nachar / (exp((((vef + 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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
          	double tmp;
          	if (KbT <= -2.65e+122) {
          		tmp = t_0;
          	} else if (KbT <= 4.6e+196) {
          		tmp = NaChar / (Math.exp((((Vef + 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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)))
          	tmp = 0
          	if KbT <= -2.65e+122:
          		tmp = t_0
          	elif KbT <= 4.6e+196:
          		tmp = NaChar / (math.exp((((Vef + 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(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) + Float64(-0.5 * Float64(Float64(EAccept + Float64(Ev + Float64(Vef - mu))) * Float64(Float64(Float64(Float64(mu - Vef) - Ev) - EAccept) / KbT)))) / KbT))))
          	tmp = 0.0
          	if (KbT <= -2.65e+122)
          		tmp = t_0;
          	elseif (KbT <= 4.6e+196)
          		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + 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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
          	tmp = 0.0;
          	if (KbT <= -2.65e+122)
          		tmp = t_0;
          	elseif (KbT <= 4.6e+196)
          		tmp = NaChar / (exp((((Vef + 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[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(EAccept + N[(Ev + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(mu - Vef), $MachinePrecision] - Ev), $MachinePrecision] - EAccept), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.65e+122], t$95$0, If[LessEqual[KbT, 4.6e+196], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + Ev), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\
          \mathbf{if}\;KbT \leq -2.65 \cdot 10^{+122}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;KbT \leq 4.6 \cdot 10^{+196}:\\
          \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + Ev\right) - mu}{KbT}} + 1}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if KbT < -2.65e122 or 4.59999999999999961e196 < KbT

            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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
            5. Step-by-step derivation
              1. mul-1-negN/A

                \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
              2. unsub-negN/A

                \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
              3. --lowering--.f64N/A

                \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
            6. Simplified67.0%

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

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

                \[\leadsto \frac{NdChar}{\color{blue}{2}} + \frac{NaChar}{2 - \frac{\frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)\right)}{KbT} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]
              2. Step-by-step derivation
                1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                14. --lowering--.f6473.9%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
              3. Applied egg-rr73.9%

                \[\leadsto \frac{NdChar}{2} + \frac{NaChar}{2 - \frac{\color{blue}{\left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}\right) \cdot -0.5} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]

              if -2.65e122 < KbT < 4.59999999999999961e196

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6461.5%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \color{blue}{\left(e^{\frac{\left(Ev + Vef\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(Ev + Vef\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(Ev + Vef\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(Ev + Vef\right), mu\right), KbT\right)\right)\right)\right) \]
                6. +-lowering-+.f6451.8%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -2.65 \cdot 10^{+122}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \mathbf{elif}\;KbT \leq 4.6 \cdot 10^{+196}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + Ev\right) - mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \end{array} \]
            11. Add Preprocessing

            Alternative 13: 59.9% accurate, 1.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;mu \leq -5.2 \cdot 10^{+196}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \end{array} \end{array} \]
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
             :precision binary64
             (if (<= mu -5.2e+196)
               (/ NdChar (+ (exp (/ mu KbT)) 1.0))
               (/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0))))
            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
            	double tmp;
            	if (mu <= -5.2e+196) {
            		tmp = NdChar / (exp((mu / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / 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) :: tmp
                if (mu <= (-5.2d+196)) then
                    tmp = ndchar / (exp((mu / kbt)) + 1.0d0)
                else
                    tmp = nachar / (exp((((eaccept + ev) + (vef - mu)) / 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 tmp;
            	if (mu <= -5.2e+196) {
            		tmp = NdChar / (Math.exp((mu / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
            	}
            	return tmp;
            }
            
            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
            	tmp = 0
            	if mu <= -5.2e+196:
            		tmp = NdChar / (math.exp((mu / KbT)) + 1.0)
            	else:
            		tmp = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0)
            	return tmp
            
            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0
            	if (mu <= -5.2e+196)
            		tmp = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0));
            	else
            		tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0));
            	end
            	return tmp
            end
            
            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0;
            	if (mu <= -5.2e+196)
            		tmp = NdChar / (exp((mu / KbT)) + 1.0);
            	else
            		tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[mu, -5.2e+196], N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;mu \leq -5.2 \cdot 10^{+196}:\\
            \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if mu < -5.20000000000000024e196

              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. --lowering--.f64N/A

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(Vef + EDonor\right), mu\right), Ec\right), KbT\right)\right)\right)\right) \]
                9. +-lowering-+.f6474.4%

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

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

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

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

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

              if -5.20000000000000024e196 < 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. 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. associate--l+N/A

                  \[\leadsto \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) \]
                6. sub-negN/A

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(EAccept + \left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
                8. mul-1-negN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(EAccept + Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
                11. +-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(EAccept, Ev\right), \left(Vef + -1 \cdot mu\right)\right), KbT\right)\right)\right)\right) \]
                12. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right), KbT\right)\right)\right)\right) \]
                13. sub-negN/A

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

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

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

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

            Alternative 14: 43.4% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ \mathbf{if}\;NdChar \leq -3.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{NdChar}{t\_0}\\ \mathbf{elif}\;NdChar \leq 1.9 \cdot 10^{+78}:\\ \;\;\;\;\frac{NaChar}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 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)))
               (if (<= NdChar -3.6e-90)
                 (/ NdChar t_0)
                 (if (<= NdChar 1.9e+78)
                   (/ NaChar t_0)
                   (/ NdChar (+ (exp (/ EDonor 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 = exp((Vef / KbT)) + 1.0;
            	double tmp;
            	if (NdChar <= -3.6e-90) {
            		tmp = NdChar / t_0;
            	} else if (NdChar <= 1.9e+78) {
            		tmp = NaChar / t_0;
            	} else {
            		tmp = NdChar / (exp((EDonor / 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 = exp((vef / kbt)) + 1.0d0
                if (ndchar <= (-3.6d-90)) then
                    tmp = ndchar / t_0
                else if (ndchar <= 1.9d+78) then
                    tmp = nachar / t_0
                else
                    tmp = ndchar / (exp((edonor / 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 = Math.exp((Vef / KbT)) + 1.0;
            	double tmp;
            	if (NdChar <= -3.6e-90) {
            		tmp = NdChar / t_0;
            	} else if (NdChar <= 1.9e+78) {
            		tmp = NaChar / t_0;
            	} else {
            		tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.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 NdChar <= -3.6e-90:
            		tmp = NdChar / t_0
            	elif NdChar <= 1.9e+78:
            		tmp = NaChar / t_0
            	else:
            		tmp = NdChar / (math.exp((EDonor / KbT)) + 1.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 (NdChar <= -3.6e-90)
            		tmp = Float64(NdChar / t_0);
            	elseif (NdChar <= 1.9e+78)
            		tmp = Float64(NaChar / t_0);
            	else
            		tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.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 (NdChar <= -3.6e-90)
            		tmp = NdChar / t_0;
            	elseif (NdChar <= 1.9e+78)
            		tmp = NaChar / t_0;
            	else
            		tmp = NdChar / (exp((EDonor / KbT)) + 1.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[NdChar, -3.6e-90], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[NdChar, 1.9e+78], N[(NaChar / t$95$0), $MachinePrecision], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := e^{\frac{Vef}{KbT}} + 1\\
            \mathbf{if}\;NdChar \leq -3.6 \cdot 10^{-90}:\\
            \;\;\;\;\frac{NdChar}{t\_0}\\
            
            \mathbf{elif}\;NdChar \leq 1.9 \cdot 10^{+78}:\\
            \;\;\;\;\frac{NaChar}{t\_0}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if NdChar < -3.59999999999999981e-90

              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. --lowering--.f64N/A

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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-/.f6448.7%

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

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

              if -3.59999999999999981e-90 < NdChar < 1.9e78

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6471.4%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
              11. Simplified49.3%

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

              if 1.9e78 < NdChar

              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. --lowering--.f64N/A

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{NdChar}{1 + e^{\frac{\left(\left(Vef + EDonor\right) + mu\right) - Ec}{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-/.f6451.6%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;NdChar \leq -3.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;NdChar \leq 1.9 \cdot 10^{+78}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 15: 39.6% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;Ev \leq -1.75 \cdot 10^{+75}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq 9.2 \cdot 10^{-297}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \end{array} \]
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
             :precision binary64
             (if (<= Ev -1.75e+75)
               (/ NaChar (+ (exp (/ Ev KbT)) 1.0))
               (if (<= Ev 9.2e-297)
                 (/ NaChar (+ (exp (/ Vef KbT)) 1.0))
                 (/ NaChar (+ (exp (/ EAccept KbT)) 1.0)))))
            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
            	double tmp;
            	if (Ev <= -1.75e+75) {
            		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
            	} else if (Ev <= 9.2e-297) {
            		tmp = NaChar / (exp((Vef / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (exp((EAccept / 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) :: tmp
                if (ev <= (-1.75d+75)) then
                    tmp = nachar / (exp((ev / kbt)) + 1.0d0)
                else if (ev <= 9.2d-297) then
                    tmp = nachar / (exp((vef / kbt)) + 1.0d0)
                else
                    tmp = nachar / (exp((eaccept / 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 tmp;
            	if (Ev <= -1.75e+75) {
            		tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
            	} else if (Ev <= 9.2e-297) {
            		tmp = NaChar / (Math.exp((Vef / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
            	}
            	return tmp;
            }
            
            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
            	tmp = 0
            	if Ev <= -1.75e+75:
            		tmp = NaChar / (math.exp((Ev / KbT)) + 1.0)
            	elif Ev <= 9.2e-297:
            		tmp = NaChar / (math.exp((Vef / KbT)) + 1.0)
            	else:
            		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0)
            	return tmp
            
            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0
            	if (Ev <= -1.75e+75)
            		tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0));
            	elseif (Ev <= 9.2e-297)
            		tmp = Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0));
            	else
            		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0));
            	end
            	return tmp
            end
            
            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0;
            	if (Ev <= -1.75e+75)
            		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
            	elseif (Ev <= 9.2e-297)
            		tmp = NaChar / (exp((Vef / KbT)) + 1.0);
            	else
            		tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[Ev, -1.75e+75], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ev, 9.2e-297], N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;Ev \leq -1.75 \cdot 10^{+75}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
            
            \mathbf{elif}\;Ev \leq 9.2 \cdot 10^{-297}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if Ev < -1.7499999999999999e75

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6458.0%

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

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

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

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

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

              if -1.7499999999999999e75 < Ev < 9.1999999999999996e-297

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6461.5%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right)\right)\right)\right) \]
              11. Simplified43.5%

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

              if 9.1999999999999996e-297 < Ev

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6457.5%

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

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

                \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\color{blue}{\left(\frac{EAccept}{KbT}\right)}\right)\right)\right) \]
              10. Step-by-step derivation
                1. /-lowering-/.f6438.0%

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
              11. Simplified38.0%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;Ev \leq -1.75 \cdot 10^{+75}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{elif}\;Ev \leq 9.2 \cdot 10^{-297}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 16: 38.8% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;Ev \leq -4.8 \cdot 10^{+72}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \end{array} \]
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
             :precision binary64
             (if (<= Ev -4.8e+72)
               (/ NaChar (+ (exp (/ Ev KbT)) 1.0))
               (/ NaChar (+ (exp (/ EAccept KbT)) 1.0))))
            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
            	double tmp;
            	if (Ev <= -4.8e+72) {
            		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (exp((EAccept / 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) :: tmp
                if (ev <= (-4.8d+72)) then
                    tmp = nachar / (exp((ev / kbt)) + 1.0d0)
                else
                    tmp = nachar / (exp((eaccept / 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 tmp;
            	if (Ev <= -4.8e+72) {
            		tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
            	} else {
            		tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
            	}
            	return tmp;
            }
            
            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
            	tmp = 0
            	if Ev <= -4.8e+72:
            		tmp = NaChar / (math.exp((Ev / KbT)) + 1.0)
            	else:
            		tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0)
            	return tmp
            
            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0
            	if (Ev <= -4.8e+72)
            		tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0));
            	else
            		tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0));
            	end
            	return tmp
            end
            
            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	tmp = 0.0;
            	if (Ev <= -4.8e+72)
            		tmp = NaChar / (exp((Ev / KbT)) + 1.0);
            	else
            		tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[Ev, -4.8e+72], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;Ev \leq -4.8 \cdot 10^{+72}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if Ev < -4.8000000000000002e72

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6458.8%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right) \]
              11. Simplified50.7%

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

              if -4.8000000000000002e72 < Ev

              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. clear-numN/A

                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                2. associate-/r/N/A

                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                6. exp-lowering-exp.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                10. --lowering--.f64100.0%

                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
              5. Applied egg-rr100.0%

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

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                7. +-lowering-+.f6459.0%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(EAccept, KbT\right)\right)\right)\right) \]
              11. Simplified38.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;Ev \leq -4.8 \cdot 10^{+72}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 17: 36.4% accurate, 3.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ t_1 := \left(EAccept + \left(Vef + Ev\right)\right) - mu\\ t_2 := t\_1 \cdot t\_1\\ \mathbf{if}\;KbT \leq -1.25 \cdot 10^{+109}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 2.4 \cdot 10^{+58}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{t\_1 + \frac{0.16666666666666666 \cdot \frac{t\_1 \cdot t\_2}{KbT} + t\_2 \cdot 0.5}{KbT}}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
             :precision binary64
             (let* ((t_0
                     (+
                      (/ NdChar 2.0)
                      (/
                       NaChar
                       (+
                        2.0
                        (/
                         (+
                          (+ (+ EAccept Ev) (- Vef mu))
                          (*
                           -0.5
                           (*
                            (+ EAccept (+ Ev (- Vef mu)))
                            (/ (- (- (- mu Vef) Ev) EAccept) KbT))))
                         KbT)))))
                    (t_1 (- (+ EAccept (+ Vef Ev)) mu))
                    (t_2 (* t_1 t_1)))
               (if (<= KbT -1.25e+109)
                 t_0
                 (if (<= KbT 2.4e+58)
                   (/
                    NaChar
                    (+
                     2.0
                     (/
                      (+
                       t_1
                       (/ (+ (* 0.16666666666666666 (/ (* t_1 t_2) KbT)) (* t_2 0.5)) KbT))
                      KbT)))
                   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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
            	double t_1 = (EAccept + (Vef + Ev)) - mu;
            	double t_2 = t_1 * t_1;
            	double tmp;
            	if (KbT <= -1.25e+109) {
            		tmp = t_0;
            	} else if (KbT <= 2.4e+58) {
            		tmp = NaChar / (2.0 + ((t_1 + (((0.16666666666666666 * ((t_1 * t_2) / KbT)) + (t_2 * 0.5)) / KbT)) / KbT));
            	} 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) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_0 = (ndchar / 2.0d0) + (nachar / (2.0d0 + ((((eaccept + ev) + (vef - mu)) + ((-0.5d0) * ((eaccept + (ev + (vef - mu))) * ((((mu - vef) - ev) - eaccept) / kbt)))) / kbt)))
                t_1 = (eaccept + (vef + ev)) - mu
                t_2 = t_1 * t_1
                if (kbt <= (-1.25d+109)) then
                    tmp = t_0
                else if (kbt <= 2.4d+58) then
                    tmp = nachar / (2.0d0 + ((t_1 + (((0.16666666666666666d0 * ((t_1 * t_2) / kbt)) + (t_2 * 0.5d0)) / kbt)) / kbt))
                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 / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
            	double t_1 = (EAccept + (Vef + Ev)) - mu;
            	double t_2 = t_1 * t_1;
            	double tmp;
            	if (KbT <= -1.25e+109) {
            		tmp = t_0;
            	} else if (KbT <= 2.4e+58) {
            		tmp = NaChar / (2.0 + ((t_1 + (((0.16666666666666666 * ((t_1 * t_2) / KbT)) + (t_2 * 0.5)) / KbT)) / KbT));
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
            	t_0 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)))
            	t_1 = (EAccept + (Vef + Ev)) - mu
            	t_2 = t_1 * t_1
            	tmp = 0
            	if KbT <= -1.25e+109:
            		tmp = t_0
            	elif KbT <= 2.4e+58:
            		tmp = NaChar / (2.0 + ((t_1 + (((0.16666666666666666 * ((t_1 * t_2) / KbT)) + (t_2 * 0.5)) / KbT)) / KbT))
            	else:
            		tmp = t_0
            	return tmp
            
            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	t_0 = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) + Float64(-0.5 * Float64(Float64(EAccept + Float64(Ev + Float64(Vef - mu))) * Float64(Float64(Float64(Float64(mu - Vef) - Ev) - EAccept) / KbT)))) / KbT))))
            	t_1 = Float64(Float64(EAccept + Float64(Vef + Ev)) - mu)
            	t_2 = Float64(t_1 * t_1)
            	tmp = 0.0
            	if (KbT <= -1.25e+109)
            		tmp = t_0;
            	elseif (KbT <= 2.4e+58)
            		tmp = Float64(NaChar / Float64(2.0 + Float64(Float64(t_1 + Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(t_1 * t_2) / KbT)) + Float64(t_2 * 0.5)) / KbT)) / KbT)));
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	t_0 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
            	t_1 = (EAccept + (Vef + Ev)) - mu;
            	t_2 = t_1 * t_1;
            	tmp = 0.0;
            	if (KbT <= -1.25e+109)
            		tmp = t_0;
            	elseif (KbT <= 2.4e+58)
            		tmp = NaChar / (2.0 + ((t_1 + (((0.16666666666666666 * ((t_1 * t_2) / KbT)) + (t_2 * 0.5)) / KbT)) / KbT));
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(EAccept + N[(Ev + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(mu - Vef), $MachinePrecision] - Ev), $MachinePrecision] - EAccept), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(EAccept + N[(Vef + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * t$95$1), $MachinePrecision]}, If[LessEqual[KbT, -1.25e+109], t$95$0, If[LessEqual[KbT, 2.4e+58], N[(NaChar / N[(2.0 + N[(N[(t$95$1 + N[(N[(N[(0.16666666666666666 * N[(N[(t$95$1 * t$95$2), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * 0.5), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\
            t_1 := \left(EAccept + \left(Vef + Ev\right)\right) - mu\\
            t_2 := t\_1 \cdot t\_1\\
            \mathbf{if}\;KbT \leq -1.25 \cdot 10^{+109}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;KbT \leq 2.4 \cdot 10^{+58}:\\
            \;\;\;\;\frac{NaChar}{2 + \frac{t\_1 + \frac{0.16666666666666666 \cdot \frac{t\_1 \cdot t\_2}{KbT} + t\_2 \cdot 0.5}{KbT}}{KbT}}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if KbT < -1.25e109 or 2.4e58 < KbT

              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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
              5. Step-by-step derivation
                1. mul-1-negN/A

                  \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                2. unsub-negN/A

                  \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                3. --lowering--.f64N/A

                  \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
              6. Simplified69.3%

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
              8. Step-by-step derivation
                1. Simplified44.2%

                  \[\leadsto \frac{NdChar}{\color{blue}{2}} + \frac{NaChar}{2 - \frac{\frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)\right)}{KbT} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]
                2. Step-by-step derivation
                  1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                  14. --lowering--.f6460.7%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                3. Applied egg-rr60.7%

                  \[\leadsto \frac{NdChar}{2} + \frac{NaChar}{2 - \frac{\color{blue}{\left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}\right) \cdot -0.5} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]

                if -1.25e109 < KbT < 2.4e58

                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. clear-numN/A

                    \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                  2. associate-/r/N/A

                    \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                  4. /-lowering-/.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                  6. exp-lowering-exp.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                  7. /-lowering-/.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                  8. +-lowering-+.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                  10. --lowering--.f64100.0%

                    \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                5. Applied egg-rr100.0%

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

                  \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                  7. +-lowering-+.f6463.8%

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \color{blue}{\left(-1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{3}}{KbT} + \frac{1}{2} \cdot {\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                  2. mul-1-negN/A

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

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

                    \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{3}}{KbT} + \frac{1}{2} \cdot {\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right) \]
                11. Simplified29.2%

                  \[\leadsto \frac{NaChar}{\color{blue}{2 + \left(-\frac{-1 \cdot \left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{0.16666666666666666 \cdot \frac{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) \cdot \left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)\right)}{KbT} + 0.5 \cdot \left(\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)\right)}{KbT}\right)}{KbT}\right)}} \]
              9. Recombined 2 regimes into one program.
              10. Final simplification40.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.25 \cdot 10^{+109}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \mathbf{elif}\;KbT \leq 2.4 \cdot 10^{+58}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{\left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right) + \frac{0.16666666666666666 \cdot \frac{\left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right) \cdot \left(\left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right) \cdot \left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right)\right)}{KbT} + \left(\left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right) \cdot \left(\left(EAccept + \left(Vef + Ev\right)\right) - mu\right)\right) \cdot 0.5}{KbT}}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \end{array} \]
              11. Add Preprocessing

              Alternative 18: 35.9% accurate, 4.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := EDonor + \left(Vef + mu\right)\\ t_1 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ t_2 := t\_0 - Ec\\ \mathbf{if}\;KbT \leq -3.5 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;KbT \leq 8.8 \cdot 10^{-18}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{t\_2 + -0.5 \cdot \frac{t\_2 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\ \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)))
                      (t_1
                       (+
                        (/ NdChar 2.0)
                        (/
                         NaChar
                         (+
                          2.0
                          (/
                           (+
                            (+ (+ EAccept Ev) (- Vef mu))
                            (*
                             -0.5
                             (*
                              (+ EAccept (+ Ev (- Vef mu)))
                              (/ (- (- (- mu Vef) Ev) EAccept) KbT))))
                           KbT)))))
                      (t_2 (- t_0 Ec)))
                 (if (<= KbT -3.5e+145)
                   t_1
                   (if (<= KbT 8.8e-18)
                     (/ NdChar (+ 2.0 (/ (+ t_2 (* -0.5 (/ (* t_2 (- Ec t_0)) KbT))) KbT)))
                     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);
              	double t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
              	double t_2 = t_0 - Ec;
              	double tmp;
              	if (KbT <= -3.5e+145) {
              		tmp = t_1;
              	} else if (KbT <= 8.8e-18) {
              		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
              	} 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) :: t_2
                  real(8) :: tmp
                  t_0 = edonor + (vef + mu)
                  t_1 = (ndchar / 2.0d0) + (nachar / (2.0d0 + ((((eaccept + ev) + (vef - mu)) + ((-0.5d0) * ((eaccept + (ev + (vef - mu))) * ((((mu - vef) - ev) - eaccept) / kbt)))) / kbt)))
                  t_2 = t_0 - ec
                  if (kbt <= (-3.5d+145)) then
                      tmp = t_1
                  else if (kbt <= 8.8d-18) then
                      tmp = ndchar / (2.0d0 + ((t_2 + ((-0.5d0) * ((t_2 * (ec - t_0)) / kbt))) / kbt))
                  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);
              	double t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
              	double t_2 = t_0 - Ec;
              	double tmp;
              	if (KbT <= -3.5e+145) {
              		tmp = t_1;
              	} else if (KbT <= 8.8e-18) {
              		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
              	t_0 = EDonor + (Vef + mu)
              	t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)))
              	t_2 = t_0 - Ec
              	tmp = 0
              	if KbT <= -3.5e+145:
              		tmp = t_1
              	elif KbT <= 8.8e-18:
              		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT))
              	else:
              		tmp = t_1
              	return tmp
              
              function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
              	t_0 = Float64(EDonor + Float64(Vef + mu))
              	t_1 = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) + Float64(-0.5 * Float64(Float64(EAccept + Float64(Ev + Float64(Vef - mu))) * Float64(Float64(Float64(Float64(mu - Vef) - Ev) - EAccept) / KbT)))) / KbT))))
              	t_2 = Float64(t_0 - Ec)
              	tmp = 0.0
              	if (KbT <= -3.5e+145)
              		tmp = t_1;
              	elseif (KbT <= 8.8e-18)
              		tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(t_2 + Float64(-0.5 * Float64(Float64(t_2 * Float64(Ec - t_0)) / KbT))) / KbT)));
              	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);
              	t_1 = (NdChar / 2.0) + (NaChar / (2.0 + ((((EAccept + Ev) + (Vef - mu)) + (-0.5 * ((EAccept + (Ev + (Vef - mu))) * ((((mu - Vef) - Ev) - EAccept) / KbT)))) / KbT)));
              	t_2 = t_0 - Ec;
              	tmp = 0.0;
              	if (KbT <= -3.5e+145)
              		tmp = t_1;
              	elseif (KbT <= 8.8e-18)
              		tmp = NdChar / (2.0 + ((t_2 + (-0.5 * ((t_2 * (Ec - t_0)) / KbT))) / KbT));
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(EAccept + N[(Ev + N[(Vef - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(mu - Vef), $MachinePrecision] - Ev), $MachinePrecision] - EAccept), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - Ec), $MachinePrecision]}, If[LessEqual[KbT, -3.5e+145], t$95$1, If[LessEqual[KbT, 8.8e-18], N[(NdChar / N[(2.0 + N[(N[(t$95$2 + N[(-0.5 * N[(N[(t$95$2 * N[(Ec - t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := EDonor + \left(Vef + mu\right)\\
              t_1 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\
              t_2 := t\_0 - Ec\\
              \mathbf{if}\;KbT \leq -3.5 \cdot 10^{+145}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;KbT \leq 8.8 \cdot 10^{-18}:\\
              \;\;\;\;\frac{NdChar}{2 + \frac{t\_2 + -0.5 \cdot \frac{t\_2 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if KbT < -3.5000000000000001e145 or 8.7999999999999994e-18 < KbT

                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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                5. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                  2. unsub-negN/A

                    \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                  3. --lowering--.f64N/A

                    \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                  4. /-lowering-/.f64N/A

                    \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
                6. Simplified70.9%

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                8. Step-by-step derivation
                  1. Simplified40.7%

                    \[\leadsto \frac{NdChar}{\color{blue}{2}} + \frac{NaChar}{2 - \frac{\frac{-0.5 \cdot \left(\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) \cdot \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)\right)}{KbT} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]
                  2. Step-by-step derivation
                    1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \left(Vef - mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                    14. --lowering--.f6455.7%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right), \frac{-1}{2}\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                  3. Applied egg-rr55.7%

                    \[\leadsto \frac{NdChar}{2} + \frac{NaChar}{2 - \frac{\color{blue}{\left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{EAccept + \left(Ev + \left(Vef - mu\right)\right)}{KbT}\right) \cdot -0.5} - \left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right)}{KbT}} \]

                  if -3.5000000000000001e145 < KbT < 8.7999999999999994e-18

                  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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(2, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right) \]
                  9. Simplified30.2%

                    \[\leadsto \frac{NdChar}{\color{blue}{2 + \left(-\frac{\left(-\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right) + -0.5 \cdot \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}{KbT}\right)}} \]
                9. Recombined 2 regimes into one program.
                10. Final simplification40.5%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -3.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \mathbf{elif}\;KbT \leq 8.8 \cdot 10^{-18}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + -0.5 \cdot \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(\left(EAccept + Ev\right) + \left(Vef - mu\right)\right) + -0.5 \cdot \left(\left(EAccept + \left(Ev + \left(Vef - mu\right)\right)\right) \cdot \frac{\left(\left(mu - Vef\right) - Ev\right) - EAccept}{KbT}\right)}{KbT}}\\ \end{array} \]
                11. Add Preprocessing

                Alternative 19: 36.1% accurate, 5.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := EDonor + \left(Vef + mu\right)\\ t_1 := t\_0 - Ec\\ t_2 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \mathbf{if}\;KbT \leq -7.8 \cdot 10^{+144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;KbT \leq 2.16 \cdot 10^{+101}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{t\_1 + -0.5 \cdot \frac{t\_1 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\ \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)))
                        (t_1 (- t_0 Ec))
                        (t_2
                         (+
                          (/ NdChar 2.0)
                          (/ NaChar (+ 2.0 (/ (- (+ EAccept (+ Vef Ev)) mu) KbT))))))
                   (if (<= KbT -7.8e+144)
                     t_2
                     (if (<= KbT 2.16e+101)
                       (/ NdChar (+ 2.0 (/ (+ t_1 (* -0.5 (/ (* t_1 (- Ec t_0)) KbT))) KbT)))
                       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);
                	double t_1 = t_0 - Ec;
                	double t_2 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                	double tmp;
                	if (KbT <= -7.8e+144) {
                		tmp = t_2;
                	} else if (KbT <= 2.16e+101) {
                		tmp = NdChar / (2.0 + ((t_1 + (-0.5 * ((t_1 * (Ec - t_0)) / KbT))) / KbT));
                	} 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)
                    t_1 = t_0 - ec
                    t_2 = (ndchar / 2.0d0) + (nachar / (2.0d0 + (((eaccept + (vef + ev)) - mu) / kbt)))
                    if (kbt <= (-7.8d+144)) then
                        tmp = t_2
                    else if (kbt <= 2.16d+101) then
                        tmp = ndchar / (2.0d0 + ((t_1 + ((-0.5d0) * ((t_1 * (ec - t_0)) / kbt))) / kbt))
                    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);
                	double t_1 = t_0 - Ec;
                	double t_2 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                	double tmp;
                	if (KbT <= -7.8e+144) {
                		tmp = t_2;
                	} else if (KbT <= 2.16e+101) {
                		tmp = NdChar / (2.0 + ((t_1 + (-0.5 * ((t_1 * (Ec - t_0)) / KbT))) / KbT));
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                	t_0 = EDonor + (Vef + mu)
                	t_1 = t_0 - Ec
                	t_2 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)))
                	tmp = 0
                	if KbT <= -7.8e+144:
                		tmp = t_2
                	elif KbT <= 2.16e+101:
                		tmp = NdChar / (2.0 + ((t_1 + (-0.5 * ((t_1 * (Ec - t_0)) / KbT))) / KbT))
                	else:
                		tmp = t_2
                	return tmp
                
                function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                	t_0 = Float64(EDonor + Float64(Vef + mu))
                	t_1 = Float64(t_0 - Ec)
                	t_2 = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(EAccept + Float64(Vef + Ev)) - mu) / KbT))))
                	tmp = 0.0
                	if (KbT <= -7.8e+144)
                		tmp = t_2;
                	elseif (KbT <= 2.16e+101)
                		tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(t_1 + Float64(-0.5 * Float64(Float64(t_1 * Float64(Ec - t_0)) / KbT))) / KbT)));
                	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);
                	t_1 = t_0 - Ec;
                	t_2 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                	tmp = 0.0;
                	if (KbT <= -7.8e+144)
                		tmp = t_2;
                	elseif (KbT <= 2.16e+101)
                		tmp = NdChar / (2.0 + ((t_1 + (-0.5 * ((t_1 * (Ec - t_0)) / KbT))) / KbT));
                	else
                		tmp = t_2;
                	end
                	tmp_2 = tmp;
                end
                
                code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - Ec), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(EAccept + N[(Vef + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -7.8e+144], t$95$2, If[LessEqual[KbT, 2.16e+101], N[(NdChar / N[(2.0 + N[(N[(t$95$1 + N[(-0.5 * N[(N[(t$95$1 * N[(Ec - t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := EDonor + \left(Vef + mu\right)\\
                t_1 := t\_0 - Ec\\
                t_2 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\
                \mathbf{if}\;KbT \leq -7.8 \cdot 10^{+144}:\\
                \;\;\;\;t\_2\\
                
                \mathbf{elif}\;KbT \leq 2.16 \cdot 10^{+101}:\\
                \;\;\;\;\frac{NdChar}{2 + \frac{t\_1 + -0.5 \cdot \frac{t\_1 \cdot \left(Ec - t\_0\right)}{KbT}}{KbT}}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if KbT < -7.80000000000000036e144 or 2.15999999999999999e101 < KbT

                  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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                  5. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                    2. unsub-negN/A

                      \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                    3. --lowering--.f64N/A

                      \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                    4. /-lowering-/.f64N/A

                      \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
                  6. Simplified67.1%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                  8. Step-by-step derivation
                    1. Simplified44.8%

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

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \left(Ev + Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                      4. +-lowering-+.f6462.0%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                    4. Simplified62.0%

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

                    if -7.80000000000000036e144 < KbT < 2.15999999999999999e101

                    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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(2, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}^{2}}{KbT}\right), KbT\right)\right)\right)\right) \]
                    9. Simplified29.3%

                      \[\leadsto \frac{NdChar}{\color{blue}{2 + \left(-\frac{\left(-\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)\right) + -0.5 \cdot \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT}}{KbT}\right)}} \]
                  9. Recombined 2 regimes into one program.
                  10. Final simplification39.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -7.8 \cdot 10^{+144}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \mathbf{elif}\;KbT \leq 2.16 \cdot 10^{+101}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) + -0.5 \cdot \frac{\left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right) \cdot \left(Ec - \left(EDonor + \left(Vef + mu\right)\right)\right)}{KbT}}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \]
                  11. Add Preprocessing

                  Alternative 20: 30.4% accurate, 6.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \mathbf{if}\;KbT \leq -5.8 \cdot 10^{+115}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq -1.85 \cdot 10^{-193}:\\ \;\;\;\;\frac{NaChar}{2 + \left(\frac{Ev}{KbT} + \frac{0.5 \cdot \left(Ev \cdot Ev\right)}{KbT \cdot KbT}\right)}\\ \mathbf{elif}\;KbT \leq 3.1 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{\left(\left(2 + \frac{EAccept}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{Ev}{KbT}\right)\right) - \frac{mu}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                   :precision binary64
                   (let* ((t_0
                           (+
                            (/ NdChar 2.0)
                            (/ NaChar (+ 2.0 (/ (- (+ EAccept (+ Vef Ev)) mu) KbT))))))
                     (if (<= KbT -5.8e+115)
                       t_0
                       (if (<= KbT -1.85e-193)
                         (/ NaChar (+ 2.0 (+ (/ Ev KbT) (/ (* 0.5 (* Ev Ev)) (* KbT KbT)))))
                         (if (<= KbT 3.1e-18)
                           (/
                            NaChar
                            (-
                             (+ (+ 2.0 (/ EAccept KbT)) (+ (/ Vef KbT) (/ Ev KbT)))
                             (/ mu KbT)))
                           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 / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                  	double tmp;
                  	if (KbT <= -5.8e+115) {
                  		tmp = t_0;
                  	} else if (KbT <= -1.85e-193) {
                  		tmp = NaChar / (2.0 + ((Ev / KbT) + ((0.5 * (Ev * Ev)) / (KbT * KbT))));
                  	} else if (KbT <= 3.1e-18) {
                  		tmp = NaChar / (((2.0 + (EAccept / KbT)) + ((Vef / KbT) + (Ev / KbT))) - (mu / KbT));
                  	} 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 / 2.0d0) + (nachar / (2.0d0 + (((eaccept + (vef + ev)) - mu) / kbt)))
                      if (kbt <= (-5.8d+115)) then
                          tmp = t_0
                      else if (kbt <= (-1.85d-193)) then
                          tmp = nachar / (2.0d0 + ((ev / kbt) + ((0.5d0 * (ev * ev)) / (kbt * kbt))))
                      else if (kbt <= 3.1d-18) then
                          tmp = nachar / (((2.0d0 + (eaccept / kbt)) + ((vef / kbt) + (ev / kbt))) - (mu / kbt))
                      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 / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                  	double tmp;
                  	if (KbT <= -5.8e+115) {
                  		tmp = t_0;
                  	} else if (KbT <= -1.85e-193) {
                  		tmp = NaChar / (2.0 + ((Ev / KbT) + ((0.5 * (Ev * Ev)) / (KbT * KbT))));
                  	} else if (KbT <= 3.1e-18) {
                  		tmp = NaChar / (((2.0 + (EAccept / KbT)) + ((Vef / KbT) + (Ev / KbT))) - (mu / KbT));
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                  	t_0 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)))
                  	tmp = 0
                  	if KbT <= -5.8e+115:
                  		tmp = t_0
                  	elif KbT <= -1.85e-193:
                  		tmp = NaChar / (2.0 + ((Ev / KbT) + ((0.5 * (Ev * Ev)) / (KbT * KbT))))
                  	elif KbT <= 3.1e-18:
                  		tmp = NaChar / (((2.0 + (EAccept / KbT)) + ((Vef / KbT) + (Ev / KbT))) - (mu / KbT))
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                  	t_0 = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(EAccept + Float64(Vef + Ev)) - mu) / KbT))))
                  	tmp = 0.0
                  	if (KbT <= -5.8e+115)
                  		tmp = t_0;
                  	elseif (KbT <= -1.85e-193)
                  		tmp = Float64(NaChar / Float64(2.0 + Float64(Float64(Ev / KbT) + Float64(Float64(0.5 * Float64(Ev * Ev)) / Float64(KbT * KbT)))));
                  	elseif (KbT <= 3.1e-18)
                  		tmp = Float64(NaChar / Float64(Float64(Float64(2.0 + Float64(EAccept / KbT)) + Float64(Float64(Vef / KbT) + Float64(Ev / KbT))) - Float64(mu / KbT)));
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                  	t_0 = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                  	tmp = 0.0;
                  	if (KbT <= -5.8e+115)
                  		tmp = t_0;
                  	elseif (KbT <= -1.85e-193)
                  		tmp = NaChar / (2.0 + ((Ev / KbT) + ((0.5 * (Ev * Ev)) / (KbT * KbT))));
                  	elseif (KbT <= 3.1e-18)
                  		tmp = NaChar / (((2.0 + (EAccept / KbT)) + ((Vef / KbT) + (Ev / KbT))) - (mu / KbT));
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(EAccept + N[(Vef + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -5.8e+115], t$95$0, If[LessEqual[KbT, -1.85e-193], N[(NaChar / N[(2.0 + N[(N[(Ev / KbT), $MachinePrecision] + N[(N[(0.5 * N[(Ev * Ev), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.1e-18], N[(NaChar / N[(N[(N[(2.0 + N[(EAccept / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(Ev / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\
                  \mathbf{if}\;KbT \leq -5.8 \cdot 10^{+115}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;KbT \leq -1.85 \cdot 10^{-193}:\\
                  \;\;\;\;\frac{NaChar}{2 + \left(\frac{Ev}{KbT} + \frac{0.5 \cdot \left(Ev \cdot Ev\right)}{KbT \cdot KbT}\right)}\\
                  
                  \mathbf{elif}\;KbT \leq 3.1 \cdot 10^{-18}:\\
                  \;\;\;\;\frac{NaChar}{\left(\left(2 + \frac{EAccept}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{Ev}{KbT}\right)\right) - \frac{mu}{KbT}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if KbT < -5.80000000000000009e115 or 3.10000000000000007e-18 < KbT

                    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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                    5. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                      2. unsub-negN/A

                        \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                      3. --lowering--.f64N/A

                        \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                      4. /-lowering-/.f64N/A

                        \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
                    6. Simplified72.0%

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                    8. Step-by-step derivation
                      1. Simplified42.0%

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

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \left(Ev + Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                        4. +-lowering-+.f6452.4%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \mathsf{+.f64}\left(Ev, Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                      4. Simplified52.4%

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

                      if -5.80000000000000009e115 < KbT < -1.8500000000000001e-193

                      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. clear-numN/A

                          \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                        2. associate-/r/N/A

                          \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                        3. *-lowering-*.f64N/A

                          \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                        4. /-lowering-/.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                        5. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                        6. exp-lowering-exp.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                        7. /-lowering-/.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        8. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        9. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        10. --lowering--.f64100.0%

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                      5. Applied egg-rr100.0%

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

                        \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                      7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                        7. +-lowering-+.f6456.4%

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right) \]
                      11. Simplified28.9%

                        \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{Ev}{KbT}}}} \]
                      12. Taylor expanded in KbT around inf

                        \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(2 + \left(\frac{1}{2} \cdot \frac{{Ev}^{2}}{{KbT}^{2}} + \frac{Ev}{KbT}\right)\right)}\right) \]
                      13. Step-by-step derivation
                        1. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{2} \cdot \frac{{Ev}^{2}}{{KbT}^{2}} + \frac{Ev}{KbT}\right)}\right)\right) \]
                        2. +-commutativeN/A

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

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

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \left(\color{blue}{\frac{1}{2}} \cdot \frac{{Ev}^{2}}{{KbT}^{2}}\right)\right)\right)\right) \]
                        5. associate-*r/N/A

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

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

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({Ev}^{2}\right)\right), \left({\color{blue}{KbT}}^{2}\right)\right)\right)\right)\right) \]
                        8. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(Ev \cdot Ev\right)\right), \left({KbT}^{2}\right)\right)\right)\right)\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(Ev, Ev\right)\right), \left({KbT}^{2}\right)\right)\right)\right)\right) \]
                        10. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(Ev, Ev\right)\right), \left(KbT \cdot \color{blue}{KbT}\right)\right)\right)\right)\right) \]
                        11. *-lowering-*.f6414.7%

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(Ev, Ev\right)\right), \mathsf{*.f64}\left(KbT, \color{blue}{KbT}\right)\right)\right)\right)\right) \]
                      14. Simplified14.7%

                        \[\leadsto \frac{NaChar}{\color{blue}{2 + \left(\frac{Ev}{KbT} + \frac{0.5 \cdot \left(Ev \cdot Ev\right)}{KbT \cdot KbT}\right)}} \]

                      if -1.8500000000000001e-193 < KbT < 3.10000000000000007e-18

                      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. clear-numN/A

                          \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                        2. associate-/r/N/A

                          \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                        3. *-lowering-*.f64N/A

                          \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                        4. /-lowering-/.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                        5. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                        6. exp-lowering-exp.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                        7. /-lowering-/.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        8. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        9. +-lowering-+.f64N/A

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                        10. --lowering--.f64100.0%

                          \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                      5. Applied egg-rr100.0%

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

                        \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                      7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                        7. +-lowering-+.f6473.9%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EAccept, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(Vef, KbT\right)\right)\right), \left(\frac{mu}{KbT}\right)\right)\right) \]
                        9. /-lowering-/.f6426.4%

                          \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EAccept, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right), \mathsf{/.f64}\left(Vef, KbT\right)\right)\right), \mathsf{/.f64}\left(mu, \color{blue}{KbT}\right)\right)\right) \]
                      11. Simplified26.4%

                        \[\leadsto \frac{NaChar}{\color{blue}{\left(\left(2 + \frac{EAccept}{KbT}\right) + \left(\frac{Ev}{KbT} + \frac{Vef}{KbT}\right)\right) - \frac{mu}{KbT}}} \]
                    9. Recombined 3 regimes into one program.
                    10. Final simplification34.2%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -5.8 \cdot 10^{+115}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \mathbf{elif}\;KbT \leq -1.85 \cdot 10^{-193}:\\ \;\;\;\;\frac{NaChar}{2 + \left(\frac{Ev}{KbT} + \frac{0.5 \cdot \left(Ev \cdot Ev\right)}{KbT \cdot KbT}\right)}\\ \mathbf{elif}\;KbT \leq 3.1 \cdot 10^{-18}:\\ \;\;\;\;\frac{NaChar}{\left(\left(2 + \frac{EAccept}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{Ev}{KbT}\right)\right) - \frac{mu}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \]
                    11. Add Preprocessing

                    Alternative 21: 33.1% accurate, 7.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;KbT \leq -4.1 \cdot 10^{-10}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 1.28 \cdot 10^{-18}:\\ \;\;\;\;\frac{NdChar}{\frac{mu \cdot \left(\frac{EDonor + \left(Vef + \left(KbT \cdot 2 - Ec\right)\right)}{mu} + 1\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \end{array} \]
                    (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                     :precision binary64
                     (if (<= KbT -4.1e-10)
                       (* 0.5 (+ NdChar NaChar))
                       (if (<= KbT 1.28e-18)
                         (/
                          NdChar
                          (/ (* mu (+ (/ (+ EDonor (+ Vef (- (* KbT 2.0) Ec))) mu) 1.0)) KbT))
                         (+
                          (/ NdChar 2.0)
                          (/ NaChar (+ 2.0 (/ (- (+ EAccept (+ Vef Ev)) mu) KbT)))))))
                    double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                    	double tmp;
                    	if (KbT <= -4.1e-10) {
                    		tmp = 0.5 * (NdChar + NaChar);
                    	} else if (KbT <= 1.28e-18) {
                    		tmp = NdChar / ((mu * (((EDonor + (Vef + ((KbT * 2.0) - Ec))) / mu) + 1.0)) / KbT);
                    	} else {
                    		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                    	}
                    	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 <= (-4.1d-10)) then
                            tmp = 0.5d0 * (ndchar + nachar)
                        else if (kbt <= 1.28d-18) then
                            tmp = ndchar / ((mu * (((edonor + (vef + ((kbt * 2.0d0) - ec))) / mu) + 1.0d0)) / kbt)
                        else
                            tmp = (ndchar / 2.0d0) + (nachar / (2.0d0 + (((eaccept + (vef + ev)) - mu) / kbt)))
                        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 <= -4.1e-10) {
                    		tmp = 0.5 * (NdChar + NaChar);
                    	} else if (KbT <= 1.28e-18) {
                    		tmp = NdChar / ((mu * (((EDonor + (Vef + ((KbT * 2.0) - Ec))) / mu) + 1.0)) / KbT);
                    	} else {
                    		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                    	}
                    	return tmp;
                    }
                    
                    def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                    	tmp = 0
                    	if KbT <= -4.1e-10:
                    		tmp = 0.5 * (NdChar + NaChar)
                    	elif KbT <= 1.28e-18:
                    		tmp = NdChar / ((mu * (((EDonor + (Vef + ((KbT * 2.0) - Ec))) / mu) + 1.0)) / KbT)
                    	else:
                    		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)))
                    	return tmp
                    
                    function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                    	tmp = 0.0
                    	if (KbT <= -4.1e-10)
                    		tmp = Float64(0.5 * Float64(NdChar + NaChar));
                    	elseif (KbT <= 1.28e-18)
                    		tmp = Float64(NdChar / Float64(Float64(mu * Float64(Float64(Float64(EDonor + Float64(Vef + Float64(Float64(KbT * 2.0) - Ec))) / mu) + 1.0)) / KbT));
                    	else
                    		tmp = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(EAccept + Float64(Vef + Ev)) - mu) / KbT))));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                    	tmp = 0.0;
                    	if (KbT <= -4.1e-10)
                    		tmp = 0.5 * (NdChar + NaChar);
                    	elseif (KbT <= 1.28e-18)
                    		tmp = NdChar / ((mu * (((EDonor + (Vef + ((KbT * 2.0) - Ec))) / mu) + 1.0)) / KbT);
                    	else
                    		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -4.1e-10], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.28e-18], N[(NdChar / N[(N[(mu * N[(N[(N[(EDonor + N[(Vef + N[(N[(KbT * 2.0), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / mu), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(EAccept + N[(Vef + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;KbT \leq -4.1 \cdot 10^{-10}:\\
                    \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
                    
                    \mathbf{elif}\;KbT \leq 1.28 \cdot 10^{-18}:\\
                    \;\;\;\;\frac{NdChar}{\frac{mu \cdot \left(\frac{EDonor + \left(Vef + \left(KbT \cdot 2 - Ec\right)\right)}{mu} + 1\right)}{KbT}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if KbT < -4.0999999999999998e-10

                      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-+.f6444.6%

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

                        \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                      if -4.0999999999999998e-10 < KbT < 1.27999999999999993e-18

                      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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                        9. /-lowering-/.f6417.3%

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                      9. Simplified17.3%

                        \[\leadsto \frac{NdChar}{\color{blue}{\left(\left(2 + \frac{EDonor}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}} \]
                      10. Taylor expanded in KbT around 0

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \left(2 \cdot KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                        8. *-lowering-*.f6422.6%

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

                        \[\leadsto \frac{NdChar}{\color{blue}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + 2 \cdot KbT\right) - Ec\right)}{KbT}}} \]
                      13. Taylor expanded in mu around -inf

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(mu\right), \left(-1 \cdot \frac{\left(EDonor + \left(Vef + 2 \cdot KbT\right)\right) - Ec}{mu} + \left(\mathsf{neg}\left(1\right)\right)\right)\right), KbT\right)\right) \]
                        6. metadata-evalN/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(mu\right), \mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(2 \cdot KbT\right), Ec\right)\right)\right), mu\right)\right), -1\right)\right), KbT\right)\right) \]
                        16. *-commutativeN/A

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(mu\right), \mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\left(KbT \cdot 2\right), Ec\right)\right)\right), mu\right)\right), -1\right)\right), KbT\right)\right) \]
                        17. *-lowering-*.f6425.0%

                          \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(mu\right), \mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(KbT, 2\right), Ec\right)\right)\right), mu\right)\right), -1\right)\right), KbT\right)\right) \]
                      15. Simplified25.0%

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

                      if 1.27999999999999993e-18 < KbT

                      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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                      5. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                        2. unsub-negN/A

                          \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                        3. --lowering--.f64N/A

                          \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                        4. /-lowering-/.f64N/A

                          \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
                      6. Simplified71.9%

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                      8. Step-by-step derivation
                        1. Simplified38.0%

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

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

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

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \left(Ev + Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                          4. +-lowering-+.f6445.1%

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -4.1 \cdot 10^{-10}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 1.28 \cdot 10^{-18}:\\ \;\;\;\;\frac{NdChar}{\frac{mu \cdot \left(\frac{EDonor + \left(Vef + \left(KbT \cdot 2 - Ec\right)\right)}{mu} + 1\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \]
                      11. Add Preprocessing

                      Alternative 22: 32.7% accurate, 8.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;KbT \leq -8.5 \cdot 10^{-11}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 2.3 \cdot 10^{-19}:\\ \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \end{array} \]
                      (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                       :precision binary64
                       (if (<= KbT -8.5e-11)
                         (* 0.5 (+ NdChar NaChar))
                         (if (<= KbT 2.3e-19)
                           (/ NdChar (/ (+ EDonor (- (+ (+ Vef mu) (* KbT 2.0)) Ec)) KbT))
                           (+
                            (/ NdChar 2.0)
                            (/ NaChar (+ 2.0 (/ (- (+ EAccept (+ Vef Ev)) mu) KbT)))))))
                      double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                      	double tmp;
                      	if (KbT <= -8.5e-11) {
                      		tmp = 0.5 * (NdChar + NaChar);
                      	} else if (KbT <= 2.3e-19) {
                      		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                      	} else {
                      		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                      	}
                      	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 <= (-8.5d-11)) then
                              tmp = 0.5d0 * (ndchar + nachar)
                          else if (kbt <= 2.3d-19) then
                              tmp = ndchar / ((edonor + (((vef + mu) + (kbt * 2.0d0)) - ec)) / kbt)
                          else
                              tmp = (ndchar / 2.0d0) + (nachar / (2.0d0 + (((eaccept + (vef + ev)) - mu) / kbt)))
                          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 <= -8.5e-11) {
                      		tmp = 0.5 * (NdChar + NaChar);
                      	} else if (KbT <= 2.3e-19) {
                      		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                      	} else {
                      		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                      	}
                      	return tmp;
                      }
                      
                      def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                      	tmp = 0
                      	if KbT <= -8.5e-11:
                      		tmp = 0.5 * (NdChar + NaChar)
                      	elif KbT <= 2.3e-19:
                      		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT)
                      	else:
                      		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)))
                      	return tmp
                      
                      function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                      	tmp = 0.0
                      	if (KbT <= -8.5e-11)
                      		tmp = Float64(0.5 * Float64(NdChar + NaChar));
                      	elseif (KbT <= 2.3e-19)
                      		tmp = Float64(NdChar / Float64(Float64(EDonor + Float64(Float64(Float64(Vef + mu) + Float64(KbT * 2.0)) - Ec)) / KbT));
                      	else
                      		tmp = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(2.0 + Float64(Float64(Float64(EAccept + Float64(Vef + Ev)) - mu) / KbT))));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                      	tmp = 0.0;
                      	if (KbT <= -8.5e-11)
                      		tmp = 0.5 * (NdChar + NaChar);
                      	elseif (KbT <= 2.3e-19)
                      		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                      	else
                      		tmp = (NdChar / 2.0) + (NaChar / (2.0 + (((EAccept + (Vef + Ev)) - mu) / KbT)));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -8.5e-11], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.3e-19], N[(NdChar / N[(N[(EDonor + N[(N[(N[(Vef + mu), $MachinePrecision] + N[(KbT * 2.0), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(2.0 + N[(N[(N[(EAccept + N[(Vef + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;KbT \leq -8.5 \cdot 10^{-11}:\\
                      \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
                      
                      \mathbf{elif}\;KbT \leq 2.3 \cdot 10^{-19}:\\
                      \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if KbT < -8.50000000000000037e-11

                        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-+.f6444.6%

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

                          \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                        if -8.50000000000000037e-11 < KbT < 2.2999999999999998e-19

                        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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                          9. /-lowering-/.f6417.3%

                            \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                        9. Simplified17.3%

                          \[\leadsto \frac{NdChar}{\color{blue}{\left(\left(2 + \frac{EDonor}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}} \]
                        10. Taylor expanded in KbT around 0

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \left(2 \cdot KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                          8. *-lowering-*.f6422.6%

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

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

                        if 2.2999999999999998e-19 < KbT

                        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 KbT 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, \color{blue}{\left(2 + -1 \cdot \frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right) \]
                        5. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\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, \left(2 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)\right)\right)\right)\right) \]
                          2. unsub-negN/A

                            \[\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, \left(2 - \color{blue}{\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}}\right)\right)\right) \]
                          3. --lowering--.f64N/A

                            \[\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(2, \color{blue}{\left(\frac{-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}}{KbT}\right)}\right)\right)\right) \]
                          4. /-lowering-/.f64N/A

                            \[\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(2, \mathsf{/.f64}\left(\left(-1 \cdot \left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right) + \frac{-1}{2} \cdot \frac{{\left(\left(EAccept + \left(Ev + Vef\right)\right) - mu\right)}^{2}}{KbT}\right), \color{blue}{KbT}\right)\right)\right)\right) \]
                        6. Simplified71.9%

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, \color{blue}{2}\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right)\right), KbT\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(EAccept, Ev\right), \mathsf{\_.f64}\left(Vef, mu\right)\right)\right), KbT\right)\right)\right)\right) \]
                        8. Step-by-step derivation
                          1. Simplified38.0%

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

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(NdChar, 2\right), \mathsf{/.f64}\left(NaChar, \mathsf{\_.f64}\left(2, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(mu, \mathsf{+.f64}\left(EAccept, \left(Ev + Vef\right)\right)\right), KbT\right)\right)\right)\right) \]
                            4. +-lowering-+.f6445.1%

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

                            \[\leadsto \frac{NdChar}{2} + \frac{NaChar}{2 - \color{blue}{\frac{mu - \left(EAccept + \left(Ev + Vef\right)\right)}{KbT}}} \]
                        9. Recombined 3 regimes into one program.
                        10. Final simplification34.3%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -8.5 \cdot 10^{-11}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 2.3 \cdot 10^{-19}:\\ \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{2 + \frac{\left(EAccept + \left(Vef + Ev\right)\right) - mu}{KbT}}\\ \end{array} \]
                        11. Add Preprocessing

                        Alternative 23: 33.0% accurate, 9.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -5 \cdot 10^{-11}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 2.05 \cdot 10^{-27}:\\ \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \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 -5e-11)
                             t_0
                             (if (<= KbT 2.05e-27)
                               (/ NdChar (/ (+ EDonor (- (+ (+ Vef mu) (* KbT 2.0)) Ec)) KbT))
                               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 <= -5e-11) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.05e-27) {
                        		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                        	} 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 <= (-5d-11)) then
                                tmp = t_0
                            else if (kbt <= 2.05d-27) then
                                tmp = ndchar / ((edonor + (((vef + mu) + (kbt * 2.0d0)) - ec)) / kbt)
                            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 <= -5e-11) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.05e-27) {
                        		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                        	} 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 <= -5e-11:
                        		tmp = t_0
                        	elif KbT <= 2.05e-27:
                        		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT)
                        	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 <= -5e-11)
                        		tmp = t_0;
                        	elseif (KbT <= 2.05e-27)
                        		tmp = Float64(NdChar / Float64(Float64(EDonor + Float64(Float64(Float64(Vef + mu) + Float64(KbT * 2.0)) - Ec)) / KbT));
                        	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 <= -5e-11)
                        		tmp = t_0;
                        	elseif (KbT <= 2.05e-27)
                        		tmp = NdChar / ((EDonor + (((Vef + mu) + (KbT * 2.0)) - Ec)) / KbT);
                        	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, -5e-11], t$95$0, If[LessEqual[KbT, 2.05e-27], N[(NdChar / N[(N[(EDonor + N[(N[(N[(Vef + mu), $MachinePrecision] + N[(KbT * 2.0), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
                        \mathbf{if}\;KbT \leq -5 \cdot 10^{-11}:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;KbT \leq 2.05 \cdot 10^{-27}:\\
                        \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_0\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if KbT < -5.00000000000000018e-11 or 2.0499999999999999e-27 < KbT

                          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 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-+.f6444.2%

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

                            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                          if -5.00000000000000018e-11 < KbT < 2.0499999999999999e-27

                          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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                            9. /-lowering-/.f6417.5%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                          9. Simplified17.5%

                            \[\leadsto \frac{NdChar}{\color{blue}{\left(\left(2 + \frac{EDonor}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}} \]
                          10. Taylor expanded in KbT around 0

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \left(2 \cdot KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                            8. *-lowering-*.f6423.0%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \mathsf{*.f64}\left(2, KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                          12. Simplified23.0%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -5 \cdot 10^{-11}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 2.05 \cdot 10^{-27}:\\ \;\;\;\;\frac{NdChar}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 24: 32.3% accurate, 9.9× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -1.12 \cdot 10^{-10}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 2.95 \cdot 10^{-25}:\\ \;\;\;\;\frac{NdChar}{\frac{Vef + \left(\left(mu + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \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.12e-10)
                             t_0
                             (if (<= KbT 2.95e-25)
                               (/ NdChar (/ (+ Vef (- (+ mu (* KbT 2.0)) Ec)) KbT))
                               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.12e-10) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.95e-25) {
                        		tmp = NdChar / ((Vef + ((mu + (KbT * 2.0)) - Ec)) / KbT);
                        	} 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.12d-10)) then
                                tmp = t_0
                            else if (kbt <= 2.95d-25) then
                                tmp = ndchar / ((vef + ((mu + (kbt * 2.0d0)) - ec)) / kbt)
                            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.12e-10) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.95e-25) {
                        		tmp = NdChar / ((Vef + ((mu + (KbT * 2.0)) - Ec)) / KbT);
                        	} 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.12e-10:
                        		tmp = t_0
                        	elif KbT <= 2.95e-25:
                        		tmp = NdChar / ((Vef + ((mu + (KbT * 2.0)) - Ec)) / KbT)
                        	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.12e-10)
                        		tmp = t_0;
                        	elseif (KbT <= 2.95e-25)
                        		tmp = Float64(NdChar / Float64(Float64(Vef + Float64(Float64(mu + Float64(KbT * 2.0)) - Ec)) / KbT));
                        	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.12e-10)
                        		tmp = t_0;
                        	elseif (KbT <= 2.95e-25)
                        		tmp = NdChar / ((Vef + ((mu + (KbT * 2.0)) - Ec)) / KbT);
                        	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.12e-10], t$95$0, If[LessEqual[KbT, 2.95e-25], N[(NdChar / N[(N[(Vef + N[(N[(mu + N[(KbT * 2.0), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
                        \mathbf{if}\;KbT \leq -1.12 \cdot 10^{-10}:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;KbT \leq 2.95 \cdot 10^{-25}:\\
                        \;\;\;\;\frac{NdChar}{\frac{Vef + \left(\left(mu + KbT \cdot 2\right) - Ec\right)}{KbT}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_0\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if KbT < -1.12e-10 or 2.9499999999999999e-25 < KbT

                          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 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-+.f6444.2%

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

                            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                          if -1.12e-10 < KbT < 2.9499999999999999e-25

                          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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                            9. /-lowering-/.f6417.5%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                          9. Simplified17.5%

                            \[\leadsto \frac{NdChar}{\color{blue}{\left(\left(2 + \frac{EDonor}{KbT}\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}} \]
                          10. Taylor expanded in KbT around 0

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \left(2 \cdot KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                            8. *-lowering-*.f6423.0%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(EDonor, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(Vef, mu\right), \mathsf{*.f64}\left(2, KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                          12. Simplified23.0%

                            \[\leadsto \frac{NdChar}{\color{blue}{\frac{EDonor + \left(\left(\left(Vef + mu\right) + 2 \cdot KbT\right) - Ec\right)}{KbT}}} \]
                          13. Taylor expanded in EDonor around 0

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\left(\left(Vef + \left(mu + 2 \cdot KbT\right)\right) - Ec\right), \color{blue}{KbT}\right)\right) \]
                            2. associate--l+N/A

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, \left(2 \cdot KbT\right)\right), Ec\right)\right), KbT\right)\right) \]
                            6. *-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, \left(KbT \cdot 2\right)\right), Ec\right)\right), KbT\right)\right) \]
                            7. *-lowering-*.f6420.6%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(mu, \mathsf{*.f64}\left(KbT, 2\right)\right), Ec\right)\right), KbT\right)\right) \]
                          15. Simplified20.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -1.12 \cdot 10^{-10}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 2.95 \cdot 10^{-25}:\\ \;\;\;\;\frac{NdChar}{\frac{Vef + \left(\left(mu + KbT \cdot 2\right) - Ec\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 25: 30.3% accurate, 10.9× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -7 \cdot 10^{+30}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 2.35 \cdot 10^{-29}:\\ \;\;\;\;\frac{\frac{mu \cdot \left(NdChar \cdot KbT\right)}{EDonor}}{0 - EDonor}\\ \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 -7e+30)
                             t_0
                             (if (<= KbT 2.35e-29)
                               (/ (/ (* mu (* NdChar KbT)) EDonor) (- 0.0 EDonor))
                               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 <= -7e+30) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.35e-29) {
                        		tmp = ((mu * (NdChar * KbT)) / EDonor) / (0.0 - EDonor);
                        	} 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 <= (-7d+30)) then
                                tmp = t_0
                            else if (kbt <= 2.35d-29) then
                                tmp = ((mu * (ndchar * kbt)) / edonor) / (0.0d0 - edonor)
                            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 <= -7e+30) {
                        		tmp = t_0;
                        	} else if (KbT <= 2.35e-29) {
                        		tmp = ((mu * (NdChar * KbT)) / EDonor) / (0.0 - EDonor);
                        	} 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 <= -7e+30:
                        		tmp = t_0
                        	elif KbT <= 2.35e-29:
                        		tmp = ((mu * (NdChar * KbT)) / EDonor) / (0.0 - EDonor)
                        	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 <= -7e+30)
                        		tmp = t_0;
                        	elseif (KbT <= 2.35e-29)
                        		tmp = Float64(Float64(Float64(mu * Float64(NdChar * KbT)) / EDonor) / Float64(0.0 - EDonor));
                        	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 <= -7e+30)
                        		tmp = t_0;
                        	elseif (KbT <= 2.35e-29)
                        		tmp = ((mu * (NdChar * KbT)) / EDonor) / (0.0 - EDonor);
                        	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, -7e+30], t$95$0, If[LessEqual[KbT, 2.35e-29], N[(N[(N[(mu * N[(NdChar * KbT), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] / N[(0.0 - EDonor), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
                        \mathbf{if}\;KbT \leq -7 \cdot 10^{+30}:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;KbT \leq 2.35 \cdot 10^{-29}:\\
                        \;\;\;\;\frac{\frac{mu \cdot \left(NdChar \cdot KbT\right)}{EDonor}}{0 - EDonor}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_0\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if KbT < -7.00000000000000042e30 or 2.3499999999999999e-29 < KbT

                          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 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-+.f6446.1%

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

                            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                          if -7.00000000000000042e30 < KbT < 2.3499999999999999e-29

                          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. --lowering--.f64N/A

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(Vef + EDonor\right), mu\right), Ec\right), KbT\right)\right)\right)\right) \]
                            9. +-lowering-+.f6462.7%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                            9. /-lowering-/.f6417.2%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                          9. Simplified17.2%

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

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

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

                            \[\leadsto \color{blue}{\frac{\left(-\frac{\left(KbT \cdot KbT\right) \cdot \left(NdChar \cdot \left(2 + \left(\left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right) - \frac{Ec}{KbT}\right)\right)\right)}{EDonor}\right) + KbT \cdot NdChar}{EDonor}} \]
                          13. Taylor expanded in mu around inf

                            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \frac{KbT \cdot \left(NdChar \cdot mu\right)}{EDonor}\right)}, EDonor\right) \]
                          14. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{KbT \cdot \left(NdChar \cdot mu\right)}{EDonor}\right)\right), EDonor\right) \]
                            2. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(KbT \cdot \left(NdChar \cdot mu\right)\right), EDonor\right)\right), EDonor\right) \]
                            3. associate-*r*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(KbT \cdot NdChar\right) \cdot mu\right), EDonor\right)\right), EDonor\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(KbT \cdot NdChar\right), mu\right), EDonor\right)\right), EDonor\right) \]
                            5. *-lowering-*.f6420.1%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(KbT, NdChar\right), mu\right), EDonor\right)\right), EDonor\right) \]
                          15. Simplified20.1%

                            \[\leadsto \frac{\color{blue}{-1 \cdot \frac{\left(KbT \cdot NdChar\right) \cdot mu}{EDonor}}}{EDonor} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification33.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -7 \cdot 10^{+30}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 2.35 \cdot 10^{-29}:\\ \;\;\;\;\frac{\frac{mu \cdot \left(NdChar \cdot KbT\right)}{EDonor}}{0 - EDonor}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 26: 26.1% accurate, 13.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;Ev \leq -6.4 \cdot 10^{+209}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\ \mathbf{elif}\;Ev \leq 9.8 \cdot 10^{-52}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{Ec}{KbT}}\\ \end{array} \end{array} \]
                        (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                         :precision binary64
                         (if (<= Ev -6.4e+209)
                           (/ NaChar (+ 2.0 (/ Ev KbT)))
                           (if (<= Ev 9.8e-52)
                             (* 0.5 (+ NdChar NaChar))
                             (/ NdChar (- 2.0 (/ Ec KbT))))))
                        double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                        	double tmp;
                        	if (Ev <= -6.4e+209) {
                        		tmp = NaChar / (2.0 + (Ev / KbT));
                        	} else if (Ev <= 9.8e-52) {
                        		tmp = 0.5 * (NdChar + NaChar);
                        	} else {
                        		tmp = NdChar / (2.0 - (Ec / KbT));
                        	}
                        	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 (ev <= (-6.4d+209)) then
                                tmp = nachar / (2.0d0 + (ev / kbt))
                            else if (ev <= 9.8d-52) then
                                tmp = 0.5d0 * (ndchar + nachar)
                            else
                                tmp = ndchar / (2.0d0 - (ec / kbt))
                            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 (Ev <= -6.4e+209) {
                        		tmp = NaChar / (2.0 + (Ev / KbT));
                        	} else if (Ev <= 9.8e-52) {
                        		tmp = 0.5 * (NdChar + NaChar);
                        	} else {
                        		tmp = NdChar / (2.0 - (Ec / KbT));
                        	}
                        	return tmp;
                        }
                        
                        def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                        	tmp = 0
                        	if Ev <= -6.4e+209:
                        		tmp = NaChar / (2.0 + (Ev / KbT))
                        	elif Ev <= 9.8e-52:
                        		tmp = 0.5 * (NdChar + NaChar)
                        	else:
                        		tmp = NdChar / (2.0 - (Ec / KbT))
                        	return tmp
                        
                        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                        	tmp = 0.0
                        	if (Ev <= -6.4e+209)
                        		tmp = Float64(NaChar / Float64(2.0 + Float64(Ev / KbT)));
                        	elseif (Ev <= 9.8e-52)
                        		tmp = Float64(0.5 * Float64(NdChar + NaChar));
                        	else
                        		tmp = Float64(NdChar / Float64(2.0 - Float64(Ec / KbT)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                        	tmp = 0.0;
                        	if (Ev <= -6.4e+209)
                        		tmp = NaChar / (2.0 + (Ev / KbT));
                        	elseif (Ev <= 9.8e-52)
                        		tmp = 0.5 * (NdChar + NaChar);
                        	else
                        		tmp = NdChar / (2.0 - (Ec / KbT));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[Ev, -6.4e+209], N[(NaChar / N[(2.0 + N[(Ev / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ev, 9.8e-52], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], N[(NdChar / N[(2.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;Ev \leq -6.4 \cdot 10^{+209}:\\
                        \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\
                        
                        \mathbf{elif}\;Ev \leq 9.8 \cdot 10^{-52}:\\
                        \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{NdChar}{2 - \frac{Ec}{KbT}}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if Ev < -6.3999999999999999e209

                          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. clear-numN/A

                              \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                            2. associate-/r/N/A

                              \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                            3. *-lowering-*.f64N/A

                              \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                            4. /-lowering-/.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                            6. exp-lowering-exp.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                            7. /-lowering-/.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                            8. +-lowering-+.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                            10. --lowering--.f64100.0%

                              \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                          5. Applied egg-rr100.0%

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

                            \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                          7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                            7. +-lowering-+.f6463.7%

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right) \]
                          11. Simplified58.5%

                            \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{Ev}{KbT}}}} \]
                          12. Taylor expanded in Ev around 0

                            \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(2 + \frac{Ev}{KbT}\right)}\right) \]
                          13. Step-by-step derivation
                            1. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{Ev}{KbT}\right)}\right)\right) \]
                            2. /-lowering-/.f6422.4%

                              \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{/.f64}\left(Ev, \color{blue}{KbT}\right)\right)\right) \]
                          14. Simplified22.4%

                            \[\leadsto \frac{NaChar}{\color{blue}{2 + \frac{Ev}{KbT}}} \]

                          if -6.3999999999999999e209 < Ev < 9.80000000000000037e-52

                          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-+.f6429.9%

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

                            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                          if 9.80000000000000037e-52 < Ev

                          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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                            9. /-lowering-/.f6421.2%

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                          9. Simplified21.2%

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

                            \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\color{blue}{2}, \mathsf{/.f64}\left(Ec, KbT\right)\right)\right) \]
                          11. Step-by-step derivation
                            1. Simplified20.1%

                              \[\leadsto \frac{NdChar}{\color{blue}{2} - \frac{Ec}{KbT}} \]
                          12. Recombined 3 regimes into one program.
                          13. Final simplification27.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;Ev \leq -6.4 \cdot 10^{+209}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\ \mathbf{elif}\;Ev \leq 9.8 \cdot 10^{-52}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{Ec}{KbT}}\\ \end{array} \]
                          14. Add Preprocessing

                          Alternative 27: 29.9% accurate, 15.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{if}\;KbT \leq -3.6 \cdot 10^{-187}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;KbT \leq 1.32 \cdot 10^{-28}:\\ \;\;\;\;\frac{NdChar}{\frac{Vef}{KbT}}\\ \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 -3.6e-187)
                               t_0
                               (if (<= KbT 1.32e-28) (/ NdChar (/ Vef KbT)) 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 <= -3.6e-187) {
                          		tmp = t_0;
                          	} else if (KbT <= 1.32e-28) {
                          		tmp = NdChar / (Vef / KbT);
                          	} 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 <= (-3.6d-187)) then
                                  tmp = t_0
                              else if (kbt <= 1.32d-28) then
                                  tmp = ndchar / (vef / kbt)
                              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 <= -3.6e-187) {
                          		tmp = t_0;
                          	} else if (KbT <= 1.32e-28) {
                          		tmp = NdChar / (Vef / KbT);
                          	} 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 <= -3.6e-187:
                          		tmp = t_0
                          	elif KbT <= 1.32e-28:
                          		tmp = NdChar / (Vef / KbT)
                          	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 <= -3.6e-187)
                          		tmp = t_0;
                          	elseif (KbT <= 1.32e-28)
                          		tmp = Float64(NdChar / Float64(Vef / KbT));
                          	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 <= -3.6e-187)
                          		tmp = t_0;
                          	elseif (KbT <= 1.32e-28)
                          		tmp = NdChar / (Vef / KbT);
                          	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, -3.6e-187], t$95$0, If[LessEqual[KbT, 1.32e-28], N[(NdChar / N[(Vef / KbT), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
                          \mathbf{if}\;KbT \leq -3.6 \cdot 10^{-187}:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;KbT \leq 1.32 \cdot 10^{-28}:\\
                          \;\;\;\;\frac{NdChar}{\frac{Vef}{KbT}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_0\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if KbT < -3.59999999999999994e-187 or 1.32000000000000011e-28 < KbT

                            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 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-+.f6436.9%

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

                              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                            if -3.59999999999999994e-187 < KbT < 1.32000000000000011e-28

                            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. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \left(\frac{Ec}{KbT}\right)\right)\right) \]
                              9. /-lowering-/.f6418.2%

                                \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(EDonor, KbT\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(Vef, KbT\right), \mathsf{/.f64}\left(mu, KbT\right)\right)\right), \mathsf{/.f64}\left(Ec, \color{blue}{KbT}\right)\right)\right) \]
                            9. Simplified18.2%

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

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

                                \[\leadsto \mathsf{/.f64}\left(NdChar, \mathsf{/.f64}\left(Vef, \color{blue}{KbT}\right)\right) \]
                            12. Simplified19.3%

                              \[\leadsto \frac{NdChar}{\color{blue}{\frac{Vef}{KbT}}} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification31.3%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;KbT \leq -3.6 \cdot 10^{-187}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \mathbf{elif}\;KbT \leq 1.32 \cdot 10^{-28}:\\ \;\;\;\;\frac{NdChar}{\frac{Vef}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 28: 24.0% accurate, 17.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;NaChar \leq -4.4 \cdot 10^{-26}:\\ \;\;\;\;NaChar \cdot 0.5\\ \mathbf{elif}\;NaChar \leq 170000000000:\\ \;\;\;\;\frac{NdChar}{2}\\ \mathbf{else}:\\ \;\;\;\;NaChar \cdot 0.5\\ \end{array} \end{array} \]
                          (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                           :precision binary64
                           (if (<= NaChar -4.4e-26)
                             (* NaChar 0.5)
                             (if (<= NaChar 170000000000.0) (/ NdChar 2.0) (* 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 (NaChar <= -4.4e-26) {
                          		tmp = NaChar * 0.5;
                          	} else if (NaChar <= 170000000000.0) {
                          		tmp = NdChar / 2.0;
                          	} 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 (nachar <= (-4.4d-26)) then
                                  tmp = nachar * 0.5d0
                              else if (nachar <= 170000000000.0d0) then
                                  tmp = ndchar / 2.0d0
                              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 (NaChar <= -4.4e-26) {
                          		tmp = NaChar * 0.5;
                          	} else if (NaChar <= 170000000000.0) {
                          		tmp = NdChar / 2.0;
                          	} else {
                          		tmp = NaChar * 0.5;
                          	}
                          	return tmp;
                          }
                          
                          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                          	tmp = 0
                          	if NaChar <= -4.4e-26:
                          		tmp = NaChar * 0.5
                          	elif NaChar <= 170000000000.0:
                          		tmp = NdChar / 2.0
                          	else:
                          		tmp = NaChar * 0.5
                          	return tmp
                          
                          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                          	tmp = 0.0
                          	if (NaChar <= -4.4e-26)
                          		tmp = Float64(NaChar * 0.5);
                          	elseif (NaChar <= 170000000000.0)
                          		tmp = Float64(NdChar / 2.0);
                          	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 (NaChar <= -4.4e-26)
                          		tmp = NaChar * 0.5;
                          	elseif (NaChar <= 170000000000.0)
                          		tmp = NdChar / 2.0;
                          	else
                          		tmp = NaChar * 0.5;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[NaChar, -4.4e-26], N[(NaChar * 0.5), $MachinePrecision], If[LessEqual[NaChar, 170000000000.0], N[(NdChar / 2.0), $MachinePrecision], N[(NaChar * 0.5), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;NaChar \leq -4.4 \cdot 10^{-26}:\\
                          \;\;\;\;NaChar \cdot 0.5\\
                          
                          \mathbf{elif}\;NaChar \leq 170000000000:\\
                          \;\;\;\;\frac{NdChar}{2}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;NaChar \cdot 0.5\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if NaChar < -4.4000000000000002e-26 or 1.7e11 < 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 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-+.f6427.8%

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

                              \[\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-*.f6425.4%

                                \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{NaChar}\right) \]
                            9. Simplified25.4%

                              \[\leadsto \color{blue}{0.5 \cdot NaChar} \]

                            if -4.4000000000000002e-26 < NaChar < 1.7e11

                            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. --lowering--.f64N/A

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(NdChar, \color{blue}{2}\right) \]
                            8. Step-by-step derivation
                              1. Simplified24.8%

                                \[\leadsto \frac{NdChar}{\color{blue}{2}} \]
                            9. Recombined 2 regimes into one program.
                            10. Final simplification25.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;NaChar \leq -4.4 \cdot 10^{-26}:\\ \;\;\;\;NaChar \cdot 0.5\\ \mathbf{elif}\;NaChar \leq 170000000000:\\ \;\;\;\;\frac{NdChar}{2}\\ \mathbf{else}:\\ \;\;\;\;NaChar \cdot 0.5\\ \end{array} \]
                            11. Add Preprocessing

                            Alternative 29: 28.0% accurate, 19.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;Ev \leq -1.7 \cdot 10^{+210}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \end{array} \]
                            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                             :precision binary64
                             (if (<= Ev -1.7e+210)
                               (/ NaChar (+ 2.0 (/ Ev KbT)))
                               (* 0.5 (+ NdChar NaChar))))
                            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                            	double tmp;
                            	if (Ev <= -1.7e+210) {
                            		tmp = NaChar / (2.0 + (Ev / KbT));
                            	} else {
                            		tmp = 0.5 * (NdChar + NaChar);
                            	}
                            	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 (ev <= (-1.7d+210)) then
                                    tmp = nachar / (2.0d0 + (ev / kbt))
                                else
                                    tmp = 0.5d0 * (ndchar + nachar)
                                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 (Ev <= -1.7e+210) {
                            		tmp = NaChar / (2.0 + (Ev / KbT));
                            	} else {
                            		tmp = 0.5 * (NdChar + NaChar);
                            	}
                            	return tmp;
                            }
                            
                            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                            	tmp = 0
                            	if Ev <= -1.7e+210:
                            		tmp = NaChar / (2.0 + (Ev / KbT))
                            	else:
                            		tmp = 0.5 * (NdChar + NaChar)
                            	return tmp
                            
                            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	tmp = 0.0
                            	if (Ev <= -1.7e+210)
                            		tmp = Float64(NaChar / Float64(2.0 + Float64(Ev / KbT)));
                            	else
                            		tmp = Float64(0.5 * Float64(NdChar + NaChar));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	tmp = 0.0;
                            	if (Ev <= -1.7e+210)
                            		tmp = NaChar / (2.0 + (Ev / KbT));
                            	else
                            		tmp = 0.5 * (NdChar + NaChar);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[Ev, -1.7e+210], N[(NaChar / N[(2.0 + N[(Ev / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;Ev \leq -1.7 \cdot 10^{+210}:\\
                            \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if Ev < -1.70000000000000012e210

                              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. clear-numN/A

                                  \[\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), \left(\frac{1}{\color{blue}{\frac{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}{NaChar}}}\right)\right) \]
                                2. associate-/r/N/A

                                  \[\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), \left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}} \cdot \color{blue}{NaChar}\right)\right) \]
                                3. *-lowering-*.f64N/A

                                  \[\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(\left(\frac{1}{1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}\right), \color{blue}{NaChar}\right)\right) \]
                                4. /-lowering-/.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \left(1 + e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right), NaChar\right)\right) \]
                                5. +-lowering-+.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}\right)\right)\right), NaChar\right)\right) \]
                                6. exp-lowering-exp.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\left(\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}\right)\right)\right)\right), NaChar\right)\right) \]
                                7. /-lowering-/.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\left(Vef + \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                                8. +-lowering-+.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \left(EAccept + \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                                9. +-lowering-+.f64N/A

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \left(Ev - mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                                10. --lowering--.f64100.0%

                                  \[\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(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(Vef, \mathsf{+.f64}\left(EAccept, \mathsf{\_.f64}\left(Ev, mu\right)\right)\right), KbT\right)\right)\right)\right), NaChar\right)\right) \]
                              5. Applied egg-rr100.0%

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

                                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                              7. 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. +-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(EAccept, \left(Ev + Vef\right)\right), mu\right), KbT\right)\right)\right)\right) \]
                                7. +-lowering-+.f6463.7%

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

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

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

                                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{/.f64}\left(Ev, KbT\right)\right)\right)\right) \]
                              11. Simplified58.5%

                                \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{Ev}{KbT}}}} \]
                              12. Taylor expanded in Ev around 0

                                \[\leadsto \mathsf{/.f64}\left(NaChar, \color{blue}{\left(2 + \frac{Ev}{KbT}\right)}\right) \]
                              13. Step-by-step derivation
                                1. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{Ev}{KbT}\right)}\right)\right) \]
                                2. /-lowering-/.f6422.4%

                                  \[\leadsto \mathsf{/.f64}\left(NaChar, \mathsf{+.f64}\left(2, \mathsf{/.f64}\left(Ev, \color{blue}{KbT}\right)\right)\right) \]
                              14. Simplified22.4%

                                \[\leadsto \frac{NaChar}{\color{blue}{2 + \frac{Ev}{KbT}}} \]

                              if -1.70000000000000012e210 < Ev

                              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-+.f6428.8%

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;Ev \leq -1.7 \cdot 10^{+210}:\\ \;\;\;\;\frac{NaChar}{2 + \frac{Ev}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 30: 28.5% accurate, 45.8× speedup?

                            \[\begin{array}{l} \\ 0.5 \cdot \left(NdChar + NaChar\right) \end{array} \]
                            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                             :precision binary64
                             (* 0.5 (+ NdChar NaChar)))
                            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                            	return 0.5 * (NdChar + NaChar);
                            }
                            
                            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 = 0.5d0 * (ndchar + nachar)
                            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 0.5 * (NdChar + NaChar);
                            }
                            
                            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                            	return 0.5 * (NdChar + NaChar)
                            
                            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	return Float64(0.5 * Float64(NdChar + NaChar))
                            end
                            
                            function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	tmp = 0.5 * (NdChar + NaChar);
                            end
                            
                            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            0.5 \cdot \left(NdChar + NaChar\right)
                            \end{array}
                            
                            Derivation
                            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-+.f6428.0%

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

                              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
                            7. Final simplification28.0%

                              \[\leadsto 0.5 \cdot \left(NdChar + NaChar\right) \]
                            8. Add Preprocessing

                            Alternative 31: 18.4% accurate, 76.3× speedup?

                            \[\begin{array}{l} \\ NaChar \cdot 0.5 \end{array} \]
                            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
                             :precision binary64
                             (* NaChar 0.5))
                            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
                            	return NaChar * 0.5;
                            }
                            
                            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 * 0.5d0
                            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 * 0.5;
                            }
                            
                            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
                            	return NaChar * 0.5
                            
                            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	return Float64(NaChar * 0.5)
                            end
                            
                            function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
                            	tmp = NaChar * 0.5;
                            end
                            
                            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(NaChar * 0.5), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            NaChar \cdot 0.5
                            \end{array}
                            
                            Derivation
                            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-+.f6428.0%

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

                              \[\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-*.f6419.3%

                                \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{NaChar}\right) \]
                            9. Simplified19.3%

                              \[\leadsto \color{blue}{0.5 \cdot NaChar} \]
                            10. Final simplification19.3%

                              \[\leadsto NaChar \cdot 0.5 \]
                            11. Add Preprocessing

                            Reproduce

                            ?
                            herbie shell --seed 2024160 
                            (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))))))