
(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 20 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 (/ (- (- Ec (+ mu EDonor)) Vef) KbT))) 1.0)) (/ NaChar (- -1.0 (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / ((1.0 / exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - exp(((Vef + (EAccept + (Ev - mu))) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (ndchar / ((1.0d0 / exp((((ec - (mu + edonor)) - vef) / kbt))) + 1.0d0)) - (nachar / ((-1.0d0) - exp(((vef + (eaccept + (ev - mu))) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / ((1.0 / Math.exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / ((1.0 / math.exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - math.exp(((Vef + (EAccept + (Ev - mu))) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(Float64(1.0 / exp(Float64(Float64(Float64(Ec - Float64(mu + EDonor)) - Vef) / KbT))) + 1.0)) - Float64(NaChar / Float64(-1.0 - exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT))))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NdChar / ((1.0 / exp((((Ec - (mu + EDonor)) - Vef) / KbT))) + 1.0)) - (NaChar / (-1.0 - exp(((Vef + (EAccept + (Ev - mu))) / KbT)))); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(N[(1.0 / N[Exp[N[(N[(N[(Ec - N[(mu + EDonor), $MachinePrecision]), $MachinePrecision] - Vef), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - N[(NaChar / N[(-1.0 - N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{\frac{1}{e^{\frac{\left(Ec - \left(mu + EDonor\right)\right) - Vef}{KbT}}} + 1} - \frac{NaChar}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}
\end{array}
Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (- (- Ec EDonor) (+ Vef mu)))
(t_1
(+
(/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0))
(/ NaChar (+ (exp (/ Vef KbT)) 1.0)))))
(if (<= Vef -2.1e+133)
t_1
(if (<= Vef 2.45e+36)
(+
(/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
(/
NdChar
(+
(/
-1.0
(+
-1.0
(/
(+ (/ (* -0.5 (* t_0 t_0)) KbT) (+ (+ Vef mu) (- EDonor Ec)))
KbT)))
1.0)))
t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Ec - EDonor) - (Vef + mu);
double t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0));
double tmp;
if (Vef <= -2.1e+133) {
tmp = t_1;
} else if (Vef <= 2.45e+36) {
tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (ec - edonor) - (vef + mu)
t_1 = (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)) + (nachar / (exp((vef / kbt)) + 1.0d0))
if (vef <= (-2.1d+133)) then
tmp = t_1
else if (vef <= 2.45d+36) then
tmp = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (((-1.0d0) / ((-1.0d0) + (((((-0.5d0) * (t_0 * t_0)) / kbt) + ((vef + mu) + (edonor - ec))) / kbt))) + 1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Ec - EDonor) - (Vef + mu);
double t_1 = (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (Math.exp((Vef / KbT)) + 1.0));
double tmp;
if (Vef <= -2.1e+133) {
tmp = t_1;
} else if (Vef <= 2.45e+36) {
tmp = (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (Ec - EDonor) - (Vef + mu) t_1 = (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (math.exp((Vef / KbT)) + 1.0)) tmp = 0 if Vef <= -2.1e+133: tmp = t_1 elif Vef <= 2.45e+36: tmp = (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0)) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(Ec - EDonor) - Float64(Vef + mu)) t_1 = Float64(Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0))) tmp = 0.0 if (Vef <= -2.1e+133) tmp = t_1; elseif (Vef <= 2.45e+36) tmp = Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(Float64(-1.0 / Float64(-1.0 + Float64(Float64(Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT) + Float64(Float64(Vef + mu) + Float64(EDonor - Ec))) / KbT))) + 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (Ec - EDonor) - (Vef + mu); t_1 = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp((Vef / KbT)) + 1.0)); tmp = 0.0; if (Vef <= -2.1e+133) tmp = t_1; elseif (Vef <= 2.45e+36) tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(Ec - EDonor), $MachinePrecision] - N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -2.1e+133], t$95$1, If[LessEqual[Vef, 2.45e+36], N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[(-1.0 / N[(-1.0 + N[(N[(N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(Vef + mu), $MachinePrecision] + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\
t_1 := \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -2.1 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Vef \leq 2.45 \cdot 10^{+36}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if Vef < -2.1e133 or 2.4499999999999999e36 < Vef Initial program 100.0%
Simplified100.0%
Taylor expanded in Vef around inf
/-lowering-/.f6484.5%
Simplified84.5%
if -2.1e133 < Vef < 2.4499999999999999e36Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified81.7%
Final simplification82.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0)) (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1}
\end{array}
Initial program 99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (- (- Ec EDonor) (+ Vef mu)))
(t_1 (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))))
(if (<= Vef -1.1e+184)
t_1
(if (<= Vef 6e+233)
(+
(/ NaChar (+ (exp (/ (+ Vef (+ EAccept (- Ev mu))) KbT)) 1.0))
(/
NdChar
(+
(/
-1.0
(+
-1.0
(/
(+ (/ (* -0.5 (* t_0 t_0)) KbT) (+ (+ Vef mu) (- EDonor Ec)))
KbT)))
1.0)))
t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Ec - EDonor) - (Vef + mu);
double t_1 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
double tmp;
if (Vef <= -1.1e+184) {
tmp = t_1;
} else if (Vef <= 6e+233) {
tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (ec - edonor) - (vef + mu)
t_1 = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
if (vef <= (-1.1d+184)) then
tmp = t_1
else if (vef <= 6d+233) then
tmp = (nachar / (exp(((vef + (eaccept + (ev - mu))) / kbt)) + 1.0d0)) + (ndchar / (((-1.0d0) / ((-1.0d0) + (((((-0.5d0) * (t_0 * t_0)) / kbt) + ((vef + mu) + (edonor - ec))) / kbt))) + 1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Ec - EDonor) - (Vef + mu);
double t_1 = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
double tmp;
if (Vef <= -1.1e+184) {
tmp = t_1;
} else if (Vef <= 6e+233) {
tmp = (NaChar / (Math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (Ec - EDonor) - (Vef + mu) t_1 = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0) tmp = 0 if Vef <= -1.1e+184: tmp = t_1 elif Vef <= 6e+233: tmp = (NaChar / (math.exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0)) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(Ec - EDonor) - Float64(Vef + mu)) t_1 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0)) tmp = 0.0 if (Vef <= -1.1e+184) tmp = t_1; elseif (Vef <= 6e+233) tmp = Float64(Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept + Float64(Ev - mu))) / KbT)) + 1.0)) + Float64(NdChar / Float64(Float64(-1.0 / Float64(-1.0 + Float64(Float64(Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT) + Float64(Float64(Vef + mu) + Float64(EDonor - Ec))) / KbT))) + 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (Ec - EDonor) - (Vef + mu); t_1 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0); tmp = 0.0; if (Vef <= -1.1e+184) tmp = t_1; elseif (Vef <= 6e+233) tmp = (NaChar / (exp(((Vef + (EAccept + (Ev - mu))) / KbT)) + 1.0)) + (NdChar / ((-1.0 / (-1.0 + ((((-0.5 * (t_0 * t_0)) / KbT) + ((Vef + mu) + (EDonor - Ec))) / KbT))) + 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(Ec - EDonor), $MachinePrecision] - N[(Vef + mu), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -1.1e+184], t$95$1, If[LessEqual[Vef, 6e+233], N[(N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept + N[(Ev - mu), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NdChar / N[(N[(-1.0 / N[(-1.0 + N[(N[(N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision] + N[(N[(Vef + mu), $MachinePrecision] + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(Ec - EDonor\right) - \left(Vef + mu\right)\\
t_1 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -1.1 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Vef \leq 6 \cdot 10^{+233}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}} + 1} + \frac{NdChar}{\frac{-1}{-1 + \frac{\frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT} + \left(\left(Vef + mu\right) + \left(EDonor - Ec\right)\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if Vef < -1.1e184 or 6.00000000000000028e233 < Vef Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6487.7%
Simplified87.7%
if -1.1e184 < Vef < 6.00000000000000028e233Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified76.9%
Final simplification78.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0
(+
NdChar
(/ NaChar (+ (exp (/ (+ EAccept (- Ev (- mu Vef))) KbT)) 1.0)))))
(if (<= NdChar -9e-162)
t_0
(if (<= NdChar 1.2e-126)
(/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
(if (<= NdChar 620000000000.0)
t_0
(/
NdChar
(+ (/ 1.0 (exp (/ (- (- (- Ec EDonor) mu) Vef) KbT))) 1.0)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
double tmp;
if (NdChar <= -9e-162) {
tmp = t_0;
} else if (NdChar <= 1.2e-126) {
tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else if (NdChar <= 620000000000.0) {
tmp = t_0;
} else {
tmp = NdChar / ((1.0 / exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar + (nachar / (exp(((eaccept + (ev - (mu - vef))) / kbt)) + 1.0d0))
if (ndchar <= (-9d-162)) then
tmp = t_0
else if (ndchar <= 1.2d-126) then
tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
else if (ndchar <= 620000000000.0d0) then
tmp = t_0
else
tmp = ndchar / ((1.0d0 / exp(((((ec - edonor) - mu) - vef) / kbt))) + 1.0d0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (Math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
double tmp;
if (NdChar <= -9e-162) {
tmp = t_0;
} else if (NdChar <= 1.2e-126) {
tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else if (NdChar <= 620000000000.0) {
tmp = t_0;
} else {
tmp = NdChar / ((1.0 / Math.exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar + (NaChar / (math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0)) tmp = 0 if NdChar <= -9e-162: tmp = t_0 elif NdChar <= 1.2e-126: tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0) elif NdChar <= 620000000000.0: tmp = t_0 else: tmp = NdChar / ((1.0 / math.exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Float64(EAccept + Float64(Ev - Float64(mu - Vef))) / KbT)) + 1.0))) tmp = 0.0 if (NdChar <= -9e-162) tmp = t_0; elseif (NdChar <= 1.2e-126) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0)); elseif (NdChar <= 620000000000.0) tmp = t_0; else tmp = Float64(NdChar / Float64(Float64(1.0 / exp(Float64(Float64(Float64(Float64(Ec - EDonor) - mu) - Vef) / KbT))) + 1.0)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0)); tmp = 0.0; if (NdChar <= -9e-162) tmp = t_0; elseif (NdChar <= 1.2e-126) tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0); elseif (NdChar <= 620000000000.0) tmp = t_0; else tmp = NdChar / ((1.0 / exp(((((Ec - EDonor) - mu) - Vef) / KbT))) + 1.0); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(N[(EAccept + N[(Ev - N[(mu - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -9e-162], t$95$0, If[LessEqual[NdChar, 1.2e-126], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 620000000000.0], t$95$0, N[(NdChar / N[(N[(1.0 / N[Exp[N[(N[(N[(N[(Ec - EDonor), $MachinePrecision] - mu), $MachinePrecision] - Vef), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -9 \cdot 10^{-162}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NdChar \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{elif}\;NdChar \leq 620000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{\frac{1}{e^{\frac{\left(\left(Ec - EDonor\right) - mu\right) - Vef}{KbT}}} + 1}\\
\end{array}
\end{array}
if NdChar < -9.00000000000000045e-162 or 1.20000000000000003e-126 < NdChar < 6.2e11Initial program 100.0%
Simplified100.0%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64100.0%
Applied egg-rr100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified78.3%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6472.6%
Simplified72.6%
if -9.00000000000000045e-162 < NdChar < 1.20000000000000003e-126Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6482.0%
Simplified82.0%
if 6.2e11 < NdChar Initial program 99.8%
Simplified99.8%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.6%
Simplified75.6%
associate-+r+N/A
associate-+r-N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+r-N/A
frac-2negN/A
sub0-negN/A
distribute-neg-frac2N/A
rec-expN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
Applied egg-rr75.6%
Final simplification76.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0
(+
NdChar
(/ NaChar (+ (exp (/ (+ EAccept (- Ev (- mu Vef))) KbT)) 1.0)))))
(if (<= NdChar -2.45e-169)
t_0
(if (<= NdChar 3.9e-122)
(/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
(if (<= NdChar 1.3)
t_0
(/ NdChar (+ (exp (/ (+ EDonor (+ Vef (- mu Ec))) KbT)) 1.0)))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
double tmp;
if (NdChar <= -2.45e-169) {
tmp = t_0;
} else if (NdChar <= 3.9e-122) {
tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else if (NdChar <= 1.3) {
tmp = t_0;
} else {
tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar + (nachar / (exp(((eaccept + (ev - (mu - vef))) / kbt)) + 1.0d0))
if (ndchar <= (-2.45d-169)) then
tmp = t_0
else if (ndchar <= 3.9d-122) then
tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
else if (ndchar <= 1.3d0) then
tmp = t_0
else
tmp = ndchar / (exp(((edonor + (vef + (mu - ec))) / kbt)) + 1.0d0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (Math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0));
double tmp;
if (NdChar <= -2.45e-169) {
tmp = t_0;
} else if (NdChar <= 3.9e-122) {
tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else if (NdChar <= 1.3) {
tmp = t_0;
} else {
tmp = NdChar / (Math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar + (NaChar / (math.exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0)) tmp = 0 if NdChar <= -2.45e-169: tmp = t_0 elif NdChar <= 3.9e-122: tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0) elif NdChar <= 1.3: tmp = t_0 else: tmp = NdChar / (math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Float64(EAccept + Float64(Ev - Float64(mu - Vef))) / KbT)) + 1.0))) tmp = 0.0 if (NdChar <= -2.45e-169) tmp = t_0; elseif (NdChar <= 3.9e-122) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0)); elseif (NdChar <= 1.3) tmp = t_0; else tmp = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Vef + Float64(mu - Ec))) / KbT)) + 1.0)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar + (NaChar / (exp(((EAccept + (Ev - (mu - Vef))) / KbT)) + 1.0)); tmp = 0.0; if (NdChar <= -2.45e-169) tmp = t_0; elseif (NdChar <= 3.9e-122) tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0); elseif (NdChar <= 1.3) tmp = t_0; else tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(N[(EAccept + N[(Ev - N[(mu - Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -2.45e-169], t$95$0, If[LessEqual[NdChar, 3.9e-122], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 1.3], t$95$0, N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{EAccept + \left(Ev - \left(mu - Vef\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -2.45 \cdot 10^{-169}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NdChar \leq 3.9 \cdot 10^{-122}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{elif}\;NdChar \leq 1.3:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\
\end{array}
\end{array}
if NdChar < -2.45e-169 or 3.8999999999999999e-122 < NdChar < 1.30000000000000004Initial program 100.0%
Simplified100.0%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64100.0%
Applied egg-rr100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified78.3%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6472.6%
Simplified72.6%
if -2.45e-169 < NdChar < 3.8999999999999999e-122Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6482.0%
Simplified82.0%
if 1.30000000000000004 < NdChar Initial program 99.8%
Simplified99.8%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.6%
Simplified75.6%
Final simplification76.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)) (t_1 (+ NdChar (/ NaChar t_0))))
(if (<= Vef -0.0005)
t_1
(if (<= Vef -2.5e-91)
(/ NdChar (+ (exp (/ Ec (- 0.0 KbT))) 1.0))
(if (<= Vef 4.5e+76)
(+ NdChar (/ NaChar (+ (exp (/ Ev KbT)) 1.0)))
(if (<= Vef 5.2e+141) (/ NdChar t_0) t_1))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = exp((Vef / KbT)) + 1.0;
double t_1 = NdChar + (NaChar / t_0);
double tmp;
if (Vef <= -0.0005) {
tmp = t_1;
} else if (Vef <= -2.5e-91) {
tmp = NdChar / (exp((Ec / (0.0 - KbT))) + 1.0);
} else if (Vef <= 4.5e+76) {
tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
} else if (Vef <= 5.2e+141) {
tmp = NdChar / t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp((vef / kbt)) + 1.0d0
t_1 = ndchar + (nachar / t_0)
if (vef <= (-0.0005d0)) then
tmp = t_1
else if (vef <= (-2.5d-91)) then
tmp = ndchar / (exp((ec / (0.0d0 - kbt))) + 1.0d0)
else if (vef <= 4.5d+76) then
tmp = ndchar + (nachar / (exp((ev / kbt)) + 1.0d0))
else if (vef <= 5.2d+141) then
tmp = ndchar / t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = Math.exp((Vef / KbT)) + 1.0;
double t_1 = NdChar + (NaChar / t_0);
double tmp;
if (Vef <= -0.0005) {
tmp = t_1;
} else if (Vef <= -2.5e-91) {
tmp = NdChar / (Math.exp((Ec / (0.0 - KbT))) + 1.0);
} else if (Vef <= 4.5e+76) {
tmp = NdChar + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
} else if (Vef <= 5.2e+141) {
tmp = NdChar / t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = math.exp((Vef / KbT)) + 1.0 t_1 = NdChar + (NaChar / t_0) tmp = 0 if Vef <= -0.0005: tmp = t_1 elif Vef <= -2.5e-91: tmp = NdChar / (math.exp((Ec / (0.0 - KbT))) + 1.0) elif Vef <= 4.5e+76: tmp = NdChar + (NaChar / (math.exp((Ev / KbT)) + 1.0)) elif Vef <= 5.2e+141: tmp = NdChar / t_0 else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0) t_1 = Float64(NdChar + Float64(NaChar / t_0)) tmp = 0.0 if (Vef <= -0.0005) tmp = t_1; elseif (Vef <= -2.5e-91) tmp = Float64(NdChar / Float64(exp(Float64(Ec / Float64(0.0 - KbT))) + 1.0)); elseif (Vef <= 4.5e+76) tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0))); elseif (Vef <= 5.2e+141) tmp = Float64(NdChar / t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = exp((Vef / KbT)) + 1.0; t_1 = NdChar + (NaChar / t_0); tmp = 0.0; if (Vef <= -0.0005) tmp = t_1; elseif (Vef <= -2.5e-91) tmp = NdChar / (exp((Ec / (0.0 - KbT))) + 1.0); elseif (Vef <= 4.5e+76) tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0)); elseif (Vef <= 5.2e+141) tmp = NdChar / t_0; else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar + N[(NaChar / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -0.0005], t$95$1, If[LessEqual[Vef, -2.5e-91], N[(NdChar / N[(N[Exp[N[(Ec / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 4.5e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 5.2e+141], N[(NdChar / t$95$0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
t_1 := NdChar + \frac{NaChar}{t\_0}\\
\mathbf{if}\;Vef \leq -0.0005:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Vef \leq -2.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{Ec}{0 - KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 4.5 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 5.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if Vef < -5.0000000000000001e-4 or 5.1999999999999999e141 < Vef Initial program 100.0%
Simplified100.0%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64100.0%
Applied egg-rr100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified64.5%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6463.7%
Simplified63.7%
Taylor expanded in Vef around inf
/-lowering-/.f6458.1%
Simplified58.1%
if -5.0000000000000001e-4 < Vef < -2.49999999999999999e-91Initial program 99.9%
Simplified99.9%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6471.6%
Simplified71.6%
Taylor expanded in Ec around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6466.8%
Simplified66.8%
if -2.49999999999999999e-91 < Vef < 4.4999999999999997e76Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified79.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6470.1%
Simplified70.1%
Taylor expanded in Ev around inf
/-lowering-/.f6449.4%
Simplified49.4%
if 4.4999999999999997e76 < Vef < 5.1999999999999999e141Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6477.6%
Simplified77.6%
Taylor expanded in Vef around inf
/-lowering-/.f6469.9%
Simplified69.9%
Final simplification55.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))))
(if (<= NaChar -1.9e-96)
t_0
(if (<= NaChar 5e+29)
(/ NdChar (+ (exp (/ (+ EDonor (+ Vef (- mu Ec))) KbT)) 1.0))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
double tmp;
if (NaChar <= -1.9e-96) {
tmp = t_0;
} else if (NaChar <= 5e+29) {
tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
if (nachar <= (-1.9d-96)) then
tmp = t_0
else if (nachar <= 5d+29) then
tmp = ndchar / (exp(((edonor + (vef + (mu - ec))) / kbt)) + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
double tmp;
if (NaChar <= -1.9e-96) {
tmp = t_0;
} else if (NaChar <= 5e+29) {
tmp = NdChar / (Math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0) tmp = 0 if NaChar <= -1.9e-96: tmp = t_0 elif NaChar <= 5e+29: tmp = NdChar / (math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0)) tmp = 0.0 if (NaChar <= -1.9e-96) tmp = t_0; elseif (NaChar <= 5e+29) tmp = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Vef + Float64(mu - Ec))) / KbT)) + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0); tmp = 0.0; if (NaChar <= -1.9e-96) tmp = t_0; elseif (NaChar <= 5e+29) tmp = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -1.9e-96], t$95$0, If[LessEqual[NaChar, 5e+29], N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{if}\;NaChar \leq -1.9 \cdot 10^{-96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NaChar \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if NaChar < -1.9e-96 or 5.0000000000000001e29 < NaChar Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6472.1%
Simplified72.1%
if -1.9e-96 < NaChar < 5.0000000000000001e29Initial program 99.9%
Simplified99.9%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6470.0%
Simplified70.0%
Final simplification71.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ NdChar (/ NaChar (+ (exp (/ mu (- 0.0 KbT))) 1.0)))))
(if (<= mu -1.2e+177)
t_0
(if (<= mu 2.15e+102)
(/ NaChar (+ (exp (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)) 1.0))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
double tmp;
if (mu <= -1.2e+177) {
tmp = t_0;
} else if (mu <= 2.15e+102) {
tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar + (nachar / (exp((mu / (0.0d0 - kbt))) + 1.0d0))
if (mu <= (-1.2d+177)) then
tmp = t_0
else if (mu <= 2.15d+102) then
tmp = nachar / (exp((((vef + (eaccept + ev)) - mu) / kbt)) + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar + (NaChar / (Math.exp((mu / (0.0 - KbT))) + 1.0));
double tmp;
if (mu <= -1.2e+177) {
tmp = t_0;
} else if (mu <= 2.15e+102) {
tmp = NaChar / (Math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar + (NaChar / (math.exp((mu / (0.0 - KbT))) + 1.0)) tmp = 0 if mu <= -1.2e+177: tmp = t_0 elif mu <= 2.15e+102: tmp = NaChar / (math.exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(mu / Float64(0.0 - KbT))) + 1.0))) tmp = 0.0 if (mu <= -1.2e+177) tmp = t_0; elseif (mu <= 2.15e+102) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT)) + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0)); tmp = 0.0; if (mu <= -1.2e+177) tmp = t_0; elseif (mu <= 2.15e+102) tmp = NaChar / (exp((((Vef + (EAccept + Ev)) - mu) / KbT)) + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar + N[(NaChar / N[(N[Exp[N[(mu / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[mu, -1.2e+177], t$95$0, If[LessEqual[mu, 2.15e+102], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\
\mathbf{if}\;mu \leq -1.2 \cdot 10^{+177}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;mu \leq 2.15 \cdot 10^{+102}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if mu < -1.2e177 or 2.15e102 < mu Initial program 100.0%
Simplified100.0%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64100.0%
Applied egg-rr100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified76.0%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6474.9%
Simplified74.9%
Taylor expanded in mu around inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6471.9%
Simplified71.9%
if -1.2e177 < mu < 2.15e102Initial program 99.9%
Simplified99.9%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6468.0%
Simplified68.0%
Final simplification69.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec))
(t_1
(/
NdChar
(+
(/
-1.0
(+
(+
(+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
(/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
(- -1.0 (/ Ec KbT))))
1.0)))
(t_2 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.35e+154)
(+
(/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
(+ (* -0.25 (/ NaChar (/ KbT Vef))) t_2))
(if (<= KbT -2.9e-71)
t_1
(if (<= KbT 1.6e-205)
(/ NdChar (+ (exp (/ Vef KbT)) 1.0))
(if (<= KbT 9.6e+150) t_1 t_2))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
double t_2 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.35e+154) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
} else if (KbT <= -2.9e-71) {
tmp = t_1;
} else if (KbT <= 1.6e-205) {
tmp = NdChar / (exp((Vef / KbT)) + 1.0);
} else if (KbT <= 9.6e+150) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (edonor + (vef + mu)) - ec
t_1 = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
t_2 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.35d+154)) then
tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_2)
else if (kbt <= (-2.9d-71)) then
tmp = t_1
else if (kbt <= 1.6d-205) then
tmp = ndchar / (exp((vef / kbt)) + 1.0d0)
else if (kbt <= 9.6d+150) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
double t_2 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.35e+154) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
} else if (KbT <= -2.9e-71) {
tmp = t_1;
} else if (KbT <= 1.6e-205) {
tmp = NdChar / (Math.exp((Vef / KbT)) + 1.0);
} else if (KbT <= 9.6e+150) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (EDonor + (Vef + mu)) - Ec t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0) t_2 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.35e+154: tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2) elif KbT <= -2.9e-71: tmp = t_1 elif KbT <= 1.6e-205: tmp = NdChar / (math.exp((Vef / KbT)) + 1.0) elif KbT <= 9.6e+150: tmp = t_1 else: tmp = t_2 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec) t_1 = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0)) t_2 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.35e+154) tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_2)); elseif (KbT <= -2.9e-71) tmp = t_1; elseif (KbT <= 1.6e-205) tmp = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0)); elseif (KbT <= 9.6e+150) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (EDonor + (Vef + mu)) - Ec; t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0); t_2 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.35e+154) tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2); elseif (KbT <= -2.9e-71) tmp = t_1; elseif (KbT <= 1.6e-205) tmp = NdChar / (exp((Vef / KbT)) + 1.0); elseif (KbT <= 9.6e+150) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.35e+154], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -2.9e-71], t$95$1, If[LessEqual[KbT, 1.6e-205], N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.6e+150], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\
t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\
\mathbf{elif}\;KbT \leq -2.9 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;KbT \leq 1.6 \cdot 10^{-205}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if KbT < -1.35000000000000003e154Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified59.6%
Applied egg-rr65.5%
Taylor expanded in Vef around inf
/-lowering-/.f6465.8%
Simplified65.8%
if -1.35000000000000003e154 < KbT < -2.8999999999999999e-71 or 1.60000000000000005e-205 < KbT < 9.60000000000000011e150Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified77.6%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Simplified48.4%
if -2.8999999999999999e-71 < KbT < 1.60000000000000005e-205Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6460.6%
Simplified60.6%
Taylor expanded in Vef around inf
/-lowering-/.f6445.2%
Simplified45.2%
if 9.60000000000000011e150 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6456.0%
Simplified56.0%
Final simplification50.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec))
(t_1
(/
NdChar
(+
(/
-1.0
(+
(+
(+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
(/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
(- -1.0 (/ Ec KbT))))
1.0)))
(t_2 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.75e+157)
(+
(/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
(+ (* -0.25 (/ NaChar (/ KbT Vef))) t_2))
(if (<= KbT -1.16e-132)
t_1
(if (<= KbT 3.2e-205)
(/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
(if (<= KbT 9.6e+150) t_1 t_2))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
double t_2 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.75e+157) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
} else if (KbT <= -1.16e-132) {
tmp = t_1;
} else if (KbT <= 3.2e-205) {
tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
} else if (KbT <= 9.6e+150) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (edonor + (vef + mu)) - ec
t_1 = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
t_2 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.75d+157)) then
tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_2)
else if (kbt <= (-1.16d-132)) then
tmp = t_1
else if (kbt <= 3.2d-205) then
tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
else if (kbt <= 9.6d+150) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
double t_2 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.75e+157) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2);
} else if (KbT <= -1.16e-132) {
tmp = t_1;
} else if (KbT <= 3.2e-205) {
tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
} else if (KbT <= 9.6e+150) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (EDonor + (Vef + mu)) - Ec t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0) t_2 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.75e+157: tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2) elif KbT <= -1.16e-132: tmp = t_1 elif KbT <= 3.2e-205: tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0) elif KbT <= 9.6e+150: tmp = t_1 else: tmp = t_2 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec) t_1 = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0)) t_2 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.75e+157) tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_2)); elseif (KbT <= -1.16e-132) tmp = t_1; elseif (KbT <= 3.2e-205) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)); elseif (KbT <= 9.6e+150) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (EDonor + (Vef + mu)) - Ec; t_1 = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0); t_2 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.75e+157) tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_2); elseif (KbT <= -1.16e-132) tmp = t_1; elseif (KbT <= 3.2e-205) tmp = NdChar / (exp((EDonor / KbT)) + 1.0); elseif (KbT <= 9.6e+150) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.75e+157], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, -1.16e-132], t$95$1, If[LessEqual[KbT, 3.2e-205], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.6e+150], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := \frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\
t_2 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.75 \cdot 10^{+157}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_2\right)\\
\mathbf{elif}\;KbT \leq -1.16 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;KbT \leq 3.2 \cdot 10^{-205}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{elif}\;KbT \leq 9.6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if KbT < -1.75000000000000001e157Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified59.6%
Applied egg-rr65.5%
Taylor expanded in Vef around inf
/-lowering-/.f6465.8%
Simplified65.8%
if -1.75000000000000001e157 < KbT < -1.1599999999999999e-132 or 3.20000000000000009e-205 < KbT < 9.60000000000000011e150Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified76.1%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Simplified45.2%
if -1.1599999999999999e-132 < KbT < 3.20000000000000009e-205Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6465.5%
Simplified65.5%
Taylor expanded in EDonor around inf
/-lowering-/.f6438.3%
Simplified38.3%
if 9.60000000000000011e150 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6456.0%
Simplified56.0%
Final simplification47.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)))
(if (<= Vef -9.5e+166)
(/ NdChar t_0)
(if (<= Vef 1.55e+160)
(+ NdChar (/ NaChar (+ (exp (/ mu (- 0.0 KbT))) 1.0)))
(+ NdChar (/ NaChar t_0))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = exp((Vef / KbT)) + 1.0;
double tmp;
if (Vef <= -9.5e+166) {
tmp = NdChar / t_0;
} else if (Vef <= 1.55e+160) {
tmp = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0));
} else {
tmp = NdChar + (NaChar / t_0);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = exp((vef / kbt)) + 1.0d0
if (vef <= (-9.5d+166)) then
tmp = ndchar / t_0
else if (vef <= 1.55d+160) then
tmp = ndchar + (nachar / (exp((mu / (0.0d0 - kbt))) + 1.0d0))
else
tmp = ndchar + (nachar / t_0)
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = Math.exp((Vef / KbT)) + 1.0;
double tmp;
if (Vef <= -9.5e+166) {
tmp = NdChar / t_0;
} else if (Vef <= 1.55e+160) {
tmp = NdChar + (NaChar / (Math.exp((mu / (0.0 - KbT))) + 1.0));
} else {
tmp = NdChar + (NaChar / t_0);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = math.exp((Vef / KbT)) + 1.0 tmp = 0 if Vef <= -9.5e+166: tmp = NdChar / t_0 elif Vef <= 1.55e+160: tmp = NdChar + (NaChar / (math.exp((mu / (0.0 - KbT))) + 1.0)) else: tmp = NdChar + (NaChar / t_0) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0) tmp = 0.0 if (Vef <= -9.5e+166) tmp = Float64(NdChar / t_0); elseif (Vef <= 1.55e+160) tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(mu / Float64(0.0 - KbT))) + 1.0))); else tmp = Float64(NdChar + Float64(NaChar / t_0)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = exp((Vef / KbT)) + 1.0; tmp = 0.0; if (Vef <= -9.5e+166) tmp = NdChar / t_0; elseif (Vef <= 1.55e+160) tmp = NdChar + (NaChar / (exp((mu / (0.0 - KbT))) + 1.0)); else tmp = NdChar + (NaChar / t_0); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[Vef, -9.5e+166], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[Vef, 1.55e+160], N[(NdChar + N[(NaChar / N[(N[Exp[N[(mu / N[(0.0 - KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(NdChar + N[(NaChar / t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
\mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\mathbf{elif}\;Vef \leq 1.55 \cdot 10^{+160}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{mu}{0 - KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;NdChar + \frac{NaChar}{t\_0}\\
\end{array}
\end{array}
if Vef < -9.49999999999999984e166Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6458.2%
Simplified58.2%
Taylor expanded in Vef around inf
/-lowering-/.f6455.7%
Simplified55.7%
if -9.49999999999999984e166 < Vef < 1.5499999999999999e160Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified77.5%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6467.7%
Simplified67.7%
Taylor expanded in mu around inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6456.5%
Simplified56.5%
if 1.5499999999999999e160 < Vef Initial program 100.0%
Simplified100.0%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f64100.0%
Applied egg-rr100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified62.6%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6462.6%
Simplified62.6%
Taylor expanded in Vef around inf
/-lowering-/.f6462.6%
Simplified62.6%
Final simplification57.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ (exp (/ Vef KbT)) 1.0))))
(if (<= Vef -9.5e+166)
t_0
(if (<= Vef 5e+76) (+ NdChar (/ NaChar (+ (exp (/ Ev KbT)) 1.0))) t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -9.5e+166) {
tmp = t_0;
} else if (Vef <= 5e+76) {
tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (exp((vef / kbt)) + 1.0d0)
if (vef <= (-9.5d+166)) then
tmp = t_0
else if (vef <= 5d+76) then
tmp = ndchar + (nachar / (exp((ev / kbt)) + 1.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (Math.exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -9.5e+166) {
tmp = t_0;
} else if (Vef <= 5e+76) {
tmp = NdChar + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (math.exp((Vef / KbT)) + 1.0) tmp = 0 if Vef <= -9.5e+166: tmp = t_0 elif Vef <= 5e+76: tmp = NdChar + (NaChar / (math.exp((Ev / KbT)) + 1.0)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0)) tmp = 0.0 if (Vef <= -9.5e+166) tmp = t_0; elseif (Vef <= 5e+76) tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (exp((Vef / KbT)) + 1.0); tmp = 0.0; if (Vef <= -9.5e+166) tmp = t_0; elseif (Vef <= 5e+76) tmp = NdChar + (NaChar / (exp((Ev / KbT)) + 1.0)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -9.5e+166], t$95$0, If[LessEqual[Vef, 5e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;Vef \leq 5 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if Vef < -9.49999999999999984e166 or 4.99999999999999991e76 < Vef Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6458.3%
Simplified58.3%
Taylor expanded in Vef around inf
/-lowering-/.f6450.3%
Simplified50.3%
if -9.49999999999999984e166 < Vef < 4.99999999999999991e76Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified79.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6468.7%
Simplified68.7%
Taylor expanded in Ev around inf
/-lowering-/.f6448.5%
Simplified48.5%
Final simplification49.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ (exp (/ Vef KbT)) 1.0))))
(if (<= Vef -3.65e+168)
t_0
(if (<= Vef 5.1e+76)
(+ NdChar (/ NaChar (+ (exp (/ EAccept KbT)) 1.0)))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -3.65e+168) {
tmp = t_0;
} else if (Vef <= 5.1e+76) {
tmp = NdChar + (NaChar / (exp((EAccept / KbT)) + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (exp((vef / kbt)) + 1.0d0)
if (vef <= (-3.65d+168)) then
tmp = t_0
else if (vef <= 5.1d+76) then
tmp = ndchar + (nachar / (exp((eaccept / kbt)) + 1.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (Math.exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -3.65e+168) {
tmp = t_0;
} else if (Vef <= 5.1e+76) {
tmp = NdChar + (NaChar / (Math.exp((EAccept / KbT)) + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (math.exp((Vef / KbT)) + 1.0) tmp = 0 if Vef <= -3.65e+168: tmp = t_0 elif Vef <= 5.1e+76: tmp = NdChar + (NaChar / (math.exp((EAccept / KbT)) + 1.0)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0)) tmp = 0.0 if (Vef <= -3.65e+168) tmp = t_0; elseif (Vef <= 5.1e+76) tmp = Float64(NdChar + Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (exp((Vef / KbT)) + 1.0); tmp = 0.0; if (Vef <= -3.65e+168) tmp = t_0; elseif (Vef <= 5.1e+76) tmp = NdChar + (NaChar / (exp((EAccept / KbT)) + 1.0)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -3.65e+168], t$95$0, If[LessEqual[Vef, 5.1e+76], N[(NdChar + N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -3.65 \cdot 10^{+168}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;Vef \leq 5.1 \cdot 10^{+76}:\\
\;\;\;\;NdChar + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if Vef < -3.6499999999999998e168 or 5.1000000000000002e76 < Vef Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6458.3%
Simplified58.3%
Taylor expanded in Vef around inf
/-lowering-/.f6450.3%
Simplified50.3%
if -3.6499999999999998e168 < Vef < 5.1000000000000002e76Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified79.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6468.7%
Simplified68.7%
Taylor expanded in EAccept around inf
/-lowering-/.f6454.6%
Simplified54.6%
Final simplification53.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (- (+ EDonor (+ Vef mu)) Ec)) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.35e+154)
(+
(/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
(+ (* -0.25 (/ NaChar (/ KbT Vef))) t_1))
(if (<= KbT 1.7e+153)
(/
NdChar
(+
(/
-1.0
(+
(+
(+ (+ (/ Vef KbT) (/ EDonor KbT)) (/ mu KbT))
(/ (* -0.5 (* t_0 t_0)) (* KbT KbT)))
(- -1.0 (/ Ec KbT))))
1.0))
t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.35e+154) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1);
} else if (KbT <= 1.7e+153) {
tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (edonor + (vef + mu)) - ec
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.35d+154)) then
tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_1)
else if (kbt <= 1.7d+153) then
tmp = ndchar / (((-1.0d0) / (((((vef / kbt) + (edonor / kbt)) + (mu / kbt)) + (((-0.5d0) * (t_0 * t_0)) / (kbt * kbt))) + ((-1.0d0) - (ec / kbt)))) + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (EDonor + (Vef + mu)) - Ec;
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.35e+154) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1);
} else if (KbT <= 1.7e+153) {
tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (EDonor + (Vef + mu)) - Ec t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.35e+154: tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1) elif KbT <= 1.7e+153: tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(EDonor + Float64(Vef + mu)) - Ec) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.35e+154) tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_1)); elseif (KbT <= 1.7e+153) tmp = Float64(NdChar / Float64(Float64(-1.0 / Float64(Float64(Float64(Float64(Float64(Vef / KbT) + Float64(EDonor / KbT)) + Float64(mu / KbT)) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / Float64(KbT * KbT))) + Float64(-1.0 - Float64(Ec / KbT)))) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (EDonor + (Vef + mu)) - Ec; t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.35e+154) tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_1); elseif (KbT <= 1.7e+153) tmp = NdChar / ((-1.0 / (((((Vef / KbT) + (EDonor / KbT)) + (mu / KbT)) + ((-0.5 * (t_0 * t_0)) / (KbT * KbT))) + (-1.0 - (Ec / KbT)))) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(EDonor + N[(Vef + mu), $MachinePrecision]), $MachinePrecision] - Ec), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.35e+154], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.7e+153], N[(NdChar / N[(N[(-1.0 / N[(N[(N[(N[(N[(Vef / KbT), $MachinePrecision] + N[(EDonor / KbT), $MachinePrecision]), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(EDonor + \left(Vef + mu\right)\right) - Ec\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_1\right)\\
\mathbf{elif}\;KbT \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\frac{NdChar}{\frac{-1}{\left(\left(\left(\frac{Vef}{KbT} + \frac{EDonor}{KbT}\right) + \frac{mu}{KbT}\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT \cdot KbT}\right) + \left(-1 - \frac{Ec}{KbT}\right)} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if KbT < -1.35000000000000003e154Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified59.6%
Applied egg-rr65.5%
Taylor expanded in Vef around inf
/-lowering-/.f6465.8%
Simplified65.8%
if -1.35000000000000003e154 < KbT < 1.6999999999999999e153Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified73.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Simplified39.2%
if 1.6999999999999999e153 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6456.0%
Simplified56.0%
Final simplification44.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.5e+180)
(+
(/ (* NdChar -0.25) (/ KbT (+ Vef (+ mu (- EDonor Ec)))))
(+ (* -0.25 (/ NaChar (/ KbT Vef))) t_0))
(if (<= KbT 1.35e+69) NdChar t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.5e+180) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0);
} else if (KbT <= 1.35e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.5d+180)) then
tmp = ((ndchar * (-0.25d0)) / (kbt / (vef + (mu + (edonor - ec))))) + (((-0.25d0) * (nachar / (kbt / vef))) + t_0)
else if (kbt <= 1.35d+69) then
tmp = ndchar
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.5e+180) {
tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0);
} else if (KbT <= 1.35e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.5e+180: tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0) elif KbT <= 1.35e+69: tmp = NdChar else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.5e+180) tmp = Float64(Float64(Float64(NdChar * -0.25) / Float64(KbT / Float64(Vef + Float64(mu + Float64(EDonor - Ec))))) + Float64(Float64(-0.25 * Float64(NaChar / Float64(KbT / Vef))) + t_0)); elseif (KbT <= 1.35e+69) tmp = NdChar; else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.5e+180) tmp = ((NdChar * -0.25) / (KbT / (Vef + (mu + (EDonor - Ec))))) + ((-0.25 * (NaChar / (KbT / Vef))) + t_0); elseif (KbT <= 1.35e+69) tmp = NdChar; else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.5e+180], N[(N[(N[(NdChar * -0.25), $MachinePrecision] / N[(KbT / N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(NaChar / N[(KbT / Vef), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.35e+69], NdChar, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{NdChar \cdot -0.25}{\frac{KbT}{Vef + \left(mu + \left(EDonor - Ec\right)\right)}} + \left(-0.25 \cdot \frac{NaChar}{\frac{KbT}{Vef}} + t\_0\right)\\
\mathbf{elif}\;KbT \leq 1.35 \cdot 10^{+69}:\\
\;\;\;\;NdChar\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -1.50000000000000001e180Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified64.1%
Applied egg-rr70.4%
Taylor expanded in Vef around inf
/-lowering-/.f6470.7%
Simplified70.7%
if -1.50000000000000001e180 < KbT < 1.3499999999999999e69Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified72.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6467.5%
Simplified67.5%
Taylor expanded in NdChar around inf
Simplified38.5%
if 1.3499999999999999e69 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6448.2%
Simplified48.2%
Final simplification43.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -2.1e+180)
(+
(* -0.25 (* NaChar (/ (- (+ Vef (+ EAccept Ev)) mu) KbT)))
(+ t_0 (* -0.25 (* NdChar (/ mu KbT)))))
(if (<= KbT 2.5e+69) NdChar t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.1e+180) {
tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))));
} else if (KbT <= 2.5e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-2.1d+180)) then
tmp = ((-0.25d0) * (nachar * (((vef + (eaccept + ev)) - mu) / kbt))) + (t_0 + ((-0.25d0) * (ndchar * (mu / kbt))))
else if (kbt <= 2.5d+69) then
tmp = ndchar
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.1e+180) {
tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT))));
} else if (KbT <= 2.5e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -2.1e+180: tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT)))) elif KbT <= 2.5e+69: tmp = NdChar else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -2.1e+180) tmp = Float64(Float64(-0.25 * Float64(NaChar * Float64(Float64(Float64(Vef + Float64(EAccept + Ev)) - mu) / KbT))) + Float64(t_0 + Float64(-0.25 * Float64(NdChar * Float64(mu / KbT))))); elseif (KbT <= 2.5e+69) tmp = NdChar; else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -2.1e+180) tmp = (-0.25 * (NaChar * (((Vef + (EAccept + Ev)) - mu) / KbT))) + (t_0 + (-0.25 * (NdChar * (mu / KbT)))); elseif (KbT <= 2.5e+69) tmp = NdChar; else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.1e+180], N[(N[(-0.25 * N[(NaChar * N[(N[(N[(Vef + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] - mu), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + N[(-0.25 * N[(NdChar * N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 2.5e+69], NdChar, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -2.1 \cdot 10^{+180}:\\
\;\;\;\;-0.25 \cdot \left(NaChar \cdot \frac{\left(Vef + \left(EAccept + Ev\right)\right) - mu}{KbT}\right) + \left(t\_0 + -0.25 \cdot \left(NdChar \cdot \frac{mu}{KbT}\right)\right)\\
\mathbf{elif}\;KbT \leq 2.5 \cdot 10^{+69}:\\
\;\;\;\;NdChar\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -2.1e180Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified64.1%
Taylor expanded in mu around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6469.0%
Simplified69.0%
if -2.1e180 < KbT < 2.50000000000000018e69Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified72.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6467.5%
Simplified67.5%
Taylor expanded in NdChar around inf
Simplified38.5%
if 2.50000000000000018e69 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6448.2%
Simplified48.2%
Final simplification43.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (let* ((t_0 (* 0.5 (+ NdChar NaChar)))) (if (<= KbT -2.75e+180) t_0 (if (<= KbT 6.2e+69) NdChar t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.75e+180) {
tmp = t_0;
} else if (KbT <= 6.2e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-2.75d+180)) then
tmp = t_0
else if (kbt <= 6.2d+69) then
tmp = ndchar
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.75e+180) {
tmp = t_0;
} else if (KbT <= 6.2e+69) {
tmp = NdChar;
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -2.75e+180: tmp = t_0 elif KbT <= 6.2e+69: tmp = NdChar else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -2.75e+180) tmp = t_0; elseif (KbT <= 6.2e+69) tmp = NdChar; else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -2.75e+180) tmp = t_0; elseif (KbT <= 6.2e+69) tmp = NdChar; else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.75e+180], t$95$0, If[LessEqual[KbT, 6.2e+69], NdChar, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -2.75 \cdot 10^{+180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\
\;\;\;\;NdChar\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -2.7500000000000001e180 or 6.1999999999999997e69 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6454.4%
Simplified54.4%
if -2.7500000000000001e180 < KbT < 6.1999999999999997e69Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified72.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6467.5%
Simplified67.5%
Taylor expanded in NdChar around inf
Simplified38.5%
Final simplification43.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (<= KbT -1.8e+191) (* NaChar 0.5) (if (<= KbT 6.2e+69) NdChar (* NaChar 0.5))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -1.8e+191) {
tmp = NaChar * 0.5;
} else if (KbT <= 6.2e+69) {
tmp = NdChar;
} else {
tmp = NaChar * 0.5;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (kbt <= (-1.8d+191)) then
tmp = nachar * 0.5d0
else if (kbt <= 6.2d+69) then
tmp = ndchar
else
tmp = nachar * 0.5d0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -1.8e+191) {
tmp = NaChar * 0.5;
} else if (KbT <= 6.2e+69) {
tmp = NdChar;
} else {
tmp = NaChar * 0.5;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if KbT <= -1.8e+191: tmp = NaChar * 0.5 elif KbT <= 6.2e+69: tmp = NdChar else: tmp = NaChar * 0.5 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (KbT <= -1.8e+191) tmp = Float64(NaChar * 0.5); elseif (KbT <= 6.2e+69) tmp = NdChar; else tmp = Float64(NaChar * 0.5); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (KbT <= -1.8e+191) tmp = NaChar * 0.5; elseif (KbT <= 6.2e+69) tmp = NdChar; else tmp = NaChar * 0.5; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -1.8e+191], N[(NaChar * 0.5), $MachinePrecision], If[LessEqual[KbT, 6.2e+69], NdChar, N[(NaChar * 0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;KbT \leq -1.8 \cdot 10^{+191}:\\
\;\;\;\;NaChar \cdot 0.5\\
\mathbf{elif}\;KbT \leq 6.2 \cdot 10^{+69}:\\
\;\;\;\;NdChar\\
\mathbf{else}:\\
\;\;\;\;NaChar \cdot 0.5\\
\end{array}
\end{array}
if KbT < -1.8e191 or 6.1999999999999997e69 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6454.7%
Simplified54.7%
Taylor expanded in NaChar around inf
*-lowering-*.f6442.0%
Simplified42.0%
if -1.8e191 < KbT < 6.1999999999999997e69Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified72.7%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6467.6%
Simplified67.6%
Taylor expanded in NdChar around inf
Simplified38.5%
Final simplification39.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 NdChar)
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NdChar;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = ndchar
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NdChar;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return NdChar
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return NdChar end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = NdChar; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := NdChar
\begin{array}{l}
\\
NdChar
\end{array}
Initial program 99.9%
Simplified99.9%
frac-2negN/A
distribute-frac-neg2N/A
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-+r-N/A
--lowering--.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified72.2%
Taylor expanded in Ec around inf
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6465.1%
Simplified65.1%
Taylor expanded in NdChar around inf
Simplified31.0%
herbie shell --seed 2024161
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:name "Bulmash initializePoisson"
:precision binary64
(+ (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT)))) (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))