Bulmash initializePoisson

Percentage Accurate: 100.0% → 100.0%
Time: 14.7s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{1}{e^{\frac{Ev + \left(Vef + \left(EAccept - mu\right)\right)}{KbT}} + 1}, NaChar, \frac{NdChar}{e^{\frac{\left(Vef + \left(mu + EDonor\right)\right) - Ec}{KbT}} + 1}\right) \end{array} \]
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
 :precision binary64
 (fma
  (/ 1.0 (+ (exp (/ (+ Ev (+ Vef (- EAccept mu))) KbT)) 1.0))
  NaChar
  (/ NdChar (+ (exp (/ (- (+ Vef (+ mu EDonor)) Ec) KbT)) 1.0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
	return fma((1.0 / (exp(((Ev + (Vef + (EAccept - mu))) / KbT)) + 1.0)), NaChar, (NdChar / (exp((((Vef + (mu + EDonor)) - Ec) / KbT)) + 1.0)));
}
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
	return fma(Float64(1.0 / Float64(exp(Float64(Float64(Ev + Float64(Vef + Float64(EAccept - mu))) / KbT)) + 1.0)), NaChar, Float64(NdChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(mu + EDonor)) - Ec) / KbT)) + 1.0)))
end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(1.0 / N[(N[Exp[N[(N[(Ev + N[(Vef + N[(EAccept - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * NaChar + N[(NdChar / N[(N[Exp[N[(N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{1}{e^{\frac{Ev + \left(Vef + \left(EAccept - mu\right)\right)}{KbT}} + 1}, NaChar, \frac{NdChar}{e^{\frac{\left(Vef + \left(mu + EDonor\right)\right) - Ec}{KbT}} + 1}\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. Add Preprocessing
  3. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(\mathsf{neg}\left(mu\right)\right)}{KbT}}} + \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}}} \]
    2. clear-numN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(\mathsf{neg}\left(mu\right)\right)}{KbT}}}{NaChar}}} + \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} \]
    3. associate-/r/N/A

      \[\leadsto \color{blue}{\frac{1}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(\mathsf{neg}\left(mu\right)\right)}{KbT}}} \cdot NaChar} + \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} \]
    4. accelerator-lowering-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(\mathsf{neg}\left(mu\right)\right)}{KbT}}}, NaChar, \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}}\right)} \]
  4. Applied egg-rr100.0%

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

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

