\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\]
↓
\[\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\mathsf{hypot}\left(1, \frac{M}{d} \cdot \sqrt{D \cdot \left(h \cdot \frac{D \cdot -0.25}{\ell}\right)}\right) \cdot w0\\
\mathbf{elif}\;t_0 \leq 0.0005:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
(FPCore (w0 M D h l d)
:precision binary64
(* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
↓
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))
(if (<= t_0 (- INFINITY))
(* (hypot 1.0 (* (/ M d) (sqrt (* D (* h (/ (* D -0.25) l)))))) w0)
(if (<= t_0 0.0005) (* w0 (sqrt (- 1.0 t_0))) w0))))double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
↓
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = hypot(1.0, ((M / d) * sqrt((D * (h * ((D * -0.25) / l)))))) * w0;
} else if (t_0 <= 0.0005) {
tmp = w0 * sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
↓
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = Math.hypot(1.0, ((M / d) * Math.sqrt((D * (h * ((D * -0.25) / l)))))) * w0;
} else if (t_0 <= 0.0005) {
tmp = w0 * Math.sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d):
return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
↓
def code(w0, M, D, h, l, d):
t_0 = math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)
tmp = 0
if t_0 <= -math.inf:
tmp = math.hypot(1.0, ((M / d) * math.sqrt((D * (h * ((D * -0.25) / l)))))) * w0
elif t_0 <= 0.0005:
tmp = w0 * math.sqrt((1.0 - t_0))
else:
tmp = w0
return tmp
function code(w0, M, D, h, l, d)
return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)))))
end
↓
function code(w0, M, D, h, l, d)
t_0 = Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))
tmp = 0.0
if (t_0 <= Float64(-Inf))
tmp = Float64(hypot(1.0, Float64(Float64(M / d) * sqrt(Float64(D * Float64(h * Float64(Float64(D * -0.25) / l)))))) * w0);
elseif (t_0 <= 0.0005)
tmp = Float64(w0 * sqrt(Float64(1.0 - t_0)));
else
tmp = w0;
end
return tmp
end
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))));
end
↓
function tmp_2 = code(w0, M, D, h, l, d)
t_0 = (((M * D) / (2.0 * d)) ^ 2.0) * (h / l);
tmp = 0.0;
if (t_0 <= -Inf)
tmp = hypot(1.0, ((M / d) * sqrt((D * (h * ((D * -0.25) / l)))))) * w0;
elseif (t_0 <= 0.0005)
tmp = w0 * sqrt((1.0 - t_0));
else
tmp = w0;
end
tmp_2 = tmp;
end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[Sqrt[1.0 ^ 2 + N[(N[(M / d), $MachinePrecision] * N[Sqrt[N[(D * N[(h * N[(N[(D * -0.25), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] * w0), $MachinePrecision], If[LessEqual[t$95$0, 0.0005], N[(w0 * N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]]
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
↓
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\mathsf{hypot}\left(1, \frac{M}{d} \cdot \sqrt{D \cdot \left(h \cdot \frac{D \cdot -0.25}{\ell}\right)}\right) \cdot w0\\
\mathbf{elif}\;t_0 \leq 0.0005:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 85.9% |
|---|
| Cost | 27784 |
|---|
\[\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\\
\mathbf{if}\;t_0 \leq 0:\\
\;\;\;\;w0\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+286}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{h}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{\left(d \cdot \frac{d}{M}\right) \cdot \frac{\frac{\ell}{D \cdot h}}{M}}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 84.4% |
|---|
| Cost | 14344 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{-0.25 \cdot \left(D \cdot D\right)}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{M \cdot h}\right)}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-194}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 83.0% |
|---|
| Cost | 14344 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{-0.25 \cdot \left(D \cdot D\right)}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{M \cdot h}\right)}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq 2 \cdot 10^{-282}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 79.8% |
|---|
| Cost | 8524 |
|---|
\[\begin{array}{l}
t_0 := d \cdot \frac{d}{M}\\
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+122}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{t_0 \cdot \frac{\frac{\ell}{D}}{M \cdot h}}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-26}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{\frac{\frac{\ell}{h}}{D} \cdot \left(\frac{d}{M} \cdot \frac{d}{M}\right)}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-181}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{t_0 \cdot \frac{\frac{\ell}{D \cdot h}}{M}}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 80.2% |
|---|
| Cost | 8264 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -2 \cdot 10^{+296}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{-0.25}{\frac{d \cdot \left(d \cdot \ell\right)}{h \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot M\right)\right)}}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-181}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{M \cdot D}{\frac{d}{\frac{M}{d}} \cdot \frac{\frac{\ell}{h}}{D}}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 80.3% |
|---|
| Cost | 8264 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+234}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{-0.25 \cdot \left(D \cdot D\right)}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{M \cdot h}\right)}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-181}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{M \cdot D}{\frac{d}{\frac{M}{d}} \cdot \frac{\frac{\ell}{h}}{D}}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 76.5% |
|---|
| Cost | 8140 |
|---|
\[\begin{array}{l}
t_0 := d \cdot \frac{d}{M}\\
\mathbf{if}\;D \leq 5 \cdot 10^{-128}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{t_0 \cdot \frac{\frac{\ell}{D \cdot h}}{M}}}\\
\mathbf{elif}\;D \leq 5 \cdot 10^{+27}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D \cdot \left(D \cdot h\right)}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{M}\right)}}\\
\mathbf{elif}\;D \leq 4.2 \cdot 10^{+79}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{t_0 \cdot \frac{\frac{\ell}{D}}{M \cdot h}}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 78.4% |
|---|
| Cost | 8008 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d \leq -5 \cdot 10^{+185}:\\
\;\;\;\;w0\\
\mathbf{elif}\;d \leq -5 \cdot 10^{+31}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{D}{\left(d \cdot \frac{d}{M}\right) \cdot \frac{\frac{\ell}{D}}{M \cdot h}}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 78.5% |
|---|
| Cost | 64 |
|---|
\[w0
\]