
(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:
Herbie found 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))) (/ NaChar (exp (log1p (exp (/ (+ (+ EAccept Ev) (- Vef 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(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / exp(log1p(exp((((EAccept + Ev) + (Vef - mu)) / KbT)))));
}
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(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / Math.exp(Math.log1p(Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / math.exp(math.log1p(math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + Float64(NaChar / exp(log1p(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)))))) end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[Exp[N[Log[1 + N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + \frac{NaChar}{e^{\mathsf{log1p}\left(e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}}\right)}}
\end{array}
Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
div-inv100.0%
add-exp-log100.0%
log1p-udef100.0%
rec-exp100.0%
associate--l+100.0%
associate--l+100.0%
Applied egg-rr100.0%
*-commutative100.0%
exp-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
associate-+r-100.0%
+-commutative100.0%
associate--l+100.0%
associate--l+100.0%
+-commutative100.0%
associate-+r-100.0%
+-commutative100.0%
associate-+r-100.0%
+-commutative100.0%
associate-+l-100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0
(+
(/ NaChar (+ 1.0 (exp (/ Vef KbT))))
(/ NdChar (+ 1.0 (exp (/ (+ Vef (+ mu EDonor)) KbT))))))
(t_1
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(/ NdChar (+ 1.0 (exp (/ mu KbT)))))))
(if (<= Ec -1.65e+100)
(+
(/ NaChar (+ 1.0 (exp (/ EAccept KbT))))
(/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (<= Ec 4.4e-234)
t_1
(if (<= Ec 290000000000.0)
t_0
(if (<= Ec 8.5e+133)
t_1
(if (<= Ec 4.2e+203)
t_0
(+
(/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))
NaChar))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT))));
double t_1 = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT))));
double tmp;
if (Ec <= -1.65e+100) {
tmp = (NaChar / (1.0 + exp((EAccept / KbT)))) + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if (Ec <= 4.4e-234) {
tmp = t_1;
} else if (Ec <= 290000000000.0) {
tmp = t_0;
} else if (Ec <= 8.5e+133) {
tmp = t_1;
} else if (Ec <= 4.2e+203) {
tmp = t_0;
} else {
tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (nachar / (1.0d0 + exp((vef / kbt)))) + (ndchar / (1.0d0 + exp(((vef + (mu + edonor)) / kbt))))
t_1 = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar / (1.0d0 + exp((mu / kbt))))
if (ec <= (-1.65d+100)) then
tmp = (nachar / (1.0d0 + exp((eaccept / kbt)))) + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if (ec <= 4.4d-234) then
tmp = t_1
else if (ec <= 290000000000.0d0) then
tmp = t_0
else if (ec <= 8.5d+133) then
tmp = t_1
else if (ec <= 4.2d+203) then
tmp = t_0
else
tmp = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + nachar
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (NaChar / (1.0 + Math.exp((Vef / KbT)))) + (NdChar / (1.0 + Math.exp(((Vef + (mu + EDonor)) / KbT))));
double t_1 = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + Math.exp((mu / KbT))));
double tmp;
if (Ec <= -1.65e+100) {
tmp = (NaChar / (1.0 + Math.exp((EAccept / KbT)))) + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if (Ec <= 4.4e-234) {
tmp = t_1;
} else if (Ec <= 290000000000.0) {
tmp = t_0;
} else if (Ec <= 8.5e+133) {
tmp = t_1;
} else if (Ec <= 4.2e+203) {
tmp = t_0;
} else {
tmp = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (NaChar / (1.0 + math.exp((Vef / KbT)))) + (NdChar / (1.0 + math.exp(((Vef + (mu + EDonor)) / KbT)))) t_1 = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + math.exp((mu / KbT)))) tmp = 0 if Ec <= -1.65e+100: tmp = (NaChar / (1.0 + math.exp((EAccept / KbT)))) + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif Ec <= 4.4e-234: tmp = t_1 elif Ec <= 290000000000.0: tmp = t_0 elif Ec <= 8.5e+133: tmp = t_1 elif Ec <= 4.2e+203: tmp = t_0 else: tmp = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Vef / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(Vef + Float64(mu + EDonor)) / KbT))))) t_1 = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(mu / KbT))))) tmp = 0.0 if (Ec <= -1.65e+100) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif (Ec <= 4.4e-234) tmp = t_1; elseif (Ec <= 290000000000.0) tmp = t_0; elseif (Ec <= 8.5e+133) tmp = t_1; elseif (Ec <= 4.2e+203) tmp = t_0; else tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + NaChar); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT)))); t_1 = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT)))); tmp = 0.0; if (Ec <= -1.65e+100) tmp = (NaChar / (1.0 + exp((EAccept / KbT)))) + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif (Ec <= 4.4e-234) tmp = t_1; elseif (Ec <= 290000000000.0) tmp = t_0; elseif (Ec <= 8.5e+133) tmp = t_1; elseif (Ec <= 4.2e+203) tmp = t_0; else tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(NaChar / N[(1.0 + N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Ec, -1.65e+100], N[(N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ec, 4.4e-234], t$95$1, If[LessEqual[Ec, 290000000000.0], t$95$0, If[LessEqual[Ec, 8.5e+133], t$95$1, If[LessEqual[Ec, 4.2e+203], t$95$0, N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + NaChar), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} + \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + EDonor\right)}{KbT}}}\\
t_1 := \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + \frac{NdChar}{1 + e^{\frac{mu}{KbT}}}\\
\mathbf{if}\;Ec \leq -1.65 \cdot 10^{+100}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}} + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;Ec \leq 4.4 \cdot 10^{-234}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;Ec \leq 290000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;Ec \leq 8.5 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;Ec \leq 4.2 \cdot 10^{+203}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + NaChar\\
\end{array}
\end{array}
if Ec < -1.6500000000000001e100Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 79.0%
Taylor expanded in Ec around inf 77.0%
mul-1-neg52.4%
distribute-neg-frac52.4%
Simplified77.0%
if -1.6500000000000001e100 < Ec < 4.3999999999999998e-234 or 2.9e11 < Ec < 8.50000000000000044e133Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 78.9%
if 4.3999999999999998e-234 < Ec < 2.9e11 or 8.50000000000000044e133 < Ec < 4.19999999999999967e203Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Vef around inf 77.5%
Taylor expanded in Ec around 0 77.5%
if 4.19999999999999967e203 < Ec Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 39.2%
Taylor expanded in Vef around inf 65.1%
Taylor expanded in Vef around 0 85.4%
Final simplification78.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))
(if (<= Ec -7.4e+147)
(+ t_0 (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (or (<= Ec -5e-216) (and (not (<= Ec 1.2e-225)) (<= Ec 5.4e+200)))
(+ t_0 (/ NdChar (+ 1.0 (exp (/ (+ Vef (+ mu EDonor)) KbT)))))
(+
(/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))
NaChar)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + exp((EAccept / KbT)));
double tmp;
if (Ec <= -7.4e+147) {
tmp = t_0 + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if ((Ec <= -5e-216) || (!(Ec <= 1.2e-225) && (Ec <= 5.4e+200))) {
tmp = t_0 + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT))));
} else {
tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = nachar / (1.0d0 + exp((eaccept / kbt)))
if (ec <= (-7.4d+147)) then
tmp = t_0 + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if ((ec <= (-5d-216)) .or. (.not. (ec <= 1.2d-225)) .and. (ec <= 5.4d+200)) then
tmp = t_0 + (ndchar / (1.0d0 + exp(((vef + (mu + edonor)) / kbt))))
else
tmp = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + nachar
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + Math.exp((EAccept / KbT)));
double tmp;
if (Ec <= -7.4e+147) {
tmp = t_0 + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if ((Ec <= -5e-216) || (!(Ec <= 1.2e-225) && (Ec <= 5.4e+200))) {
tmp = t_0 + (NdChar / (1.0 + Math.exp(((Vef + (mu + EDonor)) / KbT))));
} else {
tmp = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + math.exp((EAccept / KbT))) tmp = 0 if Ec <= -7.4e+147: tmp = t_0 + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif (Ec <= -5e-216) or (not (Ec <= 1.2e-225) and (Ec <= 5.4e+200)): tmp = t_0 + (NdChar / (1.0 + math.exp(((Vef + (mu + EDonor)) / KbT)))) else: tmp = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))) tmp = 0.0 if (Ec <= -7.4e+147) tmp = Float64(t_0 + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif ((Ec <= -5e-216) || (!(Ec <= 1.2e-225) && (Ec <= 5.4e+200))) tmp = Float64(t_0 + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(Vef + Float64(mu + EDonor)) / KbT))))); else tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + NaChar); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + exp((EAccept / KbT))); tmp = 0.0; if (Ec <= -7.4e+147) tmp = t_0 + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif ((Ec <= -5e-216) || (~((Ec <= 1.2e-225)) && (Ec <= 5.4e+200))) tmp = t_0 + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT)))); else tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Ec, -7.4e+147], N[(t$95$0 + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[Ec, -5e-216], And[N[Not[LessEqual[Ec, 1.2e-225]], $MachinePrecision], LessEqual[Ec, 5.4e+200]]], N[(t$95$0 + N[(NdChar / N[(1.0 + N[Exp[N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + NaChar), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{if}\;Ec \leq -7.4 \cdot 10^{+147}:\\
\;\;\;\;t_0 + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;Ec \leq -5 \cdot 10^{-216} \lor \neg \left(Ec \leq 1.2 \cdot 10^{-225}\right) \land Ec \leq 5.4 \cdot 10^{+200}:\\
\;\;\;\;t_0 + \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + EDonor\right)}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + NaChar\\
\end{array}
\end{array}
if Ec < -7.3999999999999999e147Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 75.5%
Taylor expanded in Ec around inf 75.5%
mul-1-neg51.0%
distribute-neg-frac51.0%
Simplified75.5%
if -7.3999999999999999e147 < Ec < -5.00000000000000021e-216 or 1.19999999999999998e-225 < Ec < 5.40000000000000031e200Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 68.3%
Taylor expanded in Ec around 0 67.1%
if -5.00000000000000021e-216 < Ec < 1.19999999999999998e-225 or 5.40000000000000031e200 < Ec Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 35.2%
Taylor expanded in Vef around inf 58.6%
Taylor expanded in Vef around 0 78.8%
Final simplification70.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0
(+
(/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))
(/ NaChar (+ 1.0 (exp (/ EAccept KbT)))))))
(if (<= EAccept -1.7e-49)
t_0
(if (<= EAccept 4.5e-112)
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(/ NdChar (+ 1.0 (exp (/ mu KbT)))))
(if (<= EAccept 7.5e+87)
(+
(/ NaChar (+ 1.0 (exp (/ Vef KbT))))
(/ NdChar (+ 1.0 (exp (/ (+ Vef (+ mu 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 = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + exp((EAccept / KbT))));
double tmp;
if (EAccept <= -1.7e-49) {
tmp = t_0;
} else if (EAccept <= 4.5e-112) {
tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT))));
} else if (EAccept <= 7.5e+87) {
tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + 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) :: tmp
t_0 = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + (nachar / (1.0d0 + exp((eaccept / kbt))))
if (eaccept <= (-1.7d-49)) then
tmp = t_0
else if (eaccept <= 4.5d-112) then
tmp = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar / (1.0d0 + exp((mu / kbt))))
else if (eaccept <= 7.5d+87) then
tmp = (nachar / (1.0d0 + exp((vef / kbt)))) + (ndchar / (1.0d0 + exp(((vef + (mu + 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 = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + Math.exp((EAccept / KbT))));
double tmp;
if (EAccept <= -1.7e-49) {
tmp = t_0;
} else if (EAccept <= 4.5e-112) {
tmp = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + Math.exp((mu / KbT))));
} else if (EAccept <= 7.5e+87) {
tmp = (NaChar / (1.0 + Math.exp((Vef / KbT)))) + (NdChar / (1.0 + Math.exp(((Vef + (mu + EDonor)) / KbT))));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + math.exp((EAccept / KbT)))) tmp = 0 if EAccept <= -1.7e-49: tmp = t_0 elif EAccept <= 4.5e-112: tmp = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + math.exp((mu / KbT)))) elif EAccept <= 7.5e+87: tmp = (NaChar / (1.0 + math.exp((Vef / KbT)))) + (NdChar / (1.0 + math.exp(((Vef + (mu + EDonor)) / KbT)))) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT))))) tmp = 0.0 if (EAccept <= -1.7e-49) tmp = t_0; elseif (EAccept <= 4.5e-112) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(mu / KbT))))); elseif (EAccept <= 7.5e+87) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Vef / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(Vef + Float64(mu + 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 = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + exp((EAccept / KbT)))); tmp = 0.0; if (EAccept <= -1.7e-49) tmp = t_0; elseif (EAccept <= 4.5e-112) tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT)))); elseif (EAccept <= 7.5e+87) tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + 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[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[EAccept, -1.7e-49], t$95$0, If[LessEqual[EAccept, 4.5e-112], N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[EAccept, 7.5e+87], N[(N[(NaChar / N[(1.0 + N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{if}\;EAccept \leq -1.7 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;EAccept \leq 4.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + \frac{NdChar}{1 + e^{\frac{mu}{KbT}}}\\
\mathbf{elif}\;EAccept \leq 7.5 \cdot 10^{+87}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} + \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + EDonor\right)}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if EAccept < -1.70000000000000002e-49 or 7.50000000000000014e87 < EAccept Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 83.9%
if -1.70000000000000002e-49 < EAccept < 4.50000000000000012e-112Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 67.6%
if 4.50000000000000012e-112 < EAccept < 7.50000000000000014e87Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Vef around inf 81.3%
Taylor expanded in Ec around 0 74.1%
Final simplification76.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))))
(if (<= EAccept 3.6e-228)
(+ t_0 (/ NaChar (+ 1.0 (exp (/ Ev KbT)))))
(if (<= EAccept 2.4e-112)
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(/ NdChar (+ 1.0 (exp (/ mu KbT)))))
(if (<= EAccept 7.6e+88)
(+
(/ NaChar (+ 1.0 (exp (/ Vef KbT))))
(/ NdChar (+ 1.0 (exp (/ (+ Vef (+ mu EDonor)) KbT)))))
(+ t_0 (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double tmp;
if (EAccept <= 3.6e-228) {
tmp = t_0 + (NaChar / (1.0 + exp((Ev / KbT))));
} else if (EAccept <= 2.4e-112) {
tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT))));
} else if (EAccept <= 7.6e+88) {
tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT))));
} else {
tmp = t_0 + (NaChar / (1.0 + exp((EAccept / KbT))));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
if (eaccept <= 3.6d-228) then
tmp = t_0 + (nachar / (1.0d0 + exp((ev / kbt))))
else if (eaccept <= 2.4d-112) then
tmp = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar / (1.0d0 + exp((mu / kbt))))
else if (eaccept <= 7.6d+88) then
tmp = (nachar / (1.0d0 + exp((vef / kbt)))) + (ndchar / (1.0d0 + exp(((vef + (mu + edonor)) / kbt))))
else
tmp = t_0 + (nachar / (1.0d0 + exp((eaccept / kbt))))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double tmp;
if (EAccept <= 3.6e-228) {
tmp = t_0 + (NaChar / (1.0 + Math.exp((Ev / KbT))));
} else if (EAccept <= 2.4e-112) {
tmp = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + Math.exp((mu / KbT))));
} else if (EAccept <= 7.6e+88) {
tmp = (NaChar / (1.0 + Math.exp((Vef / KbT)))) + (NdChar / (1.0 + Math.exp(((Vef + (mu + EDonor)) / KbT))));
} else {
tmp = t_0 + (NaChar / (1.0 + Math.exp((EAccept / KbT))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) tmp = 0 if EAccept <= 3.6e-228: tmp = t_0 + (NaChar / (1.0 + math.exp((Ev / KbT)))) elif EAccept <= 2.4e-112: tmp = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + math.exp((mu / KbT)))) elif EAccept <= 7.6e+88: tmp = (NaChar / (1.0 + math.exp((Vef / KbT)))) + (NdChar / (1.0 + math.exp(((Vef + (mu + EDonor)) / KbT)))) else: tmp = t_0 + (NaChar / (1.0 + math.exp((EAccept / KbT)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) tmp = 0.0 if (EAccept <= 3.6e-228) tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + exp(Float64(Ev / KbT))))); elseif (EAccept <= 2.4e-112) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(mu / KbT))))); elseif (EAccept <= 7.6e+88) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Vef / KbT)))) + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(Vef + Float64(mu + EDonor)) / KbT))))); else tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); tmp = 0.0; if (EAccept <= 3.6e-228) tmp = t_0 + (NaChar / (1.0 + exp((Ev / KbT)))); elseif (EAccept <= 2.4e-112) tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar / (1.0 + exp((mu / KbT)))); elseif (EAccept <= 7.6e+88) tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + (NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT)))); else tmp = t_0 + (NaChar / (1.0 + exp((EAccept / KbT)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[EAccept, 3.6e-228], N[(t$95$0 + N[(NaChar / N[(1.0 + N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[EAccept, 2.4e-112], N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[EAccept, 7.6e+88], N[(N[(NaChar / N[(1.0 + N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
\mathbf{if}\;EAccept \leq 3.6 \cdot 10^{-228}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + e^{\frac{Ev}{KbT}}}\\
\mathbf{elif}\;EAccept \leq 2.4 \cdot 10^{-112}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + \frac{NdChar}{1 + e^{\frac{mu}{KbT}}}\\
\mathbf{elif}\;EAccept \leq 7.6 \cdot 10^{+88}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} + \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + EDonor\right)}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\end{array}
\end{array}
if EAccept < 3.6000000000000002e-228Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 74.3%
if 3.6000000000000002e-228 < EAccept < 2.4000000000000001e-112Initial program 99.9%
neg-sub099.9%
associate--r-99.9%
+-commutative99.9%
neg-sub099.9%
sub-neg99.9%
associate--l-99.9%
unsub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in mu around inf 71.7%
if 2.4000000000000001e-112 < EAccept < 7.5999999999999993e88Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Vef around inf 81.3%
Taylor expanded in Ec around 0 74.1%
if 7.5999999999999993e88 < EAccept Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 92.6%
Final simplification77.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))) (/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT))))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}}
\end{array}
Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ Vef (+ mu EDonor)) KbT)))))
(t_1 (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))
(if (<= Ec -3.8e+147)
(+ t_1 (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (<= Ec 2.55e-297)
(+ t_1 t_0)
(if (<= Ec 4.5e+203)
(+ (/ NaChar (+ 1.0 (exp (/ Vef KbT)))) t_0)
(+
(/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))
NaChar))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT)));
double t_1 = NaChar / (1.0 + exp((EAccept / KbT)));
double tmp;
if (Ec <= -3.8e+147) {
tmp = t_1 + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if (Ec <= 2.55e-297) {
tmp = t_1 + t_0;
} else if (Ec <= 4.5e+203) {
tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + t_0;
} else {
tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((vef + (mu + edonor)) / kbt)))
t_1 = nachar / (1.0d0 + exp((eaccept / kbt)))
if (ec <= (-3.8d+147)) then
tmp = t_1 + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if (ec <= 2.55d-297) then
tmp = t_1 + t_0
else if (ec <= 4.5d+203) then
tmp = (nachar / (1.0d0 + exp((vef / kbt)))) + t_0
else
tmp = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + nachar
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((Vef + (mu + EDonor)) / KbT)));
double t_1 = NaChar / (1.0 + Math.exp((EAccept / KbT)));
double tmp;
if (Ec <= -3.8e+147) {
tmp = t_1 + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if (Ec <= 2.55e-297) {
tmp = t_1 + t_0;
} else if (Ec <= 4.5e+203) {
tmp = (NaChar / (1.0 + Math.exp((Vef / KbT)))) + t_0;
} else {
tmp = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((Vef + (mu + EDonor)) / KbT))) t_1 = NaChar / (1.0 + math.exp((EAccept / KbT))) tmp = 0 if Ec <= -3.8e+147: tmp = t_1 + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif Ec <= 2.55e-297: tmp = t_1 + t_0 elif Ec <= 4.5e+203: tmp = (NaChar / (1.0 + math.exp((Vef / KbT)))) + t_0 else: tmp = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(Vef + Float64(mu + EDonor)) / KbT)))) t_1 = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))) tmp = 0.0 if (Ec <= -3.8e+147) tmp = Float64(t_1 + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif (Ec <= 2.55e-297) tmp = Float64(t_1 + t_0); elseif (Ec <= 4.5e+203) tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Vef / KbT)))) + t_0); else tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + NaChar); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((Vef + (mu + EDonor)) / KbT))); t_1 = NaChar / (1.0 + exp((EAccept / KbT))); tmp = 0.0; if (Ec <= -3.8e+147) tmp = t_1 + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif (Ec <= 2.55e-297) tmp = t_1 + t_0; elseif (Ec <= 4.5e+203) tmp = (NaChar / (1.0 + exp((Vef / KbT)))) + t_0; else tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(Vef + N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Ec, -3.8e+147], N[(t$95$1 + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ec, 2.55e-297], N[(t$95$1 + t$95$0), $MachinePrecision], If[LessEqual[Ec, 4.5e+203], N[(N[(NaChar / N[(1.0 + N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + NaChar), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{Vef + \left(mu + EDonor\right)}{KbT}}}\\
t_1 := \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{if}\;Ec \leq -3.8 \cdot 10^{+147}:\\
\;\;\;\;t_1 + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;Ec \leq 2.55 \cdot 10^{-297}:\\
\;\;\;\;t_1 + t_0\\
\mathbf{elif}\;Ec \leq 4.5 \cdot 10^{+203}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Vef}{KbT}}} + t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + NaChar\\
\end{array}
\end{array}
if Ec < -3.7999999999999997e147Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 75.5%
Taylor expanded in Ec around inf 75.5%
mul-1-neg51.0%
distribute-neg-frac51.0%
Simplified75.5%
if -3.7999999999999997e147 < Ec < 2.55000000000000004e-297Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 66.9%
Taylor expanded in Ec around 0 65.7%
if 2.55000000000000004e-297 < Ec < 4.5000000000000003e203Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Vef around inf 75.2%
Taylor expanded in Ec around 0 73.4%
if 4.5000000000000003e203 < Ec Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 39.2%
Taylor expanded in Vef around inf 65.1%
Taylor expanded in Vef around 0 85.4%
Final simplification72.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT))))))
(if (<= EAccept 1.95e-206)
(+ t_0 (/ NaChar (+ 1.0 (exp (/ Ev KbT)))))
(if (<= EAccept 2.4e+93)
(+ t_0 (/ NaChar (+ 1.0 (exp (/ Vef KbT)))))
(+ t_0 (/ NaChar (+ 1.0 (exp (/ EAccept KbT)))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double tmp;
if (EAccept <= 1.95e-206) {
tmp = t_0 + (NaChar / (1.0 + exp((Ev / KbT))));
} else if (EAccept <= 2.4e+93) {
tmp = t_0 + (NaChar / (1.0 + exp((Vef / KbT))));
} else {
tmp = t_0 + (NaChar / (1.0 + exp((EAccept / KbT))));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
if (eaccept <= 1.95d-206) then
tmp = t_0 + (nachar / (1.0d0 + exp((ev / kbt))))
else if (eaccept <= 2.4d+93) then
tmp = t_0 + (nachar / (1.0d0 + exp((vef / kbt))))
else
tmp = t_0 + (nachar / (1.0d0 + exp((eaccept / kbt))))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double tmp;
if (EAccept <= 1.95e-206) {
tmp = t_0 + (NaChar / (1.0 + Math.exp((Ev / KbT))));
} else if (EAccept <= 2.4e+93) {
tmp = t_0 + (NaChar / (1.0 + Math.exp((Vef / KbT))));
} else {
tmp = t_0 + (NaChar / (1.0 + Math.exp((EAccept / KbT))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) tmp = 0 if EAccept <= 1.95e-206: tmp = t_0 + (NaChar / (1.0 + math.exp((Ev / KbT)))) elif EAccept <= 2.4e+93: tmp = t_0 + (NaChar / (1.0 + math.exp((Vef / KbT)))) else: tmp = t_0 + (NaChar / (1.0 + math.exp((EAccept / KbT)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) tmp = 0.0 if (EAccept <= 1.95e-206) tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + exp(Float64(Ev / KbT))))); elseif (EAccept <= 2.4e+93) tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + exp(Float64(Vef / KbT))))); else tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); tmp = 0.0; if (EAccept <= 1.95e-206) tmp = t_0 + (NaChar / (1.0 + exp((Ev / KbT)))); elseif (EAccept <= 2.4e+93) tmp = t_0 + (NaChar / (1.0 + exp((Vef / KbT)))); else tmp = t_0 + (NaChar / (1.0 + exp((EAccept / KbT)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[EAccept, 1.95e-206], N[(t$95$0 + N[(NaChar / N[(1.0 + N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[EAccept, 2.4e+93], N[(t$95$0 + N[(NaChar / N[(1.0 + N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
\mathbf{if}\;EAccept \leq 1.95 \cdot 10^{-206}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + e^{\frac{Ev}{KbT}}}\\
\mathbf{elif}\;EAccept \leq 2.4 \cdot 10^{+93}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + e^{\frac{Vef}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\end{array}
\end{array}
if EAccept < 1.95000000000000004e-206Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 74.4%
if 1.95000000000000004e-206 < EAccept < 2.4000000000000001e93Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Vef around inf 68.7%
if 2.4000000000000001e93 < EAccept Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 92.6%
Final simplification76.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))))
(t_1 (+ 1.0 (/ mu KbT)))
(t_2 (+ t_0 (/ NaChar (+ 1.0 (/ EAccept KbT)))))
(t_3 (/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))))
(if (<= KbT -6.8e+177)
(+ t_3 (* NdChar 0.5))
(if (<= KbT -5.2e-180)
(+
t_0
(/ NaChar (+ (+ (/ Ev KbT) 2.0) (* 0.5 (/ (* Ev Ev) (* KbT KbT))))))
(if (<= KbT 2.25e-287)
(+ t_0 NaChar)
(if (<= KbT 2.1e-212)
t_2
(if (<= KbT 1.95e-168)
(+
t_3
(/ NdChar (+ 1.0 (+ (* 0.5 (/ (* mu mu) (* KbT KbT))) t_1))))
(if (<= KbT 9.5e+164) t_2 (+ t_3 (/ NdChar (+ 1.0 t_1)))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = 1.0 + (mu / KbT);
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -6.8e+177) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -5.2e-180) {
tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT)))));
} else if (KbT <= 2.25e-287) {
tmp = t_0 + NaChar;
} else if (KbT <= 2.1e-212) {
tmp = t_2;
} else if (KbT <= 1.95e-168) {
tmp = t_3 + (NdChar / (1.0 + ((0.5 * ((mu * mu) / (KbT * KbT))) + t_1)));
} else if (KbT <= 9.5e+164) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + t_1));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
t_1 = 1.0d0 + (mu / kbt)
t_2 = t_0 + (nachar / (1.0d0 + (eaccept / kbt)))
t_3 = nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))
if (kbt <= (-6.8d+177)) then
tmp = t_3 + (ndchar * 0.5d0)
else if (kbt <= (-5.2d-180)) then
tmp = t_0 + (nachar / (((ev / kbt) + 2.0d0) + (0.5d0 * ((ev * ev) / (kbt * kbt)))))
else if (kbt <= 2.25d-287) then
tmp = t_0 + nachar
else if (kbt <= 2.1d-212) then
tmp = t_2
else if (kbt <= 1.95d-168) then
tmp = t_3 + (ndchar / (1.0d0 + ((0.5d0 * ((mu * mu) / (kbt * kbt))) + t_1)))
else if (kbt <= 9.5d+164) then
tmp = t_2
else
tmp = t_3 + (ndchar / (1.0d0 + t_1))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = 1.0 + (mu / KbT);
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -6.8e+177) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -5.2e-180) {
tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT)))));
} else if (KbT <= 2.25e-287) {
tmp = t_0 + NaChar;
} else if (KbT <= 2.1e-212) {
tmp = t_2;
} else if (KbT <= 1.95e-168) {
tmp = t_3 + (NdChar / (1.0 + ((0.5 * ((mu * mu) / (KbT * KbT))) + t_1)));
} else if (KbT <= 9.5e+164) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + t_1));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) t_1 = 1.0 + (mu / KbT) t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))) t_3 = NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT))) tmp = 0 if KbT <= -6.8e+177: tmp = t_3 + (NdChar * 0.5) elif KbT <= -5.2e-180: tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT))))) elif KbT <= 2.25e-287: tmp = t_0 + NaChar elif KbT <= 2.1e-212: tmp = t_2 elif KbT <= 1.95e-168: tmp = t_3 + (NdChar / (1.0 + ((0.5 * ((mu * mu) / (KbT * KbT))) + t_1))) elif KbT <= 9.5e+164: tmp = t_2 else: tmp = t_3 + (NdChar / (1.0 + t_1)) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) t_1 = Float64(1.0 + Float64(mu / KbT)) t_2 = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(EAccept / KbT)))) t_3 = Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) tmp = 0.0 if (KbT <= -6.8e+177) tmp = Float64(t_3 + Float64(NdChar * 0.5)); elseif (KbT <= -5.2e-180) tmp = Float64(t_0 + Float64(NaChar / Float64(Float64(Float64(Ev / KbT) + 2.0) + Float64(0.5 * Float64(Float64(Ev * Ev) / Float64(KbT * KbT)))))); elseif (KbT <= 2.25e-287) tmp = Float64(t_0 + NaChar); elseif (KbT <= 2.1e-212) tmp = t_2; elseif (KbT <= 1.95e-168) tmp = Float64(t_3 + Float64(NdChar / Float64(1.0 + Float64(Float64(0.5 * Float64(Float64(mu * mu) / Float64(KbT * KbT))) + t_1)))); elseif (KbT <= 9.5e+164) tmp = t_2; else tmp = Float64(t_3 + Float64(NdChar / Float64(1.0 + t_1))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); t_1 = 1.0 + (mu / KbT); t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))); t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT))); tmp = 0.0; if (KbT <= -6.8e+177) tmp = t_3 + (NdChar * 0.5); elseif (KbT <= -5.2e-180) tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT))))); elseif (KbT <= 2.25e-287) tmp = t_0 + NaChar; elseif (KbT <= 2.1e-212) tmp = t_2; elseif (KbT <= 1.95e-168) tmp = t_3 + (NdChar / (1.0 + ((0.5 * ((mu * mu) / (KbT * KbT))) + t_1))); elseif (KbT <= 9.5e+164) tmp = t_2; else tmp = t_3 + (NdChar / (1.0 + t_1)); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(mu / KbT), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(NaChar / N[(1.0 + N[(EAccept / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -6.8e+177], N[(t$95$3 + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -5.2e-180], N[(t$95$0 + N[(NaChar / N[(N[(N[(Ev / KbT), $MachinePrecision] + 2.0), $MachinePrecision] + N[(0.5 * N[(N[(Ev * Ev), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.25e-287], N[(t$95$0 + NaChar), $MachinePrecision], If[LessEqual[KbT, 2.1e-212], t$95$2, If[LessEqual[KbT, 1.95e-168], N[(t$95$3 + N[(NdChar / N[(1.0 + N[(N[(0.5 * N[(N[(mu * mu), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.5e+164], t$95$2, N[(t$95$3 + N[(NdChar / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
t_1 := 1 + \frac{mu}{KbT}\\
t_2 := t_0 + \frac{NaChar}{1 + \frac{EAccept}{KbT}}\\
t_3 := \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}}\\
\mathbf{if}\;KbT \leq -6.8 \cdot 10^{+177}:\\
\;\;\;\;t_3 + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq -5.2 \cdot 10^{-180}:\\
\;\;\;\;t_0 + \frac{NaChar}{\left(\frac{Ev}{KbT} + 2\right) + 0.5 \cdot \frac{Ev \cdot Ev}{KbT \cdot KbT}}\\
\mathbf{elif}\;KbT \leq 2.25 \cdot 10^{-287}:\\
\;\;\;\;t_0 + NaChar\\
\mathbf{elif}\;KbT \leq 2.1 \cdot 10^{-212}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;KbT \leq 1.95 \cdot 10^{-168}:\\
\;\;\;\;t_3 + \frac{NdChar}{1 + \left(0.5 \cdot \frac{mu \cdot mu}{KbT \cdot KbT} + t_1\right)}\\
\mathbf{elif}\;KbT \leq 9.5 \cdot 10^{+164}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 + \frac{NdChar}{1 + t_1}\\
\end{array}
\end{array}
if KbT < -6.7999999999999996e177Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 85.3%
Taylor expanded in mu around 0 82.7%
if -6.7999999999999996e177 < KbT < -5.1999999999999998e-180Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 65.9%
Taylor expanded in Ev around 0 59.9%
associate-+r+59.9%
unpow259.9%
unpow259.9%
Simplified59.9%
if -5.1999999999999998e-180 < KbT < 2.25000000000000008e-287Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 27.4%
Taylor expanded in Vef around inf 46.9%
Taylor expanded in Vef around 0 76.1%
if 2.25000000000000008e-287 < KbT < 2.1e-212 or 1.95000000000000006e-168 < KbT < 9.49999999999999976e164Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 48.2%
Taylor expanded in EAccept around inf 52.8%
if 2.1e-212 < KbT < 1.95000000000000006e-168Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 87.8%
Taylor expanded in mu around 0 86.3%
associate-+r+86.3%
+-commutative86.3%
unpow286.3%
unpow286.3%
Simplified86.3%
if 9.49999999999999976e164 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 86.9%
Taylor expanded in mu around 0 85.3%
Final simplification65.4%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))))
(t_1 (+ t_0 NaChar))
(t_2 (+ t_0 (/ NaChar (+ 1.0 (/ EAccept KbT)))))
(t_3 (/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))))
(if (<= KbT -3.4e+162)
(+ t_3 (* NdChar 0.5))
(if (<= KbT -1.65e-183)
(+ t_0 (/ NaChar (+ 1.0 (/ Ev KbT))))
(if (<= KbT 7.2e-275)
t_1
(if (<= KbT 5.8e-253)
t_2
(if (<= KbT 2.8e-149)
t_1
(if (<= KbT 2.5e+165)
t_2
(+ t_3 (/ NdChar (+ 1.0 (+ 1.0 (/ mu KbT)))))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -3.4e+162) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -1.65e-183) {
tmp = t_0 + (NaChar / (1.0 + (Ev / KbT)));
} else if (KbT <= 7.2e-275) {
tmp = t_1;
} else if (KbT <= 5.8e-253) {
tmp = t_2;
} else if (KbT <= 2.8e-149) {
tmp = t_1;
} else if (KbT <= 2.5e+165) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT))));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
t_1 = t_0 + nachar
t_2 = t_0 + (nachar / (1.0d0 + (eaccept / kbt)))
t_3 = nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))
if (kbt <= (-3.4d+162)) then
tmp = t_3 + (ndchar * 0.5d0)
else if (kbt <= (-1.65d-183)) then
tmp = t_0 + (nachar / (1.0d0 + (ev / kbt)))
else if (kbt <= 7.2d-275) then
tmp = t_1
else if (kbt <= 5.8d-253) then
tmp = t_2
else if (kbt <= 2.8d-149) then
tmp = t_1
else if (kbt <= 2.5d+165) then
tmp = t_2
else
tmp = t_3 + (ndchar / (1.0d0 + (1.0d0 + (mu / kbt))))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -3.4e+162) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -1.65e-183) {
tmp = t_0 + (NaChar / (1.0 + (Ev / KbT)));
} else if (KbT <= 7.2e-275) {
tmp = t_1;
} else if (KbT <= 5.8e-253) {
tmp = t_2;
} else if (KbT <= 2.8e-149) {
tmp = t_1;
} else if (KbT <= 2.5e+165) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) t_1 = t_0 + NaChar t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))) t_3 = NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT))) tmp = 0 if KbT <= -3.4e+162: tmp = t_3 + (NdChar * 0.5) elif KbT <= -1.65e-183: tmp = t_0 + (NaChar / (1.0 + (Ev / KbT))) elif KbT <= 7.2e-275: tmp = t_1 elif KbT <= 5.8e-253: tmp = t_2 elif KbT <= 2.8e-149: tmp = t_1 elif KbT <= 2.5e+165: tmp = t_2 else: tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) t_1 = Float64(t_0 + NaChar) t_2 = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(EAccept / KbT)))) t_3 = Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) tmp = 0.0 if (KbT <= -3.4e+162) tmp = Float64(t_3 + Float64(NdChar * 0.5)); elseif (KbT <= -1.65e-183) tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(Ev / KbT)))); elseif (KbT <= 7.2e-275) tmp = t_1; elseif (KbT <= 5.8e-253) tmp = t_2; elseif (KbT <= 2.8e-149) tmp = t_1; elseif (KbT <= 2.5e+165) tmp = t_2; else tmp = Float64(t_3 + Float64(NdChar / Float64(1.0 + Float64(1.0 + Float64(mu / KbT))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); t_1 = t_0 + NaChar; t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))); t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT))); tmp = 0.0; if (KbT <= -3.4e+162) tmp = t_3 + (NdChar * 0.5); elseif (KbT <= -1.65e-183) tmp = t_0 + (NaChar / (1.0 + (Ev / KbT))); elseif (KbT <= 7.2e-275) tmp = t_1; elseif (KbT <= 5.8e-253) tmp = t_2; elseif (KbT <= 2.8e-149) tmp = t_1; elseif (KbT <= 2.5e+165) tmp = t_2; else tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + NaChar), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(NaChar / N[(1.0 + N[(EAccept / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.4e+162], N[(t$95$3 + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -1.65e-183], N[(t$95$0 + N[(NaChar / N[(1.0 + N[(Ev / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 7.2e-275], t$95$1, If[LessEqual[KbT, 5.8e-253], t$95$2, If[LessEqual[KbT, 2.8e-149], t$95$1, If[LessEqual[KbT, 2.5e+165], t$95$2, N[(t$95$3 + N[(NdChar / N[(1.0 + N[(1.0 + N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
t_1 := t_0 + NaChar\\
t_2 := t_0 + \frac{NaChar}{1 + \frac{EAccept}{KbT}}\\
t_3 := \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}}\\
\mathbf{if}\;KbT \leq -3.4 \cdot 10^{+162}:\\
\;\;\;\;t_3 + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq -1.65 \cdot 10^{-183}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + \frac{Ev}{KbT}}\\
\mathbf{elif}\;KbT \leq 7.2 \cdot 10^{-275}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 5.8 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;KbT \leq 2.8 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+165}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 + \frac{NdChar}{1 + \left(1 + \frac{mu}{KbT}\right)}\\
\end{array}
\end{array}
if KbT < -3.40000000000000003e162Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 84.3%
Taylor expanded in mu around 0 79.7%
if -3.40000000000000003e162 < KbT < -1.65e-183Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 52.6%
Taylor expanded in Ev around inf 49.3%
if -1.65e-183 < KbT < 7.1999999999999994e-275 or 5.7999999999999996e-253 < KbT < 2.7999999999999999e-149Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 27.9%
Taylor expanded in Vef around inf 42.1%
Taylor expanded in Vef around 0 73.9%
if 7.1999999999999994e-275 < KbT < 5.7999999999999996e-253 or 2.7999999999999999e-149 < KbT < 2.49999999999999985e165Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in EAccept around inf 53.0%
if 2.49999999999999985e165 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 86.9%
Taylor expanded in mu around 0 85.3%
Final simplification62.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))))
(t_1 (+ t_0 NaChar))
(t_2 (+ t_0 (/ NaChar (+ 1.0 (/ EAccept KbT)))))
(t_3 (/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))))
(if (<= KbT -5.8e+177)
(+ t_3 (* NdChar 0.5))
(if (<= KbT -1.35e-178)
(+
t_0
(/ NaChar (+ (+ (/ Ev KbT) 2.0) (* 0.5 (/ (* Ev Ev) (* KbT KbT))))))
(if (<= KbT 9.2e-274)
t_1
(if (<= KbT 3.5e-250)
t_2
(if (<= KbT 3.1e-149)
t_1
(if (<= KbT 8.2e+163)
t_2
(+ t_3 (/ NdChar (+ 1.0 (+ 1.0 (/ mu KbT)))))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -5.8e+177) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -1.35e-178) {
tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT)))));
} else if (KbT <= 9.2e-274) {
tmp = t_1;
} else if (KbT <= 3.5e-250) {
tmp = t_2;
} else if (KbT <= 3.1e-149) {
tmp = t_1;
} else if (KbT <= 8.2e+163) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT))));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
t_1 = t_0 + nachar
t_2 = t_0 + (nachar / (1.0d0 + (eaccept / kbt)))
t_3 = nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))
if (kbt <= (-5.8d+177)) then
tmp = t_3 + (ndchar * 0.5d0)
else if (kbt <= (-1.35d-178)) then
tmp = t_0 + (nachar / (((ev / kbt) + 2.0d0) + (0.5d0 * ((ev * ev) / (kbt * kbt)))))
else if (kbt <= 9.2d-274) then
tmp = t_1
else if (kbt <= 3.5d-250) then
tmp = t_2
else if (kbt <= 3.1d-149) then
tmp = t_1
else if (kbt <= 8.2d+163) then
tmp = t_2
else
tmp = t_3 + (ndchar / (1.0d0 + (1.0d0 + (mu / kbt))))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)));
double tmp;
if (KbT <= -5.8e+177) {
tmp = t_3 + (NdChar * 0.5);
} else if (KbT <= -1.35e-178) {
tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT)))));
} else if (KbT <= 9.2e-274) {
tmp = t_1;
} else if (KbT <= 3.5e-250) {
tmp = t_2;
} else if (KbT <= 3.1e-149) {
tmp = t_1;
} else if (KbT <= 8.2e+163) {
tmp = t_2;
} else {
tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) t_1 = t_0 + NaChar t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))) t_3 = NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT))) tmp = 0 if KbT <= -5.8e+177: tmp = t_3 + (NdChar * 0.5) elif KbT <= -1.35e-178: tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT))))) elif KbT <= 9.2e-274: tmp = t_1 elif KbT <= 3.5e-250: tmp = t_2 elif KbT <= 3.1e-149: tmp = t_1 elif KbT <= 8.2e+163: tmp = t_2 else: tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) t_1 = Float64(t_0 + NaChar) t_2 = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(EAccept / KbT)))) t_3 = Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) tmp = 0.0 if (KbT <= -5.8e+177) tmp = Float64(t_3 + Float64(NdChar * 0.5)); elseif (KbT <= -1.35e-178) tmp = Float64(t_0 + Float64(NaChar / Float64(Float64(Float64(Ev / KbT) + 2.0) + Float64(0.5 * Float64(Float64(Ev * Ev) / Float64(KbT * KbT)))))); elseif (KbT <= 9.2e-274) tmp = t_1; elseif (KbT <= 3.5e-250) tmp = t_2; elseif (KbT <= 3.1e-149) tmp = t_1; elseif (KbT <= 8.2e+163) tmp = t_2; else tmp = Float64(t_3 + Float64(NdChar / Float64(1.0 + Float64(1.0 + Float64(mu / KbT))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); t_1 = t_0 + NaChar; t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))); t_3 = NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT))); tmp = 0.0; if (KbT <= -5.8e+177) tmp = t_3 + (NdChar * 0.5); elseif (KbT <= -1.35e-178) tmp = t_0 + (NaChar / (((Ev / KbT) + 2.0) + (0.5 * ((Ev * Ev) / (KbT * KbT))))); elseif (KbT <= 9.2e-274) tmp = t_1; elseif (KbT <= 3.5e-250) tmp = t_2; elseif (KbT <= 3.1e-149) tmp = t_1; elseif (KbT <= 8.2e+163) tmp = t_2; else tmp = t_3 + (NdChar / (1.0 + (1.0 + (mu / KbT)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + NaChar), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(NaChar / N[(1.0 + N[(EAccept / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -5.8e+177], N[(t$95$3 + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -1.35e-178], N[(t$95$0 + N[(NaChar / N[(N[(N[(Ev / KbT), $MachinePrecision] + 2.0), $MachinePrecision] + N[(0.5 * N[(N[(Ev * Ev), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.2e-274], t$95$1, If[LessEqual[KbT, 3.5e-250], t$95$2, If[LessEqual[KbT, 3.1e-149], t$95$1, If[LessEqual[KbT, 8.2e+163], t$95$2, N[(t$95$3 + N[(NdChar / N[(1.0 + N[(1.0 + N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
t_1 := t_0 + NaChar\\
t_2 := t_0 + \frac{NaChar}{1 + \frac{EAccept}{KbT}}\\
t_3 := \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}}\\
\mathbf{if}\;KbT \leq -5.8 \cdot 10^{+177}:\\
\;\;\;\;t_3 + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq -1.35 \cdot 10^{-178}:\\
\;\;\;\;t_0 + \frac{NaChar}{\left(\frac{Ev}{KbT} + 2\right) + 0.5 \cdot \frac{Ev \cdot Ev}{KbT \cdot KbT}}\\
\mathbf{elif}\;KbT \leq 9.2 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 3.5 \cdot 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;KbT \leq 3.1 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 8.2 \cdot 10^{+163}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 + \frac{NdChar}{1 + \left(1 + \frac{mu}{KbT}\right)}\\
\end{array}
\end{array}
if KbT < -5.80000000000000027e177Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 85.3%
Taylor expanded in mu around 0 82.7%
if -5.80000000000000027e177 < KbT < -1.35000000000000004e-178Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 65.9%
Taylor expanded in Ev around 0 59.9%
associate-+r+59.9%
unpow259.9%
unpow259.9%
Simplified59.9%
if -1.35000000000000004e-178 < KbT < 9.19999999999999984e-274 or 3.4999999999999999e-250 < KbT < 3.09999999999999987e-149Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 29.3%
Taylor expanded in Vef around inf 43.2%
Taylor expanded in Vef around 0 72.5%
if 9.19999999999999984e-274 < KbT < 3.4999999999999999e-250 or 3.09999999999999987e-149 < KbT < 8.1999999999999998e163Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in EAccept around inf 53.0%
if 8.1999999999999998e163 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 86.9%
Taylor expanded in mu around 0 85.3%
Final simplification65.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))))
(t_1 (+ t_0 NaChar))
(t_2 (+ t_0 (/ NaChar (+ 1.0 (/ EAccept KbT)))))
(t_3
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(* NdChar 0.5))))
(if (<= KbT -7.1e+162)
t_3
(if (<= KbT -3.1e-186)
(+ t_0 (/ NaChar (+ 1.0 (/ Ev KbT))))
(if (<= KbT 2e-281)
t_1
(if (<= KbT 1.25e-252)
t_2
(if (<= KbT 3.7e-149) t_1 (if (<= KbT 1.12e+164) t_2 t_3))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5);
double tmp;
if (KbT <= -7.1e+162) {
tmp = t_3;
} else if (KbT <= -3.1e-186) {
tmp = t_0 + (NaChar / (1.0 + (Ev / KbT)));
} else if (KbT <= 2e-281) {
tmp = t_1;
} else if (KbT <= 1.25e-252) {
tmp = t_2;
} else if (KbT <= 3.7e-149) {
tmp = t_1;
} else if (KbT <= 1.12e+164) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
t_1 = t_0 + nachar
t_2 = t_0 + (nachar / (1.0d0 + (eaccept / kbt)))
t_3 = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar * 0.5d0)
if (kbt <= (-7.1d+162)) then
tmp = t_3
else if (kbt <= (-3.1d-186)) then
tmp = t_0 + (nachar / (1.0d0 + (ev / kbt)))
else if (kbt <= 2d-281) then
tmp = t_1
else if (kbt <= 1.25d-252) then
tmp = t_2
else if (kbt <= 3.7d-149) then
tmp = t_1
else if (kbt <= 1.12d+164) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT)));
double t_3 = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5);
double tmp;
if (KbT <= -7.1e+162) {
tmp = t_3;
} else if (KbT <= -3.1e-186) {
tmp = t_0 + (NaChar / (1.0 + (Ev / KbT)));
} else if (KbT <= 2e-281) {
tmp = t_1;
} else if (KbT <= 1.25e-252) {
tmp = t_2;
} else if (KbT <= 3.7e-149) {
tmp = t_1;
} else if (KbT <= 1.12e+164) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) t_1 = t_0 + NaChar t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))) t_3 = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5) tmp = 0 if KbT <= -7.1e+162: tmp = t_3 elif KbT <= -3.1e-186: tmp = t_0 + (NaChar / (1.0 + (Ev / KbT))) elif KbT <= 2e-281: tmp = t_1 elif KbT <= 1.25e-252: tmp = t_2 elif KbT <= 3.7e-149: tmp = t_1 elif KbT <= 1.12e+164: tmp = t_2 else: tmp = t_3 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) t_1 = Float64(t_0 + NaChar) t_2 = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(EAccept / KbT)))) t_3 = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar * 0.5)) tmp = 0.0 if (KbT <= -7.1e+162) tmp = t_3; elseif (KbT <= -3.1e-186) tmp = Float64(t_0 + Float64(NaChar / Float64(1.0 + Float64(Ev / KbT)))); elseif (KbT <= 2e-281) tmp = t_1; elseif (KbT <= 1.25e-252) tmp = t_2; elseif (KbT <= 3.7e-149) tmp = t_1; elseif (KbT <= 1.12e+164) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); t_1 = t_0 + NaChar; t_2 = t_0 + (NaChar / (1.0 + (EAccept / KbT))); t_3 = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5); tmp = 0.0; if (KbT <= -7.1e+162) tmp = t_3; elseif (KbT <= -3.1e-186) tmp = t_0 + (NaChar / (1.0 + (Ev / KbT))); elseif (KbT <= 2e-281) tmp = t_1; elseif (KbT <= 1.25e-252) tmp = t_2; elseif (KbT <= 3.7e-149) tmp = t_1; elseif (KbT <= 1.12e+164) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + NaChar), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(NaChar / N[(1.0 + N[(EAccept / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -7.1e+162], t$95$3, If[LessEqual[KbT, -3.1e-186], N[(t$95$0 + N[(NaChar / N[(1.0 + N[(Ev / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2e-281], t$95$1, If[LessEqual[KbT, 1.25e-252], t$95$2, If[LessEqual[KbT, 3.7e-149], t$95$1, If[LessEqual[KbT, 1.12e+164], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
t_1 := t_0 + NaChar\\
t_2 := t_0 + \frac{NaChar}{1 + \frac{EAccept}{KbT}}\\
t_3 := \frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + NdChar \cdot 0.5\\
\mathbf{if}\;KbT \leq -7.1 \cdot 10^{+162}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;KbT \leq -3.1 \cdot 10^{-186}:\\
\;\;\;\;t_0 + \frac{NaChar}{1 + \frac{Ev}{KbT}}\\
\mathbf{elif}\;KbT \leq 2 \cdot 10^{-281}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 1.25 \cdot 10^{-252}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;KbT \leq 3.7 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq 1.12 \cdot 10^{+164}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if KbT < -7.0999999999999997e162 or 1.12000000000000006e164 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 85.2%
Taylor expanded in mu around 0 81.2%
if -7.0999999999999997e162 < KbT < -3.10000000000000009e-186Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 52.6%
Taylor expanded in Ev around inf 49.3%
if -3.10000000000000009e-186 < KbT < 2e-281 or 1.25000000000000002e-252 < KbT < 3.6999999999999999e-149Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 27.9%
Taylor expanded in Vef around inf 42.1%
Taylor expanded in Vef around 0 73.9%
if 2e-281 < KbT < 1.25000000000000002e-252 or 3.6999999999999999e-149 < KbT < 1.12000000000000006e164Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in EAccept around inf 53.0%
Final simplification62.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))))
(t_1 (+ t_0 NaChar)))
(if (<= NdChar -6.5e-21)
t_1
(if (<= NdChar -1.75e-43)
(- t_0 (/ NaChar (/ mu KbT)))
(if (or (<= NdChar -2.4e-95) (not (<= NdChar 2.1e-119)))
t_1
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(* 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 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double tmp;
if (NdChar <= -6.5e-21) {
tmp = t_1;
} else if (NdChar <= -1.75e-43) {
tmp = t_0 - (NaChar / (mu / KbT));
} else if ((NdChar <= -2.4e-95) || !(NdChar <= 2.1e-119)) {
tmp = t_1;
} else {
tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))
t_1 = t_0 + nachar
if (ndchar <= (-6.5d-21)) then
tmp = t_1
else if (ndchar <= (-1.75d-43)) then
tmp = t_0 - (nachar / (mu / kbt))
else if ((ndchar <= (-2.4d-95)) .or. (.not. (ndchar <= 2.1d-119))) then
tmp = t_1
else
tmp = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar * 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 t_0 = NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)));
double t_1 = t_0 + NaChar;
double tmp;
if (NdChar <= -6.5e-21) {
tmp = t_1;
} else if (NdChar <= -1.75e-43) {
tmp = t_0 - (NaChar / (mu / KbT));
} else if ((NdChar <= -2.4e-95) || !(NdChar <= 2.1e-119)) {
tmp = t_1;
} else {
tmp = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT))) t_1 = t_0 + NaChar tmp = 0 if NdChar <= -6.5e-21: tmp = t_1 elif NdChar <= -1.75e-43: tmp = t_0 - (NaChar / (mu / KbT)) elif (NdChar <= -2.4e-95) or not (NdChar <= 2.1e-119): tmp = t_1 else: tmp = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) t_1 = Float64(t_0 + NaChar) tmp = 0.0 if (NdChar <= -6.5e-21) tmp = t_1; elseif (NdChar <= -1.75e-43) tmp = Float64(t_0 - Float64(NaChar / Float64(mu / KbT))); elseif ((NdChar <= -2.4e-95) || !(NdChar <= 2.1e-119)) tmp = t_1; else tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT))); t_1 = t_0 + NaChar; tmp = 0.0; if (NdChar <= -6.5e-21) tmp = t_1; elseif (NdChar <= -1.75e-43) tmp = t_0 - (NaChar / (mu / KbT)); elseif ((NdChar <= -2.4e-95) || ~((NdChar <= 2.1e-119))) tmp = t_1; else tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + NaChar), $MachinePrecision]}, If[LessEqual[NdChar, -6.5e-21], t$95$1, If[LessEqual[NdChar, -1.75e-43], N[(t$95$0 - N[(NaChar / N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[NdChar, -2.4e-95], N[Not[LessEqual[NdChar, 2.1e-119]], $MachinePrecision]], t$95$1, N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}}\\
t_1 := t_0 + NaChar\\
\mathbf{if}\;NdChar \leq -6.5 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;NdChar \leq -1.75 \cdot 10^{-43}:\\
\;\;\;\;t_0 - \frac{NaChar}{\frac{mu}{KbT}}\\
\mathbf{elif}\;NdChar \leq -2.4 \cdot 10^{-95} \lor \neg \left(NdChar \leq 2.1 \cdot 10^{-119}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + NdChar \cdot 0.5\\
\end{array}
\end{array}
if NdChar < -6.49999999999999987e-21 or -1.74999999999999999e-43 < NdChar < -2.4e-95 or 2.1e-119 < NdChar Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 53.8%
Taylor expanded in Vef around inf 63.6%
Taylor expanded in Vef around 0 68.5%
if -6.49999999999999987e-21 < NdChar < -1.74999999999999999e-43Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 89.2%
Taylor expanded in mu around inf 63.8%
mul-1-neg63.8%
associate-/l*75.3%
Simplified75.3%
if -2.4e-95 < NdChar < 2.1e-119Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 67.7%
Taylor expanded in mu around 0 56.2%
Final simplification64.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(if (or (<= NdChar -2.15e-95) (not (<= NdChar 3.6e-118)))
(+ (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))) NaChar)
(+
(/ NaChar (+ 1.0 (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT))))
(* NdChar 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 ((NdChar <= -2.15e-95) || !(NdChar <= 3.6e-118)) {
tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
} else {
tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 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 ((ndchar <= (-2.15d-95)) .or. (.not. (ndchar <= 3.6d-118))) then
tmp = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + nachar
else
tmp = (nachar / (1.0d0 + exp((((vef + (eaccept + ev)) - mu) / kbt)))) + (ndchar * 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 ((NdChar <= -2.15e-95) || !(NdChar <= 3.6e-118)) {
tmp = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
} else {
tmp = (NaChar / (1.0 + Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if (NdChar <= -2.15e-95) or not (NdChar <= 3.6e-118): tmp = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar else: tmp = (NaChar / (1.0 + math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if ((NdChar <= -2.15e-95) || !(NdChar <= 3.6e-118)) tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + NaChar); else tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)))) + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if ((NdChar <= -2.15e-95) || ~((NdChar <= 3.6e-118))) tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar; else tmp = (NaChar / (1.0 + exp((((Vef + (EAccept + Ev)) - mu) / KbT)))) + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[Or[LessEqual[NdChar, -2.15e-95], N[Not[LessEqual[NdChar, 3.6e-118]], $MachinePrecision]], N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + NaChar), $MachinePrecision], N[(N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NdChar \leq -2.15 \cdot 10^{-95} \lor \neg \left(NdChar \leq 3.6 \cdot 10^{-118}\right):\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + NaChar\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}}} + NdChar \cdot 0.5\\
\end{array}
\end{array}
if NdChar < -2.14999999999999999e-95 or 3.6000000000000002e-118 < NdChar Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 55.4%
Taylor expanded in Vef around inf 63.6%
Taylor expanded in Vef around 0 66.2%
if -2.14999999999999999e-95 < NdChar < 3.6000000000000002e-118Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in mu around inf 67.7%
Taylor expanded in mu around 0 56.2%
Final simplification63.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (or (<= NdChar -7e-234) (not (<= NdChar 1.2e-219))) (+ (/ NdChar (+ 1.0 (exp (/ (+ mu (- (+ Vef EDonor) Ec)) KbT)))) NaChar) (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((NdChar <= -7e-234) || !(NdChar <= 1.2e-219)) {
tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
} else {
tmp = NaChar / (1.0 + exp((EAccept / KbT)));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if ((ndchar <= (-7d-234)) .or. (.not. (ndchar <= 1.2d-219))) then
tmp = (ndchar / (1.0d0 + exp(((mu + ((vef + edonor) - ec)) / kbt)))) + nachar
else
tmp = nachar / (1.0d0 + exp((eaccept / kbt)))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((NdChar <= -7e-234) || !(NdChar <= 1.2e-219)) {
tmp = (NdChar / (1.0 + Math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar;
} else {
tmp = NaChar / (1.0 + Math.exp((EAccept / KbT)));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if (NdChar <= -7e-234) or not (NdChar <= 1.2e-219): tmp = (NdChar / (1.0 + math.exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar else: tmp = NaChar / (1.0 + math.exp((EAccept / KbT))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if ((NdChar <= -7e-234) || !(NdChar <= 1.2e-219)) tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(mu + Float64(Float64(Vef + EDonor) - Ec)) / KbT)))) + NaChar); else tmp = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if ((NdChar <= -7e-234) || ~((NdChar <= 1.2e-219))) tmp = (NdChar / (1.0 + exp(((mu + ((Vef + EDonor) - Ec)) / KbT)))) + NaChar; else tmp = NaChar / (1.0 + exp((EAccept / KbT))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[Or[LessEqual[NdChar, -7e-234], N[Not[LessEqual[NdChar, 1.2e-219]], $MachinePrecision]], N[(N[(NdChar / N[(1.0 + N[Exp[N[(N[(mu + N[(N[(Vef + EDonor), $MachinePrecision] - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + NaChar), $MachinePrecision], N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NdChar \leq -7 \cdot 10^{-234} \lor \neg \left(NdChar \leq 1.2 \cdot 10^{-219}\right):\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{mu + \left(\left(Vef + EDonor\right) - Ec\right)}{KbT}}} + NaChar\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\end{array}
\end{array}
if NdChar < -7.0000000000000003e-234 or 1.20000000000000007e-219 < NdChar Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 50.2%
Taylor expanded in Vef around inf 57.8%
Taylor expanded in Vef around 0 61.8%
if -7.0000000000000003e-234 < NdChar < 1.20000000000000007e-219Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 70.0%
Taylor expanded in NdChar around 0 56.1%
Final simplification61.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (exp (/ EAccept KbT)))))
(t_1 (+ t_0 (* NdChar 0.5))))
(if (<= KbT -2.2e+158)
t_1
(if (<= KbT -8.6e-160)
(+ NaChar (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (<= KbT 2.8e+56) t_0 t_1)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + exp((EAccept / KbT)));
double t_1 = t_0 + (NdChar * 0.5);
double tmp;
if (KbT <= -2.2e+158) {
tmp = t_1;
} else if (KbT <= -8.6e-160) {
tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if (KbT <= 2.8e+56) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = nachar / (1.0d0 + exp((eaccept / kbt)))
t_1 = t_0 + (ndchar * 0.5d0)
if (kbt <= (-2.2d+158)) then
tmp = t_1
else if (kbt <= (-8.6d-160)) then
tmp = nachar + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if (kbt <= 2.8d+56) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + Math.exp((EAccept / KbT)));
double t_1 = t_0 + (NdChar * 0.5);
double tmp;
if (KbT <= -2.2e+158) {
tmp = t_1;
} else if (KbT <= -8.6e-160) {
tmp = NaChar + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if (KbT <= 2.8e+56) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + math.exp((EAccept / KbT))) t_1 = t_0 + (NdChar * 0.5) tmp = 0 if KbT <= -2.2e+158: tmp = t_1 elif KbT <= -8.6e-160: tmp = NaChar + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif KbT <= 2.8e+56: tmp = t_0 else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))) t_1 = Float64(t_0 + Float64(NdChar * 0.5)) tmp = 0.0 if (KbT <= -2.2e+158) tmp = t_1; elseif (KbT <= -8.6e-160) tmp = Float64(NaChar + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif (KbT <= 2.8e+56) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + exp((EAccept / KbT))); t_1 = t_0 + (NdChar * 0.5); tmp = 0.0; if (KbT <= -2.2e+158) tmp = t_1; elseif (KbT <= -8.6e-160) tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif (KbT <= 2.8e+56) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.2e+158], t$95$1, If[LessEqual[KbT, -8.6e-160], N[(NaChar + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.8e+56], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
t_1 := t_0 + NdChar \cdot 0.5\\
\mathbf{if}\;KbT \leq -2.2 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq -8.6 \cdot 10^{-160}:\\
\;\;\;\;NaChar + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;KbT \leq 2.8 \cdot 10^{+56}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if KbT < -2.2000000000000001e158 or 2.80000000000000008e56 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 76.9%
Taylor expanded in KbT around inf 60.2%
if -2.2000000000000001e158 < KbT < -8.60000000000000028e-160Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 49.6%
Taylor expanded in Vef around inf 61.1%
Taylor expanded in Ec around inf 41.9%
mul-1-neg41.9%
distribute-neg-frac41.9%
Simplified41.9%
Taylor expanded in Vef around 0 41.5%
if -8.60000000000000028e-160 < KbT < 2.80000000000000008e56Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 66.7%
Taylor expanded in NdChar around 0 44.4%
Final simplification48.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))
(if (<= KbT -2.8e+161)
(+ t_0 (* NdChar 0.5))
(if (<= KbT -9.5e-160)
(+ NaChar (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (<= KbT 3.6e+40)
t_0
(+ (/ NaChar (+ 1.0 (exp (/ Ev KbT)))) (* 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 = NaChar / (1.0 + exp((EAccept / KbT)));
double tmp;
if (KbT <= -2.8e+161) {
tmp = t_0 + (NdChar * 0.5);
} else if (KbT <= -9.5e-160) {
tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if (KbT <= 3.6e+40) {
tmp = t_0;
} else {
tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 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) :: t_0
real(8) :: tmp
t_0 = nachar / (1.0d0 + exp((eaccept / kbt)))
if (kbt <= (-2.8d+161)) then
tmp = t_0 + (ndchar * 0.5d0)
else if (kbt <= (-9.5d-160)) then
tmp = nachar + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if (kbt <= 3.6d+40) then
tmp = t_0
else
tmp = (nachar / (1.0d0 + exp((ev / kbt)))) + (ndchar * 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 t_0 = NaChar / (1.0 + Math.exp((EAccept / KbT)));
double tmp;
if (KbT <= -2.8e+161) {
tmp = t_0 + (NdChar * 0.5);
} else if (KbT <= -9.5e-160) {
tmp = NaChar + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if (KbT <= 3.6e+40) {
tmp = t_0;
} else {
tmp = (NaChar / (1.0 + Math.exp((Ev / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + math.exp((EAccept / KbT))) tmp = 0 if KbT <= -2.8e+161: tmp = t_0 + (NdChar * 0.5) elif KbT <= -9.5e-160: tmp = NaChar + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif KbT <= 3.6e+40: tmp = t_0 else: tmp = (NaChar / (1.0 + math.exp((Ev / KbT)))) + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))) tmp = 0.0 if (KbT <= -2.8e+161) tmp = Float64(t_0 + Float64(NdChar * 0.5)); elseif (KbT <= -9.5e-160) tmp = Float64(NaChar + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif (KbT <= 3.6e+40) tmp = t_0; else tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Ev / KbT)))) + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + exp((EAccept / KbT))); tmp = 0.0; if (KbT <= -2.8e+161) tmp = t_0 + (NdChar * 0.5); elseif (KbT <= -9.5e-160) tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif (KbT <= 3.6e+40) tmp = t_0; else tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.8e+161], N[(t$95$0 + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -9.5e-160], N[(NaChar + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.6e+40], t$95$0, N[(N[(NaChar / N[(1.0 + N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{if}\;KbT \leq -2.8 \cdot 10^{+161}:\\
\;\;\;\;t_0 + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq -9.5 \cdot 10^{-160}:\\
\;\;\;\;NaChar + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;KbT \leq 3.6 \cdot 10^{+40}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Ev}{KbT}}} + NdChar \cdot 0.5\\
\end{array}
\end{array}
if KbT < -2.80000000000000021e161Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 85.9%
Taylor expanded in KbT around inf 70.6%
if -2.80000000000000021e161 < KbT < -9.5000000000000002e-160Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 49.6%
Taylor expanded in Vef around inf 61.1%
Taylor expanded in Ec around inf 41.9%
mul-1-neg41.9%
distribute-neg-frac41.9%
Simplified41.9%
Taylor expanded in Vef around 0 41.5%
if -9.5000000000000002e-160 < KbT < 3.59999999999999996e40Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 68.1%
Taylor expanded in NdChar around 0 45.2%
if 3.59999999999999996e40 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 72.6%
Taylor expanded in KbT around inf 57.5%
Final simplification50.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(if (<= KbT -7.5e+151)
(+ (* NaChar 0.5) (/ NdChar (+ 1.0 (exp (/ EDonor KbT)))))
(if (<= KbT -9e-160)
(+ NaChar (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))))
(if (<= KbT 2.5e+40)
(/ NaChar (+ 1.0 (exp (/ EAccept KbT))))
(+ (/ NaChar (+ 1.0 (exp (/ Ev KbT)))) (* NdChar 0.5))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -7.5e+151) {
tmp = (NaChar * 0.5) + (NdChar / (1.0 + exp((EDonor / KbT))));
} else if (KbT <= -9e-160) {
tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT))));
} else if (KbT <= 2.5e+40) {
tmp = NaChar / (1.0 + exp((EAccept / KbT)));
} else {
tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (kbt <= (-7.5d+151)) then
tmp = (nachar * 0.5d0) + (ndchar / (1.0d0 + exp((edonor / kbt))))
else if (kbt <= (-9d-160)) then
tmp = nachar + (ndchar / (1.0d0 + exp((-ec / kbt))))
else if (kbt <= 2.5d+40) then
tmp = nachar / (1.0d0 + exp((eaccept / kbt)))
else
tmp = (nachar / (1.0d0 + exp((ev / kbt)))) + (ndchar * 0.5d0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -7.5e+151) {
tmp = (NaChar * 0.5) + (NdChar / (1.0 + Math.exp((EDonor / KbT))));
} else if (KbT <= -9e-160) {
tmp = NaChar + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else if (KbT <= 2.5e+40) {
tmp = NaChar / (1.0 + Math.exp((EAccept / KbT)));
} else {
tmp = (NaChar / (1.0 + Math.exp((Ev / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if KbT <= -7.5e+151: tmp = (NaChar * 0.5) + (NdChar / (1.0 + math.exp((EDonor / KbT)))) elif KbT <= -9e-160: tmp = NaChar + (NdChar / (1.0 + math.exp((-Ec / KbT)))) elif KbT <= 2.5e+40: tmp = NaChar / (1.0 + math.exp((EAccept / KbT))) else: tmp = (NaChar / (1.0 + math.exp((Ev / KbT)))) + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (KbT <= -7.5e+151) tmp = Float64(Float64(NaChar * 0.5) + Float64(NdChar / Float64(1.0 + exp(Float64(EDonor / KbT))))); elseif (KbT <= -9e-160) tmp = Float64(NaChar + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); elseif (KbT <= 2.5e+40) tmp = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))); else tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Ev / KbT)))) + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (KbT <= -7.5e+151) tmp = (NaChar * 0.5) + (NdChar / (1.0 + exp((EDonor / KbT)))); elseif (KbT <= -9e-160) tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT)))); elseif (KbT <= 2.5e+40) tmp = NaChar / (1.0 + exp((EAccept / KbT))); else tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -7.5e+151], N[(N[(NaChar * 0.5), $MachinePrecision] + N[(NdChar / N[(1.0 + N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -9e-160], N[(NaChar + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.5e+40], N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(NaChar / N[(1.0 + N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;KbT \leq -7.5 \cdot 10^{+151}:\\
\;\;\;\;NaChar \cdot 0.5 + \frac{NdChar}{1 + e^{\frac{EDonor}{KbT}}}\\
\mathbf{elif}\;KbT \leq -9 \cdot 10^{-160}:\\
\;\;\;\;NaChar + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Ev}{KbT}}} + NdChar \cdot 0.5\\
\end{array}
\end{array}
if KbT < -7.49999999999999977e151Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 80.0%
Taylor expanded in EDonor around inf 71.6%
if -7.49999999999999977e151 < KbT < -9.00000000000000053e-160Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.9%
Taylor expanded in Vef around inf 59.8%
Taylor expanded in Ec around inf 41.3%
mul-1-neg41.3%
distribute-neg-frac41.3%
Simplified41.3%
Taylor expanded in Vef around 0 40.9%
if -9.00000000000000053e-160 < KbT < 2.50000000000000002e40Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 68.1%
Taylor expanded in NdChar around 0 45.2%
if 2.50000000000000002e40 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 72.6%
Taylor expanded in KbT around inf 57.5%
Final simplification50.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(if (<= KbT -8e+109)
(+ (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT)))) (* NaChar 0.5))
(if (<= KbT 1.1e+41)
(/ NaChar (+ 1.0 (exp (/ EAccept KbT))))
(+ (/ NaChar (+ 1.0 (exp (/ Ev KbT)))) (* NdChar 0.5)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -8e+109) {
tmp = (NdChar / (1.0 + exp((-Ec / KbT)))) + (NaChar * 0.5);
} else if (KbT <= 1.1e+41) {
tmp = NaChar / (1.0 + exp((EAccept / KbT)));
} else {
tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (kbt <= (-8d+109)) then
tmp = (ndchar / (1.0d0 + exp((-ec / kbt)))) + (nachar * 0.5d0)
else if (kbt <= 1.1d+41) then
tmp = nachar / (1.0d0 + exp((eaccept / kbt)))
else
tmp = (nachar / (1.0d0 + exp((ev / kbt)))) + (ndchar * 0.5d0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -8e+109) {
tmp = (NdChar / (1.0 + Math.exp((-Ec / KbT)))) + (NaChar * 0.5);
} else if (KbT <= 1.1e+41) {
tmp = NaChar / (1.0 + Math.exp((EAccept / KbT)));
} else {
tmp = (NaChar / (1.0 + Math.exp((Ev / KbT)))) + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if KbT <= -8e+109: tmp = (NdChar / (1.0 + math.exp((-Ec / KbT)))) + (NaChar * 0.5) elif KbT <= 1.1e+41: tmp = NaChar / (1.0 + math.exp((EAccept / KbT))) else: tmp = (NaChar / (1.0 + math.exp((Ev / KbT)))) + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (KbT <= -8e+109) tmp = Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT)))) + Float64(NaChar * 0.5)); elseif (KbT <= 1.1e+41) tmp = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))); else tmp = Float64(Float64(NaChar / Float64(1.0 + exp(Float64(Ev / KbT)))) + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (KbT <= -8e+109) tmp = (NdChar / (1.0 + exp((-Ec / KbT)))) + (NaChar * 0.5); elseif (KbT <= 1.1e+41) tmp = NaChar / (1.0 + exp((EAccept / KbT))); else tmp = (NaChar / (1.0 + exp((Ev / KbT)))) + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -8e+109], N[(N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.1e+41], N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(NaChar / N[(1.0 + N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;KbT \leq -8 \cdot 10^{+109}:\\
\;\;\;\;\frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}} + NaChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 1.1 \cdot 10^{+41}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{Ev}{KbT}}} + NdChar \cdot 0.5\\
\end{array}
\end{array}
if KbT < -7.99999999999999985e109Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 72.8%
Taylor expanded in Ec around inf 64.0%
mul-1-neg50.9%
distribute-neg-frac50.9%
Simplified64.0%
if -7.99999999999999985e109 < KbT < 1.09999999999999995e41Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 66.9%
Taylor expanded in NdChar around 0 41.3%
if 1.09999999999999995e41 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in Ev around inf 72.6%
Taylor expanded in KbT around inf 57.5%
Final simplification48.4%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (or (<= NdChar -7e+176) (not (<= NdChar 2.8e-90))) (+ NaChar (/ NdChar (+ 1.0 (exp (/ (- Ec) KbT))))) (/ NaChar (+ 1.0 (exp (/ EAccept KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((NdChar <= -7e+176) || !(NdChar <= 2.8e-90)) {
tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT))));
} else {
tmp = NaChar / (1.0 + exp((EAccept / KbT)));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if ((ndchar <= (-7d+176)) .or. (.not. (ndchar <= 2.8d-90))) then
tmp = nachar + (ndchar / (1.0d0 + exp((-ec / kbt))))
else
tmp = nachar / (1.0d0 + exp((eaccept / kbt)))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((NdChar <= -7e+176) || !(NdChar <= 2.8e-90)) {
tmp = NaChar + (NdChar / (1.0 + Math.exp((-Ec / KbT))));
} else {
tmp = NaChar / (1.0 + Math.exp((EAccept / KbT)));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if (NdChar <= -7e+176) or not (NdChar <= 2.8e-90): tmp = NaChar + (NdChar / (1.0 + math.exp((-Ec / KbT)))) else: tmp = NaChar / (1.0 + math.exp((EAccept / KbT))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if ((NdChar <= -7e+176) || !(NdChar <= 2.8e-90)) tmp = Float64(NaChar + Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Ec) / KbT))))); else tmp = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if ((NdChar <= -7e+176) || ~((NdChar <= 2.8e-90))) tmp = NaChar + (NdChar / (1.0 + exp((-Ec / KbT)))); else tmp = NaChar / (1.0 + exp((EAccept / KbT))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[Or[LessEqual[NdChar, -7e+176], N[Not[LessEqual[NdChar, 2.8e-90]], $MachinePrecision]], N[(NaChar + N[(NdChar / N[(1.0 + N[Exp[N[((-Ec) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NdChar \leq -7 \cdot 10^{+176} \lor \neg \left(NdChar \leq 2.8 \cdot 10^{-90}\right):\\
\;\;\;\;NaChar + \frac{NdChar}{1 + e^{\frac{-Ec}{KbT}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\end{array}
\end{array}
if NdChar < -7.00000000000000005e176 or 2.7999999999999999e-90 < NdChar Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 58.4%
Taylor expanded in Vef around inf 66.5%
Taylor expanded in Ec around inf 47.8%
mul-1-neg47.8%
distribute-neg-frac47.8%
Simplified47.8%
Taylor expanded in Vef around 0 52.7%
if -7.00000000000000005e176 < NdChar < 2.7999999999999999e-90Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 62.8%
Taylor expanded in NdChar around 0 42.1%
Final simplification46.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (/ EAccept KbT) (+ (/ Vef KbT) (+ (/ Ev KbT) 2.0)))))
(if (<= KbT -1.45e+116)
(* 0.5 (+ NdChar NaChar))
(if (<= KbT 4.4e+36)
(/ NaChar (+ 1.0 (exp (/ EAccept KbT))))
(if (<= KbT 9e+249)
(+
(/
NdChar
(-
(+ (/ mu KbT) (+ 2.0 (+ (/ Vef KbT) (/ EDonor KbT))))
(/ Ec KbT)))
(/ NaChar (+ 1.0 (/ Vef KbT))))
(+
(* NdChar 0.5)
(+
(/ NaChar t_0)
(/
NaChar
(/
(*
t_0
(* KbT (+ (/ Ev KbT) (+ (/ Vef KbT) (+ (/ EAccept KbT) 2.0)))))
mu)))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0));
double tmp;
if (KbT <= -1.45e+116) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= 4.4e+36) {
tmp = NaChar / (1.0 + exp((EAccept / KbT)));
} else if (KbT <= 9e+249) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (Vef / KbT)));
} else {
tmp = (NdChar * 0.5) + ((NaChar / t_0) + (NaChar / ((t_0 * (KbT * ((Ev / KbT) + ((Vef / KbT) + ((EAccept / KbT) + 2.0))))) / mu)));
}
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 = (eaccept / kbt) + ((vef / kbt) + ((ev / kbt) + 2.0d0))
if (kbt <= (-1.45d+116)) then
tmp = 0.5d0 * (ndchar + nachar)
else if (kbt <= 4.4d+36) then
tmp = nachar / (1.0d0 + exp((eaccept / kbt)))
else if (kbt <= 9d+249) then
tmp = (ndchar / (((mu / kbt) + (2.0d0 + ((vef / kbt) + (edonor / kbt)))) - (ec / kbt))) + (nachar / (1.0d0 + (vef / kbt)))
else
tmp = (ndchar * 0.5d0) + ((nachar / t_0) + (nachar / ((t_0 * (kbt * ((ev / kbt) + ((vef / kbt) + ((eaccept / kbt) + 2.0d0))))) / mu)))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0));
double tmp;
if (KbT <= -1.45e+116) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= 4.4e+36) {
tmp = NaChar / (1.0 + Math.exp((EAccept / KbT)));
} else if (KbT <= 9e+249) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (Vef / KbT)));
} else {
tmp = (NdChar * 0.5) + ((NaChar / t_0) + (NaChar / ((t_0 * (KbT * ((Ev / KbT) + ((Vef / KbT) + ((EAccept / KbT) + 2.0))))) / mu)));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)) tmp = 0 if KbT <= -1.45e+116: tmp = 0.5 * (NdChar + NaChar) elif KbT <= 4.4e+36: tmp = NaChar / (1.0 + math.exp((EAccept / KbT))) elif KbT <= 9e+249: tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (Vef / KbT))) else: tmp = (NdChar * 0.5) + ((NaChar / t_0) + (NaChar / ((t_0 * (KbT * ((Ev / KbT) + ((Vef / KbT) + ((EAccept / KbT) + 2.0))))) / mu))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(EAccept / KbT) + Float64(Float64(Vef / KbT) + Float64(Float64(Ev / KbT) + 2.0))) tmp = 0.0 if (KbT <= -1.45e+116) tmp = Float64(0.5 * Float64(NdChar + NaChar)); elseif (KbT <= 4.4e+36) tmp = Float64(NaChar / Float64(1.0 + exp(Float64(EAccept / KbT)))); elseif (KbT <= 9e+249) tmp = Float64(Float64(NdChar / Float64(Float64(Float64(mu / KbT) + Float64(2.0 + Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)))) - Float64(Ec / KbT))) + Float64(NaChar / Float64(1.0 + Float64(Vef / KbT)))); else tmp = Float64(Float64(NdChar * 0.5) + Float64(Float64(NaChar / t_0) + Float64(NaChar / Float64(Float64(t_0 * Float64(KbT * Float64(Float64(Ev / KbT) + Float64(Float64(Vef / KbT) + Float64(Float64(EAccept / KbT) + 2.0))))) / mu)))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)); tmp = 0.0; if (KbT <= -1.45e+116) tmp = 0.5 * (NdChar + NaChar); elseif (KbT <= 4.4e+36) tmp = NaChar / (1.0 + exp((EAccept / KbT))); elseif (KbT <= 9e+249) tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (Vef / KbT))); else tmp = (NdChar * 0.5) + ((NaChar / t_0) + (NaChar / ((t_0 * (KbT * ((Ev / KbT) + ((Vef / KbT) + ((EAccept / KbT) + 2.0))))) / mu))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EAccept / KbT), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(N[(Ev / KbT), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.45e+116], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 4.4e+36], N[(NaChar / N[(1.0 + N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9e+249], N[(N[(NdChar / N[(N[(N[(mu / KbT), $MachinePrecision] + N[(2.0 + N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar * 0.5), $MachinePrecision] + N[(N[(NaChar / t$95$0), $MachinePrecision] + N[(NaChar / N[(N[(t$95$0 * N[(KbT * N[(N[(Ev / KbT), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(N[(EAccept / KbT), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{EAccept}{KbT} + \left(\frac{Vef}{KbT} + \left(\frac{Ev}{KbT} + 2\right)\right)\\
\mathbf{if}\;KbT \leq -1.45 \cdot 10^{+116}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{elif}\;KbT \leq 4.4 \cdot 10^{+36}:\\
\;\;\;\;\frac{NaChar}{1 + e^{\frac{EAccept}{KbT}}}\\
\mathbf{elif}\;KbT \leq 9 \cdot 10^{+249}:\\
\;\;\;\;\frac{NdChar}{\left(\frac{mu}{KbT} + \left(2 + \left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right)\right)\right) - \frac{Ec}{KbT}} + \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;NdChar \cdot 0.5 + \left(\frac{NaChar}{t_0} + \frac{NaChar}{\frac{t_0 \cdot \left(KbT \cdot \left(\frac{Ev}{KbT} + \left(\frac{Vef}{KbT} + \left(\frac{EAccept}{KbT} + 2\right)\right)\right)\right)}{mu}}\right)\\
\end{array}
\end{array}
if KbT < -1.4500000000000001e116Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 82.4%
Taylor expanded in KbT around inf 56.3%
distribute-lft-out56.3%
Simplified56.3%
if -1.4500000000000001e116 < KbT < 4.40000000000000001e36Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 66.9%
Taylor expanded in NdChar around 0 41.3%
if 4.40000000000000001e36 < KbT < 8.9999999999999993e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 39.5%
Taylor expanded in Vef around inf 55.3%
Taylor expanded in KbT around inf 43.4%
if 8.9999999999999993e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 87.6%
Taylor expanded in mu around 0 70.2%
+-commutative70.2%
associate-+r+70.2%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in KbT around inf 88.6%
Final simplification46.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ 1.0 (/ Vef KbT))))
(if (<= mu 1.6e-194)
(+ NaChar (* NdChar 0.5))
(if (<= mu 6.5e+83)
(+
(/
NdChar
(- (+ (/ mu KbT) (+ 2.0 (+ (/ Vef KbT) (/ EDonor KbT)))) (/ Ec KbT)))
(/
NaChar
(+ 1.0 (- (+ (/ Ev KbT) (+ (/ EAccept KbT) t_0)) (/ mu KbT)))))
(/ NaChar t_0)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 1.0 + (Vef / KbT);
double tmp;
if (mu <= 1.6e-194) {
tmp = NaChar + (NdChar * 0.5);
} else if (mu <= 6.5e+83) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (((Ev / KbT) + ((EAccept / KbT) + t_0)) - (mu / KbT))));
} else {
tmp = NaChar / t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (vef / kbt)
if (mu <= 1.6d-194) then
tmp = nachar + (ndchar * 0.5d0)
else if (mu <= 6.5d+83) then
tmp = (ndchar / (((mu / kbt) + (2.0d0 + ((vef / kbt) + (edonor / kbt)))) - (ec / kbt))) + (nachar / (1.0d0 + (((ev / kbt) + ((eaccept / kbt) + t_0)) - (mu / kbt))))
else
tmp = nachar / t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 1.0 + (Vef / KbT);
double tmp;
if (mu <= 1.6e-194) {
tmp = NaChar + (NdChar * 0.5);
} else if (mu <= 6.5e+83) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (((Ev / KbT) + ((EAccept / KbT) + t_0)) - (mu / KbT))));
} else {
tmp = NaChar / t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 1.0 + (Vef / KbT) tmp = 0 if mu <= 1.6e-194: tmp = NaChar + (NdChar * 0.5) elif mu <= 6.5e+83: tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (((Ev / KbT) + ((EAccept / KbT) + t_0)) - (mu / KbT)))) else: tmp = NaChar / t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(1.0 + Float64(Vef / KbT)) tmp = 0.0 if (mu <= 1.6e-194) tmp = Float64(NaChar + Float64(NdChar * 0.5)); elseif (mu <= 6.5e+83) tmp = Float64(Float64(NdChar / Float64(Float64(Float64(mu / KbT) + Float64(2.0 + Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)))) - Float64(Ec / KbT))) + Float64(NaChar / Float64(1.0 + Float64(Float64(Float64(Ev / KbT) + Float64(Float64(EAccept / KbT) + t_0)) - Float64(mu / KbT))))); else tmp = Float64(NaChar / t_0); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 1.0 + (Vef / KbT); tmp = 0.0; if (mu <= 1.6e-194) tmp = NaChar + (NdChar * 0.5); elseif (mu <= 6.5e+83) tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + (NaChar / (1.0 + (((Ev / KbT) + ((EAccept / KbT) + t_0)) - (mu / KbT)))); else tmp = NaChar / t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[mu, 1.6e-194], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[mu, 6.5e+83], N[(N[(NdChar / N[(N[(N[(mu / KbT), $MachinePrecision] + N[(2.0 + N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[(N[(N[(Ev / KbT), $MachinePrecision] + N[(N[(EAccept / KbT), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(NaChar / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{Vef}{KbT}\\
\mathbf{if}\;mu \leq 1.6 \cdot 10^{-194}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\mathbf{elif}\;mu \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{NdChar}{\left(\frac{mu}{KbT} + \left(2 + \left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right)\right)\right) - \frac{Ec}{KbT}} + \frac{NaChar}{1 + \left(\left(\frac{Ev}{KbT} + \left(\frac{EAccept}{KbT} + t_0\right)\right) - \frac{mu}{KbT}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{t_0}\\
\end{array}
\end{array}
if mu < 1.6000000000000001e-194Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 49.5%
Taylor expanded in Vef around inf 54.7%
Taylor expanded in KbT around inf 29.5%
Taylor expanded in Vef around 0 38.8%
+-commutative38.8%
Simplified38.8%
if 1.6000000000000001e-194 < mu < 6.5000000000000003e83Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 61.2%
Taylor expanded in KbT around inf 34.7%
if 6.5000000000000003e83 < mu Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 42.8%
Taylor expanded in Vef around inf 59.0%
Taylor expanded in KbT around inf 23.0%
Taylor expanded in NdChar around 0 30.0%
Final simplification36.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (/ Vef KbT)))))
(if (<= KbT -1.9e+142)
(* 0.5 (+ NdChar NaChar))
(if (<= KbT -1.05e-229)
t_0
(if (<= KbT 3.8e-151)
(+ NaChar (* NdChar 0.5))
(if (<= KbT 2e+56)
t_0
(if (<= KbT 6.8e+249)
(+ t_0 (/ NdChar (- 2.0 (/ Ec KbT))))
(+
(* NdChar 0.5)
(+
(/
NaChar
(+ (/ EAccept KbT) (+ (/ Vef KbT) (+ (/ Ev KbT) 2.0))))
(/ NaChar (* 4.0 (/ KbT mu))))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double tmp;
if (KbT <= -1.9e+142) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 3.8e-151) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 2e+56) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_0 + (NdChar / (2.0 - (Ec / KbT)));
} else {
tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu))));
}
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 / (1.0d0 + (vef / kbt))
if (kbt <= (-1.9d+142)) then
tmp = 0.5d0 * (ndchar + nachar)
else if (kbt <= (-1.05d-229)) then
tmp = t_0
else if (kbt <= 3.8d-151) then
tmp = nachar + (ndchar * 0.5d0)
else if (kbt <= 2d+56) then
tmp = t_0
else if (kbt <= 6.8d+249) then
tmp = t_0 + (ndchar / (2.0d0 - (ec / kbt)))
else
tmp = (ndchar * 0.5d0) + ((nachar / ((eaccept / kbt) + ((vef / kbt) + ((ev / kbt) + 2.0d0)))) + (nachar / (4.0d0 * (kbt / mu))))
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 / (1.0 + (Vef / KbT));
double tmp;
if (KbT <= -1.9e+142) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 3.8e-151) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 2e+56) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_0 + (NdChar / (2.0 - (Ec / KbT)));
} else {
tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + (Vef / KbT)) tmp = 0 if KbT <= -1.9e+142: tmp = 0.5 * (NdChar + NaChar) elif KbT <= -1.05e-229: tmp = t_0 elif KbT <= 3.8e-151: tmp = NaChar + (NdChar * 0.5) elif KbT <= 2e+56: tmp = t_0 elif KbT <= 6.8e+249: tmp = t_0 + (NdChar / (2.0 - (Ec / KbT))) else: tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + Float64(Vef / KbT))) tmp = 0.0 if (KbT <= -1.9e+142) tmp = Float64(0.5 * Float64(NdChar + NaChar)); elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 3.8e-151) tmp = Float64(NaChar + Float64(NdChar * 0.5)); elseif (KbT <= 2e+56) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = Float64(t_0 + Float64(NdChar / Float64(2.0 - Float64(Ec / KbT)))); else tmp = Float64(Float64(NdChar * 0.5) + Float64(Float64(NaChar / Float64(Float64(EAccept / KbT) + Float64(Float64(Vef / KbT) + Float64(Float64(Ev / KbT) + 2.0)))) + Float64(NaChar / Float64(4.0 * Float64(KbT / mu))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + (Vef / KbT)); tmp = 0.0; if (KbT <= -1.9e+142) tmp = 0.5 * (NdChar + NaChar); elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 3.8e-151) tmp = NaChar + (NdChar * 0.5); elseif (KbT <= 2e+56) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = t_0 + (NdChar / (2.0 - (Ec / KbT))); else tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.9e+142], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -1.05e-229], t$95$0, If[LessEqual[KbT, 3.8e-151], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2e+56], t$95$0, If[LessEqual[KbT, 6.8e+249], N[(t$95$0 + N[(NdChar / N[(2.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar * 0.5), $MachinePrecision] + N[(N[(NaChar / N[(N[(EAccept / KbT), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(N[(Ev / KbT), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(4.0 * N[(KbT / mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
\mathbf{if}\;KbT \leq -1.9 \cdot 10^{+142}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{elif}\;KbT \leq -1.05 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 3.8 \cdot 10^{-151}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 2 \cdot 10^{+56}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;t_0 + \frac{NdChar}{2 - \frac{Ec}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;NdChar \cdot 0.5 + \left(\frac{NaChar}{\frac{EAccept}{KbT} + \left(\frac{Vef}{KbT} + \left(\frac{Ev}{KbT} + 2\right)\right)} + \frac{NaChar}{4 \cdot \frac{KbT}{mu}}\right)\\
\end{array}
\end{array}
if KbT < -1.89999999999999995e142Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 87.3%
Taylor expanded in KbT around inf 60.8%
distribute-lft-out60.8%
Simplified60.8%
if -1.89999999999999995e142 < KbT < -1.04999999999999992e-229 or 3.7999999999999997e-151 < KbT < 2.00000000000000018e56Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in Vef around inf 53.9%
Taylor expanded in KbT around inf 16.7%
Taylor expanded in NdChar around 0 31.1%
if -1.04999999999999992e-229 < KbT < 3.7999999999999997e-151Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 32.2%
Taylor expanded in Vef around inf 43.3%
Taylor expanded in KbT around inf 11.6%
Taylor expanded in Vef around 0 39.4%
+-commutative39.4%
Simplified39.4%
if 2.00000000000000018e56 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 44.2%
Taylor expanded in Vef around inf 55.8%
Taylor expanded in Ec around inf 44.2%
mul-1-neg44.2%
distribute-neg-frac44.2%
Simplified44.2%
Taylor expanded in Ec around 0 40.6%
mul-1-neg40.6%
unsub-neg40.6%
Simplified40.6%
if 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 87.6%
Taylor expanded in mu around 0 70.2%
+-commutative70.2%
associate-+r+70.2%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in KbT around inf 88.6%
Taylor expanded in KbT around inf 88.6%
Final simplification41.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (/ Vef KbT)))))
(if (<= KbT -9.2e+136)
(* 0.5 (+ NdChar NaChar))
(if (<= KbT -8.2e-230)
t_0
(if (<= KbT 2.2e-125)
(+ NaChar (* NdChar 0.5))
(if (<= KbT 6.8e+249)
(+
(/
NdChar
(-
(+ (/ mu KbT) (+ 2.0 (+ (/ Vef KbT) (/ EDonor KbT))))
(/ Ec KbT)))
t_0)
(+
(* NdChar 0.5)
(+
(/ NaChar (+ (/ EAccept KbT) (+ (/ Vef KbT) (+ (/ Ev KbT) 2.0))))
(/ NaChar (* 4.0 (/ KbT mu)))))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double tmp;
if (KbT <= -9.2e+136) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= -8.2e-230) {
tmp = t_0;
} else if (KbT <= 2.2e-125) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 6.8e+249) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + t_0;
} else {
tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu))));
}
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 / (1.0d0 + (vef / kbt))
if (kbt <= (-9.2d+136)) then
tmp = 0.5d0 * (ndchar + nachar)
else if (kbt <= (-8.2d-230)) then
tmp = t_0
else if (kbt <= 2.2d-125) then
tmp = nachar + (ndchar * 0.5d0)
else if (kbt <= 6.8d+249) then
tmp = (ndchar / (((mu / kbt) + (2.0d0 + ((vef / kbt) + (edonor / kbt)))) - (ec / kbt))) + t_0
else
tmp = (ndchar * 0.5d0) + ((nachar / ((eaccept / kbt) + ((vef / kbt) + ((ev / kbt) + 2.0d0)))) + (nachar / (4.0d0 * (kbt / mu))))
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 / (1.0 + (Vef / KbT));
double tmp;
if (KbT <= -9.2e+136) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= -8.2e-230) {
tmp = t_0;
} else if (KbT <= 2.2e-125) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 6.8e+249) {
tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + t_0;
} else {
tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu))));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + (Vef / KbT)) tmp = 0 if KbT <= -9.2e+136: tmp = 0.5 * (NdChar + NaChar) elif KbT <= -8.2e-230: tmp = t_0 elif KbT <= 2.2e-125: tmp = NaChar + (NdChar * 0.5) elif KbT <= 6.8e+249: tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + t_0 else: tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu)))) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + Float64(Vef / KbT))) tmp = 0.0 if (KbT <= -9.2e+136) tmp = Float64(0.5 * Float64(NdChar + NaChar)); elseif (KbT <= -8.2e-230) tmp = t_0; elseif (KbT <= 2.2e-125) tmp = Float64(NaChar + Float64(NdChar * 0.5)); elseif (KbT <= 6.8e+249) tmp = Float64(Float64(NdChar / Float64(Float64(Float64(mu / KbT) + Float64(2.0 + Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)))) - Float64(Ec / KbT))) + t_0); else tmp = Float64(Float64(NdChar * 0.5) + Float64(Float64(NaChar / Float64(Float64(EAccept / KbT) + Float64(Float64(Vef / KbT) + Float64(Float64(Ev / KbT) + 2.0)))) + Float64(NaChar / Float64(4.0 * Float64(KbT / mu))))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + (Vef / KbT)); tmp = 0.0; if (KbT <= -9.2e+136) tmp = 0.5 * (NdChar + NaChar); elseif (KbT <= -8.2e-230) tmp = t_0; elseif (KbT <= 2.2e-125) tmp = NaChar + (NdChar * 0.5); elseif (KbT <= 6.8e+249) tmp = (NdChar / (((mu / KbT) + (2.0 + ((Vef / KbT) + (EDonor / KbT)))) - (Ec / KbT))) + t_0; else tmp = (NdChar * 0.5) + ((NaChar / ((EAccept / KbT) + ((Vef / KbT) + ((Ev / KbT) + 2.0)))) + (NaChar / (4.0 * (KbT / mu)))); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -9.2e+136], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -8.2e-230], t$95$0, If[LessEqual[KbT, 2.2e-125], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 6.8e+249], N[(N[(NdChar / N[(N[(N[(mu / KbT), $MachinePrecision] + N[(2.0 + N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(NdChar * 0.5), $MachinePrecision] + N[(N[(NaChar / N[(N[(EAccept / KbT), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(N[(Ev / KbT), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(4.0 * N[(KbT / mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
\mathbf{if}\;KbT \leq -9.2 \cdot 10^{+136}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{elif}\;KbT \leq -8.2 \cdot 10^{-230}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 2.2 \cdot 10^{-125}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;\frac{NdChar}{\left(\frac{mu}{KbT} + \left(2 + \left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right)\right)\right) - \frac{Ec}{KbT}} + t_0\\
\mathbf{else}:\\
\;\;\;\;NdChar \cdot 0.5 + \left(\frac{NaChar}{\frac{EAccept}{KbT} + \left(\frac{Vef}{KbT} + \left(\frac{Ev}{KbT} + 2\right)\right)} + \frac{NaChar}{4 \cdot \frac{KbT}{mu}}\right)\\
\end{array}
\end{array}
if KbT < -9.2e136Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 87.3%
Taylor expanded in KbT around inf 60.8%
distribute-lft-out60.8%
Simplified60.8%
if -9.2e136 < KbT < -8.2000000000000003e-230Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 48.8%
Taylor expanded in Vef around inf 54.5%
Taylor expanded in KbT around inf 18.3%
Taylor expanded in NdChar around 0 31.0%
if -8.2000000000000003e-230 < KbT < 2.19999999999999995e-125Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 34.3%
Taylor expanded in Vef around inf 44.8%
Taylor expanded in KbT around inf 11.5%
Taylor expanded in Vef around 0 37.5%
+-commutative37.5%
Simplified37.5%
if 2.19999999999999995e-125 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 44.3%
Taylor expanded in Vef around inf 53.3%
Taylor expanded in KbT around inf 32.9%
if 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 87.6%
Taylor expanded in mu around 0 70.2%
+-commutative70.2%
associate-+r+70.2%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in KbT around inf 88.6%
Taylor expanded in KbT around inf 88.6%
Final simplification40.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (/ Vef KbT)))) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.02e+142)
t_1
(if (<= KbT -1.05e-229)
t_0
(if (<= KbT 1.85e-150)
(+ NaChar (* NdChar 0.5))
(if (<= KbT 3.7e+56)
t_0
(if (<= KbT 6.8e+249)
(+ t_0 (/ NdChar (- 2.0 (/ 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 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.02e+142) {
tmp = t_1;
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 1.85e-150) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 3.7e+56) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_0 + (NdChar / (2.0 - (Ec / KbT)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = nachar / (1.0d0 + (vef / kbt))
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.02d+142)) then
tmp = t_1
else if (kbt <= (-1.05d-229)) then
tmp = t_0
else if (kbt <= 1.85d-150) then
tmp = nachar + (ndchar * 0.5d0)
else if (kbt <= 3.7d+56) then
tmp = t_0
else if (kbt <= 6.8d+249) then
tmp = t_0 + (ndchar / (2.0d0 - (ec / kbt)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.02e+142) {
tmp = t_1;
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 1.85e-150) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 3.7e+56) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_0 + (NdChar / (2.0 - (Ec / KbT)));
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + (Vef / KbT)) t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.02e+142: tmp = t_1 elif KbT <= -1.05e-229: tmp = t_0 elif KbT <= 1.85e-150: tmp = NaChar + (NdChar * 0.5) elif KbT <= 3.7e+56: tmp = t_0 elif KbT <= 6.8e+249: tmp = t_0 + (NdChar / (2.0 - (Ec / KbT))) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + Float64(Vef / KbT))) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.02e+142) tmp = t_1; elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 1.85e-150) tmp = Float64(NaChar + Float64(NdChar * 0.5)); elseif (KbT <= 3.7e+56) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = Float64(t_0 + Float64(NdChar / Float64(2.0 - Float64(Ec / KbT)))); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + (Vef / KbT)); t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.02e+142) tmp = t_1; elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 1.85e-150) tmp = NaChar + (NdChar * 0.5); elseif (KbT <= 3.7e+56) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = t_0 + (NdChar / (2.0 - (Ec / KbT))); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.02e+142], t$95$1, If[LessEqual[KbT, -1.05e-229], t$95$0, If[LessEqual[KbT, 1.85e-150], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.7e+56], t$95$0, If[LessEqual[KbT, 6.8e+249], N[(t$95$0 + N[(NdChar / N[(2.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.02 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq -1.05 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 1.85 \cdot 10^{-150}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;t_0 + \frac{NdChar}{2 - \frac{Ec}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if KbT < -1.0199999999999999e142 or 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 87.5%
Taylor expanded in KbT around inf 67.4%
distribute-lft-out67.4%
Simplified67.4%
if -1.0199999999999999e142 < KbT < -1.04999999999999992e-229 or 1.85e-150 < KbT < 3.69999999999999997e56Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in Vef around inf 53.9%
Taylor expanded in KbT around inf 16.7%
Taylor expanded in NdChar around 0 31.1%
if -1.04999999999999992e-229 < KbT < 1.85e-150Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 32.2%
Taylor expanded in Vef around inf 43.3%
Taylor expanded in KbT around inf 11.6%
Taylor expanded in Vef around 0 39.4%
+-commutative39.4%
Simplified39.4%
if 3.69999999999999997e56 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 44.2%
Taylor expanded in Vef around inf 55.8%
Taylor expanded in Ec around inf 44.2%
mul-1-neg44.2%
distribute-neg-frac44.2%
Simplified44.2%
Taylor expanded in Ec around 0 40.6%
mul-1-neg40.6%
unsub-neg40.6%
Simplified40.6%
Final simplification41.4%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (/ Vef KbT)))) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -6e+144)
t_1
(if (<= KbT -1.05e-229)
t_0
(if (<= KbT 1.15e-150)
(+ NaChar (* NdChar 0.5))
(if (<= KbT 2.8e+57)
t_0
(if (<= KbT 6.8e+249) (+ (* NdChar 0.5) t_0) t_1)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6e+144) {
tmp = t_1;
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 1.15e-150) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 2.8e+57) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = (NdChar * 0.5) + t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = nachar / (1.0d0 + (vef / kbt))
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-6d+144)) then
tmp = t_1
else if (kbt <= (-1.05d-229)) then
tmp = t_0
else if (kbt <= 1.15d-150) then
tmp = nachar + (ndchar * 0.5d0)
else if (kbt <= 2.8d+57) then
tmp = t_0
else if (kbt <= 6.8d+249) then
tmp = (ndchar * 0.5d0) + t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6e+144) {
tmp = t_1;
} else if (KbT <= -1.05e-229) {
tmp = t_0;
} else if (KbT <= 1.15e-150) {
tmp = NaChar + (NdChar * 0.5);
} else if (KbT <= 2.8e+57) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = (NdChar * 0.5) + t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + (Vef / KbT)) t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -6e+144: tmp = t_1 elif KbT <= -1.05e-229: tmp = t_0 elif KbT <= 1.15e-150: tmp = NaChar + (NdChar * 0.5) elif KbT <= 2.8e+57: tmp = t_0 elif KbT <= 6.8e+249: tmp = (NdChar * 0.5) + t_0 else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + Float64(Vef / KbT))) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -6e+144) tmp = t_1; elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 1.15e-150) tmp = Float64(NaChar + Float64(NdChar * 0.5)); elseif (KbT <= 2.8e+57) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = Float64(Float64(NdChar * 0.5) + t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + (Vef / KbT)); t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -6e+144) tmp = t_1; elseif (KbT <= -1.05e-229) tmp = t_0; elseif (KbT <= 1.15e-150) tmp = NaChar + (NdChar * 0.5); elseif (KbT <= 2.8e+57) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = (NdChar * 0.5) + t_0; else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -6e+144], t$95$1, If[LessEqual[KbT, -1.05e-229], t$95$0, If[LessEqual[KbT, 1.15e-150], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.8e+57], t$95$0, If[LessEqual[KbT, 6.8e+249], N[(N[(NdChar * 0.5), $MachinePrecision] + t$95$0), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -6 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq -1.05 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 1.15 \cdot 10^{-150}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 2.8 \cdot 10^{+57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;NdChar \cdot 0.5 + t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if KbT < -5.9999999999999998e144 or 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 87.5%
Taylor expanded in KbT around inf 67.4%
distribute-lft-out67.4%
Simplified67.4%
if -5.9999999999999998e144 < KbT < -1.04999999999999992e-229 or 1.15000000000000001e-150 < KbT < 2.8e57Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in Vef around inf 53.9%
Taylor expanded in KbT around inf 16.7%
Taylor expanded in NdChar around 0 31.1%
if -1.04999999999999992e-229 < KbT < 1.15000000000000001e-150Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 32.2%
Taylor expanded in Vef around inf 43.3%
Taylor expanded in KbT around inf 11.6%
Taylor expanded in Vef around 0 39.4%
+-commutative39.4%
Simplified39.4%
if 2.8e57 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 44.2%
Taylor expanded in Vef around inf 55.8%
Taylor expanded in KbT around inf 39.3%
Final simplification41.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ 1.0 (/ Vef KbT))))
(t_1 (* 0.5 (+ NdChar NaChar)))
(t_2 (+ NaChar (* NdChar 0.5))))
(if (<= KbT -3.3e+144)
t_1
(if (<= KbT -8.6e-230)
t_0
(if (<= KbT 1.62e-149)
t_2
(if (<= KbT 2.9e+57) t_0 (if (<= KbT 6.8e+249) t_2 t_1)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double t_2 = NaChar + (NdChar * 0.5);
double tmp;
if (KbT <= -3.3e+144) {
tmp = t_1;
} else if (KbT <= -8.6e-230) {
tmp = t_0;
} else if (KbT <= 1.62e-149) {
tmp = t_2;
} else if (KbT <= 2.9e+57) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = nachar / (1.0d0 + (vef / kbt))
t_1 = 0.5d0 * (ndchar + nachar)
t_2 = nachar + (ndchar * 0.5d0)
if (kbt <= (-3.3d+144)) then
tmp = t_1
else if (kbt <= (-8.6d-230)) then
tmp = t_0
else if (kbt <= 1.62d-149) then
tmp = t_2
else if (kbt <= 2.9d+57) then
tmp = t_0
else if (kbt <= 6.8d+249) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (1.0 + (Vef / KbT));
double t_1 = 0.5 * (NdChar + NaChar);
double t_2 = NaChar + (NdChar * 0.5);
double tmp;
if (KbT <= -3.3e+144) {
tmp = t_1;
} else if (KbT <= -8.6e-230) {
tmp = t_0;
} else if (KbT <= 1.62e-149) {
tmp = t_2;
} else if (KbT <= 2.9e+57) {
tmp = t_0;
} else if (KbT <= 6.8e+249) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (1.0 + (Vef / KbT)) t_1 = 0.5 * (NdChar + NaChar) t_2 = NaChar + (NdChar * 0.5) tmp = 0 if KbT <= -3.3e+144: tmp = t_1 elif KbT <= -8.6e-230: tmp = t_0 elif KbT <= 1.62e-149: tmp = t_2 elif KbT <= 2.9e+57: tmp = t_0 elif KbT <= 6.8e+249: tmp = t_2 else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(1.0 + Float64(Vef / KbT))) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) t_2 = Float64(NaChar + Float64(NdChar * 0.5)) tmp = 0.0 if (KbT <= -3.3e+144) tmp = t_1; elseif (KbT <= -8.6e-230) tmp = t_0; elseif (KbT <= 1.62e-149) tmp = t_2; elseif (KbT <= 2.9e+57) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (1.0 + (Vef / KbT)); t_1 = 0.5 * (NdChar + NaChar); t_2 = NaChar + (NdChar * 0.5); tmp = 0.0; if (KbT <= -3.3e+144) tmp = t_1; elseif (KbT <= -8.6e-230) tmp = t_0; elseif (KbT <= 1.62e-149) tmp = t_2; elseif (KbT <= 2.9e+57) tmp = t_0; elseif (KbT <= 6.8e+249) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(1.0 + N[(Vef / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.3e+144], t$95$1, If[LessEqual[KbT, -8.6e-230], t$95$0, If[LessEqual[KbT, 1.62e-149], t$95$2, If[LessEqual[KbT, 2.9e+57], t$95$0, If[LessEqual[KbT, 6.8e+249], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{1 + \frac{Vef}{KbT}}\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
t_2 := NaChar + NdChar \cdot 0.5\\
\mathbf{if}\;KbT \leq -3.3 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;KbT \leq -8.6 \cdot 10^{-230}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 1.62 \cdot 10^{-149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;KbT \leq 2.9 \cdot 10^{+57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;KbT \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if KbT < -3.3e144 or 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 87.5%
Taylor expanded in KbT around inf 67.4%
distribute-lft-out67.4%
Simplified67.4%
if -3.3e144 < KbT < -8.6000000000000002e-230 or 1.6200000000000001e-149 < KbT < 2.9000000000000002e57Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 47.7%
Taylor expanded in Vef around inf 53.9%
Taylor expanded in KbT around inf 16.7%
Taylor expanded in NdChar around 0 31.1%
if -8.6000000000000002e-230 < KbT < 1.6200000000000001e-149 or 2.9000000000000002e57 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 37.0%
Taylor expanded in Vef around inf 48.2%
Taylor expanded in KbT around inf 22.6%
Taylor expanded in Vef around 0 39.3%
+-commutative39.3%
Simplified39.3%
Final simplification41.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (or (<= KbT -3.05e+121) (not (<= KbT 6.8e+249))) (* 0.5 (+ NdChar NaChar)) (+ NaChar (* NdChar 0.5))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((KbT <= -3.05e+121) || !(KbT <= 6.8e+249)) {
tmp = 0.5 * (NdChar + NaChar);
} else {
tmp = NaChar + (NdChar * 0.5);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if ((kbt <= (-3.05d+121)) .or. (.not. (kbt <= 6.8d+249))) then
tmp = 0.5d0 * (ndchar + nachar)
else
tmp = nachar + (ndchar * 0.5d0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if ((KbT <= -3.05e+121) || !(KbT <= 6.8e+249)) {
tmp = 0.5 * (NdChar + NaChar);
} else {
tmp = NaChar + (NdChar * 0.5);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if (KbT <= -3.05e+121) or not (KbT <= 6.8e+249): tmp = 0.5 * (NdChar + NaChar) else: tmp = NaChar + (NdChar * 0.5) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if ((KbT <= -3.05e+121) || !(KbT <= 6.8e+249)) tmp = Float64(0.5 * Float64(NdChar + NaChar)); else tmp = Float64(NaChar + Float64(NdChar * 0.5)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if ((KbT <= -3.05e+121) || ~((KbT <= 6.8e+249))) tmp = 0.5 * (NdChar + NaChar); else tmp = NaChar + (NdChar * 0.5); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[Or[LessEqual[KbT, -3.05e+121], N[Not[LessEqual[KbT, 6.8e+249]], $MachinePrecision]], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], N[(NaChar + N[(NdChar * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;KbT \leq -3.05 \cdot 10^{+121} \lor \neg \left(KbT \leq 6.8 \cdot 10^{+249}\right):\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{else}:\\
\;\;\;\;NaChar + NdChar \cdot 0.5\\
\end{array}
\end{array}
if KbT < -3.0499999999999999e121 or 6.80000000000000026e249 < KbT Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 84.6%
Taylor expanded in KbT around inf 65.0%
distribute-lft-out65.0%
Simplified65.0%
if -3.0499999999999999e121 < KbT < 6.80000000000000026e249Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in KbT around inf 43.9%
Taylor expanded in Vef around inf 52.2%
Taylor expanded in KbT around inf 19.1%
Taylor expanded in Vef around 0 27.9%
+-commutative27.9%
Simplified27.9%
Final simplification36.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (* 0.5 (+ NdChar NaChar)))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = 0.5d0 * (ndchar + nachar)
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return 0.5 * (NdChar + NaChar)
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(0.5 * Float64(NdChar + NaChar)) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.5 * (NdChar + NaChar); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(NdChar + NaChar\right)
\end{array}
Initial program 100.0%
neg-sub0100.0%
associate--r-100.0%
+-commutative100.0%
neg-sub0100.0%
sub-neg100.0%
associate--l-100.0%
unsub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in EAccept around inf 69.1%
Taylor expanded in KbT around inf 24.7%
distribute-lft-out24.7%
Simplified24.7%
Final simplification24.7%
herbie shell --seed 2023171
(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))))))