\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\]
↓
\[\begin{array}{l}
t_0 := \frac{M \cdot D}{\sqrt{8} \cdot d}\\
t_1 := 1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
t_3 := \sqrt{\frac{d}{h}} \cdot t_2\\
t_4 := {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\\
t_5 := \left(t_4 \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot t_1\\
\mathbf{if}\;t_5 \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\left(1 - t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right) \cdot t_3\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\left(t_4 \cdot \begin{array}{l}
\mathbf{if}\;\frac{d}{\ell} \ne 0:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(\log \left(\frac{-1}{\ell}\right) + \log \left(-1 \cdot d\right)\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(\left(0.125 \cdot h\right) \cdot \frac{M \cdot D}{d}\right) \cdot \left(M \cdot D\right)}{d} - \ell}{\ell} \cdot \left(-t_3\right)\\
\end{array}
\]
(FPCore (d h l M D)
:precision binary64
(*
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
(- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
↓
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) (* (sqrt 8.0) d)))
(t_1
(- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))
(t_2 (sqrt (/ d l)))
(t_3 (* (sqrt (/ d h)) t_2))
(t_4 (pow (/ d h) (/ 1.0 2.0)))
(t_5 (* (* t_4 (pow (/ d l) (/ 1.0 2.0))) t_1)))
(if (<= t_5 5e+293)
(* (- 1.0 (* t_0 (* t_0 (/ h l)))) t_3)
(if (<= t_5 INFINITY)
(*
(*
t_4
(if (!= (/ d l) 0.0)
(pow (exp (* -0.5 (+ (log (/ -1.0 l)) (log (* -1.0 d))))) -1.0)
t_2))
t_1)
(*
(/ (- (/ (* (* (* 0.125 h) (/ (* M D) d)) (* M D)) d) l) l)
(- t_3))))))double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
↓
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / (sqrt(8.0) * d);
double t_1 = 1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l));
double t_2 = sqrt((d / l));
double t_3 = sqrt((d / h)) * t_2;
double t_4 = pow((d / h), (1.0 / 2.0));
double t_5 = (t_4 * pow((d / l), (1.0 / 2.0))) * t_1;
double tmp;
if (t_5 <= 5e+293) {
tmp = (1.0 - (t_0 * (t_0 * (h / l)))) * t_3;
} else if (t_5 <= ((double) INFINITY)) {
double tmp_1;
if ((d / l) != 0.0) {
tmp_1 = pow(exp((-0.5 * (log((-1.0 / l)) + log((-1.0 * d))))), -1.0);
} else {
tmp_1 = t_2;
}
tmp = (t_4 * tmp_1) * t_1;
} else {
tmp = ((((((0.125 * h) * ((M * D) / d)) * (M * D)) / d) - l) / l) * -t_3;
}
return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
↓
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / (Math.sqrt(8.0) * d);
double t_1 = 1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l));
double t_2 = Math.sqrt((d / l));
double t_3 = Math.sqrt((d / h)) * t_2;
double t_4 = Math.pow((d / h), (1.0 / 2.0));
double t_5 = (t_4 * Math.pow((d / l), (1.0 / 2.0))) * t_1;
double tmp;
if (t_5 <= 5e+293) {
tmp = (1.0 - (t_0 * (t_0 * (h / l)))) * t_3;
} else if (t_5 <= Double.POSITIVE_INFINITY) {
double tmp_1;
if ((d / l) != 0.0) {
tmp_1 = Math.pow(Math.exp((-0.5 * (Math.log((-1.0 / l)) + Math.log((-1.0 * d))))), -1.0);
} else {
tmp_1 = t_2;
}
tmp = (t_4 * tmp_1) * t_1;
} else {
tmp = ((((((0.125 * h) * ((M * D) / d)) * (M * D)) / d) - l) / l) * -t_3;
}
return tmp;
}
def code(d, h, l, M, D):
return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
↓
def code(d, h, l, M, D):
t_0 = (M * D) / (math.sqrt(8.0) * d)
t_1 = 1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l))
t_2 = math.sqrt((d / l))
t_3 = math.sqrt((d / h)) * t_2
t_4 = math.pow((d / h), (1.0 / 2.0))
t_5 = (t_4 * math.pow((d / l), (1.0 / 2.0))) * t_1
tmp = 0
if t_5 <= 5e+293:
tmp = (1.0 - (t_0 * (t_0 * (h / l)))) * t_3
elif t_5 <= math.inf:
tmp_1 = 0
if (d / l) != 0.0:
tmp_1 = math.pow(math.exp((-0.5 * (math.log((-1.0 / l)) + math.log((-1.0 * d))))), -1.0)
else:
tmp_1 = t_2
tmp = (t_4 * tmp_1) * t_1
else:
tmp = ((((((0.125 * h) * ((M * D) / d)) * (M * D)) / d) - l) / l) * -t_3
return tmp
function code(d, h, l, M, D)
return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
↓
function code(d, h, l, M, D)
t_0 = Float64(Float64(M * D) / Float64(sqrt(8.0) * d))
t_1 = Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))
t_2 = sqrt(Float64(d / l))
t_3 = Float64(sqrt(Float64(d / h)) * t_2)
t_4 = Float64(d / h) ^ Float64(1.0 / 2.0)
t_5 = Float64(Float64(t_4 * (Float64(d / l) ^ Float64(1.0 / 2.0))) * t_1)
tmp = 0.0
if (t_5 <= 5e+293)
tmp = Float64(Float64(1.0 - Float64(t_0 * Float64(t_0 * Float64(h / l)))) * t_3);
elseif (t_5 <= Inf)
tmp_1 = 0.0
if (Float64(d / l) != 0.0)
tmp_1 = exp(Float64(-0.5 * Float64(log(Float64(-1.0 / l)) + log(Float64(-1.0 * d))))) ^ -1.0;
else
tmp_1 = t_2;
end
tmp = Float64(Float64(t_4 * tmp_1) * t_1);
else
tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(0.125 * h) * Float64(Float64(M * D) / d)) * Float64(M * D)) / d) - l) / l) * Float64(-t_3));
end
return tmp
end
function tmp = code(d, h, l, M, D)
tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
end
↓
function tmp_3 = code(d, h, l, M, D)
t_0 = (M * D) / (sqrt(8.0) * d);
t_1 = 1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l));
t_2 = sqrt((d / l));
t_3 = sqrt((d / h)) * t_2;
t_4 = (d / h) ^ (1.0 / 2.0);
t_5 = (t_4 * ((d / l) ^ (1.0 / 2.0))) * t_1;
tmp = 0.0;
if (t_5 <= 5e+293)
tmp = (1.0 - (t_0 * (t_0 * (h / l)))) * t_3;
elseif (t_5 <= Inf)
tmp_2 = 0.0;
if ((d / l) ~= 0.0)
tmp_2 = exp((-0.5 * (log((-1.0 / l)) + log((-1.0 * d))))) ^ -1.0;
else
tmp_2 = t_2;
end
tmp = (t_4 * tmp_2) * t_1;
else
tmp = ((((((0.125 * h) * ((M * D) / d)) * (M * D)) / d) - l) / l) * -t_3;
end
tmp_3 = tmp;
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(N[Sqrt[8.0], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$5, 5e+293], N[(N[(1.0 - N[(t$95$0 * N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(t$95$4 * If[Unequal[N[(d / l), $MachinePrecision], 0.0], N[Power[N[Exp[N[(-0.5 * N[(N[Log[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision] + N[Log[N[(-1.0 * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], -1.0], $MachinePrecision], t$95$2]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(0.125 * h), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] - l), $MachinePrecision] / l), $MachinePrecision] * (-t$95$3)), $MachinePrecision]]]]]]]]]
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
↓
\begin{array}{l}
t_0 := \frac{M \cdot D}{\sqrt{8} \cdot d}\\
t_1 := 1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
t_3 := \sqrt{\frac{d}{h}} \cdot t_2\\
t_4 := {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\\
t_5 := \left(t_4 \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot t_1\\
\mathbf{if}\;t_5 \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\left(1 - t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right) \cdot t_3\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\left(t_4 \cdot \begin{array}{l}
\mathbf{if}\;\frac{d}{\ell} \ne 0:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(\log \left(\frac{-1}{\ell}\right) + \log \left(-1 \cdot d\right)\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(\left(0.125 \cdot h\right) \cdot \frac{M \cdot D}{d}\right) \cdot \left(M \cdot D\right)}{d} - \ell}{\ell} \cdot \left(-t_3\right)\\
\end{array}