
(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 23 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 (+ (exp (/ (+ EDonor (+ mu (- Vef Ec))) 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 / (exp(((EDonor + (mu + (Vef - Ec))) / 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 / (exp(((edonor + (mu + (vef - ec))) / 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 / (Math.exp(((EDonor + (mu + (Vef - Ec))) / 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 / (math.exp(((EDonor + (mu + (Vef - Ec))) / 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(exp(Float64(Float64(EDonor + Float64(mu + Float64(Vef - Ec))) / 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 / (exp(((EDonor + (mu + (Vef - Ec))) / 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[Exp[N[(N[(EDonor + N[(mu + N[(Vef - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $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}{e^{\frac{EDonor + \left(mu + \left(Vef - Ec\right)\right)}{KbT}} + 1} - \frac{NaChar}{-1 - e^{\frac{Vef + \left(EAccept + \left(Ev - mu\right)\right)}{KbT}}}
\end{array}
Initial program 99.6%
+-lowering-+.f64N/A
Simplified99.6%
Final simplification99.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ (exp (/ (+ EDonor (+ mu (- Vef Ec))) KbT)) 1.0))))
(if (<= Ev -6.2e-5)
(+ t_0 (/ NaChar (+ (exp (/ Ev KbT)) 1.0)))
(if (<= Ev -4.2e-116)
(/ NdChar (+ (exp (/ (+ (+ EDonor Vef) (- mu Ec)) KbT)) 1.0))
(if (<= Ev -7e-239)
(/ NaChar (+ (exp (/ (+ (- Vef mu) (+ EAccept Ev)) KbT)) 1.0))
(+ t_0 (/ NaChar (+ (exp (/ EAccept KbT)) 1.0))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0);
double tmp;
if (Ev <= -6.2e-5) {
tmp = t_0 + (NaChar / (exp((Ev / KbT)) + 1.0));
} else if (Ev <= -4.2e-116) {
tmp = NdChar / (exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0);
} else if (Ev <= -7e-239) {
tmp = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
} else {
tmp = t_0 + (NaChar / (exp((EAccept / KbT)) + 1.0));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (exp(((edonor + (mu + (vef - ec))) / kbt)) + 1.0d0)
if (ev <= (-6.2d-5)) then
tmp = t_0 + (nachar / (exp((ev / kbt)) + 1.0d0))
else if (ev <= (-4.2d-116)) then
tmp = ndchar / (exp((((edonor + vef) + (mu - ec)) / kbt)) + 1.0d0)
else if (ev <= (-7d-239)) then
tmp = nachar / (exp((((vef - mu) + (eaccept + ev)) / kbt)) + 1.0d0)
else
tmp = t_0 + (nachar / (exp((eaccept / kbt)) + 1.0d0))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (Math.exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0);
double tmp;
if (Ev <= -6.2e-5) {
tmp = t_0 + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
} else if (Ev <= -4.2e-116) {
tmp = NdChar / (Math.exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0);
} else if (Ev <= -7e-239) {
tmp = NaChar / (Math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
} else {
tmp = t_0 + (NaChar / (Math.exp((EAccept / KbT)) + 1.0));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (math.exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0) tmp = 0 if Ev <= -6.2e-5: tmp = t_0 + (NaChar / (math.exp((Ev / KbT)) + 1.0)) elif Ev <= -4.2e-116: tmp = NdChar / (math.exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0) elif Ev <= -7e-239: tmp = NaChar / (math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0) else: tmp = t_0 + (NaChar / (math.exp((EAccept / KbT)) + 1.0)) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(mu + Float64(Vef - Ec))) / KbT)) + 1.0)) tmp = 0.0 if (Ev <= -6.2e-5) tmp = Float64(t_0 + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0))); elseif (Ev <= -4.2e-116) tmp = Float64(NdChar / Float64(exp(Float64(Float64(Float64(EDonor + Vef) + Float64(mu - Ec)) / KbT)) + 1.0)); elseif (Ev <= -7e-239) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef - mu) + Float64(EAccept + Ev)) / KbT)) + 1.0)); else tmp = Float64(t_0 + Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0); tmp = 0.0; if (Ev <= -6.2e-5) tmp = t_0 + (NaChar / (exp((Ev / KbT)) + 1.0)); elseif (Ev <= -4.2e-116) tmp = NdChar / (exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0); elseif (Ev <= -7e-239) tmp = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0); else tmp = t_0 + (NaChar / (exp((EAccept / KbT)) + 1.0)); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(mu + N[(Vef - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Ev, -6.2e-5], N[(t$95$0 + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ev, -4.2e-116], N[(NdChar / N[(N[Exp[N[(N[(N[(EDonor + Vef), $MachinePrecision] + N[(mu - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Ev, -7e-239], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef - mu), $MachinePrecision] + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{EDonor + \left(mu + \left(Vef - Ec\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;Ev \leq -6.2 \cdot 10^{-5}:\\
\;\;\;\;t\_0 + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{elif}\;Ev \leq -4.2 \cdot 10^{-116}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{\left(EDonor + Vef\right) + \left(mu - Ec\right)}{KbT}} + 1}\\
\mathbf{elif}\;Ev \leq -7 \cdot 10^{-239}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef - mu\right) + \left(EAccept + Ev\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\end{array}
\end{array}
if Ev < -6.20000000000000027e-5Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in Ev around inf
/-lowering-/.f6490.2%
Simplified90.2%
if -6.20000000000000027e-5 < Ev < -4.1999999999999998e-116Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6482.7%
Simplified82.7%
if -4.1999999999999998e-116 < Ev < -7.00000000000000011e-239Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6467.8%
Simplified67.8%
if -7.00000000000000011e-239 < Ev Initial program 99.3%
+-lowering-+.f64N/A
Simplified99.3%
Taylor expanded in EAccept around inf
/-lowering-/.f6465.9%
Simplified65.9%
Final simplification74.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ (+ (- Vef mu) (+ EAccept Ev)) KbT)) 1.0))))
(if (<= NaChar -1.5e+27)
t_0
(if (<= NaChar 8e-230)
(/ NdChar (+ (exp (/ (+ (+ EDonor Vef) (- mu Ec)) KbT)) 1.0))
(if (<= NaChar 1.5e+29)
(+
(/ NdChar (+ (exp (/ (+ EDonor (+ mu (- Vef Ec))) KbT)) 1.0))
(/ 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 = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
double tmp;
if (NaChar <= -1.5e+27) {
tmp = t_0;
} else if (NaChar <= 8e-230) {
tmp = NdChar / (exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0);
} else if (NaChar <= 1.5e+29) {
tmp = (NdChar / (exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0)) + (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 = nachar / (exp((((vef - mu) + (eaccept + ev)) / kbt)) + 1.0d0)
if (nachar <= (-1.5d+27)) then
tmp = t_0
else if (nachar <= 8d-230) then
tmp = ndchar / (exp((((edonor + vef) + (mu - ec)) / kbt)) + 1.0d0)
else if (nachar <= 1.5d+29) then
tmp = (ndchar / (exp(((edonor + (mu + (vef - ec))) / kbt)) + 1.0d0)) + (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 = NaChar / (Math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
double tmp;
if (NaChar <= -1.5e+27) {
tmp = t_0;
} else if (NaChar <= 8e-230) {
tmp = NdChar / (Math.exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0);
} else if (NaChar <= 1.5e+29) {
tmp = (NdChar / (Math.exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0)) + (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 = NaChar / (math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0) tmp = 0 if NaChar <= -1.5e+27: tmp = t_0 elif NaChar <= 8e-230: tmp = NdChar / (math.exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0) elif NaChar <= 1.5e+29: tmp = (NdChar / (math.exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0)) + (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(NaChar / Float64(exp(Float64(Float64(Float64(Vef - mu) + Float64(EAccept + Ev)) / KbT)) + 1.0)) tmp = 0.0 if (NaChar <= -1.5e+27) tmp = t_0; elseif (NaChar <= 8e-230) tmp = Float64(NdChar / Float64(exp(Float64(Float64(Float64(EDonor + Vef) + Float64(mu - Ec)) / KbT)) + 1.0)); elseif (NaChar <= 1.5e+29) tmp = Float64(Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(mu + Float64(Vef - Ec))) / KbT)) + 1.0)) + 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 = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0); tmp = 0.0; if (NaChar <= -1.5e+27) tmp = t_0; elseif (NaChar <= 8e-230) tmp = NdChar / (exp((((EDonor + Vef) + (mu - Ec)) / KbT)) + 1.0); elseif (NaChar <= 1.5e+29) tmp = (NdChar / (exp(((EDonor + (mu + (Vef - Ec))) / KbT)) + 1.0)) + (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[(NaChar / N[(N[Exp[N[(N[(N[(Vef - mu), $MachinePrecision] + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -1.5e+27], t$95$0, If[LessEqual[NaChar, 8e-230], N[(NdChar / N[(N[Exp[N[(N[(N[(EDonor + Vef), $MachinePrecision] + N[(mu - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NaChar, 1.5e+29], N[(N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(mu + N[(Vef - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 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{NaChar}{e^{\frac{\left(Vef - mu\right) + \left(EAccept + Ev\right)}{KbT}} + 1}\\
\mathbf{if}\;NaChar \leq -1.5 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NaChar \leq 8 \cdot 10^{-230}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{\left(EDonor + Vef\right) + \left(mu - Ec\right)}{KbT}} + 1}\\
\mathbf{elif}\;NaChar \leq 1.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor + \left(mu + \left(Vef - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if NaChar < -1.49999999999999988e27 or 1.5e29 < NaChar Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.9%
Simplified75.9%
if -1.49999999999999988e27 < NaChar < 8.00000000000000037e-230Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6482.7%
Simplified82.7%
if 8.00000000000000037e-230 < NaChar < 1.5e29Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in EAccept around inf
/-lowering-/.f6483.2%
Simplified83.2%
Final simplification79.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)))
(if (<= Vef -7.2e+120)
(/ NaChar t_0)
(if (<= Vef 8e-167)
(/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
(if (<= Vef 2.25e-94)
(/ NaChar (+ (exp (- 0.0 (/ mu KbT))) 1.0))
(if (<= Vef 7.8e+115)
(/ NdChar (+ (exp (/ mu KbT)) 1.0))
(/ 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 = exp((Vef / KbT)) + 1.0;
double tmp;
if (Vef <= -7.2e+120) {
tmp = NaChar / t_0;
} else if (Vef <= 8e-167) {
tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 2.25e-94) {
tmp = NaChar / (exp((0.0 - (mu / KbT))) + 1.0);
} else if (Vef <= 7.8e+115) {
tmp = NdChar / (exp((mu / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= (-7.2d+120)) then
tmp = nachar / t_0
else if (vef <= 8d-167) then
tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
else if (vef <= 2.25d-94) then
tmp = nachar / (exp((0.0d0 - (mu / kbt))) + 1.0d0)
else if (vef <= 7.8d+115) then
tmp = ndchar / (exp((mu / kbt)) + 1.0d0)
else
tmp = ndchar / 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 <= -7.2e+120) {
tmp = NaChar / t_0;
} else if (Vef <= 8e-167) {
tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 2.25e-94) {
tmp = NaChar / (Math.exp((0.0 - (mu / KbT))) + 1.0);
} else if (Vef <= 7.8e+115) {
tmp = NdChar / (Math.exp((mu / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= -7.2e+120: tmp = NaChar / t_0 elif Vef <= 8e-167: tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0) elif Vef <= 2.25e-94: tmp = NaChar / (math.exp((0.0 - (mu / KbT))) + 1.0) elif Vef <= 7.8e+115: tmp = NdChar / (math.exp((mu / KbT)) + 1.0) else: tmp = NdChar / 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 <= -7.2e+120) tmp = Float64(NaChar / t_0); elseif (Vef <= 8e-167) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)); elseif (Vef <= 2.25e-94) tmp = Float64(NaChar / Float64(exp(Float64(0.0 - Float64(mu / KbT))) + 1.0)); elseif (Vef <= 7.8e+115) tmp = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0)); else tmp = Float64(NdChar / 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 <= -7.2e+120) tmp = NaChar / t_0; elseif (Vef <= 8e-167) tmp = NdChar / (exp((EDonor / KbT)) + 1.0); elseif (Vef <= 2.25e-94) tmp = NaChar / (exp((0.0 - (mu / KbT))) + 1.0); elseif (Vef <= 7.8e+115) tmp = NdChar / (exp((mu / KbT)) + 1.0); else tmp = NdChar / 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, -7.2e+120], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[Vef, 8e-167], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 2.25e-94], N[(NaChar / N[(N[Exp[N[(0.0 - N[(mu / KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 7.8e+115], N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NdChar / t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
\mathbf{if}\;Vef \leq -7.2 \cdot 10^{+120}:\\
\;\;\;\;\frac{NaChar}{t\_0}\\
\mathbf{elif}\;Vef \leq 8 \cdot 10^{-167}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 2.25 \cdot 10^{-94}:\\
\;\;\;\;\frac{NaChar}{e^{0 - \frac{mu}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 7.8 \cdot 10^{+115}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\end{array}
\end{array}
if Vef < -7.20000000000000031e120Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6482.1%
Simplified82.1%
Taylor expanded in Vef around inf
/-lowering-/.f6466.8%
Simplified66.8%
if -7.20000000000000031e120 < Vef < 8.00000000000000002e-167Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6463.5%
Simplified63.5%
Taylor expanded in EDonor around inf
/-lowering-/.f6448.5%
Simplified48.5%
if 8.00000000000000002e-167 < Vef < 2.2500000000000001e-94Initial program 99.9%
+-lowering-+.f64N/A
Simplified99.9%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6470.5%
Simplified70.5%
Taylor expanded in mu around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6455.3%
Simplified55.3%
sub0-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6455.3%
Applied egg-rr55.3%
if 2.2500000000000001e-94 < Vef < 7.80000000000000012e115Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.3%
Simplified75.3%
Taylor expanded in mu around inf
/-lowering-/.f6459.1%
Simplified59.1%
if 7.80000000000000012e115 < Vef Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.6%
Simplified75.6%
Taylor expanded in Vef around inf
/-lowering-/.f6467.9%
Simplified67.9%
Final simplification56.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)))
(if (<= Vef -3.5e+122)
(/ NaChar t_0)
(if (<= Vef -4.6e-273)
(/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
(if (<= Vef 7.5e-122)
(/ NaChar (+ (exp (/ Ev KbT)) 1.0))
(if (<= Vef 1.15e+113)
(/ NdChar (+ (exp (/ mu KbT)) 1.0))
(/ 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 = exp((Vef / KbT)) + 1.0;
double tmp;
if (Vef <= -3.5e+122) {
tmp = NaChar / t_0;
} else if (Vef <= -4.6e-273) {
tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 7.5e-122) {
tmp = NaChar / (exp((Ev / KbT)) + 1.0);
} else if (Vef <= 1.15e+113) {
tmp = NdChar / (exp((mu / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= (-3.5d+122)) then
tmp = nachar / t_0
else if (vef <= (-4.6d-273)) then
tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
else if (vef <= 7.5d-122) then
tmp = nachar / (exp((ev / kbt)) + 1.0d0)
else if (vef <= 1.15d+113) then
tmp = ndchar / (exp((mu / kbt)) + 1.0d0)
else
tmp = ndchar / 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 <= -3.5e+122) {
tmp = NaChar / t_0;
} else if (Vef <= -4.6e-273) {
tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 7.5e-122) {
tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
} else if (Vef <= 1.15e+113) {
tmp = NdChar / (Math.exp((mu / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= -3.5e+122: tmp = NaChar / t_0 elif Vef <= -4.6e-273: tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0) elif Vef <= 7.5e-122: tmp = NaChar / (math.exp((Ev / KbT)) + 1.0) elif Vef <= 1.15e+113: tmp = NdChar / (math.exp((mu / KbT)) + 1.0) else: tmp = NdChar / 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 <= -3.5e+122) tmp = Float64(NaChar / t_0); elseif (Vef <= -4.6e-273) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)); elseif (Vef <= 7.5e-122) tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)); elseif (Vef <= 1.15e+113) tmp = Float64(NdChar / Float64(exp(Float64(mu / KbT)) + 1.0)); else tmp = Float64(NdChar / 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 <= -3.5e+122) tmp = NaChar / t_0; elseif (Vef <= -4.6e-273) tmp = NdChar / (exp((EDonor / KbT)) + 1.0); elseif (Vef <= 7.5e-122) tmp = NaChar / (exp((Ev / KbT)) + 1.0); elseif (Vef <= 1.15e+113) tmp = NdChar / (exp((mu / KbT)) + 1.0); else tmp = NdChar / 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, -3.5e+122], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[Vef, -4.6e-273], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 7.5e-122], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 1.15e+113], N[(NdChar / N[(N[Exp[N[(mu / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NdChar / t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
\mathbf{if}\;Vef \leq -3.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{NaChar}{t\_0}\\
\mathbf{elif}\;Vef \leq -4.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 7.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 1.15 \cdot 10^{+113}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{mu}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\end{array}
\end{array}
if Vef < -3.50000000000000014e122Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6482.1%
Simplified82.1%
Taylor expanded in Vef around inf
/-lowering-/.f6466.8%
Simplified66.8%
if -3.50000000000000014e122 < Vef < -4.59999999999999961e-273Initial program 98.9%
+-lowering-+.f64N/A
Simplified98.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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6464.2%
Simplified64.2%
Taylor expanded in EDonor around inf
/-lowering-/.f6449.7%
Simplified49.7%
if -4.59999999999999961e-273 < Vef < 7.4999999999999998e-122Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in Ev around inf
/-lowering-/.f6470.5%
Simplified70.5%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f6441.9%
Simplified41.9%
if 7.4999999999999998e-122 < Vef < 1.14999999999999998e113Initial program 99.9%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6473.2%
Simplified73.2%
Taylor expanded in mu around inf
/-lowering-/.f6455.9%
Simplified55.9%
if 1.14999999999999998e113 < Vef Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.6%
Simplified75.6%
Taylor expanded in Vef around inf
/-lowering-/.f6467.9%
Simplified67.9%
Final simplification55.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -3.3e+171)
t_0
(if (<= KbT -1.3e+119)
(/
NdChar
(- (+ (+ (/ EDonor KbT) 2.0) (+ (/ Vef KbT) (/ mu KbT))) (/ Ec KbT)))
(if (<= KbT 1.6e-269)
(/ NaChar (+ (exp (/ EAccept KbT)) 1.0))
(if (<= KbT 4.5e+201) (/ 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.3e+171) {
tmp = t_0;
} else if (KbT <= -1.3e+119) {
tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT));
} else if (KbT <= 1.6e-269) {
tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
} else if (KbT <= 4.5e+201) {
tmp = 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 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-3.3d+171)) then
tmp = t_0
else if (kbt <= (-1.3d+119)) then
tmp = ndchar / ((((edonor / kbt) + 2.0d0) + ((vef / kbt) + (mu / kbt))) - (ec / kbt))
else if (kbt <= 1.6d-269) then
tmp = nachar / (exp((eaccept / kbt)) + 1.0d0)
else if (kbt <= 4.5d+201) then
tmp = 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.3e+171) {
tmp = t_0;
} else if (KbT <= -1.3e+119) {
tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT));
} else if (KbT <= 1.6e-269) {
tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
} else if (KbT <= 4.5e+201) {
tmp = 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 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -3.3e+171: tmp = t_0 elif KbT <= -1.3e+119: tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT)) elif KbT <= 1.6e-269: tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0) elif KbT <= 4.5e+201: tmp = 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(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -3.3e+171) tmp = t_0; elseif (KbT <= -1.3e+119) tmp = Float64(NdChar / Float64(Float64(Float64(Float64(EDonor / KbT) + 2.0) + Float64(Float64(Vef / KbT) + Float64(mu / KbT))) - Float64(Ec / KbT))); elseif (KbT <= 1.6e-269) tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0)); elseif (KbT <= 4.5e+201) tmp = 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 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -3.3e+171) tmp = t_0; elseif (KbT <= -1.3e+119) tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT)); elseif (KbT <= 1.6e-269) tmp = NaChar / (exp((EAccept / KbT)) + 1.0); elseif (KbT <= 4.5e+201) tmp = 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[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.3e+171], t$95$0, If[LessEqual[KbT, -1.3e+119], N[(NdChar / N[(N[(N[(N[(EDonor / KbT), $MachinePrecision] + 2.0), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.6e-269], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 4.5e+201], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -3.3 \cdot 10^{+171}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq -1.3 \cdot 10^{+119}:\\
\;\;\;\;\frac{NdChar}{\left(\left(\frac{EDonor}{KbT} + 2\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}\\
\mathbf{elif}\;KbT \leq 1.6 \cdot 10^{-269}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{elif}\;KbT \leq 4.5 \cdot 10^{+201}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -3.29999999999999991e171 or 4.5000000000000001e201 < KbT Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6468.4%
Simplified68.4%
if -3.29999999999999991e171 < KbT < -1.3e119Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in KbT around inf
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6464.9%
Simplified64.9%
if -1.3e119 < KbT < 1.6000000000000001e-269Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6460.8%
Simplified60.8%
Taylor expanded in EAccept around inf
/-lowering-/.f6431.1%
Simplified31.1%
if 1.6000000000000001e-269 < KbT < 4.5000000000000001e201Initial program 99.0%
+-lowering-+.f64N/A
Simplified99.0%
Taylor expanded in Ev around inf
/-lowering-/.f6465.0%
Simplified65.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f6438.4%
Simplified38.4%
Final simplification42.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ (+ (- Vef mu) (+ EAccept Ev)) KbT)) 1.0))))
(if (<= NaChar -3.9e+32)
t_0
(if (<= NaChar 3.3e+28)
(/ 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 - mu) + (EAccept + Ev)) / KbT)) + 1.0);
double tmp;
if (NaChar <= -3.9e+32) {
tmp = t_0;
} else if (NaChar <= 3.3e+28) {
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 - mu) + (eaccept + ev)) / kbt)) + 1.0d0)
if (nachar <= (-3.9d+32)) then
tmp = t_0
else if (nachar <= 3.3d+28) 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 - mu) + (EAccept + Ev)) / KbT)) + 1.0);
double tmp;
if (NaChar <= -3.9e+32) {
tmp = t_0;
} else if (NaChar <= 3.3e+28) {
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 - mu) + (EAccept + Ev)) / KbT)) + 1.0) tmp = 0 if NaChar <= -3.9e+32: tmp = t_0 elif NaChar <= 3.3e+28: 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 - mu) + Float64(EAccept + Ev)) / KbT)) + 1.0)) tmp = 0.0 if (NaChar <= -3.9e+32) tmp = t_0; elseif (NaChar <= 3.3e+28) tmp = Float64(NdChar / Float64(exp(Float64(Float64(Float64(EDonor + 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 - mu) + (EAccept + Ev)) / KbT)) + 1.0); tmp = 0.0; if (NaChar <= -3.9e+32) tmp = t_0; elseif (NaChar <= 3.3e+28) 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 - mu), $MachinePrecision] + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NaChar, -3.9e+32], t$95$0, If[LessEqual[NaChar, 3.3e+28], N[(NdChar / N[(N[Exp[N[(N[(N[(EDonor + Vef), $MachinePrecision] + N[(mu - Ec), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{e^{\frac{\left(Vef - mu\right) + \left(EAccept + Ev\right)}{KbT}} + 1}\\
\mathbf{if}\;NaChar \leq -3.9 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NaChar \leq 3.3 \cdot 10^{+28}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{\left(EDonor + Vef\right) + \left(mu - Ec\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if NaChar < -3.8999999999999999e32 or 3.3e28 < NaChar Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.9%
Simplified75.9%
if -3.8999999999999999e32 < NaChar < 3.3e28Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6481.6%
Simplified81.6%
Final simplification78.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ (exp (/ EDonor KbT)) 1.0))))
(if (<= NdChar -4e+70)
t_0
(if (<= NdChar 2.8e+80)
(/ NaChar (+ (exp (/ (+ (- Vef mu) (+ EAccept Ev)) KbT)) 1.0))
(if (<= NdChar 1.7e+168) (/ NdChar (+ (exp (/ Vef KbT)) 1.0)) t_0)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (exp((EDonor / KbT)) + 1.0);
double tmp;
if (NdChar <= -4e+70) {
tmp = t_0;
} else if (NdChar <= 2.8e+80) {
tmp = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
} else if (NdChar <= 1.7e+168) {
tmp = NdChar / (exp((Vef / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (exp((edonor / kbt)) + 1.0d0)
if (ndchar <= (-4d+70)) then
tmp = t_0
else if (ndchar <= 2.8d+80) then
tmp = nachar / (exp((((vef - mu) + (eaccept + ev)) / kbt)) + 1.0d0)
else if (ndchar <= 1.7d+168) then
tmp = ndchar / (exp((vef / kbt)) + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
double tmp;
if (NdChar <= -4e+70) {
tmp = t_0;
} else if (NdChar <= 2.8e+80) {
tmp = NaChar / (Math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0);
} else if (NdChar <= 1.7e+168) {
tmp = NdChar / (Math.exp((Vef / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NdChar / (math.exp((EDonor / KbT)) + 1.0) tmp = 0 if NdChar <= -4e+70: tmp = t_0 elif NdChar <= 2.8e+80: tmp = NaChar / (math.exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0) elif NdChar <= 1.7e+168: tmp = NdChar / (math.exp((Vef / KbT)) + 1.0) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)) tmp = 0.0 if (NdChar <= -4e+70) tmp = t_0; elseif (NdChar <= 2.8e+80) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(Vef - mu) + Float64(EAccept + Ev)) / KbT)) + 1.0)); elseif (NdChar <= 1.7e+168) tmp = Float64(NdChar / Float64(exp(Float64(Vef / KbT)) + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (exp((EDonor / KbT)) + 1.0); tmp = 0.0; if (NdChar <= -4e+70) tmp = t_0; elseif (NdChar <= 2.8e+80) tmp = NaChar / (exp((((Vef - mu) + (EAccept + Ev)) / KbT)) + 1.0); elseif (NdChar <= 1.7e+168) tmp = NdChar / (exp((Vef / KbT)) + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -4e+70], t$95$0, If[LessEqual[NdChar, 2.8e+80], N[(NaChar / N[(N[Exp[N[(N[(N[(Vef - mu), $MachinePrecision] + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 1.7e+168], N[(NdChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -4 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NdChar \leq 2.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(Vef - mu\right) + \left(EAccept + Ev\right)}{KbT}} + 1}\\
\mathbf{elif}\;NdChar \leq 1.7 \cdot 10^{+168}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if NdChar < -4.00000000000000029e70 or 1.70000000000000001e168 < NdChar Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6483.6%
Simplified83.6%
Taylor expanded in EDonor around inf
/-lowering-/.f6459.0%
Simplified59.0%
if -4.00000000000000029e70 < NdChar < 2.79999999999999984e80Initial program 99.3%
+-lowering-+.f64N/A
Simplified99.3%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6473.3%
Simplified73.3%
if 2.79999999999999984e80 < NdChar < 1.70000000000000001e168Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6479.1%
Simplified79.1%
Taylor expanded in Vef around inf
/-lowering-/.f6464.3%
Simplified64.3%
Final simplification67.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)))
(if (<= Vef -1.3e+123)
(/ NaChar t_0)
(if (<= Vef -4.6e-273)
(/ NdChar (+ (exp (/ EDonor KbT)) 1.0))
(if (<= Vef 5.5e-94)
(/ NaChar (+ (exp (/ Ev KbT)) 1.0))
(/ 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 = exp((Vef / KbT)) + 1.0;
double tmp;
if (Vef <= -1.3e+123) {
tmp = NaChar / t_0;
} else if (Vef <= -4.6e-273) {
tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 5.5e-94) {
tmp = NaChar / (exp((Ev / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= (-1.3d+123)) then
tmp = nachar / t_0
else if (vef <= (-4.6d-273)) then
tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
else if (vef <= 5.5d-94) then
tmp = nachar / (exp((ev / kbt)) + 1.0d0)
else
tmp = ndchar / 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 <= -1.3e+123) {
tmp = NaChar / t_0;
} else if (Vef <= -4.6e-273) {
tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
} else if (Vef <= 5.5e-94) {
tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
} else {
tmp = NdChar / 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 <= -1.3e+123: tmp = NaChar / t_0 elif Vef <= -4.6e-273: tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0) elif Vef <= 5.5e-94: tmp = NaChar / (math.exp((Ev / KbT)) + 1.0) else: tmp = NdChar / 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 <= -1.3e+123) tmp = Float64(NaChar / t_0); elseif (Vef <= -4.6e-273) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)); elseif (Vef <= 5.5e-94) tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)); else tmp = Float64(NdChar / 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 <= -1.3e+123) tmp = NaChar / t_0; elseif (Vef <= -4.6e-273) tmp = NdChar / (exp((EDonor / KbT)) + 1.0); elseif (Vef <= 5.5e-94) tmp = NaChar / (exp((Ev / KbT)) + 1.0); else tmp = NdChar / 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, -1.3e+123], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[Vef, -4.6e-273], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 5.5e-94], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(NdChar / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
\mathbf{if}\;Vef \leq -1.3 \cdot 10^{+123}:\\
\;\;\;\;\frac{NaChar}{t\_0}\\
\mathbf{elif}\;Vef \leq -4.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\end{array}
\end{array}
if Vef < -1.29999999999999993e123Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6482.1%
Simplified82.1%
Taylor expanded in Vef around inf
/-lowering-/.f6466.8%
Simplified66.8%
if -1.29999999999999993e123 < Vef < -4.59999999999999961e-273Initial program 98.9%
+-lowering-+.f64N/A
Simplified98.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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6464.2%
Simplified64.2%
Taylor expanded in EDonor around inf
/-lowering-/.f6449.7%
Simplified49.7%
if -4.59999999999999961e-273 < Vef < 5.49999999999999989e-94Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in Ev around inf
/-lowering-/.f6470.7%
Simplified70.7%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f6440.9%
Simplified40.9%
if 5.49999999999999989e-94 < Vef Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.5%
Simplified75.5%
Taylor expanded in Vef around inf
/-lowering-/.f6457.8%
Simplified57.8%
Final simplification53.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ Vef KbT)) 1.0))))
(if (<= Vef -2.7e-74)
t_0
(if (<= Vef 2.62e-48)
(/ NaChar (+ (exp (/ Ev KbT)) 1.0))
(if (<= Vef 5.6e+130)
(*
0.5
(/
-1.0
(/
(+ (/ (- NaChar (/ (* NaChar NaChar) NdChar)) NdChar) -1.0)
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 = NaChar / (exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -2.7e-74) {
tmp = t_0;
} else if (Vef <= 2.62e-48) {
tmp = NaChar / (exp((Ev / KbT)) + 1.0);
} else if (Vef <= 5.6e+130) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / 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 = nachar / (exp((vef / kbt)) + 1.0d0)
if (vef <= (-2.7d-74)) then
tmp = t_0
else if (vef <= 2.62d-48) then
tmp = nachar / (exp((ev / kbt)) + 1.0d0)
else if (vef <= 5.6d+130) then
tmp = 0.5d0 * ((-1.0d0) / ((((nachar - ((nachar * nachar) / ndchar)) / ndchar) + (-1.0d0)) / 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 = NaChar / (Math.exp((Vef / KbT)) + 1.0);
double tmp;
if (Vef <= -2.7e-74) {
tmp = t_0;
} else if (Vef <= 2.62e-48) {
tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
} else if (Vef <= 5.6e+130) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = NaChar / (math.exp((Vef / KbT)) + 1.0) tmp = 0 if Vef <= -2.7e-74: tmp = t_0 elif Vef <= 2.62e-48: tmp = NaChar / (math.exp((Ev / KbT)) + 1.0) elif Vef <= 5.6e+130: tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)) tmp = 0.0 if (Vef <= -2.7e-74) tmp = t_0; elseif (Vef <= 2.62e-48) tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)); elseif (Vef <= 5.6e+130) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(Float64(Float64(NaChar - Float64(Float64(NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar))); 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 / KbT)) + 1.0); tmp = 0.0; if (Vef <= -2.7e-74) tmp = t_0; elseif (Vef <= 2.62e-48) tmp = NaChar / (exp((Ev / KbT)) + 1.0); elseif (Vef <= 5.6e+130) tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / 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[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -2.7e-74], t$95$0, If[LessEqual[Vef, 2.62e-48], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[Vef, 5.6e+130], N[(0.5 * N[(-1.0 / N[(N[(N[(N[(NaChar - N[(N[(NaChar * NaChar), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision] / NdChar), $MachinePrecision] + -1.0), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -2.7 \cdot 10^{-74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;Vef \leq 2.62 \cdot 10^{-48}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{elif}\;Vef \leq 5.6 \cdot 10^{+130}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{\frac{NaChar - \frac{NaChar \cdot NaChar}{NdChar}}{NdChar} + -1}{NdChar}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if Vef < -2.70000000000000018e-74 or 5.5999999999999997e130 < Vef Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6466.7%
Simplified66.7%
Taylor expanded in Vef around inf
/-lowering-/.f6453.4%
Simplified53.4%
if -2.70000000000000018e-74 < Vef < 2.6200000000000001e-48Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in Ev around inf
/-lowering-/.f6474.6%
Simplified74.6%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f6438.3%
Simplified38.3%
if 2.6200000000000001e-48 < Vef < 5.5999999999999997e130Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6430.2%
Simplified30.2%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6411.0%
Applied egg-rr11.0%
Taylor expanded in NdChar around -inf
associate-*r/N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
associate-*r/N/A
distribute-lft-inN/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified34.3%
Final simplification44.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -3.1e+171)
t_0
(if (<= KbT -2.05e+119)
(/
NdChar
(- (+ (+ (/ EDonor KbT) 2.0) (+ (/ Vef KbT) (/ mu KbT))) (/ Ec KbT)))
(if (<= KbT 1.2e+201) (/ 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.1e+171) {
tmp = t_0;
} else if (KbT <= -2.05e+119) {
tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT));
} else if (KbT <= 1.2e+201) {
tmp = 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 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-3.1d+171)) then
tmp = t_0
else if (kbt <= (-2.05d+119)) then
tmp = ndchar / ((((edonor / kbt) + 2.0d0) + ((vef / kbt) + (mu / kbt))) - (ec / kbt))
else if (kbt <= 1.2d+201) then
tmp = 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.1e+171) {
tmp = t_0;
} else if (KbT <= -2.05e+119) {
tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT));
} else if (KbT <= 1.2e+201) {
tmp = 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 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -3.1e+171: tmp = t_0 elif KbT <= -2.05e+119: tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT)) elif KbT <= 1.2e+201: tmp = 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(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -3.1e+171) tmp = t_0; elseif (KbT <= -2.05e+119) tmp = Float64(NdChar / Float64(Float64(Float64(Float64(EDonor / KbT) + 2.0) + Float64(Float64(Vef / KbT) + Float64(mu / KbT))) - Float64(Ec / KbT))); elseif (KbT <= 1.2e+201) tmp = 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 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -3.1e+171) tmp = t_0; elseif (KbT <= -2.05e+119) tmp = NdChar / ((((EDonor / KbT) + 2.0) + ((Vef / KbT) + (mu / KbT))) - (Ec / KbT)); elseif (KbT <= 1.2e+201) tmp = 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[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.1e+171], t$95$0, If[LessEqual[KbT, -2.05e+119], N[(NdChar / N[(N[(N[(N[(EDonor / KbT), $MachinePrecision] + 2.0), $MachinePrecision] + N[(N[(Vef / KbT), $MachinePrecision] + N[(mu / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(Ec / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.2e+201], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -3.1 \cdot 10^{+171}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq -2.05 \cdot 10^{+119}:\\
\;\;\;\;\frac{NdChar}{\left(\left(\frac{EDonor}{KbT} + 2\right) + \left(\frac{Vef}{KbT} + \frac{mu}{KbT}\right)\right) - \frac{Ec}{KbT}}\\
\mathbf{elif}\;KbT \leq 1.2 \cdot 10^{+201}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -3.0999999999999999e171 or 1.19999999999999996e201 < KbT Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6468.4%
Simplified68.4%
if -3.0999999999999999e171 < KbT < -2.0499999999999999e119Initial program 100.0%
+-lowering-+.f64N/A
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
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in KbT around inf
--lowering--.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6464.9%
Simplified64.9%
if -2.0499999999999999e119 < KbT < 1.19999999999999996e201Initial program 99.5%
+-lowering-+.f64N/A
Simplified99.5%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6464.6%
Simplified64.6%
Taylor expanded in EAccept around inf
/-lowering-/.f6432.7%
Simplified32.7%
Final simplification41.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ Vef KbT)) 1.0))))
(if (<= Vef -3.4e+121)
t_0
(if (<= Vef 2.2e+131) (/ NdChar (+ (exp (/ EDonor 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 / KbT)) + 1.0);
double tmp;
if (Vef <= -3.4e+121) {
tmp = t_0;
} else if (Vef <= 2.2e+131) {
tmp = NdChar / (exp((EDonor / 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 / kbt)) + 1.0d0)
if (vef <= (-3.4d+121)) then
tmp = t_0
else if (vef <= 2.2d+131) then
tmp = ndchar / (exp((edonor / 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 / KbT)) + 1.0);
double tmp;
if (Vef <= -3.4e+121) {
tmp = t_0;
} else if (Vef <= 2.2e+131) {
tmp = NdChar / (Math.exp((EDonor / 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 / KbT)) + 1.0) tmp = 0 if Vef <= -3.4e+121: tmp = t_0 elif Vef <= 2.2e+131: tmp = NdChar / (math.exp((EDonor / 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(Vef / KbT)) + 1.0)) tmp = 0.0 if (Vef <= -3.4e+121) tmp = t_0; elseif (Vef <= 2.2e+131) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / 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 / KbT)) + 1.0); tmp = 0.0; if (Vef <= -3.4e+121) tmp = t_0; elseif (Vef <= 2.2e+131) tmp = NdChar / (exp((EDonor / 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[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Vef, -3.4e+121], t$95$0, If[LessEqual[Vef, 2.2e+131], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{if}\;Vef \leq -3.4 \cdot 10^{+121}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;Vef \leq 2.2 \cdot 10^{+131}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if Vef < -3.4000000000000001e121 or 2.1999999999999999e131 < Vef Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6474.8%
Simplified74.8%
Taylor expanded in Vef around inf
/-lowering-/.f6463.9%
Simplified63.9%
if -3.4000000000000001e121 < Vef < 2.1999999999999999e131Initial program 99.4%
+-lowering-+.f64N/A
Simplified99.4%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6464.1%
Simplified64.1%
Taylor expanded in EDonor around inf
/-lowering-/.f6445.3%
Simplified45.3%
Final simplification51.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (- Vef mu) (+ EAccept Ev))) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.65e+190)
t_1
(if (<= KbT 6.1e+233)
(/
NaChar
(+
2.0
(/
(+ t_0 (/ (* -0.5 (* t_0 (- (- mu Vef) (+ EAccept Ev)))) KbT))
KbT)))
t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Vef - mu) + (EAccept + Ev);
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.65e+190) {
tmp = t_1;
} else if (KbT <= 6.1e+233) {
tmp = NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (vef - mu) + (eaccept + ev)
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.65d+190)) then
tmp = t_1
else if (kbt <= 6.1d+233) then
tmp = nachar / (2.0d0 + ((t_0 + (((-0.5d0) * (t_0 * ((mu - vef) - (eaccept + ev)))) / kbt)) / kbt))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = (Vef - mu) + (EAccept + Ev);
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.65e+190) {
tmp = t_1;
} else if (KbT <= 6.1e+233) {
tmp = NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT));
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = (Vef - mu) + (EAccept + Ev) t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.65e+190: tmp = t_1 elif KbT <= 6.1e+233: tmp = NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(Float64(Vef - mu) + Float64(EAccept + Ev)) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.65e+190) tmp = t_1; elseif (KbT <= 6.1e+233) tmp = Float64(NaChar / Float64(2.0 + Float64(Float64(t_0 + Float64(Float64(-0.5 * Float64(t_0 * Float64(Float64(mu - Vef) - Float64(EAccept + Ev)))) / KbT)) / KbT))); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = (Vef - mu) + (EAccept + Ev); t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.65e+190) tmp = t_1; elseif (KbT <= 6.1e+233) tmp = NaChar / (2.0 + ((t_0 + ((-0.5 * (t_0 * ((mu - Vef) - (EAccept + Ev)))) / KbT)) / KbT)); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[(Vef - mu), $MachinePrecision] + N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.65e+190], t$95$1, If[LessEqual[KbT, 6.1e+233], N[(NaChar / N[(2.0 + N[(N[(t$95$0 + N[(N[(-0.5 * N[(t$95$0 * N[(N[(mu - Vef), $MachinePrecision] - N[(EAccept + Ev), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(Vef - mu\right) + \left(EAccept + Ev\right)\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.65 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;KbT \leq 6.1 \cdot 10^{+233}:\\
\;\;\;\;\frac{NaChar}{2 + \frac{t\_0 + \frac{-0.5 \cdot \left(t\_0 \cdot \left(\left(mu - Vef\right) - \left(EAccept + Ev\right)\right)\right)}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if KbT < -1.65e190 or 6.1000000000000003e233 < KbT Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6484.5%
Simplified84.5%
if -1.65e190 < KbT < 6.1000000000000003e233Initial program 99.6%
+-lowering-+.f64N/A
Simplified99.6%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6463.2%
Simplified63.2%
Taylor expanded in KbT around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified33.4%
Final simplification39.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -3.3e+162)
t_0
(if (<= KbT -1.45e-162)
(*
0.5
(/
-1.0
(/
(+ (/ (- NaChar (/ (* NaChar NaChar) NdChar)) NdChar) -1.0)
NdChar)))
(if (<= KbT 5e-180)
(/ NaChar (- 2.0 (* mu (- (/ 1.0 KbT) (/ (* mu 0.5) (* KbT KbT))))))
t_0)))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.3e+162) {
tmp = t_0;
} else if (KbT <= -1.45e-162) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
} else if (KbT <= 5e-180) {
tmp = NaChar / (2.0 - (mu * ((1.0 / KbT) - ((mu * 0.5) / (KbT * KbT)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-3.3d+162)) then
tmp = t_0
else if (kbt <= (-1.45d-162)) then
tmp = 0.5d0 * ((-1.0d0) / ((((nachar - ((nachar * nachar) / ndchar)) / ndchar) + (-1.0d0)) / ndchar))
else if (kbt <= 5d-180) then
tmp = nachar / (2.0d0 - (mu * ((1.0d0 / kbt) - ((mu * 0.5d0) / (kbt * kbt)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.3e+162) {
tmp = t_0;
} else if (KbT <= -1.45e-162) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
} else if (KbT <= 5e-180) {
tmp = NaChar / (2.0 - (mu * ((1.0 / KbT) - ((mu * 0.5) / (KbT * KbT)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -3.3e+162: tmp = t_0 elif KbT <= -1.45e-162: tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)) elif KbT <= 5e-180: tmp = NaChar / (2.0 - (mu * ((1.0 / KbT) - ((mu * 0.5) / (KbT * KbT))))) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -3.3e+162) tmp = t_0; elseif (KbT <= -1.45e-162) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(Float64(Float64(NaChar - Float64(Float64(NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar))); elseif (KbT <= 5e-180) tmp = Float64(NaChar / Float64(2.0 - Float64(mu * Float64(Float64(1.0 / KbT) - Float64(Float64(mu * 0.5) / Float64(KbT * KbT)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -3.3e+162) tmp = t_0; elseif (KbT <= -1.45e-162) tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)); elseif (KbT <= 5e-180) tmp = NaChar / (2.0 - (mu * ((1.0 / KbT) - ((mu * 0.5) / (KbT * KbT))))); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.3e+162], t$95$0, If[LessEqual[KbT, -1.45e-162], N[(0.5 * N[(-1.0 / N[(N[(N[(N[(NaChar - N[(N[(NaChar * NaChar), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision] / NdChar), $MachinePrecision] + -1.0), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 5e-180], N[(NaChar / N[(2.0 - N[(mu * N[(N[(1.0 / KbT), $MachinePrecision] - N[(N[(mu * 0.5), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -3.3 \cdot 10^{+162}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq -1.45 \cdot 10^{-162}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{\frac{NaChar - \frac{NaChar \cdot NaChar}{NdChar}}{NdChar} + -1}{NdChar}}\\
\mathbf{elif}\;KbT \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\frac{NaChar}{2 - mu \cdot \left(\frac{1}{KbT} - \frac{mu \cdot 0.5}{KbT \cdot KbT}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -3.29999999999999987e162 or 5.0000000000000001e-180 < KbT Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6440.3%
Simplified40.3%
if -3.29999999999999987e162 < KbT < -1.4500000000000001e-162Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6419.7%
Simplified19.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f648.0%
Applied egg-rr8.0%
Taylor expanded in NdChar around -inf
associate-*r/N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
associate-*r/N/A
distribute-lft-inN/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified27.1%
if -1.4500000000000001e-162 < KbT < 5.0000000000000001e-180Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6468.0%
Simplified68.0%
Taylor expanded in mu around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6433.0%
Simplified33.0%
Taylor expanded in mu around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6438.5%
Simplified38.5%
Final simplification36.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -5.6e+160)
t_0
(if (<= KbT -2.1e-101)
(*
0.5
(/
-1.0
(/
(+ (/ (- NaChar (/ (* NaChar NaChar) NdChar)) NdChar) -1.0)
NdChar)))
(if (<= KbT 5e-10)
(*
0.5
(/
-1.0
(/
(+ -1.0 (/ (- NdChar (/ (* NdChar NdChar) NaChar)) NaChar))
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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -5.6e+160) {
tmp = t_0;
} else if (KbT <= -2.1e-101) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
} else if (KbT <= 5e-10) {
tmp = 0.5 * (-1.0 / ((-1.0 + ((NdChar - ((NdChar * NdChar) / NaChar)) / NaChar)) / NaChar));
} 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 <= (-5.6d+160)) then
tmp = t_0
else if (kbt <= (-2.1d-101)) then
tmp = 0.5d0 * ((-1.0d0) / ((((nachar - ((nachar * nachar) / ndchar)) / ndchar) + (-1.0d0)) / ndchar))
else if (kbt <= 5d-10) then
tmp = 0.5d0 * ((-1.0d0) / (((-1.0d0) + ((ndchar - ((ndchar * ndchar) / nachar)) / nachar)) / nachar))
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 <= -5.6e+160) {
tmp = t_0;
} else if (KbT <= -2.1e-101) {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
} else if (KbT <= 5e-10) {
tmp = 0.5 * (-1.0 / ((-1.0 + ((NdChar - ((NdChar * NdChar) / NaChar)) / NaChar)) / NaChar));
} 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 <= -5.6e+160: tmp = t_0 elif KbT <= -2.1e-101: tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)) elif KbT <= 5e-10: tmp = 0.5 * (-1.0 / ((-1.0 + ((NdChar - ((NdChar * NdChar) / NaChar)) / NaChar)) / NaChar)) 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 <= -5.6e+160) tmp = t_0; elseif (KbT <= -2.1e-101) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(Float64(Float64(NaChar - Float64(Float64(NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar))); elseif (KbT <= 5e-10) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(-1.0 + Float64(Float64(NdChar - Float64(Float64(NdChar * NdChar) / NaChar)) / NaChar)) / NaChar))); 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 <= -5.6e+160) tmp = t_0; elseif (KbT <= -2.1e-101) tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)); elseif (KbT <= 5e-10) tmp = 0.5 * (-1.0 / ((-1.0 + ((NdChar - ((NdChar * NdChar) / NaChar)) / NaChar)) / NaChar)); 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, -5.6e+160], t$95$0, If[LessEqual[KbT, -2.1e-101], N[(0.5 * N[(-1.0 / N[(N[(N[(N[(NaChar - N[(N[(NaChar * NaChar), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision] / NdChar), $MachinePrecision] + -1.0), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 5e-10], N[(0.5 * N[(-1.0 / N[(N[(-1.0 + N[(N[(NdChar - N[(N[(NdChar * NdChar), $MachinePrecision] / NaChar), $MachinePrecision]), $MachinePrecision] / NaChar), $MachinePrecision]), $MachinePrecision] / NaChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -5.6 \cdot 10^{+160}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq -2.1 \cdot 10^{-101}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{\frac{NaChar - \frac{NaChar \cdot NaChar}{NdChar}}{NdChar} + -1}{NdChar}}\\
\mathbf{elif}\;KbT \leq 5 \cdot 10^{-10}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{-1 + \frac{NdChar - \frac{NdChar \cdot NdChar}{NaChar}}{NaChar}}{NaChar}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -5.5999999999999999e160 or 5.00000000000000031e-10 < KbT Initial program 98.9%
+-lowering-+.f64N/A
Simplified98.9%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6448.1%
Simplified48.1%
if -5.5999999999999999e160 < KbT < -2.10000000000000016e-101Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6421.6%
Simplified21.6%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f648.6%
Applied egg-rr8.6%
Taylor expanded in NdChar around -inf
associate-*r/N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
associate-*r/N/A
distribute-lft-inN/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified29.8%
if -2.10000000000000016e-101 < KbT < 5.00000000000000031e-10Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6412.4%
Simplified12.4%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f647.3%
Applied egg-rr7.3%
Taylor expanded in NaChar around -inf
associate-*r/N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
associate-*r/N/A
distribute-lft-inN/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified27.0%
Final simplification35.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(if (<= NdChar -8.8e-122)
(* 0.5 (+ NdChar NaChar))
(if (<= NdChar 8.5e-217)
(* 0.5 (/ -1.0 (+ (/ NdChar (* NaChar NaChar)) (/ -1.0 NaChar))))
(*
0.5
(/
-1.0
(/
(+ (/ (- NaChar (/ (* NaChar NaChar) NdChar)) NdChar) -1.0)
NdChar))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (NdChar <= -8.8e-122) {
tmp = 0.5 * (NdChar + NaChar);
} else if (NdChar <= 8.5e-217) {
tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar)));
} else {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (ndchar <= (-8.8d-122)) then
tmp = 0.5d0 * (ndchar + nachar)
else if (ndchar <= 8.5d-217) then
tmp = 0.5d0 * ((-1.0d0) / ((ndchar / (nachar * nachar)) + ((-1.0d0) / nachar)))
else
tmp = 0.5d0 * ((-1.0d0) / ((((nachar - ((nachar * nachar) / ndchar)) / ndchar) + (-1.0d0)) / ndchar))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (NdChar <= -8.8e-122) {
tmp = 0.5 * (NdChar + NaChar);
} else if (NdChar <= 8.5e-217) {
tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar)));
} else {
tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if NdChar <= -8.8e-122: tmp = 0.5 * (NdChar + NaChar) elif NdChar <= 8.5e-217: tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar))) else: tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (NdChar <= -8.8e-122) tmp = Float64(0.5 * Float64(NdChar + NaChar)); elseif (NdChar <= 8.5e-217) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(NdChar / Float64(NaChar * NaChar)) + Float64(-1.0 / NaChar)))); else tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(Float64(Float64(NaChar - Float64(Float64(NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (NdChar <= -8.8e-122) tmp = 0.5 * (NdChar + NaChar); elseif (NdChar <= 8.5e-217) tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar))); else tmp = 0.5 * (-1.0 / ((((NaChar - ((NaChar * NaChar) / NdChar)) / NdChar) + -1.0) / NdChar)); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[NdChar, -8.8e-122], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[NdChar, 8.5e-217], N[(0.5 * N[(-1.0 / N[(N[(NdChar / N[(NaChar * NaChar), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / NaChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(-1.0 / N[(N[(N[(N[(NaChar - N[(N[(NaChar * NaChar), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision] / NdChar), $MachinePrecision] + -1.0), $MachinePrecision] / NdChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NdChar \leq -8.8 \cdot 10^{-122}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{elif}\;NdChar \leq 8.5 \cdot 10^{-217}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{NdChar}{NaChar \cdot NaChar} + \frac{-1}{NaChar}}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{\frac{NaChar - \frac{NaChar \cdot NaChar}{NdChar}}{NdChar} + -1}{NdChar}}\\
\end{array}
\end{array}
if NdChar < -8.8e-122Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6428.9%
Simplified28.9%
if -8.8e-122 < NdChar < 8.4999999999999994e-217Initial program 98.2%
+-lowering-+.f64N/A
Simplified98.2%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6420.4%
Simplified20.4%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6410.0%
Applied egg-rr10.0%
Taylor expanded in NdChar around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6435.5%
Simplified35.5%
if 8.4999999999999994e-217 < NdChar Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6428.9%
Simplified28.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f649.2%
Applied egg-rr9.2%
Taylor expanded in NdChar around -inf
associate-*r/N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
associate-*r/N/A
distribute-lft-inN/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified32.6%
Final simplification31.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.25e+118)
t_0
(if (<= KbT 4.5e-180)
(/ NaChar (+ 2.0 (/ (- Ev (/ (* -0.5 (* Ev Ev)) KbT)) KbT)))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.25e+118) {
tmp = t_0;
} else if (KbT <= 4.5e-180) {
tmp = NaChar / (2.0 + ((Ev - ((-0.5 * (Ev * Ev)) / KbT)) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.25d+118)) then
tmp = t_0
else if (kbt <= 4.5d-180) then
tmp = nachar / (2.0d0 + ((ev - (((-0.5d0) * (ev * ev)) / kbt)) / kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.25e+118) {
tmp = t_0;
} else if (KbT <= 4.5e-180) {
tmp = NaChar / (2.0 + ((Ev - ((-0.5 * (Ev * Ev)) / KbT)) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.25e+118: tmp = t_0 elif KbT <= 4.5e-180: tmp = NaChar / (2.0 + ((Ev - ((-0.5 * (Ev * Ev)) / KbT)) / KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.25e+118) tmp = t_0; elseif (KbT <= 4.5e-180) tmp = Float64(NaChar / Float64(2.0 + Float64(Float64(Ev - Float64(Float64(-0.5 * Float64(Ev * Ev)) / KbT)) / KbT))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.25e+118) tmp = t_0; elseif (KbT <= 4.5e-180) tmp = NaChar / (2.0 + ((Ev - ((-0.5 * (Ev * Ev)) / KbT)) / KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.25e+118], t$95$0, If[LessEqual[KbT, 4.5e-180], N[(NaChar / N[(2.0 + N[(N[(Ev - N[(N[(-0.5 * N[(Ev * Ev), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.25 \cdot 10^{+118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 4.5 \cdot 10^{-180}:\\
\;\;\;\;\frac{NaChar}{2 + \frac{Ev - \frac{-0.5 \cdot \left(Ev \cdot Ev\right)}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -1.24999999999999993e118 or 4.50000000000000009e-180 < KbT Initial program 99.3%
+-lowering-+.f64N/A
Simplified99.3%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6439.1%
Simplified39.1%
if -1.24999999999999993e118 < KbT < 4.50000000000000009e-180Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in Ev around inf
/-lowering-/.f6468.3%
Simplified68.3%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f6436.0%
Simplified36.0%
Taylor expanded in KbT around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.3%
Simplified23.3%
Final simplification31.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -3.8e-122)
t_0
(if (<= KbT 4e+116)
(* 0.5 (/ -1.0 (+ (/ NdChar (* NaChar NaChar)) (/ -1.0 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.8e-122) {
tmp = t_0;
} else if (KbT <= 4e+116) {
tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-3.8d-122)) then
tmp = t_0
else if (kbt <= 4d+116) then
tmp = 0.5d0 * ((-1.0d0) / ((ndchar / (nachar * nachar)) + ((-1.0d0) / nachar)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.8e-122) {
tmp = t_0;
} else if (KbT <= 4e+116) {
tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar)));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -3.8e-122: tmp = t_0 elif KbT <= 4e+116: tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar))) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -3.8e-122) tmp = t_0; elseif (KbT <= 4e+116) tmp = Float64(0.5 * Float64(-1.0 / Float64(Float64(NdChar / Float64(NaChar * NaChar)) + Float64(-1.0 / NaChar)))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -3.8e-122) tmp = t_0; elseif (KbT <= 4e+116) tmp = 0.5 * (-1.0 / ((NdChar / (NaChar * NaChar)) + (-1.0 / NaChar))); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.8e-122], t$95$0, If[LessEqual[KbT, 4e+116], N[(0.5 * N[(-1.0 / N[(N[(NdChar / N[(NaChar * NaChar), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / NaChar), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -3.8 \cdot 10^{-122}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 4 \cdot 10^{+116}:\\
\;\;\;\;0.5 \cdot \frac{-1}{\frac{NdChar}{NaChar \cdot NaChar} + \frac{-1}{NaChar}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -3.8000000000000001e-122 or 4.00000000000000006e116 < KbT Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6439.0%
Simplified39.0%
if -3.8000000000000001e-122 < KbT < 4.00000000000000006e116Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6414.9%
Simplified14.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f648.8%
Applied egg-rr8.8%
Taylor expanded in NdChar around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6423.1%
Simplified23.1%
Final simplification31.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -2.6e-126)
t_0
(if (<= KbT 4.8e-47) (/ 0.5 (/ (- 1.0 (/ NdChar NaChar)) 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 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.6e-126) {
tmp = t_0;
} else if (KbT <= 4.8e-47) {
tmp = 0.5 / ((1.0 - (NdChar / NaChar)) / NaChar);
} 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.6d-126)) then
tmp = t_0
else if (kbt <= 4.8d-47) then
tmp = 0.5d0 / ((1.0d0 - (ndchar / nachar)) / nachar)
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.6e-126) {
tmp = t_0;
} else if (KbT <= 4.8e-47) {
tmp = 0.5 / ((1.0 - (NdChar / NaChar)) / NaChar);
} 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.6e-126: tmp = t_0 elif KbT <= 4.8e-47: tmp = 0.5 / ((1.0 - (NdChar / NaChar)) / NaChar) 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.6e-126) tmp = t_0; elseif (KbT <= 4.8e-47) tmp = Float64(0.5 / Float64(Float64(1.0 - Float64(NdChar / NaChar)) / NaChar)); 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.6e-126) tmp = t_0; elseif (KbT <= 4.8e-47) tmp = 0.5 / ((1.0 - (NdChar / NaChar)) / NaChar); 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.6e-126], t$95$0, If[LessEqual[KbT, 4.8e-47], N[(0.5 / N[(N[(1.0 - N[(NdChar / NaChar), $MachinePrecision]), $MachinePrecision] / NaChar), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -2.6 \cdot 10^{-126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 4.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{0.5}{\frac{1 - \frac{NdChar}{NaChar}}{NaChar}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -2.59999999999999999e-126 or 4.7999999999999999e-47 < KbT Initial program 99.4%
+-lowering-+.f64N/A
Simplified99.4%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6436.5%
Simplified36.5%
if -2.59999999999999999e-126 < KbT < 4.7999999999999999e-47Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6411.6%
Simplified11.6%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f646.5%
Applied egg-rr6.5%
Taylor expanded in NdChar around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
un-div-invN/A
/-lowering-/.f64N/A
associate-/r*N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f6420.5%
Applied egg-rr20.5%
Final simplification30.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (<= NaChar -5.4e+26) (/ NaChar 2.0) (if (<= NaChar 1.6e+29) (* NdChar 0.5) (/ NaChar 2.0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (NaChar <= -5.4e+26) {
tmp = NaChar / 2.0;
} else if (NaChar <= 1.6e+29) {
tmp = NdChar * 0.5;
} else {
tmp = NaChar / 2.0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (nachar <= (-5.4d+26)) then
tmp = nachar / 2.0d0
else if (nachar <= 1.6d+29) then
tmp = ndchar * 0.5d0
else
tmp = nachar / 2.0d0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (NaChar <= -5.4e+26) {
tmp = NaChar / 2.0;
} else if (NaChar <= 1.6e+29) {
tmp = NdChar * 0.5;
} else {
tmp = NaChar / 2.0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if NaChar <= -5.4e+26: tmp = NaChar / 2.0 elif NaChar <= 1.6e+29: tmp = NdChar * 0.5 else: tmp = NaChar / 2.0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (NaChar <= -5.4e+26) tmp = Float64(NaChar / 2.0); elseif (NaChar <= 1.6e+29) tmp = Float64(NdChar * 0.5); else tmp = Float64(NaChar / 2.0); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (NaChar <= -5.4e+26) tmp = NaChar / 2.0; elseif (NaChar <= 1.6e+29) tmp = NdChar * 0.5; else tmp = NaChar / 2.0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[NaChar, -5.4e+26], N[(NaChar / 2.0), $MachinePrecision], If[LessEqual[NaChar, 1.6e+29], N[(NdChar * 0.5), $MachinePrecision], N[(NaChar / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NaChar \leq -5.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{NaChar}{2}\\
\mathbf{elif}\;NaChar \leq 1.6 \cdot 10^{+29}:\\
\;\;\;\;NdChar \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar}{2}\\
\end{array}
\end{array}
if NaChar < -5.4e26 or 1.59999999999999993e29 < NaChar Initial program 99.2%
+-lowering-+.f64N/A
Simplified99.2%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6475.9%
Simplified75.9%
Taylor expanded in KbT around inf
Simplified24.3%
if -5.4e26 < NaChar < 1.59999999999999993e29Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6430.3%
Simplified30.3%
Taylor expanded in NaChar around 0
*-commutativeN/A
*-lowering-*.f6429.2%
Simplified29.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (<= Vef 8.5e+239) (* 0.5 (+ NdChar NaChar)) (/ (* NaChar (* NaChar -0.5)) NdChar)))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (Vef <= 8.5e+239) {
tmp = 0.5 * (NdChar + NaChar);
} else {
tmp = (NaChar * (NaChar * -0.5)) / NdChar;
}
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 (vef <= 8.5d+239) then
tmp = 0.5d0 * (ndchar + nachar)
else
tmp = (nachar * (nachar * (-0.5d0))) / ndchar
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 (Vef <= 8.5e+239) {
tmp = 0.5 * (NdChar + NaChar);
} else {
tmp = (NaChar * (NaChar * -0.5)) / NdChar;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if Vef <= 8.5e+239: tmp = 0.5 * (NdChar + NaChar) else: tmp = (NaChar * (NaChar * -0.5)) / NdChar return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (Vef <= 8.5e+239) tmp = Float64(0.5 * Float64(NdChar + NaChar)); else tmp = Float64(Float64(NaChar * Float64(NaChar * -0.5)) / NdChar); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (Vef <= 8.5e+239) tmp = 0.5 * (NdChar + NaChar); else tmp = (NaChar * (NaChar * -0.5)) / NdChar; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[Vef, 8.5e+239], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], N[(N[(NaChar * N[(NaChar * -0.5), $MachinePrecision]), $MachinePrecision] / NdChar), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Vef \leq 8.5 \cdot 10^{+239}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{NaChar \cdot \left(NaChar \cdot -0.5\right)}{NdChar}\\
\end{array}
\end{array}
if Vef < 8.50000000000000021e239Initial program 99.6%
+-lowering-+.f64N/A
Simplified99.6%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6428.4%
Simplified28.4%
if 8.50000000000000021e239 < Vef Initial program 100.0%
+-lowering-+.f64N/A
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f647.0%
Simplified7.0%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6410.9%
Applied egg-rr10.9%
Taylor expanded in NdChar around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6436.4%
Simplified36.4%
Taylor expanded in NaChar around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6435.0%
Simplified35.0%
Final simplification28.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (* 0.5 (+ NdChar NaChar)))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = 0.5d0 * (ndchar + nachar)
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return 0.5 * (NdChar + NaChar)
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(0.5 * Float64(NdChar + NaChar)) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.5 * (NdChar + NaChar); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(NdChar + NaChar\right)
\end{array}
Initial program 99.6%
+-lowering-+.f64N/A
Simplified99.6%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6427.2%
Simplified27.2%
Final simplification27.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (* NdChar 0.5))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NdChar * 0.5;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = ndchar * 0.5d0
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NdChar * 0.5;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return NdChar * 0.5
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(NdChar * 0.5) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = NdChar * 0.5; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(NdChar * 0.5), $MachinePrecision]
\begin{array}{l}
\\
NdChar \cdot 0.5
\end{array}
Initial program 99.6%
+-lowering-+.f64N/A
Simplified99.6%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6427.2%
Simplified27.2%
Taylor expanded in NaChar around 0
*-commutativeN/A
*-lowering-*.f6419.8%
Simplified19.8%
herbie shell --seed 2024288
(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))))))