
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT)))) (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (ndchar / (1.0d0 + exp((-(((ec - vef) - edonor) - mu) / kbt)))) + (nachar / (1.0d0 + exp(((((ev + vef) + eaccept) + -mu) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + Math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + Math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / (1.0 + math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Float64(Float64(Float64(Ec - Vef) - EDonor) - mu)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Float64(Ev + Vef) + EAccept) + Float64(-mu)) / KbT))))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT)))); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[((-N[(N[(N[(Ec - Vef), $MachinePrecision] - EDonor), $MachinePrecision] - mu), $MachinePrecision]) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(N[(Ev + Vef), $MachinePrecision] + EAccept), $MachinePrecision] + (-mu)), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NdChar (+ 1.0 (exp (/ (- (- (- (- Ec Vef) EDonor) mu)) KbT)))) (/ NaChar (+ 1.0 (exp (/ (+ (+ (+ Ev Vef) EAccept) (- mu)) KbT))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (ndchar / (1.0d0 + exp((-(((ec - vef) - edonor) - mu) / kbt)))) + (nachar / (1.0d0 + exp(((((ev + vef) + eaccept) + -mu) / kbt))))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (1.0 + Math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + Math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / (1.0 + math.exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + math.exp(((((Ev + Vef) + EAccept) + -mu) / KbT))))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(1.0 + exp(Float64(Float64(-Float64(Float64(Float64(Ec - Vef) - EDonor) - mu)) / KbT)))) + Float64(NaChar / Float64(1.0 + exp(Float64(Float64(Float64(Float64(Ev + Vef) + EAccept) + Float64(-mu)) / KbT))))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NdChar / (1.0 + exp((-(((Ec - Vef) - EDonor) - mu) / KbT)))) + (NaChar / (1.0 + exp(((((Ev + Vef) + EAccept) + -mu) / KbT)))); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(1.0 + N[Exp[N[((-N[(N[(N[(Ec - Vef), $MachinePrecision] - EDonor), $MachinePrecision] - mu), $MachinePrecision]) / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(1.0 + N[Exp[N[(N[(N[(N[(Ev + Vef), $MachinePrecision] + EAccept), $MachinePrecision] + (-mu)), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{1 + e^{\frac{-\left(\left(\left(Ec - Vef\right) - EDonor\right) - mu\right)}{KbT}}} + \frac{NaChar}{1 + e^{\frac{\left(\left(Ev + Vef\right) + EAccept\right) + \left(-mu\right)}{KbT}}}
\end{array}
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (+ (/ NdChar (+ (exp (/ (+ Vef (+ mu (- EDonor Ec))) KbT)) 1.0)) (/ NaChar (+ (exp (/ (+ Vef (- EAccept (- mu Ev))) KbT)) 1.0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp(((Vef + (EAccept - (mu - Ev))) / KbT)) + 1.0));
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = (ndchar / (exp(((vef + (mu + (edonor - ec))) / kbt)) + 1.0d0)) + (nachar / (exp(((vef + (eaccept - (mu - ev))) / kbt)) + 1.0d0))
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return (NdChar / (Math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (Math.exp(((Vef + (EAccept - (mu - Ev))) / KbT)) + 1.0));
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return (NdChar / (math.exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (math.exp(((Vef + (EAccept - (mu - Ev))) / KbT)) + 1.0))
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(Float64(NdChar / Float64(exp(Float64(Float64(Vef + Float64(mu + Float64(EDonor - Ec))) / KbT)) + 1.0)) + Float64(NaChar / Float64(exp(Float64(Float64(Vef + Float64(EAccept - Float64(mu - Ev))) / KbT)) + 1.0))) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = (NdChar / (exp(((Vef + (mu + (EDonor - Ec))) / KbT)) + 1.0)) + (NaChar / (exp(((Vef + (EAccept - (mu - Ev))) / KbT)) + 1.0)); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(N[(NdChar / N[(N[Exp[N[(N[(Vef + N[(mu + N[(EDonor - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(N[(Vef + N[(EAccept - N[(mu - Ev), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{NdChar}{e^{\frac{Vef + \left(mu + \left(EDonor - Ec\right)\right)}{KbT}} + 1} + \frac{NaChar}{e^{\frac{Vef + \left(EAccept - \left(mu - Ev\right)\right)}{KbT}} + 1}
\end{array}
Initial program 100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0))
(t_1 (/ NaChar (+ (exp (- 0.0 (/ mu KbT))) 1.0))))
(if (<= mu -1.06e+40)
t_1
(if (<= mu 5.3e-250)
(/ NdChar t_0)
(if (<= mu 5.6e-36)
(/ NaChar t_0)
(if (<= mu 3.2e+79) (/ NdChar (+ (exp (/ EDonor KbT)) 1.0)) t_1))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = exp((Vef / KbT)) + 1.0;
double t_1 = NaChar / (exp((0.0 - (mu / KbT))) + 1.0);
double tmp;
if (mu <= -1.06e+40) {
tmp = t_1;
} else if (mu <= 5.3e-250) {
tmp = NdChar / t_0;
} else if (mu <= 5.6e-36) {
tmp = NaChar / t_0;
} else if (mu <= 3.2e+79) {
tmp = NdChar / (exp((EDonor / KbT)) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp((vef / kbt)) + 1.0d0
t_1 = nachar / (exp((0.0d0 - (mu / kbt))) + 1.0d0)
if (mu <= (-1.06d+40)) then
tmp = t_1
else if (mu <= 5.3d-250) then
tmp = ndchar / t_0
else if (mu <= 5.6d-36) then
tmp = nachar / t_0
else if (mu <= 3.2d+79) then
tmp = ndchar / (exp((edonor / kbt)) + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = Math.exp((Vef / KbT)) + 1.0;
double t_1 = NaChar / (Math.exp((0.0 - (mu / KbT))) + 1.0);
double tmp;
if (mu <= -1.06e+40) {
tmp = t_1;
} else if (mu <= 5.3e-250) {
tmp = NdChar / t_0;
} else if (mu <= 5.6e-36) {
tmp = NaChar / t_0;
} else if (mu <= 3.2e+79) {
tmp = NdChar / (Math.exp((EDonor / KbT)) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = math.exp((Vef / KbT)) + 1.0 t_1 = NaChar / (math.exp((0.0 - (mu / KbT))) + 1.0) tmp = 0 if mu <= -1.06e+40: tmp = t_1 elif mu <= 5.3e-250: tmp = NdChar / t_0 elif mu <= 5.6e-36: tmp = NaChar / t_0 elif mu <= 3.2e+79: tmp = NdChar / (math.exp((EDonor / KbT)) + 1.0) else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0) t_1 = Float64(NaChar / Float64(exp(Float64(0.0 - Float64(mu / KbT))) + 1.0)) tmp = 0.0 if (mu <= -1.06e+40) tmp = t_1; elseif (mu <= 5.3e-250) tmp = Float64(NdChar / t_0); elseif (mu <= 5.6e-36) tmp = Float64(NaChar / t_0); elseif (mu <= 3.2e+79) tmp = Float64(NdChar / Float64(exp(Float64(EDonor / KbT)) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = exp((Vef / KbT)) + 1.0; t_1 = NaChar / (exp((0.0 - (mu / KbT))) + 1.0); tmp = 0.0; if (mu <= -1.06e+40) tmp = t_1; elseif (mu <= 5.3e-250) tmp = NdChar / t_0; elseif (mu <= 5.6e-36) tmp = NaChar / t_0; elseif (mu <= 3.2e+79) tmp = NdChar / (exp((EDonor / KbT)) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(NaChar / N[(N[Exp[N[(0.0 - N[(mu / KbT), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[mu, -1.06e+40], t$95$1, If[LessEqual[mu, 5.3e-250], N[(NdChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 5.6e-36], N[(NaChar / t$95$0), $MachinePrecision], If[LessEqual[mu, 3.2e+79], N[(NdChar / N[(N[Exp[N[(EDonor / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
t_1 := \frac{NaChar}{e^{0 - \frac{mu}{KbT}} + 1}\\
\mathbf{if}\;mu \leq -1.06 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;mu \leq 5.3 \cdot 10^{-250}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\mathbf{elif}\;mu \leq 5.6 \cdot 10^{-36}:\\
\;\;\;\;\frac{NaChar}{t\_0}\\
\mathbf{elif}\;mu \leq 3.2 \cdot 10^{+79}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if mu < -1.05999999999999996e40 or 3.20000000000000003e79 < mu Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6465.1%
Simplified65.1%
Taylor expanded in mu around inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6456.8%
Simplified56.8%
if -1.05999999999999996e40 < mu < 5.3000000000000001e-250Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6472.6%
Simplified72.6%
Taylor expanded in Vef around inf
/-lowering-/.f6457.2%
Simplified57.2%
if 5.3000000000000001e-250 < mu < 5.6000000000000002e-36Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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.4%
Simplified70.4%
Taylor expanded in Vef around inf
/-lowering-/.f6456.4%
Simplified56.4%
if 5.6000000000000002e-36 < mu < 3.20000000000000003e79Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6467.8%
Simplified67.8%
Taylor expanded in EDonor around inf
/-lowering-/.f6465.1%
Simplified65.1%
Final simplification57.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NdChar (+ (exp (/ (+ EDonor (+ Vef (- mu Ec))) KbT)) 1.0))))
(if (<= NdChar -1.25e+122)
t_0
(if (<= NdChar 7.2e-168)
(/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
double tmp;
if (NdChar <= -1.25e+122) {
tmp = t_0;
} else if (NdChar <= 7.2e-168) {
tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = ndchar / (exp(((edonor + (vef + (mu - ec))) / kbt)) + 1.0d0)
if (ndchar <= (-1.25d+122)) then
tmp = t_0
else if (ndchar <= 7.2d-168) then
tmp = nachar / (exp((((eaccept + ev) + (vef - mu)) / kbt)) + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = NdChar / (Math.exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0);
double tmp;
if (NdChar <= -1.25e+122) {
tmp = t_0;
} else if (NdChar <= 7.2e-168) {
tmp = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / 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 + (Vef + (mu - Ec))) / KbT)) + 1.0) tmp = 0 if NdChar <= -1.25e+122: tmp = t_0 elif NdChar <= 7.2e-168: tmp = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(NdChar / Float64(exp(Float64(Float64(EDonor + Float64(Vef + Float64(mu - Ec))) / KbT)) + 1.0)) tmp = 0.0 if (NdChar <= -1.25e+122) tmp = t_0; elseif (NdChar <= 7.2e-168) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = NdChar / (exp(((EDonor + (Vef + (mu - Ec))) / KbT)) + 1.0); tmp = 0.0; if (NdChar <= -1.25e+122) tmp = t_0; elseif (NdChar <= 7.2e-168) tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(NdChar / N[(N[Exp[N[(N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[NdChar, -1.25e+122], t$95$0, If[LessEqual[NdChar, 7.2e-168], N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{NdChar}{e^{\frac{EDonor + \left(Vef + \left(mu - Ec\right)\right)}{KbT}} + 1}\\
\mathbf{if}\;NdChar \leq -1.25 \cdot 10^{+122}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;NdChar \leq 7.2 \cdot 10^{-168}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if NdChar < -1.24999999999999997e122 or 7.1999999999999998e-168 < NdChar Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6473.5%
Simplified73.5%
if -1.24999999999999997e122 < NdChar < 7.1999999999999998e-168Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6476.7%
Simplified76.7%
Final simplification75.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(if (<= KbT -9.8e+204)
(* 0.5 (+ NdChar NaChar))
(if (<= KbT 1.4e+189)
(/ NaChar (+ (exp (/ (+ (+ EAccept Ev) (- Vef mu)) KbT)) 1.0))
(+ (/ NdChar 2.0) (/ NaChar (+ (exp (/ Ev KbT)) 1.0))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -9.8e+204) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= 1.4e+189) {
tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
} else {
tmp = (NdChar / 2.0) + (NaChar / (exp((Ev / KbT)) + 1.0));
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: tmp
if (kbt <= (-9.8d+204)) then
tmp = 0.5d0 * (ndchar + nachar)
else if (kbt <= 1.4d+189) then
tmp = nachar / (exp((((eaccept + ev) + (vef - mu)) / kbt)) + 1.0d0)
else
tmp = (ndchar / 2.0d0) + (nachar / (exp((ev / kbt)) + 1.0d0))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double tmp;
if (KbT <= -9.8e+204) {
tmp = 0.5 * (NdChar + NaChar);
} else if (KbT <= 1.4e+189) {
tmp = NaChar / (Math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0);
} else {
tmp = (NdChar / 2.0) + (NaChar / (Math.exp((Ev / KbT)) + 1.0));
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if KbT <= -9.8e+204: tmp = 0.5 * (NdChar + NaChar) elif KbT <= 1.4e+189: tmp = NaChar / (math.exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0) else: tmp = (NdChar / 2.0) + (NaChar / (math.exp((Ev / KbT)) + 1.0)) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (KbT <= -9.8e+204) tmp = Float64(0.5 * Float64(NdChar + NaChar)); elseif (KbT <= 1.4e+189) tmp = Float64(NaChar / Float64(exp(Float64(Float64(Float64(EAccept + Ev) + Float64(Vef - mu)) / KbT)) + 1.0)); else tmp = Float64(Float64(NdChar / 2.0) + Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0))); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (KbT <= -9.8e+204) tmp = 0.5 * (NdChar + NaChar); elseif (KbT <= 1.4e+189) tmp = NaChar / (exp((((EAccept + Ev) + (Vef - mu)) / KbT)) + 1.0); else tmp = (NdChar / 2.0) + (NaChar / (exp((Ev / KbT)) + 1.0)); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[KbT, -9.8e+204], N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 1.4e+189], N[(NaChar / N[(N[Exp[N[(N[(N[(EAccept + Ev), $MachinePrecision] + N[(Vef - mu), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(NdChar / 2.0), $MachinePrecision] + N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;KbT \leq -9.8 \cdot 10^{+204}:\\
\;\;\;\;0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{elif}\;KbT \leq 1.4 \cdot 10^{+189}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{\left(EAccept + Ev\right) + \left(Vef - mu\right)}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{2} + \frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\end{array}
\end{array}
if KbT < -9.7999999999999995e204Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6478.1%
Simplified78.1%
if -9.7999999999999995e204 < KbT < 1.40000000000000003e189Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6465.3%
Simplified65.3%
if 1.40000000000000003e189 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified83.0%
Taylor expanded in Ev around inf
/-lowering-/.f6474.5%
Simplified74.5%
Final simplification67.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ EDonor (+ Vef (- mu Ec)))) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -1.7e+117)
t_1
(if (<= KbT -2.15e-194)
(/ NaChar (+ (exp (/ EAccept KbT)) 1.0))
(if (<= KbT 9.2e-117)
(/ NaChar (+ (exp (/ Ev KbT)) 1.0))
(if (<= KbT 3.6e+208)
(/
NdChar
(-
2.0
(/
(+ (- (- (- Ec mu) Vef) EDonor) (/ (* -0.5 (* t_0 t_0)) KbT))
KbT)))
(- t_1 (* (* Ec (/ NdChar KbT)) -0.25))))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = EDonor + (Vef + (mu - Ec));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.7e+117) {
tmp = t_1;
} else if (KbT <= -2.15e-194) {
tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
} else if (KbT <= 9.2e-117) {
tmp = NaChar / (exp((Ev / KbT)) + 1.0);
} else if (KbT <= 3.6e+208) {
tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT));
} else {
tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = edonor + (vef + (mu - ec))
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-1.7d+117)) then
tmp = t_1
else if (kbt <= (-2.15d-194)) then
tmp = nachar / (exp((eaccept / kbt)) + 1.0d0)
else if (kbt <= 9.2d-117) then
tmp = nachar / (exp((ev / kbt)) + 1.0d0)
else if (kbt <= 3.6d+208) then
tmp = ndchar / (2.0d0 - (((((ec - mu) - vef) - edonor) + (((-0.5d0) * (t_0 * t_0)) / kbt)) / kbt))
else
tmp = t_1 - ((ec * (ndchar / kbt)) * (-0.25d0))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = EDonor + (Vef + (mu - Ec));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -1.7e+117) {
tmp = t_1;
} else if (KbT <= -2.15e-194) {
tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
} else if (KbT <= 9.2e-117) {
tmp = NaChar / (Math.exp((Ev / KbT)) + 1.0);
} else if (KbT <= 3.6e+208) {
tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT));
} else {
tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = EDonor + (Vef + (mu - Ec)) t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -1.7e+117: tmp = t_1 elif KbT <= -2.15e-194: tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0) elif KbT <= 9.2e-117: tmp = NaChar / (math.exp((Ev / KbT)) + 1.0) elif KbT <= 3.6e+208: tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT)) else: tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(EDonor + Float64(Vef + Float64(mu - Ec))) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -1.7e+117) tmp = t_1; elseif (KbT <= -2.15e-194) tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0)); elseif (KbT <= 9.2e-117) tmp = Float64(NaChar / Float64(exp(Float64(Ev / KbT)) + 1.0)); elseif (KbT <= 3.6e+208) tmp = Float64(NdChar / Float64(2.0 - Float64(Float64(Float64(Float64(Float64(Ec - mu) - Vef) - EDonor) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT)) / KbT))); else tmp = Float64(t_1 - Float64(Float64(Ec * Float64(NdChar / KbT)) * -0.25)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = EDonor + (Vef + (mu - Ec)); t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -1.7e+117) tmp = t_1; elseif (KbT <= -2.15e-194) tmp = NaChar / (exp((EAccept / KbT)) + 1.0); elseif (KbT <= 9.2e-117) tmp = NaChar / (exp((Ev / KbT)) + 1.0); elseif (KbT <= 3.6e+208) tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT)); else tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -1.7e+117], t$95$1, If[LessEqual[KbT, -2.15e-194], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 9.2e-117], N[(NaChar / N[(N[Exp[N[(Ev / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.6e+208], N[(NdChar / N[(2.0 - N[(N[(N[(N[(N[(Ec - mu), $MachinePrecision] - Vef), $MachinePrecision] - EDonor), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(Ec * N[(NdChar / KbT), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := EDonor + \left(Vef + \left(mu - Ec\right)\right)\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -1.7 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;KbT \leq -2.15 \cdot 10^{-194}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{elif}\;KbT \leq 9.2 \cdot 10^{-117}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Ev}{KbT}} + 1}\\
\mathbf{elif}\;KbT \leq 3.6 \cdot 10^{+208}:\\
\;\;\;\;\frac{NdChar}{2 - \frac{\left(\left(\left(Ec - mu\right) - Vef\right) - EDonor\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(Ec \cdot \frac{NdChar}{KbT}\right) \cdot -0.25\\
\end{array}
\end{array}
if KbT < -1.7e117Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6464.7%
Simplified64.7%
if -1.7e117 < KbT < -2.15000000000000003e-194Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6469.2%
Simplified69.2%
Taylor expanded in EAccept around inf
/-lowering-/.f6426.8%
Simplified26.8%
if -2.15000000000000003e-194 < KbT < 9.19999999999999978e-117Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6472.9%
Simplified72.9%
Taylor expanded in Ev around inf
/-lowering-/.f6440.8%
Simplified40.8%
if 9.19999999999999978e-117 < KbT < 3.60000000000000003e208Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6470.2%
Simplified70.2%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified32.7%
if 3.60000000000000003e208 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified41.8%
Taylor expanded in Ec around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.0%
Simplified74.0%
Final simplification43.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ (exp (/ Vef KbT)) 1.0)) (t_1 (/ NaChar t_0)))
(if (<= NaChar -5200000000.0)
t_1
(if (<= NaChar 7e-20) (/ NdChar t_0) t_1))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = exp((Vef / KbT)) + 1.0;
double t_1 = NaChar / t_0;
double tmp;
if (NaChar <= -5200000000.0) {
tmp = t_1;
} else if (NaChar <= 7e-20) {
tmp = NdChar / t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp((vef / kbt)) + 1.0d0
t_1 = nachar / t_0
if (nachar <= (-5200000000.0d0)) then
tmp = t_1
else if (nachar <= 7d-20) then
tmp = ndchar / t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = Math.exp((Vef / KbT)) + 1.0;
double t_1 = NaChar / t_0;
double tmp;
if (NaChar <= -5200000000.0) {
tmp = t_1;
} else if (NaChar <= 7e-20) {
tmp = NdChar / t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = math.exp((Vef / KbT)) + 1.0 t_1 = NaChar / t_0 tmp = 0 if NaChar <= -5200000000.0: tmp = t_1 elif NaChar <= 7e-20: tmp = NdChar / t_0 else: tmp = t_1 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(exp(Float64(Vef / KbT)) + 1.0) t_1 = Float64(NaChar / t_0) tmp = 0.0 if (NaChar <= -5200000000.0) tmp = t_1; elseif (NaChar <= 7e-20) tmp = Float64(NdChar / t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = exp((Vef / KbT)) + 1.0; t_1 = NaChar / t_0; tmp = 0.0; if (NaChar <= -5200000000.0) tmp = t_1; elseif (NaChar <= 7e-20) tmp = NdChar / t_0; else tmp = t_1; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(NaChar / t$95$0), $MachinePrecision]}, If[LessEqual[NaChar, -5200000000.0], t$95$1, If[LessEqual[NaChar, 7e-20], N[(NdChar / t$95$0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\frac{Vef}{KbT}} + 1\\
t_1 := \frac{NaChar}{t\_0}\\
\mathbf{if}\;NaChar \leq -5200000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;NaChar \leq 7 \cdot 10^{-20}:\\
\;\;\;\;\frac{NdChar}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if NaChar < -5.2e9 or 7.00000000000000007e-20 < NaChar Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6471.7%
Simplified71.7%
Taylor expanded in Vef around inf
/-lowering-/.f6448.2%
Simplified48.2%
if -5.2e9 < NaChar < 7.00000000000000007e-20Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6473.9%
Simplified73.9%
Taylor expanded in Vef around inf
/-lowering-/.f6454.8%
Simplified54.8%
Final simplification51.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (/ NaChar (+ (exp (/ Vef KbT)) 1.0))))
(if (<= Vef -2.3e+23)
t_0
(if (<= Vef 2.65e+84) (/ 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 <= -2.3e+23) {
tmp = t_0;
} else if (Vef <= 2.65e+84) {
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 <= (-2.3d+23)) then
tmp = t_0
else if (vef <= 2.65d+84) 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 <= -2.3e+23) {
tmp = t_0;
} else if (Vef <= 2.65e+84) {
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 <= -2.3e+23: tmp = t_0 elif Vef <= 2.65e+84: 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 <= -2.3e+23) tmp = t_0; elseif (Vef <= 2.65e+84) 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 <= -2.3e+23) tmp = t_0; elseif (Vef <= 2.65e+84) 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, -2.3e+23], t$95$0, If[LessEqual[Vef, 2.65e+84], 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 -2.3 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;Vef \leq 2.65 \cdot 10^{+84}:\\
\;\;\;\;\frac{NdChar}{e^{\frac{EDonor}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if Vef < -2.3e23 or 2.6500000000000001e84 < Vef Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6471.6%
Simplified71.6%
Taylor expanded in Vef around inf
/-lowering-/.f6457.4%
Simplified57.4%
if -2.3e23 < Vef < 2.6500000000000001e84Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6461.2%
Simplified61.2%
Taylor expanded in EDonor around inf
/-lowering-/.f6445.3%
Simplified45.3%
Final simplification50.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -6.5e+117)
t_0
(if (<= KbT 1.3e+187)
(/ NaChar (+ (exp (/ Vef KbT)) 1.0))
(- t_0 (* (* Ec (/ NdChar KbT)) -0.25))))))
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 <= -6.5e+117) {
tmp = t_0;
} else if (KbT <= 1.3e+187) {
tmp = NaChar / (exp((Vef / KbT)) + 1.0);
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
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 <= (-6.5d+117)) then
tmp = t_0
else if (kbt <= 1.3d+187) then
tmp = nachar / (exp((vef / kbt)) + 1.0d0)
else
tmp = t_0 - ((ec * (ndchar / kbt)) * (-0.25d0))
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 <= -6.5e+117) {
tmp = t_0;
} else if (KbT <= 1.3e+187) {
tmp = NaChar / (Math.exp((Vef / KbT)) + 1.0);
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -6.5e+117: tmp = t_0 elif KbT <= 1.3e+187: tmp = NaChar / (math.exp((Vef / KbT)) + 1.0) else: tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25) 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 <= -6.5e+117) tmp = t_0; elseif (KbT <= 1.3e+187) tmp = Float64(NaChar / Float64(exp(Float64(Vef / KbT)) + 1.0)); else tmp = Float64(t_0 - Float64(Float64(Ec * Float64(NdChar / KbT)) * -0.25)); 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 <= -6.5e+117) tmp = t_0; elseif (KbT <= 1.3e+187) tmp = NaChar / (exp((Vef / KbT)) + 1.0); else tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25); 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, -6.5e+117], t$95$0, If[LessEqual[KbT, 1.3e+187], N[(NaChar / N[(N[Exp[N[(Vef / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(Ec * N[(NdChar / KbT), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -6.5 \cdot 10^{+117}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 1.3 \cdot 10^{+187}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{Vef}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \left(Ec \cdot \frac{NdChar}{KbT}\right) \cdot -0.25\\
\end{array}
\end{array}
if KbT < -6.5000000000000004e117Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6466.1%
Simplified66.1%
if -6.5000000000000004e117 < KbT < 1.2999999999999999e187Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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.6%
Simplified66.6%
Taylor expanded in Vef around inf
/-lowering-/.f6438.5%
Simplified38.5%
if 1.2999999999999999e187 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified35.7%
Taylor expanded in Ec around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6467.2%
Simplified67.2%
Final simplification47.0%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -2.35e+117)
t_0
(if (<= KbT 1.02e+163)
(/ NaChar (+ (exp (/ EAccept KbT)) 1.0))
(- t_0 (* (* Ec (/ NdChar KbT)) -0.25))))))
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.35e+117) {
tmp = t_0;
} else if (KbT <= 1.02e+163) {
tmp = NaChar / (exp((EAccept / KbT)) + 1.0);
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
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.35d+117)) then
tmp = t_0
else if (kbt <= 1.02d+163) then
tmp = nachar / (exp((eaccept / kbt)) + 1.0d0)
else
tmp = t_0 - ((ec * (ndchar / kbt)) * (-0.25d0))
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.35e+117) {
tmp = t_0;
} else if (KbT <= 1.02e+163) {
tmp = NaChar / (Math.exp((EAccept / KbT)) + 1.0);
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -2.35e+117: tmp = t_0 elif KbT <= 1.02e+163: tmp = NaChar / (math.exp((EAccept / KbT)) + 1.0) else: tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25) 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.35e+117) tmp = t_0; elseif (KbT <= 1.02e+163) tmp = Float64(NaChar / Float64(exp(Float64(EAccept / KbT)) + 1.0)); else tmp = Float64(t_0 - Float64(Float64(Ec * Float64(NdChar / KbT)) * -0.25)); 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.35e+117) tmp = t_0; elseif (KbT <= 1.02e+163) tmp = NaChar / (exp((EAccept / KbT)) + 1.0); else tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25); 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.35e+117], t$95$0, If[LessEqual[KbT, 1.02e+163], N[(NaChar / N[(N[Exp[N[(EAccept / KbT), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(Ec * N[(NdChar / KbT), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -2.35 \cdot 10^{+117}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 1.02 \cdot 10^{+163}:\\
\;\;\;\;\frac{NaChar}{e^{\frac{EAccept}{KbT}} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \left(Ec \cdot \frac{NdChar}{KbT}\right) \cdot -0.25\\
\end{array}
\end{array}
if KbT < -2.35000000000000003e117Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6464.7%
Simplified64.7%
if -2.35000000000000003e117 < KbT < 1.02e163Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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.9%
Simplified66.9%
Taylor expanded in EAccept around inf
/-lowering-/.f6435.6%
Simplified35.6%
if 1.02e163 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified32.6%
Taylor expanded in Ec around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6464.5%
Simplified64.5%
Final simplification44.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (+ EDonor (+ Vef (- mu Ec)))) (t_1 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -6.5e+165)
(- t_1 (* (/ Ev KbT) (* NaChar 0.25)))
(if (<= KbT 3.6e+208)
(/
NdChar
(-
2.0
(/
(+ (- (- (- Ec mu) Vef) EDonor) (/ (* -0.5 (* t_0 t_0)) KbT))
KbT)))
(- t_1 (* (* Ec (/ NdChar KbT)) -0.25))))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = EDonor + (Vef + (mu - Ec));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6.5e+165) {
tmp = t_1 - ((Ev / KbT) * (NaChar * 0.25));
} else if (KbT <= 3.6e+208) {
tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT));
} else {
tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = edonor + (vef + (mu - ec))
t_1 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-6.5d+165)) then
tmp = t_1 - ((ev / kbt) * (nachar * 0.25d0))
else if (kbt <= 3.6d+208) then
tmp = ndchar / (2.0d0 - (((((ec - mu) - vef) - edonor) + (((-0.5d0) * (t_0 * t_0)) / kbt)) / kbt))
else
tmp = t_1 - ((ec * (ndchar / kbt)) * (-0.25d0))
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = EDonor + (Vef + (mu - Ec));
double t_1 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6.5e+165) {
tmp = t_1 - ((Ev / KbT) * (NaChar * 0.25));
} else if (KbT <= 3.6e+208) {
tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT));
} else {
tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = EDonor + (Vef + (mu - Ec)) t_1 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -6.5e+165: tmp = t_1 - ((Ev / KbT) * (NaChar * 0.25)) elif KbT <= 3.6e+208: tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT)) else: tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25) return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(EDonor + Float64(Vef + Float64(mu - Ec))) t_1 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -6.5e+165) tmp = Float64(t_1 - Float64(Float64(Ev / KbT) * Float64(NaChar * 0.25))); elseif (KbT <= 3.6e+208) tmp = Float64(NdChar / Float64(2.0 - Float64(Float64(Float64(Float64(Float64(Ec - mu) - Vef) - EDonor) + Float64(Float64(-0.5 * Float64(t_0 * t_0)) / KbT)) / KbT))); else tmp = Float64(t_1 - Float64(Float64(Ec * Float64(NdChar / KbT)) * -0.25)); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = EDonor + (Vef + (mu - Ec)); t_1 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -6.5e+165) tmp = t_1 - ((Ev / KbT) * (NaChar * 0.25)); elseif (KbT <= 3.6e+208) tmp = NdChar / (2.0 - (((((Ec - mu) - Vef) - EDonor) + ((-0.5 * (t_0 * t_0)) / KbT)) / KbT)); else tmp = t_1 - ((Ec * (NdChar / KbT)) * -0.25); end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(EDonor + N[(Vef + N[(mu - Ec), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -6.5e+165], N[(t$95$1 - N[(N[(Ev / KbT), $MachinePrecision] * N[(NaChar * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.6e+208], N[(NdChar / N[(2.0 - N[(N[(N[(N[(N[(Ec - mu), $MachinePrecision] - Vef), $MachinePrecision] - EDonor), $MachinePrecision] + N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(Ec * N[(NdChar / KbT), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := EDonor + \left(Vef + \left(mu - Ec\right)\right)\\
t_1 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -6.5 \cdot 10^{+165}:\\
\;\;\;\;t\_1 - \frac{Ev}{KbT} \cdot \left(NaChar \cdot 0.25\right)\\
\mathbf{elif}\;KbT \leq 3.6 \cdot 10^{+208}:\\
\;\;\;\;\frac{NdChar}{2 - \frac{\left(\left(\left(Ec - mu\right) - Vef\right) - EDonor\right) + \frac{-0.5 \cdot \left(t\_0 \cdot t\_0\right)}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(Ec \cdot \frac{NdChar}{KbT}\right) \cdot -0.25\\
\end{array}
\end{array}
if KbT < -6.4999999999999999e165Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified35.2%
Taylor expanded in Ev around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.3%
Simplified66.3%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6468.8%
Applied egg-rr68.8%
if -6.4999999999999999e165 < KbT < 3.60000000000000003e208Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6462.8%
Simplified62.8%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified30.9%
if 3.60000000000000003e208 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified41.8%
Taylor expanded in Ec around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.0%
Simplified74.0%
Final simplification40.9%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -4.8e+26)
t_0
(if (<= KbT 1.1e-52)
(/ NdChar (+ 2.0 (* Vef (+ (/ (* Vef 0.5) (* KbT KbT)) (/ 1.0 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 <= -4.8e+26) {
tmp = t_0;
} else if (KbT <= 1.1e-52) {
tmp = NdChar / (2.0 + (Vef * (((Vef * 0.5) / (KbT * KbT)) + (1.0 / 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 <= (-4.8d+26)) then
tmp = t_0
else if (kbt <= 1.1d-52) then
tmp = ndchar / (2.0d0 + (vef * (((vef * 0.5d0) / (kbt * kbt)) + (1.0d0 / 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 <= -4.8e+26) {
tmp = t_0;
} else if (KbT <= 1.1e-52) {
tmp = NdChar / (2.0 + (Vef * (((Vef * 0.5) / (KbT * KbT)) + (1.0 / 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 <= -4.8e+26: tmp = t_0 elif KbT <= 1.1e-52: tmp = NdChar / (2.0 + (Vef * (((Vef * 0.5) / (KbT * KbT)) + (1.0 / 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 <= -4.8e+26) tmp = t_0; elseif (KbT <= 1.1e-52) tmp = Float64(NdChar / Float64(2.0 + Float64(Vef * Float64(Float64(Float64(Vef * 0.5) / Float64(KbT * KbT)) + Float64(1.0 / 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 <= -4.8e+26) tmp = t_0; elseif (KbT <= 1.1e-52) tmp = NdChar / (2.0 + (Vef * (((Vef * 0.5) / (KbT * KbT)) + (1.0 / 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, -4.8e+26], t$95$0, If[LessEqual[KbT, 1.1e-52], N[(NdChar / N[(2.0 + N[(Vef * N[(N[(N[(Vef * 0.5), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision] + N[(1.0 / KbT), $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 -4.8 \cdot 10^{+26}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 1.1 \cdot 10^{-52}:\\
\;\;\;\;\frac{NdChar}{2 + Vef \cdot \left(\frac{Vef \cdot 0.5}{KbT \cdot KbT} + \frac{1}{KbT}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -4.80000000000000009e26 or 1.10000000000000005e-52 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6445.2%
Simplified45.2%
if -4.80000000000000009e26 < KbT < 1.10000000000000005e-52Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6460.9%
Simplified60.9%
Taylor expanded in Vef around inf
/-lowering-/.f6439.1%
Simplified39.1%
Taylor expanded in Vef around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6431.4%
Simplified31.4%
Final simplification39.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -7.6e+165)
(- t_0 (* (/ Ev KbT) (* NaChar 0.25)))
(if (<= KbT 3.95e+208)
(/ NdChar (+ 2.0 (/ (- Vef (/ (* -0.5 (* Vef Vef)) KbT)) KbT)))
(- t_0 (* (* Ec (/ NdChar KbT)) -0.25))))))
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 <= -7.6e+165) {
tmp = t_0 - ((Ev / KbT) * (NaChar * 0.25));
} else if (KbT <= 3.95e+208) {
tmp = NdChar / (2.0 + ((Vef - ((-0.5 * (Vef * Vef)) / KbT)) / KbT));
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
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 <= (-7.6d+165)) then
tmp = t_0 - ((ev / kbt) * (nachar * 0.25d0))
else if (kbt <= 3.95d+208) then
tmp = ndchar / (2.0d0 + ((vef - (((-0.5d0) * (vef * vef)) / kbt)) / kbt))
else
tmp = t_0 - ((ec * (ndchar / kbt)) * (-0.25d0))
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 <= -7.6e+165) {
tmp = t_0 - ((Ev / KbT) * (NaChar * 0.25));
} else if (KbT <= 3.95e+208) {
tmp = NdChar / (2.0 + ((Vef - ((-0.5 * (Vef * Vef)) / KbT)) / KbT));
} else {
tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25);
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -7.6e+165: tmp = t_0 - ((Ev / KbT) * (NaChar * 0.25)) elif KbT <= 3.95e+208: tmp = NdChar / (2.0 + ((Vef - ((-0.5 * (Vef * Vef)) / KbT)) / KbT)) else: tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25) 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 <= -7.6e+165) tmp = Float64(t_0 - Float64(Float64(Ev / KbT) * Float64(NaChar * 0.25))); elseif (KbT <= 3.95e+208) tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(Vef - Float64(Float64(-0.5 * Float64(Vef * Vef)) / KbT)) / KbT))); else tmp = Float64(t_0 - Float64(Float64(Ec * Float64(NdChar / KbT)) * -0.25)); 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 <= -7.6e+165) tmp = t_0 - ((Ev / KbT) * (NaChar * 0.25)); elseif (KbT <= 3.95e+208) tmp = NdChar / (2.0 + ((Vef - ((-0.5 * (Vef * Vef)) / KbT)) / KbT)); else tmp = t_0 - ((Ec * (NdChar / KbT)) * -0.25); 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, -7.6e+165], N[(t$95$0 - N[(N[(Ev / KbT), $MachinePrecision] * N[(NaChar * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[KbT, 3.95e+208], N[(NdChar / N[(2.0 + N[(N[(Vef - N[(N[(-0.5 * N[(Vef * Vef), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision] / KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(Ec * N[(NdChar / KbT), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -7.6 \cdot 10^{+165}:\\
\;\;\;\;t\_0 - \frac{Ev}{KbT} \cdot \left(NaChar \cdot 0.25\right)\\
\mathbf{elif}\;KbT \leq 3.95 \cdot 10^{+208}:\\
\;\;\;\;\frac{NdChar}{2 + \frac{Vef - \frac{-0.5 \cdot \left(Vef \cdot Vef\right)}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \left(Ec \cdot \frac{NdChar}{KbT}\right) \cdot -0.25\\
\end{array}
\end{array}
if KbT < -7.59999999999999981e165Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified35.2%
Taylor expanded in Ev around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.3%
Simplified66.3%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6468.8%
Applied egg-rr68.8%
if -7.59999999999999981e165 < KbT < 3.95e208Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6462.8%
Simplified62.8%
Taylor expanded in Vef around inf
/-lowering-/.f6439.4%
Simplified39.4%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.9%
Simplified27.9%
if 3.95e208 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
Simplified41.8%
Taylor expanded in Ec around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.0%
Simplified74.0%
Final simplification38.6%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -5.4e+117)
t_0
(if (<= KbT 2.15e-54)
(/ NaChar (+ 2.0 (/ (- Vef (* -0.5 (/ (* Vef Vef) KbT))) KbT)))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -5.4e+117) {
tmp = t_0;
} else if (KbT <= 2.15e-54) {
tmp = NaChar / (2.0 + ((Vef - (-0.5 * ((Vef * Vef) / KbT))) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-5.4d+117)) then
tmp = t_0
else if (kbt <= 2.15d-54) then
tmp = nachar / (2.0d0 + ((vef - ((-0.5d0) * ((vef * vef) / kbt))) / kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -5.4e+117) {
tmp = t_0;
} else if (KbT <= 2.15e-54) {
tmp = NaChar / (2.0 + ((Vef - (-0.5 * ((Vef * Vef) / KbT))) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -5.4e+117: tmp = t_0 elif KbT <= 2.15e-54: tmp = NaChar / (2.0 + ((Vef - (-0.5 * ((Vef * Vef) / KbT))) / KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -5.4e+117) tmp = t_0; elseif (KbT <= 2.15e-54) tmp = Float64(NaChar / Float64(2.0 + Float64(Float64(Vef - Float64(-0.5 * Float64(Float64(Vef * Vef) / 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 <= -5.4e+117) tmp = t_0; elseif (KbT <= 2.15e-54) tmp = NaChar / (2.0 + ((Vef - (-0.5 * ((Vef * Vef) / KbT))) / KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -5.4e+117], t$95$0, If[LessEqual[KbT, 2.15e-54], N[(NaChar / N[(2.0 + N[(N[(Vef - N[(-0.5 * N[(N[(Vef * Vef), $MachinePrecision] / KbT), $MachinePrecision]), $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 -5.4 \cdot 10^{+117}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 2.15 \cdot 10^{-54}:\\
\;\;\;\;\frac{NaChar}{2 + \frac{Vef - -0.5 \cdot \frac{Vef \cdot Vef}{KbT}}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -5.4000000000000005e117 or 2.15e-54 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6449.9%
Simplified49.9%
if -5.4000000000000005e117 < KbT < 2.15e-54Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6471.9%
Simplified71.9%
Taylor expanded in Vef around inf
/-lowering-/.f6442.8%
Simplified42.8%
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
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6427.5%
Simplified27.5%
Final simplification38.3%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -6.8e+25)
t_0
(if (<= KbT 2.15e-61)
(/ NdChar (+ 2.0 (/ (+ EDonor (- (+ Vef mu) Ec)) KbT)))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6.8e+25) {
tmp = t_0;
} else if (KbT <= 2.15e-61) {
tmp = NdChar / (2.0 + ((EDonor + ((Vef + mu) - Ec)) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-6.8d+25)) then
tmp = t_0
else if (kbt <= 2.15d-61) then
tmp = ndchar / (2.0d0 + ((edonor + ((vef + mu) - ec)) / kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -6.8e+25) {
tmp = t_0;
} else if (KbT <= 2.15e-61) {
tmp = NdChar / (2.0 + ((EDonor + ((Vef + mu) - Ec)) / KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -6.8e+25: tmp = t_0 elif KbT <= 2.15e-61: tmp = NdChar / (2.0 + ((EDonor + ((Vef + mu) - Ec)) / KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -6.8e+25) tmp = t_0; elseif (KbT <= 2.15e-61) tmp = Float64(NdChar / Float64(2.0 + Float64(Float64(EDonor + Float64(Float64(Vef + mu) - Ec)) / KbT))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -6.8e+25) tmp = t_0; elseif (KbT <= 2.15e-61) tmp = NdChar / (2.0 + ((EDonor + ((Vef + mu) - Ec)) / KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -6.8e+25], t$95$0, If[LessEqual[KbT, 2.15e-61], N[(NdChar / N[(2.0 + N[(N[(EDonor + N[(N[(Vef + mu), $MachinePrecision] - Ec), $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 -6.8 \cdot 10^{+25}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 2.15 \cdot 10^{-61}:\\
\;\;\;\;\frac{NdChar}{2 + \frac{EDonor + \left(\left(Vef + mu\right) - Ec\right)}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -6.79999999999999967e25 or 2.1500000000000002e-61 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6444.7%
Simplified44.7%
if -6.79999999999999967e25 < KbT < 2.1500000000000002e-61Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6461.1%
Simplified61.1%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified30.1%
Taylor expanded in KbT around inf
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f6428.8%
Simplified28.8%
Final simplification37.8%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -2.8e+117)
t_0
(if (<= KbT 2.7e-53)
(/ NdChar (/ (* 0.5 (* Vef Vef)) (* KbT KbT)))
t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.8e+117) {
tmp = t_0;
} else if (KbT <= 2.7e-53) {
tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-2.8d+117)) then
tmp = t_0
else if (kbt <= 2.7d-53) then
tmp = ndchar / ((0.5d0 * (vef * vef)) / (kbt * kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -2.8e+117) {
tmp = t_0;
} else if (KbT <= 2.7e-53) {
tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -2.8e+117: tmp = t_0 elif KbT <= 2.7e-53: tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -2.8e+117) tmp = t_0; elseif (KbT <= 2.7e-53) tmp = Float64(NdChar / Float64(Float64(0.5 * Float64(Vef * Vef)) / Float64(KbT * KbT))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -2.8e+117) tmp = t_0; elseif (KbT <= 2.7e-53) tmp = NdChar / ((0.5 * (Vef * Vef)) / (KbT * KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -2.8e+117], t$95$0, If[LessEqual[KbT, 2.7e-53], N[(NdChar / N[(N[(0.5 * N[(Vef * Vef), $MachinePrecision]), $MachinePrecision] / N[(KbT * KbT), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(NdChar + NaChar\right)\\
\mathbf{if}\;KbT \leq -2.8 \cdot 10^{+117}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 2.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{NdChar}{\frac{0.5 \cdot \left(Vef \cdot Vef\right)}{KbT \cdot KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -2.79999999999999997e117 or 2.6999999999999999e-53 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6449.9%
Simplified49.9%
if -2.79999999999999997e117 < KbT < 2.6999999999999999e-53Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6458.8%
Simplified58.8%
Taylor expanded in KbT around -inf
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified29.2%
Taylor expanded in Vef around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Final simplification37.1%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -9e+23)
t_0
(if (<= KbT 2e-83) (/ NdChar (+ 2.0 (/ Vef KbT))) t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -9e+23) {
tmp = t_0;
} else if (KbT <= 2e-83) {
tmp = NdChar / (2.0 + (Vef / KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-9d+23)) then
tmp = t_0
else if (kbt <= 2d-83) then
tmp = ndchar / (2.0d0 + (vef / kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -9e+23) {
tmp = t_0;
} else if (KbT <= 2e-83) {
tmp = NdChar / (2.0 + (Vef / KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -9e+23: tmp = t_0 elif KbT <= 2e-83: tmp = NdChar / (2.0 + (Vef / KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -9e+23) tmp = t_0; elseif (KbT <= 2e-83) tmp = Float64(NdChar / Float64(2.0 + Float64(Vef / KbT))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -9e+23) tmp = t_0; elseif (KbT <= 2e-83) tmp = NdChar / (2.0 + (Vef / KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -9e+23], t$95$0, If[LessEqual[KbT, 2e-83], N[(NdChar / N[(2.0 + N[(Vef / 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 -9 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 2 \cdot 10^{-83}:\\
\;\;\;\;\frac{NdChar}{2 + \frac{Vef}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -8.99999999999999958e23 or 2.0000000000000001e-83 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6443.6%
Simplified43.6%
if -8.99999999999999958e23 < KbT < 2.0000000000000001e-83Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6461.1%
Simplified61.1%
Taylor expanded in Vef around inf
/-lowering-/.f6438.6%
Simplified38.6%
Taylor expanded in Vef around 0
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6422.2%
Simplified22.2%
Final simplification34.7%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept)
:precision binary64
(let* ((t_0 (* 0.5 (+ NdChar NaChar))))
(if (<= KbT -3.35e-15)
t_0
(if (<= KbT 7e-58) (/ NaChar (+ 2.0 (/ Vef KbT))) t_0))))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.35e-15) {
tmp = t_0;
} else if (KbT <= 7e-58) {
tmp = NaChar / (2.0 + (Vef / KbT));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (ndchar + nachar)
if (kbt <= (-3.35d-15)) then
tmp = t_0
else if (kbt <= 7d-58) then
tmp = nachar / (2.0d0 + (vef / kbt))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
double t_0 = 0.5 * (NdChar + NaChar);
double tmp;
if (KbT <= -3.35e-15) {
tmp = t_0;
} else if (KbT <= 7e-58) {
tmp = NaChar / (2.0 + (Vef / KbT));
} else {
tmp = t_0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): t_0 = 0.5 * (NdChar + NaChar) tmp = 0 if KbT <= -3.35e-15: tmp = t_0 elif KbT <= 7e-58: tmp = NaChar / (2.0 + (Vef / KbT)) else: tmp = t_0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = Float64(0.5 * Float64(NdChar + NaChar)) tmp = 0.0 if (KbT <= -3.35e-15) tmp = t_0; elseif (KbT <= 7e-58) tmp = Float64(NaChar / Float64(2.0 + Float64(Vef / KbT))); else tmp = t_0; end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) t_0 = 0.5 * (NdChar + NaChar); tmp = 0.0; if (KbT <= -3.35e-15) tmp = t_0; elseif (KbT <= 7e-58) tmp = NaChar / (2.0 + (Vef / KbT)); else tmp = t_0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := Block[{t$95$0 = N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[KbT, -3.35e-15], t$95$0, If[LessEqual[KbT, 7e-58], N[(NaChar / N[(2.0 + N[(Vef / 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 -3.35 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;KbT \leq 7 \cdot 10^{-58}:\\
\;\;\;\;\frac{NaChar}{2 + \frac{Vef}{KbT}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if KbT < -3.35e-15 or 6.9999999999999998e-58 < KbT Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6444.0%
Simplified44.0%
if -3.35e-15 < KbT < 6.9999999999999998e-58Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6472.1%
Simplified72.1%
Taylor expanded in Vef around inf
/-lowering-/.f6441.5%
Simplified41.5%
Taylor expanded in Vef around 0
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6420.9%
Simplified20.9%
Final simplification34.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (if (<= NdChar -3e+121) (/ NdChar 2.0) (if (<= NdChar 9.5e-85) (/ NaChar 2.0) (/ NdChar 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 (NdChar <= -3e+121) {
tmp = NdChar / 2.0;
} else if (NdChar <= 9.5e-85) {
tmp = NaChar / 2.0;
} else {
tmp = NdChar / 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 (ndchar <= (-3d+121)) then
tmp = ndchar / 2.0d0
else if (ndchar <= 9.5d-85) then
tmp = nachar / 2.0d0
else
tmp = ndchar / 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 (NdChar <= -3e+121) {
tmp = NdChar / 2.0;
} else if (NdChar <= 9.5e-85) {
tmp = NaChar / 2.0;
} else {
tmp = NdChar / 2.0;
}
return tmp;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): tmp = 0 if NdChar <= -3e+121: tmp = NdChar / 2.0 elif NdChar <= 9.5e-85: tmp = NaChar / 2.0 else: tmp = NdChar / 2.0 return tmp
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0 if (NdChar <= -3e+121) tmp = Float64(NdChar / 2.0); elseif (NdChar <= 9.5e-85) tmp = Float64(NaChar / 2.0); else tmp = Float64(NdChar / 2.0); end return tmp end
function tmp_2 = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.0; if (NdChar <= -3e+121) tmp = NdChar / 2.0; elseif (NdChar <= 9.5e-85) tmp = NaChar / 2.0; else tmp = NdChar / 2.0; end tmp_2 = tmp; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := If[LessEqual[NdChar, -3e+121], N[(NdChar / 2.0), $MachinePrecision], If[LessEqual[NdChar, 9.5e-85], N[(NaChar / 2.0), $MachinePrecision], N[(NdChar / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;NdChar \leq -3 \cdot 10^{+121}:\\
\;\;\;\;\frac{NdChar}{2}\\
\mathbf{elif}\;NdChar \leq 9.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{NaChar}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{NdChar}{2}\\
\end{array}
\end{array}
if NdChar < -3.0000000000000002e121 or 9.49999999999999964e-85 < NdChar Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
associate-+r+N/A
mul-1-negN/A
+-lowering-+.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f6472.6%
Simplified72.6%
Taylor expanded in KbT around inf
Simplified28.2%
if -3.0000000000000002e121 < NdChar < 9.49999999999999964e-85Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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.7%
Simplified73.7%
Taylor expanded in KbT around inf
Simplified25.2%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (* 0.5 (+ NdChar NaChar)))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = 0.5d0 * (ndchar + nachar)
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return 0.5 * (NdChar + NaChar);
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return 0.5 * (NdChar + NaChar)
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(0.5 * Float64(NdChar + NaChar)) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = 0.5 * (NdChar + NaChar); end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(0.5 * N[(NdChar + NaChar), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(NdChar + NaChar\right)
\end{array}
Initial program 100.0%
Simplified100.0%
Taylor expanded in KbT around inf
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6429.5%
Simplified29.5%
Final simplification29.5%
(FPCore (NdChar Ec Vef EDonor mu KbT NaChar Ev EAccept) :precision binary64 (/ NaChar 2.0))
double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NaChar / 2.0;
}
real(8) function code(ndchar, ec, vef, edonor, mu, kbt, nachar, ev, eaccept)
real(8), intent (in) :: ndchar
real(8), intent (in) :: ec
real(8), intent (in) :: vef
real(8), intent (in) :: edonor
real(8), intent (in) :: mu
real(8), intent (in) :: kbt
real(8), intent (in) :: nachar
real(8), intent (in) :: ev
real(8), intent (in) :: eaccept
code = nachar / 2.0d0
end function
public static double code(double NdChar, double Ec, double Vef, double EDonor, double mu, double KbT, double NaChar, double Ev, double EAccept) {
return NaChar / 2.0;
}
def code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept): return NaChar / 2.0
function code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) return Float64(NaChar / 2.0) end
function tmp = code(NdChar, Ec, Vef, EDonor, mu, KbT, NaChar, Ev, EAccept) tmp = NaChar / 2.0; end
code[NdChar_, Ec_, Vef_, EDonor_, mu_, KbT_, NaChar_, Ev_, EAccept_] := N[(NaChar / 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{NaChar}{2}
\end{array}
Initial program 100.0%
Simplified100.0%
Taylor expanded in NdChar around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
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--.f6461.3%
Simplified61.3%
Taylor expanded in KbT around inf
Simplified18.1%
herbie shell --seed 2024145
(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))))))