Alternative 2: 53.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\frac{Vef}{KbT}} + 1\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_2 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_3 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-34}:\\ \;\;\;\;\frac{NdChar}{t\_0} + NaChar \cdot 0.5\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-293}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-70}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{t\_0} + NdChar \cdot 0.5\\ \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 (- EDonor (- Ec Vef))) KbT)) 1.0))
          (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
        (t_2 (+ EDonor (- (+ Vef mu) Ec)))
        (t_3 (/ NdChar (+ (exp (/ mu KbT)) 1.0))))
   (if (<= t_1 -5e-34)
     (+ (/ NdChar t_0) (* NaChar 0.5))
     (if (<= t_1 -1e-293)
       t_3
       (if (<= t_1 0.0)
         (/
          NdChar
          (-
           2.0
           (/
            (fma
             -0.5
             (/ (* t_2 t_2) KbT)
             (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
            KbT)))
         (if (<= t_1 4e-70) t_3 (+ (/ NaChar t_0) (* NdChar 0.5))))))))
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 + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
	double t_2 = EDonor + ((Vef + mu) - Ec);
	double t_3 = NdChar / (exp((mu / KbT)) + 1.0);
	double tmp;
	if (t_1 <= -5e-34) {
		tmp = (NdChar / t_0) + (NaChar * 0.5);
	} else if (t_1 <= -1e-293) {
		tmp = t_3;
	} else if (t_1 <= 0.0) {
		tmp = NdChar / (2.0 - (fma(-0.5, ((t_2 * t_2) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
	} else if (t_1 <= 4e-70) {
		tmp = t_3;
	} else {
		tmp = (NaChar / t_0) + (NdChar * 0.5);
	}
	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(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
	t_2 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
	t_3 = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0))
	tmp = 0.0
	if (t_1 <= -5e-34)
		tmp = Float64(Float64(NdChar / t_0) + Float64(NaChar * 0.5));
	elseif (t_1 <= -1e-293)
		tmp = t_3;
	elseif (t_1 <= 0.0)
		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_2 * t_2) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
	elseif (t_1 <= 4e-70)
		tmp = t_3;
	else
		tmp = Float64(Float64(NaChar / t_0) + Float64(NdChar * 0.5));
	end
	return 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[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-34], N[(N[(NdChar / t$95$0), $MachinePrecision] + N[(NaChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-293], t$95$3, If[LessEqual[t$95$1, 0.0], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$2 * t$95$2), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-70], t$95$3, N[(N[(NaChar / t$95$0), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-293}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-70}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.0000000000000003e-34

    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. Add Preprocessing
    3. Taylor expanded in KbT around inf

      \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \color{blue}{\frac{1}{2} \cdot NaChar} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \color{blue}{NaChar \cdot \frac{1}{2}} \]
      2. *-lowering-*.f6466.4

        \[\leadsto \frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \color{blue}{NaChar \cdot 0.5} \]
    5. Simplified66.4%

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

      \[\leadsto \frac{NdChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} + NaChar \cdot \frac{1}{2} \]
    7. Step-by-step derivation
      1. Simplified51.3%

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

      if -5.0000000000000003e-34 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.0000000000000001e-293 or 0.0 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 3.99999999999999998e-70

      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. Add Preprocessing
      3. Taylor expanded in NdChar around inf

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

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

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

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

          \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
        5. associate--l+N/A

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

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

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

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

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

        \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{mu}{KbT}}}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f6444.0

          \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{mu}{KbT}}}} \]
      8. Simplified44.0%

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

      if -1.0000000000000001e-293 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 0.0

      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. Add Preprocessing
      3. Taylor expanded in NdChar around inf

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

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

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

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

          \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
        5. associate--l+N/A

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

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

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

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

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

        \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
        2. unsub-negN/A

          \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
        3. --lowering--.f64N/A

          \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
      8. Simplified87.1%

        \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
      9. Taylor expanded in EDonor around -inf

        \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
      10. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

          \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
        5. +-commutativeN/A

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

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

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

          \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
        9. +-lowering-+.f6489.0

          \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
      11. Simplified89.0%

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

      if 3.99999999999999998e-70 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT)))))

      1. Initial program 100.0%

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

        \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} \]
      4. Step-by-step derivation
        1. Simplified75.4%

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

          \[\leadsto \color{blue}{\frac{1}{2} \cdot NdChar} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{NdChar \cdot \frac{1}{2}} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
          2. *-lowering-*.f6446.8

            \[\leadsto \color{blue}{NdChar \cdot 0.5} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
        4. Simplified46.8%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{-34}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1} + NaChar \cdot 0.5\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -1 \cdot 10^{-293}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 4 \cdot 10^{-70}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1} + NdChar \cdot 0.5\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 53.6% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1} + NdChar \cdot 0.5\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_2 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_3 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-10}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-293}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-70}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
       :precision binary64
       (let* ((t_0 (+ (/ NaChar (+ (exp (/ Vef KbT)) 1.0)) (* NdChar 0.5)))
              (t_1
               (+
                (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
              (t_2 (+ EDonor (- (+ Vef mu) Ec)))
              (t_3 (/ NdChar (+ (exp (/ mu KbT)) 1.0))))
         (if (<= t_1 -5e-10)
           t_0
           (if (<= t_1 -1e-293)
             t_3
             (if (<= t_1 0.0)
               (/
                NdChar
                (-
                 2.0
                 (/
                  (fma
                   -0.5
                   (/ (* t_2 t_2) KbT)
                   (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
                  KbT)))
               (if (<= t_1 4e-70) t_3 t_0))))))
      double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
      	double t_0 = (NaChar / (exp((Vef / KbT)) + 1.0)) + (NdChar * 0.5);
      	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
      	double t_2 = EDonor + ((Vef + mu) - Ec);
      	double t_3 = NdChar / (exp((mu / KbT)) + 1.0);
      	double tmp;
      	if (t_1 <= -5e-10) {
      		tmp = t_0;
      	} else if (t_1 <= -1e-293) {
      		tmp = t_3;
      	} else if (t_1 <= 0.0) {
      		tmp = NdChar / (2.0 - (fma(-0.5, ((t_2 * t_2) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
      	} else if (t_1 <= 4e-70) {
      		tmp = t_3;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
      	t_0 = Float64(Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)) + Float64(NdChar * 0.5))
      	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
      	t_2 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
      	t_3 = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0))
      	tmp = 0.0
      	if (t_1 <= -5e-10)
      		tmp = t_0;
      	elseif (t_1 <= -1e-293)
      		tmp = t_3;
      	elseif (t_1 <= 0.0)
      		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_2 * t_2) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
      	elseif (t_1 <= 4e-70)
      		tmp = t_3;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-10], t$95$0, If[LessEqual[t$95$1, -1e-293], t$95$3, If[LessEqual[t$95$1, 0.0], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$2 * t$95$2), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-70], t$95$3, t$95$0]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1} + NdChar \cdot 0.5\\
      t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
      t_2 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
      t_3 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-10}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-293}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;t\_1 \leq 0:\\
      \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\
      
      \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-70}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.00000000000000031e-10 or 3.99999999999999998e-70 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
        3. Taylor expanded in Vef around inf

          \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} \]
        4. Step-by-step derivation
          1. Simplified74.4%

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

            \[\leadsto \color{blue}{\frac{1}{2} \cdot NdChar} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{NdChar \cdot \frac{1}{2}} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
            2. *-lowering-*.f6445.3

              \[\leadsto \color{blue}{NdChar \cdot 0.5} + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} \]
          4. Simplified45.3%

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

          if -5.00000000000000031e-10 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.0000000000000001e-293 or 0.0 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 3.99999999999999998e-70

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{mu}{KbT}}}} \]
          7. Step-by-step derivation
            1. /-lowering-/.f6444.3

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{mu}{KbT}}}} \]
          8. Simplified44.3%

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

          if -1.0000000000000001e-293 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 0.0

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
            2. unsub-negN/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            3. --lowering--.f64N/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
          8. Simplified87.1%

            \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
          9. Taylor expanded in EDonor around -inf

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
            5. +-commutativeN/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
            9. +-lowering-+.f6489.0

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
          11. Simplified89.0%

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)}\right)}{KbT}} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification53.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{-10}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1} + NdChar \cdot 0.5\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -1 \cdot 10^{-293}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 4 \cdot 10^{-70}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1} + NdChar \cdot 0.5\\ \end{array} \]
        7. Add Preprocessing

        Alternative 4: 47.9% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_3 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-10}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-285}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-70}:\\ \;\;\;\;t\_3\\ \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 (+ NaChar NdChar)))
                (t_1 (+ EDonor (- (+ Vef mu) Ec)))
                (t_2
                 (+
                  (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                  (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
                (t_3 (/ NdChar (+ (exp (/ mu KbT)) 1.0))))
           (if (<= t_2 -5e-10)
             t_0
             (if (<= t_2 -5e-285)
               t_3
               (if (<= t_2 0.0)
                 (/
                  NdChar
                  (-
                   2.0
                   (/
                    (fma
                     -0.5
                     (/ (* t_1 t_1) KbT)
                     (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
                    KbT)))
                 (if (<= t_2 4e-70) t_3 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 * (NaChar + NdChar);
        	double t_1 = EDonor + ((Vef + mu) - Ec);
        	double t_2 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
        	double t_3 = NdChar / (exp((mu / KbT)) + 1.0);
        	double tmp;
        	if (t_2 <= -5e-10) {
        		tmp = t_0;
        	} else if (t_2 <= -5e-285) {
        		tmp = t_3;
        	} else if (t_2 <= 0.0) {
        		tmp = NdChar / (2.0 - (fma(-0.5, ((t_1 * t_1) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
        	} else if (t_2 <= 4e-70) {
        		tmp = t_3;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
        	t_1 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
        	t_2 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
        	t_3 = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0))
        	tmp = 0.0
        	if (t_2 <= -5e-10)
        		tmp = t_0;
        	elseif (t_2 <= -5e-285)
        		tmp = t_3;
        	elseif (t_2 <= 0.0)
        		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_1 * t_1) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
        	elseif (t_2 <= 4e-70)
        		tmp = t_3;
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-10], t$95$0, If[LessEqual[t$95$2, -5e-285], t$95$3, If[LessEqual[t$95$2, 0.0], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$1 * t$95$1), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e-70], t$95$3, t$95$0]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
        t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
        t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
        t_3 := \frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
        \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-10}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-285}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;t\_2 \leq 0:\\
        \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\
        
        \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-70}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.00000000000000031e-10 or 3.99999999999999998e-70 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
          3. Taylor expanded in KbT around inf

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

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

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
            3. +-lowering-+.f6438.1

              \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
          5. Simplified38.1%

            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

          if -5.00000000000000031e-10 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.00000000000000018e-285 or 0.0 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 3.99999999999999998e-70

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{mu}{KbT}}}} \]
          7. Step-by-step derivation
            1. /-lowering-/.f6444.8

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

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

          if -5.00000000000000018e-285 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 0.0

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
            2. unsub-negN/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            3. --lowering--.f64N/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
          8. Simplified85.6%

            \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
          9. Taylor expanded in EDonor around -inf

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
            5. +-commutativeN/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
            9. +-lowering-+.f6487.5

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
          11. Simplified87.5%

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)}\right)}{KbT}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification50.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{-10}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{-285}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 4 \cdot 10^{-70}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 5: 46.7% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_3 := \frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+134}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-285}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-282}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;t\_2 \leq 10^{-41}:\\ \;\;\;\;t\_3\\ \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 (+ NaChar NdChar)))
                (t_1 (+ EDonor (- (+ Vef mu) Ec)))
                (t_2
                 (+
                  (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                  (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
                (t_3 (/ NdChar (+ (exp (/ EDonor KbT)) 1.0))))
           (if (<= t_2 -5e+134)
             t_0
             (if (<= t_2 -5e-285)
               t_3
               (if (<= t_2 2e-282)
                 (/
                  NdChar
                  (-
                   2.0
                   (/
                    (fma
                     -0.5
                     (/ (* t_1 t_1) KbT)
                     (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
                    KbT)))
                 (if (<= t_2 1e-41) t_3 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 * (NaChar + NdChar);
        	double t_1 = EDonor + ((Vef + mu) - Ec);
        	double t_2 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
        	double t_3 = NdChar / (exp((EDonor / KbT)) + 1.0);
        	double tmp;
        	if (t_2 <= -5e+134) {
        		tmp = t_0;
        	} else if (t_2 <= -5e-285) {
        		tmp = t_3;
        	} else if (t_2 <= 2e-282) {
        		tmp = NdChar / (2.0 - (fma(-0.5, ((t_1 * t_1) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
        	} else if (t_2 <= 1e-41) {
        		tmp = t_3;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
        	t_1 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
        	t_2 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
        	t_3 = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0))
        	tmp = 0.0
        	if (t_2 <= -5e+134)
        		tmp = t_0;
        	elseif (t_2 <= -5e-285)
        		tmp = t_3;
        	elseif (t_2 <= 2e-282)
        		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_1 * t_1) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
        	elseif (t_2 <= 1e-41)
        		tmp = t_3;
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+134], t$95$0, If[LessEqual[t$95$2, -5e-285], t$95$3, If[LessEqual[t$95$2, 2e-282], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$1 * t$95$1), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-41], t$95$3, t$95$0]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
        t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
        t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
        t_3 := \frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
        \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+134}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-285}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-282}:\\
        \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\
        
        \mathbf{elif}\;t\_2 \leq 10^{-41}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -4.99999999999999981e134 or 1.00000000000000001e-41 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT)))))

          1. Initial program 100.0%

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

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

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

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
            3. +-lowering-+.f6439.6

              \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
          5. Simplified39.6%

            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

          if -4.99999999999999981e134 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.00000000000000018e-285 or 2e-282 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 1.00000000000000001e-41

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]
          7. Step-by-step derivation
            1. /-lowering-/.f6436.6

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]
          8. Simplified36.6%

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

          if -5.00000000000000018e-285 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 2e-282

          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. Add Preprocessing
          3. Taylor expanded in NdChar around inf

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
            5. associate--l+N/A

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

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

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

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

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

            \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
            2. unsub-negN/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            3. --lowering--.f64N/A

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
          8. Simplified82.7%

            \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
          9. Taylor expanded in EDonor around -inf

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
            5. +-commutativeN/A

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

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

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

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
            9. +-lowering-+.f6484.5

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
          11. Simplified84.5%

            \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)}\right)}{KbT}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification48.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{+134}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -5 \cdot 10^{-285}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 2 \cdot 10^{-282}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 10^{-41}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 46.2% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_3 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-36}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-308}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{elif}\;t\_2 \leq 10^{+26}:\\ \;\;\;\;t\_3\\ \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 (+ NaChar NdChar)))
                (t_1 (+ EDonor (- (+ Vef mu) Ec)))
                (t_2
                 (+
                  (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                  (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
                (t_3 (/ NaChar (+ (exp (/ Vef KbT)) 1.0))))
           (if (<= t_2 -5e-36)
             t_0
             (if (<= t_2 -2e-308)
               t_3
               (if (<= t_2 0.0)
                 (/
                  NdChar
                  (-
                   2.0
                   (/
                    (fma
                     -0.5
                     (/ (* t_1 t_1) KbT)
                     (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
                    KbT)))
                 (if (<= t_2 1e+26) t_3 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 * (NaChar + NdChar);
        	double t_1 = EDonor + ((Vef + mu) - Ec);
        	double t_2 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
        	double t_3 = NaChar / (exp((Vef / KbT)) + 1.0);
        	double tmp;
        	if (t_2 <= -5e-36) {
        		tmp = t_0;
        	} else if (t_2 <= -2e-308) {
        		tmp = t_3;
        	} else if (t_2 <= 0.0) {
        		tmp = NdChar / (2.0 - (fma(-0.5, ((t_1 * t_1) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
        	} else if (t_2 <= 1e+26) {
        		tmp = t_3;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
        	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
        	t_1 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
        	t_2 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
        	t_3 = Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0))
        	tmp = 0.0
        	if (t_2 <= -5e-36)
        		tmp = t_0;
        	elseif (t_2 <= -2e-308)
        		tmp = t_3;
        	elseif (t_2 <= 0.0)
        		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_1 * t_1) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
        	elseif (t_2 <= 1e+26)
        		tmp = t_3;
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-36], t$95$0, If[LessEqual[t$95$2, -2e-308], t$95$3, If[LessEqual[t$95$2, 0.0], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$1 * t$95$1), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+26], t$95$3, t$95$0]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
        t_1 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
        t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
        t_3 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
        \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-36}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-308}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;t\_2 \leq 0:\\
        \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_1 \cdot t\_1}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\
        
        \mathbf{elif}\;t\_2 \leq 10^{+26}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -5.00000000000000004e-36 or 1.00000000000000005e26 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT)))))

          1. Initial program 100.0%

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

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

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

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
            3. +-lowering-+.f6438.4

              \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
          5. Simplified38.4%

            \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

          if -5.00000000000000004e-36 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.9999999999999998e-308 or 0.0 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 1.00000000000000005e26

          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. Add Preprocessing
          3. Taylor expanded in Vef around inf

            \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} \]
          4. Step-by-step derivation
            1. Simplified54.2%

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

              \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}}} \]
            3. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}}} \]
              2. +-lowering-+.f64N/A

                \[\leadsto \frac{NaChar}{\color{blue}{1 + e^{\frac{Vef}{KbT}}}} \]
              3. exp-lowering-exp.f64N/A

                \[\leadsto \frac{NaChar}{1 + \color{blue}{e^{\frac{Vef}{KbT}}}} \]
              4. /-lowering-/.f6429.8

                \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]
            4. Simplified29.8%

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

            if -1.9999999999999998e-308 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 0.0

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified90.1%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in EDonor around -inf

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
            10. Step-by-step derivation
              1. associate-*r*N/A

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

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
              5. +-commutativeN/A

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

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
              9. +-lowering-+.f6492.1

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
            11. Simplified92.1%

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)}\right)}{KbT}} \]
          5. Recombined 3 regimes into one program.
          6. Final simplification45.9%

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

          Alternative 7: 43.6% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_0 \cdot t\_0}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{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) Ec)))
                  (t_1 (* 0.5 (+ NaChar NdChar)))
                  (t_2
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_2 -1e-171)
               t_1
               (if (<= t_2 5e-145)
                 (/
                  NdChar
                  (-
                   2.0
                   (/
                    (fma
                     -0.5
                     (/ (* t_0 t_0) KbT)
                     (* (- 0.0 EDonor) (fma -1.0 (/ (- Ec (+ Vef mu)) EDonor) 1.0)))
                    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) - Ec);
          	double t_1 = 0.5 * (NaChar + NdChar);
          	double t_2 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_2 <= -1e-171) {
          		tmp = t_1;
          	} else if (t_2 <= 5e-145) {
          		tmp = NdChar / (2.0 - (fma(-0.5, ((t_0 * t_0) / KbT), ((0.0 - EDonor) * fma(-1.0, ((Ec - (Vef + mu)) / EDonor), 1.0))) / KbT));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
          	t_1 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_2 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_2 <= -1e-171)
          		tmp = t_1;
          	elseif (t_2 <= 5e-145)
          		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_0 * t_0) / KbT), Float64(Float64(0.0 - EDonor) * fma(-1.0, Float64(Float64(Ec - Float64(Vef + mu)) / EDonor), 1.0))) / KbT)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-171], t$95$1, If[LessEqual[t$95$2, 5e-145], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$0 * t$95$0), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(0.0 - EDonor), $MachinePrecision] * N[(-1.0 * N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] / EDonor), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
          t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-171}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-145}:\\
          \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_0 \cdot t\_0}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -9.9999999999999998e-172 or 4.9999999999999998e-145 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6433.6

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified33.6%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -9.9999999999999998e-172 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 4.9999999999999998e-145

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified61.4%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in EDonor around -inf

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{-1 \cdot \left(EDonor \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}\right)}{KbT}} \]
            10. Step-by-step derivation
              1. associate-*r*N/A

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

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(\mathsf{neg}\left(EDonor\right)\right)} \cdot \left(1 + -1 \cdot \frac{Ec - \left(Vef + mu\right)}{EDonor}\right)\right)}{KbT}} \]
              5. +-commutativeN/A

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

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(\mathsf{neg}\left(EDonor\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\color{blue}{Ec - \left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
              9. +-lowering-+.f6462.1

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \color{blue}{\left(Vef + mu\right)}}{EDonor}, 1\right)\right)}{KbT}} \]
            11. Simplified62.1%

              \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \color{blue}{\left(-EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)}\right)}{KbT}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification42.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq -1 \cdot 10^{-171}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \mathbf{elif}\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1} \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, \left(0 - EDonor\right) \cdot \mathsf{fma}\left(-1, \frac{Ec - \left(Vef + mu\right)}{EDonor}, 1\right)\right)}{KbT}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(NaChar + NdChar\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 8: 43.6% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\ t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_0 \cdot t\_0}{KbT}, \left(Ec - \left(Vef + mu\right)\right) - EDonor\right)}{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) Ec)))
                  (t_1 (* 0.5 (+ NaChar NdChar)))
                  (t_2
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_2 -1e-171)
               t_1
               (if (<= t_2 5e-145)
                 (/
                  NdChar
                  (-
                   2.0
                   (/ (fma -0.5 (/ (* t_0 t_0) KbT) (- (- Ec (+ Vef mu)) EDonor)) 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) - Ec);
          	double t_1 = 0.5 * (NaChar + NdChar);
          	double t_2 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_2 <= -1e-171) {
          		tmp = t_1;
          	} else if (t_2 <= 5e-145) {
          		tmp = NdChar / (2.0 - (fma(-0.5, ((t_0 * t_0) / KbT), ((Ec - (Vef + mu)) - EDonor)) / KbT));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(EDonor + Float64(Float64(Vef + mu) - Ec))
          	t_1 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_2 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_2 <= -1e-171)
          		tmp = t_1;
          	elseif (t_2 <= 5e-145)
          		tmp = Float64(NdChar / Float64(2.0 - Float64(fma(-0.5, Float64(Float64(t_0 * t_0) / KbT), Float64(Float64(Ec - Float64(Vef + mu)) - EDonor)) / KbT)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-171], t$95$1, If[LessEqual[t$95$2, 5e-145], N[(NdChar / N[(2.0 - N[(N[(-0.5 * N[(N[(t$95$0 * t$95$0), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(Ec - N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := EDonor + \left(\left(Vef + mu\right) - Ec\right)\\
          t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_2 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-171}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-145}:\\
          \;\;\;\;\frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{t\_0 \cdot t\_0}{KbT}, \left(Ec - \left(Vef + mu\right)\right) - EDonor\right)}{KbT}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -9.9999999999999998e-172 or 4.9999999999999998e-145 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6433.6

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified33.6%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -9.9999999999999998e-172 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 4.9999999999999998e-145

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified61.4%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification42.3%

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

          Alternative 9: 42.6% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_2 := Vef + \left(mu - Ec\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{\left(Vef + mu\right) - \mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, Ec\right)}{KbT}}\\ \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 (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0))))
                  (t_1 (* 0.5 (+ NaChar NdChar)))
                  (t_2 (+ Vef (- mu Ec))))
             (if (<= t_0 -1e-171)
               t_1
               (if (<= t_0 5e-145)
                 (/
                  NdChar
                  (+ 2.0 (/ (- (+ Vef mu) (fma -0.5 (/ (* t_2 t_2) KbT) Ec)) 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 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double t_1 = 0.5 * (NaChar + NdChar);
          	double t_2 = Vef + (mu - Ec);
          	double tmp;
          	if (t_0 <= -1e-171) {
          		tmp = t_1;
          	} else if (t_0 <= 5e-145) {
          		tmp = NdChar / (2.0 + (((Vef + mu) - fma(-0.5, ((t_2 * t_2) / KbT), Ec)) / KbT));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	t_1 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_2 = Float64(Vef + Float64(mu - Ec))
          	tmp = 0.0
          	if (t_0 <= -1e-171)
          		tmp = t_1;
          	elseif (t_0 <= 5e-145)
          		tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(Float64(Vef + mu) - fma(-0.5, Float64(Float64(t_2 * t_2) / KbT), Ec)) / KbT)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-171], t$95$1, If[LessEqual[t$95$0, 5e-145], N[(NdChar / N[(2.0 + N[(N[(N[(Vef + mu), $MachinePrecision] - N[(-0.5 * N[(N[(t$95$2 * t$95$2), $MachinePrecision] / KbT), $MachinePrecision] + Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          t_1 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_2 := Vef + \left(mu - Ec\right)\\
          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-171}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-145}:\\
          \;\;\;\;\frac{NdChar}{2 + \frac{\left(Vef + mu\right) - \mathsf{fma}\left(-0.5, \frac{t\_2 \cdot t\_2}{KbT}, Ec\right)}{KbT}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -9.9999999999999998e-172 or 4.9999999999999998e-145 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6433.6

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified33.6%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -9.9999999999999998e-172 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 4.9999999999999998e-145

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified61.4%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in EDonor around 0

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

                \[\leadsto \frac{NdChar}{2 - \frac{\color{blue}{\left(Ec + \frac{-1}{2} \cdot \frac{{\left(\left(Vef + mu\right) - Ec\right)}^{2}}{KbT}\right) - \left(Vef + mu\right)}}{KbT}} \]
              2. +-commutativeN/A

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{{\left(\left(Vef + mu\right) - Ec\right)}^{2}}{KbT}}, Ec\right) - \left(Vef + mu\right)}{KbT}} \]
              5. unpow2N/A

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\left(\left(Vef + mu\right) - Ec\right) \cdot \left(\left(Vef + mu\right) - Ec\right)}}{KbT}, Ec\right) - \left(Vef + mu\right)}{KbT}} \]
              7. associate--l+N/A

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(Vef + \color{blue}{\left(mu - Ec\right)}\right) \cdot \left(\left(Vef + mu\right) - Ec\right)}{KbT}, Ec\right) - \left(Vef + mu\right)}{KbT}} \]
              10. associate--l+N/A

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

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

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(Vef + \left(mu - Ec\right)\right) \cdot \left(Vef + \color{blue}{\left(mu - Ec\right)}\right)}{KbT}, Ec\right) - \left(Vef + mu\right)}{KbT}} \]
              13. +-lowering-+.f6457.5

                \[\leadsto \frac{NdChar}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(Vef + \left(mu - Ec\right)\right) \cdot \left(Vef + \left(mu - Ec\right)\right)}{KbT}, Ec\right) - \color{blue}{\left(Vef + mu\right)}}{KbT}} \]
            11. Simplified57.5%

              \[\leadsto \frac{NdChar}{2 - \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\left(Vef + \left(mu - Ec\right)\right) \cdot \left(Vef + \left(mu - Ec\right)\right)}{KbT}, Ec\right) - \left(Vef + mu\right)}}{KbT}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification41.1%

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

          Alternative 10: 37.9% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-274}:\\ \;\;\;\;\frac{NdChar}{\frac{0.5 \cdot \left(Vef \cdot Vef\right)}{KbT \cdot 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 (+ NaChar NdChar)))
                  (t_1
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_1 -2e-268)
               t_0
               (if (<= t_1 2e-274) (/ NdChar (/ (* 0.5 (* Vef Vef)) (* 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 = 0.5 * (NaChar + NdChar);
          	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 2e-274) {
          		tmp = NdChar / ((0.5 * (Vef * Vef)) / (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) :: tmp
              t_0 = 0.5d0 * (nachar + ndchar)
              t_1 = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((((eaccept + (ev + vef)) - mu) / kbt)) + 1.0d0))
              if (t_1 <= (-2d-268)) then
                  tmp = t_0
              else if (t_1 <= 2d-274) then
                  tmp = ndchar / ((0.5d0 * (vef * vef)) / (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 = 0.5 * (NaChar + NdChar);
          	double t_1 = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 2e-274) {
          		tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = 0.5 * (NaChar + NdChar)
          	t_1 = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0))
          	tmp = 0
          	if t_1 <= -2e-268:
          		tmp = t_0
          	elif t_1 <= 2e-274:
          		tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT))
          	else:
          		tmp = t_0
          	return tmp
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 2e-274)
          		tmp = Float64(NdChar / Float64(Float64(0.5 * Float64(Vef * Vef)) / Float64(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 = 0.5 * (NaChar + NdChar);
          	t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	tmp = 0.0;
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 2e-274)
          		tmp = NdChar / ((0.5 * (Vef * Vef)) / (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[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-268], t$95$0, If[LessEqual[t$95$1, 2e-274], N[(NdChar / N[(N[(0.5 * N[(Vef * Vef), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-274}:\\
          \;\;\;\;\frac{NdChar}{\frac{0.5 \cdot \left(Vef \cdot Vef\right)}{KbT \cdot KbT}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.99999999999999992e-268 or 1.99999999999999993e-274 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6431.9

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified31.9%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -1.99999999999999992e-268 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 1.99999999999999993e-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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified75.3%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in Vef around inf

              \[\leadsto \frac{NdChar}{\color{blue}{\frac{1}{2} \cdot \frac{{Vef}^{2}}{{KbT}^{2}}}} \]
            10. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \frac{NdChar}{\color{blue}{\frac{\frac{1}{2} \cdot {Vef}^{2}}{{KbT}^{2}}}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{\frac{\frac{1}{2} \cdot {Vef}^{2}}{{KbT}^{2}}}} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \frac{NdChar}{\frac{\color{blue}{\frac{1}{2} \cdot {Vef}^{2}}}{{KbT}^{2}}} \]
              4. unpow2N/A

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

                \[\leadsto \frac{NdChar}{\frac{\frac{1}{2} \cdot \color{blue}{\left(Vef \cdot Vef\right)}}{{KbT}^{2}}} \]
              6. unpow2N/A

                \[\leadsto \frac{NdChar}{\frac{\frac{1}{2} \cdot \left(Vef \cdot Vef\right)}{\color{blue}{KbT \cdot KbT}}} \]
              7. *-lowering-*.f6446.7

                \[\leadsto \frac{NdChar}{\frac{0.5 \cdot \left(Vef \cdot Vef\right)}{\color{blue}{KbT \cdot KbT}}} \]
            11. Simplified46.7%

              \[\leadsto \frac{NdChar}{\color{blue}{\frac{0.5 \cdot \left(Vef \cdot Vef\right)}{KbT \cdot KbT}}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification35.4%

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

          Alternative 11: 37.1% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-274}:\\ \;\;\;\;\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Vef \cdot Vef}\\ \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 (+ NaChar NdChar)))
                  (t_1
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_1 -2e-268)
               t_0
               (if (<= t_1 2e-274) (/ (* 2.0 (* NdChar (* KbT KbT))) (* Vef Vef)) 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 2e-274) {
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Vef * Vef);
          	} 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) :: tmp
              t_0 = 0.5d0 * (nachar + ndchar)
              t_1 = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((((eaccept + (ev + vef)) - mu) / kbt)) + 1.0d0))
              if (t_1 <= (-2d-268)) then
                  tmp = t_0
              else if (t_1 <= 2d-274) then
                  tmp = (2.0d0 * (ndchar * (kbt * kbt))) / (vef * vef)
              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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 2e-274) {
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Vef * Vef);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = 0.5 * (NaChar + NdChar)
          	t_1 = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0))
          	tmp = 0
          	if t_1 <= -2e-268:
          		tmp = t_0
          	elif t_1 <= 2e-274:
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Vef * Vef)
          	else:
          		tmp = t_0
          	return tmp
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 2e-274)
          		tmp = Float64(Float64(2.0 * Float64(NdChar * Float64(KbT * KbT))) / Float64(Vef * Vef));
          	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 * (NaChar + NdChar);
          	t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	tmp = 0.0;
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 2e-274)
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Vef * Vef);
          	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[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-268], t$95$0, If[LessEqual[t$95$1, 2e-274], N[(N[(2.0 * N[(NdChar * N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Vef * Vef), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-274}:\\
          \;\;\;\;\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Vef \cdot Vef}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.99999999999999992e-268 or 1.99999999999999993e-274 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6431.9

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified31.9%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -1.99999999999999992e-268 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 1.99999999999999993e-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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified75.3%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in Vef around inf

              \[\leadsto \color{blue}{2 \cdot \frac{{KbT}^{2} \cdot NdChar}{{Vef}^{2}}} \]
            10. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \color{blue}{\frac{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}{{Vef}^{2}}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}{{Vef}^{2}}} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \frac{\color{blue}{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}}{{Vef}^{2}} \]
              4. *-commutativeN/A

                \[\leadsto \frac{2 \cdot \color{blue}{\left(NdChar \cdot {KbT}^{2}\right)}}{{Vef}^{2}} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \frac{2 \cdot \color{blue}{\left(NdChar \cdot {KbT}^{2}\right)}}{{Vef}^{2}} \]
              6. unpow2N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \color{blue}{\left(KbT \cdot KbT\right)}\right)}{{Vef}^{2}} \]
              7. *-lowering-*.f64N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \color{blue}{\left(KbT \cdot KbT\right)}\right)}{{Vef}^{2}} \]
              8. unpow2N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{\color{blue}{Vef \cdot Vef}} \]
              9. *-lowering-*.f6440.2

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{\color{blue}{Vef \cdot Vef}} \]
            11. Simplified40.2%

              \[\leadsto \color{blue}{\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Vef \cdot Vef}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification33.9%

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

          Alternative 12: 35.4% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-293}:\\ \;\;\;\;\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Ec \cdot Ec}\\ \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 (+ NaChar NdChar)))
                  (t_1
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_1 -2e-268)
               t_0
               (if (<= t_1 5e-293) (/ (* 2.0 (* NdChar (* KbT KbT))) (* Ec Ec)) 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 5e-293) {
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Ec * Ec);
          	} 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) :: tmp
              t_0 = 0.5d0 * (nachar + ndchar)
              t_1 = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((((eaccept + (ev + vef)) - mu) / kbt)) + 1.0d0))
              if (t_1 <= (-2d-268)) then
                  tmp = t_0
              else if (t_1 <= 5d-293) then
                  tmp = (2.0d0 * (ndchar * (kbt * kbt))) / (ec * ec)
              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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-268) {
          		tmp = t_0;
          	} else if (t_1 <= 5e-293) {
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Ec * Ec);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = 0.5 * (NaChar + NdChar)
          	t_1 = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0))
          	tmp = 0
          	if t_1 <= -2e-268:
          		tmp = t_0
          	elif t_1 <= 5e-293:
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Ec * Ec)
          	else:
          		tmp = t_0
          	return tmp
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 5e-293)
          		tmp = Float64(Float64(2.0 * Float64(NdChar * Float64(KbT * KbT))) / Float64(Ec * Ec));
          	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 * (NaChar + NdChar);
          	t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	tmp = 0.0;
          	if (t_1 <= -2e-268)
          		tmp = t_0;
          	elseif (t_1 <= 5e-293)
          		tmp = (2.0 * (NdChar * (KbT * KbT))) / (Ec * Ec);
          	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[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-268], t$95$0, If[LessEqual[t$95$1, 5e-293], N[(N[(2.0 * N[(NdChar * N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Ec * Ec), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-268}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-293}:\\
          \;\;\;\;\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Ec \cdot Ec}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.99999999999999992e-268 or 5.0000000000000003e-293 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6431.6

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified31.6%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -1.99999999999999992e-268 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 5.0000000000000003e-293

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{\color{blue}{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}}} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\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)}} \]
              2. unsub-negN/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              3. --lowering--.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 - \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}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{NdChar}{2 - \color{blue}{\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}}} \]
            8. Simplified77.7%

              \[\leadsto \frac{NdChar}{\color{blue}{2 - \frac{\mathsf{fma}\left(-0.5, \frac{\left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right) \cdot \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)}{KbT}, 0 - \left(EDonor + \left(\left(Vef + mu\right) - Ec\right)\right)\right)}{KbT}}} \]
            9. Taylor expanded in Ec around inf

              \[\leadsto \color{blue}{2 \cdot \frac{{KbT}^{2} \cdot NdChar}{{Ec}^{2}}} \]
            10. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \color{blue}{\frac{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}{{Ec}^{2}}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}{{Ec}^{2}}} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \frac{\color{blue}{2 \cdot \left({KbT}^{2} \cdot NdChar\right)}}{{Ec}^{2}} \]
              4. *-commutativeN/A

                \[\leadsto \frac{2 \cdot \color{blue}{\left(NdChar \cdot {KbT}^{2}\right)}}{{Ec}^{2}} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \frac{2 \cdot \color{blue}{\left(NdChar \cdot {KbT}^{2}\right)}}{{Ec}^{2}} \]
              6. unpow2N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \color{blue}{\left(KbT \cdot KbT\right)}\right)}{{Ec}^{2}} \]
              7. *-lowering-*.f64N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \color{blue}{\left(KbT \cdot KbT\right)}\right)}{{Ec}^{2}} \]
              8. unpow2N/A

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{\color{blue}{Ec \cdot Ec}} \]
              9. *-lowering-*.f6435.6

                \[\leadsto \frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{\color{blue}{Ec \cdot Ec}} \]
            11. Simplified35.6%

              \[\leadsto \color{blue}{\frac{2 \cdot \left(NdChar \cdot \left(KbT \cdot KbT\right)\right)}{Ec \cdot Ec}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification32.5%

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

          Alternative 13: 32.1% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-132}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{NdChar}{2 + \frac{EDonor}{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 (+ NaChar NdChar)))
                  (t_1
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_1 -1e-132)
               t_0
               (if (<= t_1 5e-145) (/ NdChar (+ 2.0 (/ EDonor 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -1e-132) {
          		tmp = t_0;
          	} else if (t_1 <= 5e-145) {
          		tmp = NdChar / (2.0 + (EDonor / 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) :: tmp
              t_0 = 0.5d0 * (nachar + ndchar)
              t_1 = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((((eaccept + (ev + vef)) - mu) / kbt)) + 1.0d0))
              if (t_1 <= (-1d-132)) then
                  tmp = t_0
              else if (t_1 <= 5d-145) then
                  tmp = ndchar / (2.0d0 + (edonor / 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -1e-132) {
          		tmp = t_0;
          	} else if (t_1 <= 5e-145) {
          		tmp = NdChar / (2.0 + (EDonor / KbT));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = 0.5 * (NaChar + NdChar)
          	t_1 = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0))
          	tmp = 0
          	if t_1 <= -1e-132:
          		tmp = t_0
          	elif t_1 <= 5e-145:
          		tmp = NdChar / (2.0 + (EDonor / KbT))
          	else:
          		tmp = t_0
          	return tmp
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(0.5 * Float64(NaChar + NdChar))
          	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_1 <= -1e-132)
          		tmp = t_0;
          	elseif (t_1 <= 5e-145)
          		tmp = Float64(NdChar / Float64(2.0 + Float64(EDonor / 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 * (NaChar + NdChar);
          	t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	tmp = 0.0;
          	if (t_1 <= -1e-132)
          		tmp = t_0;
          	elseif (t_1 <= 5e-145)
          		tmp = NdChar / (2.0 + (EDonor / 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[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-132], t$95$0, If[LessEqual[t$95$1, 5e-145], N[(NdChar / N[(2.0 + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-132}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\
          \;\;\;\;\frac{NdChar}{2 + \frac{EDonor}{KbT}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -9.9999999999999999e-133 or 4.9999999999999998e-145 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6434.5

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified34.5%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -9.9999999999999999e-133 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 4.9999999999999998e-145

            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. Add Preprocessing
            3. Taylor expanded in NdChar around inf

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
              5. associate--l+N/A

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

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

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

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

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]
            7. Step-by-step derivation
              1. /-lowering-/.f6440.1

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

              \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]
            9. Taylor expanded in EDonor around 0

              \[\leadsto \frac{NdChar}{\color{blue}{2 + \frac{EDonor}{KbT}}} \]
            10. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \frac{NdChar}{\color{blue}{2 + \frac{EDonor}{KbT}}} \]
              2. /-lowering-/.f6427.6

                \[\leadsto \frac{NdChar}{2 + \color{blue}{\frac{EDonor}{KbT}}} \]
            11. Simplified27.6%

              \[\leadsto \frac{NdChar}{\color{blue}{2 + \frac{EDonor}{KbT}}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification32.2%

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

          Alternative 14: 29.9% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\ t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-308}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 10^{-269}:\\ \;\;\;\;\frac{0.25 \cdot \left(NdChar \cdot 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 (+ NaChar NdChar)))
                  (t_1
                   (+
                    (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                    (/ NaChar (+ (exp (/ (- (+ EAccept (+ Ev Vef)) mu) KbT)) 1.0)))))
             (if (<= t_1 -2e-308)
               t_0
               (if (<= t_1 1e-269) (/ (* 0.25 (* NdChar 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-308) {
          		tmp = t_0;
          	} else if (t_1 <= 1e-269) {
          		tmp = (0.25 * (NdChar * 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) :: t_1
              real(8) :: tmp
              t_0 = 0.5d0 * (nachar + ndchar)
              t_1 = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((((eaccept + (ev + vef)) - mu) / kbt)) + 1.0d0))
              if (t_1 <= (-2d-308)) then
                  tmp = t_0
              else if (t_1 <= 1d-269) then
                  tmp = (0.25d0 * (ndchar * 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 * (NaChar + NdChar);
          	double t_1 = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	double tmp;
          	if (t_1 <= -2e-308) {
          		tmp = t_0;
          	} else if (t_1 <= 1e-269) {
          		tmp = (0.25 * (NdChar * Ec)) / KbT;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = 0.5 * (NaChar + NdChar)
          	t_1 = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0))
          	tmp = 0
          	if t_1 <= -2e-308:
          		tmp = t_0
          	elif t_1 <= 1e-269:
          		tmp = (0.25 * (NdChar * 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(NaChar + NdChar))
          	t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Float64(Ev + Vef)) - mu) / KbT)) + 1.0)))
          	tmp = 0.0
          	if (t_1 <= -2e-308)
          		tmp = t_0;
          	elseif (t_1 <= 1e-269)
          		tmp = Float64(Float64(0.25 * Float64(NdChar * 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 * (NaChar + NdChar);
          	t_1 = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((((EAccept + (Ev + Vef)) - mu) / KbT)) + 1.0));
          	tmp = 0.0;
          	if (t_1 <= -2e-308)
          		tmp = t_0;
          	elseif (t_1 <= 1e-269)
          		tmp = (0.25 * (NdChar * 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[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + N[(Ev + Vef), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-308], t$95$0, If[LessEqual[t$95$1, 1e-269], N[(N[(0.25 * N[(NdChar * Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 0.5 \cdot \left(NaChar + NdChar\right)\\
          t_1 := \frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}} + 1}\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-308}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 10^{-269}:\\
          \;\;\;\;\frac{0.25 \cdot \left(NdChar \cdot Ec\right)}{KbT}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < -1.9999999999999998e-308 or 9.9999999999999996e-270 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) 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. Add Preprocessing
            3. Taylor expanded in KbT around inf

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

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

                \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
              3. +-lowering-+.f6431.0

                \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
            5. Simplified31.0%

              \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

            if -1.9999999999999998e-308 < (+.f64 (/.f64 NdChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (neg.f64 (-.f64 (-.f64 (-.f64 Ec Vef) EDonor) mu)) KbT)))) (/.f64 NaChar (+.f64 #s(literal 1 binary64) (exp.f64 (/.f64 (+.f64 (+.f64 (+.f64 Ev Vef) EAccept) (neg.f64 mu)) KbT))))) < 9.9999999999999996e-270

            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. Add Preprocessing
            3. Taylor expanded in KbT around inf

              \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \color{blue}{\frac{1}{2} \cdot NaChar} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \color{blue}{NaChar \cdot \frac{1}{2}} \]
              2. *-lowering-*.f644.8

                \[\leadsto \frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \color{blue}{NaChar \cdot 0.5} \]
            5. Simplified4.8%

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

              \[\leadsto \color{blue}{\frac{-1}{4} \cdot \frac{NdChar \cdot \left(\left(EDonor + \left(Vef + mu\right)\right) - Ec\right)}{KbT} + \left(\frac{1}{2} \cdot NaChar + \frac{1}{2} \cdot NdChar\right)} \]
            7. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{1}{2}, NaChar + NdChar, \frac{\left(\frac{-1}{4} \cdot NdChar\right) \cdot \left(EDonor + \color{blue}{\left(\left(Vef + mu\right) - Ec\right)}\right)}{KbT}\right) \]
              13. +-lowering-+.f641.9

                \[\leadsto \mathsf{fma}\left(0.5, NaChar + NdChar, \frac{\left(-0.25 \cdot NdChar\right) \cdot \left(EDonor + \left(\color{blue}{\left(Vef + mu\right)} - Ec\right)\right)}{KbT}\right) \]
            8. Simplified1.9%

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

              \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{Ec \cdot NdChar}{KbT}} \]
            10. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \color{blue}{\frac{\frac{1}{4} \cdot \left(Ec \cdot NdChar\right)}{KbT}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{\frac{1}{4} \cdot \left(Ec \cdot NdChar\right)}{KbT}} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \frac{\color{blue}{\frac{1}{4} \cdot \left(Ec \cdot NdChar\right)}}{KbT} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\frac{1}{4} \cdot \color{blue}{\left(NdChar \cdot Ec\right)}}{KbT} \]
              5. *-lowering-*.f6422.8

                \[\leadsto \frac{0.25 \cdot \color{blue}{\left(NdChar \cdot Ec\right)}}{KbT} \]
            11. Simplified22.8%

              \[\leadsto \color{blue}{\frac{0.25 \cdot \left(NdChar \cdot Ec\right)}{KbT}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification29.3%

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

          Alternative 15: 73.2% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{\left(Ev + EAccept\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{if}\;NaChar \leq -1.75 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NaChar \leq 4.4 \cdot 10^{+145}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
           :precision binary64
           (let* ((t_0 (/ NaChar (+ (exp (/ (+ (+ Ev EAccept) (- Vef mu)) KbT)) 1.0))))
             (if (<= NaChar -1.75e+43)
               t_0
               (if (<= NaChar 4.4e+145)
                 (+
                  (/ NdChar (+ (exp (/ (+ mu (- EDonor (- Ec Vef))) KbT)) 1.0))
                  (/ NaChar (+ (exp (/ Vef KbT)) 1.0)))
                 t_0))))
          double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
          	double t_0 = NaChar / (exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
          	double tmp;
          	if (NaChar <= -1.75e+43) {
          		tmp = t_0;
          	} else if (NaChar <= 4.4e+145) {
          		tmp = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
              real(8), intent (in) :: ndchar
              real(8), intent (in) :: ec
              real(8), intent (in) :: vef
              real(8), intent (in) :: edonor
              real(8), intent (in) :: mu
              real(8), intent (in) :: kbt
              real(8), intent (in) :: nachar
              real(8), intent (in) :: ev
              real(8), intent (in) :: eaccept
              real(8) :: t_0
              real(8) :: tmp
              t_0 = nachar / (exp((((ev + eaccept) + (vef - mu)) / kbt)) + 1.0d0)
              if (nachar <= (-1.75d+43)) then
                  tmp = t_0
              else if (nachar <= 4.4d+145) then
                  tmp = (ndchar / (exp(((mu + (edonor - (ec - vef))) / kbt)) + 1.0d0)) + (nachar / (exp((vef / kbt)) + 1.0d0))
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
          	double t_0 = NaChar / (Math.exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
          	double tmp;
          	if (NaChar <= -1.75e+43) {
          		tmp = t_0;
          	} else if (NaChar <= 4.4e+145) {
          		tmp = (NdChar / (Math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (Math.exp((Vef / KbT)) + 1.0));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
          	t_0 = NaChar / (math.exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0)
          	tmp = 0
          	if NaChar <= -1.75e+43:
          		tmp = t_0
          	elif NaChar <= 4.4e+145:
          		tmp = (NdChar / (math.exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (math.exp((Vef / KbT)) + 1.0))
          	else:
          		tmp = t_0
          	return tmp
          
          function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Ev + EAccept) + Float64(Vef - mu)) / KbT)) + 1.0))
          	tmp = 0.0
          	if (NaChar <= -1.75e+43)
          		tmp = t_0;
          	elseif (NaChar <= 4.4e+145)
          		tmp = Float64(Float64(NdChar / Float64(exp(Float64(Float64(mu + Float64(EDonor - Float64(Ec - Vef))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
          	t_0 = NaChar / (exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
          	tmp = 0.0;
          	if (NaChar <= -1.75e+43)
          		tmp = t_0;
          	elseif (NaChar <= 4.4e+145)
          		tmp = (NdChar / (exp(((mu + (EDonor - (Ec - Vef))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0));
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(N[Exp[N[(N[(N[(Ev + EAccept), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -1.75e+43], t$95$0, If[LessEqual[NaChar, 4.4e+145], N[(N[(NdChar / N[(N[Exp[N[(N[(mu + N[(EDonor - N[(Ec - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{NaChar}{e^{\frac{\left(Ev + EAccept\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
          \mathbf{if}\;NaChar \leq -1.75 \cdot 10^{+43}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;NaChar \leq 4.4 \cdot 10^{+145}:\\
          \;\;\;\;\frac{NdChar}{e^{\frac{mu + \left(EDonor - \left(Ec - Vef\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if NaChar < -1.7500000000000001e43 or 4.40000000000000017e145 < 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. Add Preprocessing
            3. Taylor expanded in NdChar around 0

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

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

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

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

                \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
              5. associate--l+N/A

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

                \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(\left(Ev + Vef\right) + \left(\mathsf{neg}\left(mu\right)\right)\right)}}{KbT}}} \]
              7. associate-+r+N/A

                \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)}}{KbT}}} \]
              8. mul-1-negN/A

                \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef + \color{blue}{-1 \cdot mu}\right)\right)}{KbT}}} \]
              9. associate-+r+N/A

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

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

                \[\leadsto \frac{NaChar}{1 + e^{\frac{\color{blue}{\left(EAccept + Ev\right)} + \left(Vef + -1 \cdot mu\right)}{KbT}}} \]
              12. mul-1-negN/A

                \[\leadsto \frac{NaChar}{1 + e^{\frac{\left(EAccept + Ev\right) + \left(Vef + \color{blue}{\left(\mathsf{neg}\left(mu\right)\right)}\right)}{KbT}}} \]
              13. sub-negN/A

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

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

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

            if -1.7500000000000001e43 < NaChar < 4.40000000000000017e145

            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. Add Preprocessing
            3. Taylor expanded in Vef around inf

              \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} \]
            4. Step-by-step derivation
              1. Simplified73.4%

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

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

            Alternative 16: 100.0% accurate, 1.0× speedup?

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

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

            Alternative 17: 68.9% accurate, 1.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{NaChar}{e^{\frac{\left(Ev + EAccept\right) + \left(Vef - mu\right)}{KbT}} + 1}\\ \mathbf{if}\;NaChar \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;NaChar \leq 5.2 \cdot 10^{+67}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(\left(Vef + mu\right) - Ec\right)}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
             :precision binary64
             (let* ((t_0 (/ NaChar (+ (exp (/ (+ (+ Ev EAccept) (- Vef mu)) KbT)) 1.0))))
               (if (<= NaChar -1.85e+62)
                 t_0
                 (if (<= NaChar 5.2e+67)
                   (/ NdChar (+ (exp (/ (+ EDonor (- (+ Vef mu) Ec)) KbT)) 1.0))
                   t_0))))
            double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
            	double t_0 = NaChar / (exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
            	double tmp;
            	if (NaChar <= -1.85e+62) {
            		tmp = t_0;
            	} else if (NaChar <= 5.2e+67) {
            		tmp = NdChar / (exp(((EDonor + ((Vef + mu) - Ec)) / KbT)) + 1.0);
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
                real(8), intent (in) :: ndchar
                real(8), intent (in) :: ec
                real(8), intent (in) :: vef
                real(8), intent (in) :: edonor
                real(8), intent (in) :: mu
                real(8), intent (in) :: kbt
                real(8), intent (in) :: nachar
                real(8), intent (in) :: ev
                real(8), intent (in) :: eaccept
                real(8) :: t_0
                real(8) :: tmp
                t_0 = nachar / (exp((((ev + eaccept) + (vef - mu)) / kbt)) + 1.0d0)
                if (nachar <= (-1.85d+62)) then
                    tmp = t_0
                else if (nachar <= 5.2d+67) then
                    tmp = ndchar / (exp(((edonor + ((vef + mu) - ec)) / kbt)) + 1.0d0)
                else
                    tmp = t_0
                end if
                code = tmp
            end function
            
            public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
            	double t_0 = NaChar / (Math.exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
            	double tmp;
            	if (NaChar <= -1.85e+62) {
            		tmp = t_0;
            	} else if (NaChar <= 5.2e+67) {
            		tmp = NdChar / (Math.exp(((EDonor + ((Vef + mu) - Ec)) / KbT)) + 1.0);
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
            	t_0 = NaChar / (math.exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0)
            	tmp = 0
            	if NaChar <= -1.85e+62:
            		tmp = t_0
            	elif NaChar <= 5.2e+67:
            		tmp = NdChar / (math.exp(((EDonor + ((Vef + mu) - Ec)) / KbT)) + 1.0)
            	else:
            		tmp = t_0
            	return tmp
            
            function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	t_0 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Ev + EAccept) + Float64(Vef - mu)) / KbT)) + 1.0))
            	tmp = 0.0
            	if (NaChar <= -1.85e+62)
            		tmp = t_0;
            	elseif (NaChar <= 5.2e+67)
            		tmp = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Float64(Vef + mu) - Ec)) / KbT)) + 1.0));
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
            	t_0 = NaChar / (exp((((Ev + EAccept) + (Vef - mu)) / KbT)) + 1.0);
            	tmp = 0.0;
            	if (NaChar <= -1.85e+62)
            		tmp = t_0;
            	elseif (NaChar <= 5.2e+67)
            		tmp = NdChar / (exp(((EDonor + ((Vef + mu) - Ec)) / KbT)) + 1.0);
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(N[Exp[N[(N[(N[(Ev + EAccept), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -1.85e+62], t$95$0, If[LessEqual[NaChar, 5.2e+67], N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \frac{NaChar}{e^{\frac{\left(Ev + EAccept\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
            \mathbf{if}\;NaChar \leq -1.85 \cdot 10^{+62}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;NaChar \leq 5.2 \cdot 10^{+67}:\\
            \;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(\left(Vef + mu\right) - Ec\right)}{KbT}} + 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if NaChar < -1.85000000000000007e62 or 5.2000000000000001e67 < 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. Add Preprocessing
              3. Taylor expanded in NdChar around 0

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

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

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

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

                  \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                5. associate--l+N/A

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

                  \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(\left(Ev + Vef\right) + \left(\mathsf{neg}\left(mu\right)\right)\right)}}{KbT}}} \]
                7. associate-+r+N/A

                  \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)}}{KbT}}} \]
                8. mul-1-negN/A

                  \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef + \color{blue}{-1 \cdot mu}\right)\right)}{KbT}}} \]
                9. associate-+r+N/A

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

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

                  \[\leadsto \frac{NaChar}{1 + e^{\frac{\color{blue}{\left(EAccept + Ev\right)} + \left(Vef + -1 \cdot mu\right)}{KbT}}} \]
                12. mul-1-negN/A

                  \[\leadsto \frac{NaChar}{1 + e^{\frac{\left(EAccept + Ev\right) + \left(Vef + \color{blue}{\left(\mathsf{neg}\left(mu\right)\right)}\right)}{KbT}}} \]
                13. sub-negN/A

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

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

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

              if -1.85000000000000007e62 < NaChar < 5.2000000000000001e67

              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. Add Preprocessing
              3. Taylor expanded in NdChar around inf

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

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

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

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

                  \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
                5. associate--l+N/A

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

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

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

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

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

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

            Alternative 18: 41.0% accurate, 1.9× speedup?

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

              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. Add Preprocessing
              3. Taylor expanded in NdChar around inf

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

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

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

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

                  \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
                5. associate--l+N/A

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

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

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

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

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

                \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{EDonor}{KbT}}}} \]
              7. Step-by-step derivation
                1. /-lowering-/.f6450.8

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

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

              if -2.25e61 < EDonor < 1.11999999999999999e-48

              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. Add Preprocessing
              3. Taylor expanded in Vef around inf

                \[\leadsto \frac{NdChar}{1 + e^{\frac{\mathsf{neg}\left(\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\color{blue}{Vef}}{KbT}}} \]
              4. Step-by-step derivation
                1. Simplified67.0%

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

                  \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}}} \]
                3. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \color{blue}{\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}}} \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \frac{NaChar}{\color{blue}{1 + e^{\frac{Vef}{KbT}}}} \]
                  3. exp-lowering-exp.f64N/A

                    \[\leadsto \frac{NaChar}{1 + \color{blue}{e^{\frac{Vef}{KbT}}}} \]
                  4. /-lowering-/.f6442.9

                    \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]
                4. Simplified42.9%

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

                if 1.11999999999999999e-48 < EDonor < 3.9e100

                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. Add Preprocessing
                3. Taylor expanded in NdChar around inf

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

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

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

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

                    \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{\left(EDonor + \left(Vef + mu\right)\right) - Ec}{KbT}}}} \]
                  5. associate--l+N/A

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

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

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

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

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

                  \[\leadsto \frac{NdChar}{1 + e^{\color{blue}{\frac{Vef}{KbT}}}} \]
                7. Step-by-step derivation
                  1. /-lowering-/.f6447.1

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;EDonor \leq -2.25 \cdot 10^{+61}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \mathbf{elif}\;EDonor \leq 1.12 \cdot 10^{-48}:\\ \;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{elif}\;EDonor \leq 3.9 \cdot 10^{+100}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\ \end{array} \]
              7. Add Preprocessing

              Alternative 19: 61.8% accurate, 2.0× speedup?

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

                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. Add Preprocessing
                3. Taylor expanded in KbT around inf

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

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

                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
                  3. +-lowering-+.f6493.7

                    \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
                5. Simplified93.7%

                  \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]

                if -7.79999999999999988e261 < KbT

                1. Initial program 100.0%

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

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

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

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

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

                    \[\leadsto \frac{NaChar}{1 + e^{\color{blue}{\frac{\left(EAccept + \left(Ev + Vef\right)\right) - mu}{KbT}}}} \]
                  5. associate--l+N/A

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

                    \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(\left(Ev + Vef\right) + \left(\mathsf{neg}\left(mu\right)\right)\right)}}{KbT}}} \]
                  7. associate-+r+N/A

                    \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \color{blue}{\left(Ev + \left(Vef + \left(\mathsf{neg}\left(mu\right)\right)\right)\right)}}{KbT}}} \]
                  8. mul-1-negN/A

                    \[\leadsto \frac{NaChar}{1 + e^{\frac{EAccept + \left(Ev + \left(Vef + \color{blue}{-1 \cdot mu}\right)\right)}{KbT}}} \]
                  9. associate-+r+N/A

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

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

                    \[\leadsto \frac{NaChar}{1 + e^{\frac{\color{blue}{\left(EAccept + Ev\right)} + \left(Vef + -1 \cdot mu\right)}{KbT}}} \]
                  12. mul-1-negN/A

                    \[\leadsto \frac{NaChar}{1 + e^{\frac{\left(EAccept + Ev\right) + \left(Vef + \color{blue}{\left(\mathsf{neg}\left(mu\right)\right)}\right)}{KbT}}} \]
                  13. sub-negN/A

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

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

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

              Alternative 20: 21.6% accurate, 15.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;NaChar \leq -5.4 \cdot 10^{-141}:\\ \;\;\;\;NaChar \cdot 0.5\\ \mathbf{elif}\;NaChar \leq 6 \cdot 10^{+132}:\\ \;\;\;\;NdChar \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;NaChar \cdot 0.5\\ \end{array} \end{array} \]
              (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
               :precision binary64
               (if (<= NaChar -5.4e-141)
                 (* NaChar 0.5)
                 (if (<= NaChar 6e+132) (* NdChar 0.5) (* 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 <= -5.4e-141) {
              		tmp = NaChar * 0.5;
              	} else if (NaChar <= 6e+132) {
              		tmp = NdChar * 0.5;
              	} 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 <= (-5.4d-141)) then
                      tmp = nachar * 0.5d0
                  else if (nachar <= 6d+132) then
                      tmp = ndchar * 0.5d0
                  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 <= -5.4e-141) {
              		tmp = NaChar * 0.5;
              	} else if (NaChar <= 6e+132) {
              		tmp = NdChar * 0.5;
              	} else {
              		tmp = NaChar * 0.5;
              	}
              	return tmp;
              }
              
              def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
              	tmp = 0
              	if NaChar <= -5.4e-141:
              		tmp = NaChar * 0.5
              	elif NaChar <= 6e+132:
              		tmp = NdChar * 0.5
              	else:
              		tmp = NaChar * 0.5
              	return tmp
              
              function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
              	tmp = 0.0
              	if (NaChar <= -5.4e-141)
              		tmp = Float64(NaChar * 0.5);
              	elseif (NaChar <= 6e+132)
              		tmp = Float64(NdChar * 0.5);
              	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 <= -5.4e-141)
              		tmp = NaChar * 0.5;
              	elseif (NaChar <= 6e+132)
              		tmp = NdChar * 0.5;
              	else
              		tmp = NaChar * 0.5;
              	end
              	tmp_2 = tmp;
              end
              
              code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[NaChar, -5.4e-141], N[(NaChar * 0.5), $MachinePrecision], If[LessEqual[NaChar, 6e+132], N[(NdChar * 0.5), $MachinePrecision], N[(NaChar * 0.5), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;NaChar \leq -5.4 \cdot 10^{-141}:\\
              \;\;\;\;NaChar \cdot 0.5\\
              
              \mathbf{elif}\;NaChar \leq 6 \cdot 10^{+132}:\\
              \;\;\;\;NdChar \cdot 0.5\\
              
              \mathbf{else}:\\
              \;\;\;\;NaChar \cdot 0.5\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if NaChar < -5.4000000000000005e-141 or 5.9999999999999996e132 < 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. Add Preprocessing
                3. Taylor expanded in KbT around inf

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

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

                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
                  3. +-lowering-+.f6424.9

                    \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
                5. Simplified24.9%

                  \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
                6. Taylor expanded in NaChar around inf

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{NaChar \cdot \frac{1}{2}} \]
                  2. *-lowering-*.f6421.6

                    \[\leadsto \color{blue}{NaChar \cdot 0.5} \]
                8. Simplified21.6%

                  \[\leadsto \color{blue}{NaChar \cdot 0.5} \]

                if -5.4000000000000005e-141 < NaChar < 5.9999999999999996e132

                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. Add Preprocessing
                3. Taylor expanded in KbT around inf

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

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

                    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
                  3. +-lowering-+.f6425.4

                    \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
                5. Simplified25.4%

                  \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
                6. Taylor expanded in NaChar around 0

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot NdChar} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{NdChar \cdot \frac{1}{2}} \]
                  2. *-lowering-*.f6422.2

                    \[\leadsto \color{blue}{NdChar \cdot 0.5} \]
                8. Simplified22.2%

                  \[\leadsto \color{blue}{NdChar \cdot 0.5} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 21: 27.3% accurate, 30.7× speedup?

              \[\begin{array}{l} \\ 0.5 \cdot \left(NaChar + NdChar\right) \end{array} \]
              (FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
               :precision binary64
               (* 0.5 (+ NaChar NdChar)))
              double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
              	return 0.5 * (NaChar + NdChar);
              }
              
              real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
                  real(8), intent (in) :: ndchar
                  real(8), intent (in) :: ec
                  real(8), intent (in) :: vef
                  real(8), intent (in) :: edonor
                  real(8), intent (in) :: mu
                  real(8), intent (in) :: kbt
                  real(8), intent (in) :: nachar
                  real(8), intent (in) :: ev
                  real(8), intent (in) :: eaccept
                  code = 0.5d0 * (nachar + ndchar)
              end function
              
              public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
              	return 0.5 * (NaChar + NdChar);
              }
              
              def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept):
              	return 0.5 * (NaChar + NdChar)
              
              function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
              	return Float64(0.5 * Float64(NaChar + NdChar))
              end
              
              function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept)
              	tmp = 0.5 * (NaChar + NdChar);
              end
              
              code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(0.5 * N[(NaChar + NdChar), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              0.5 \cdot \left(NaChar + NdChar\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. Add Preprocessing
              3. Taylor expanded in KbT around inf

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

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

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
                3. +-lowering-+.f6425.1

                  \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
              5. Simplified25.1%

                \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
              6. Add Preprocessing

              Alternative 22: 18.1% accurate, 46.0× 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. Add Preprocessing
              3. Taylor expanded in KbT around inf

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

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

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(NaChar + NdChar\right)} \]
                3. +-lowering-+.f6425.1

                  \[\leadsto 0.5 \cdot \color{blue}{\left(NaChar + NdChar\right)} \]
              5. Simplified25.1%

                \[\leadsto \color{blue}{0.5 \cdot \left(NaChar + NdChar\right)} \]
              6. Taylor expanded in NaChar around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot NaChar} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{NaChar \cdot \frac{1}{2}} \]
                2. *-lowering-*.f6417.3

                  \[\leadsto \color{blue}{NaChar \cdot 0.5} \]
              8. Simplified17.3%

                \[\leadsto \color{blue}{NaChar \cdot 0.5} \]
              9. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024196 
              (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))))))