\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;1 - {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell} \leq 2 \cdot 10^{+292}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{0.25}{d} \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{d}}{\ell}}\\
\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
(if (<= (- 1.0 (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ h l))) 2e+292)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ M d) (/ D 2.0)) 2.0)))))
(* w0 (sqrt (- 1.0 (/ (* (/ 0.25 d) (/ (* h (* (* M D) (* M D))) d)) l)))))) 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 tmp;
if ((1.0 - (pow(((M * D) / (d * 2.0)), 2.0) * (h / l))) <= 2e+292) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0 * sqrt((1.0 - (((0.25 / d) * ((h * ((M * D) * (M * D))) / d)) / l)));
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
↓
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((1.0d0 - ((((m * d) / (d_1 * 2.0d0)) ** 2.0d0) * (h / l))) <= 2d+292) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((m / d_1) * (d / 2.0d0)) ** 2.0d0))))
else
tmp = w0 * sqrt((1.0d0 - (((0.25d0 / d_1) * ((h * ((m * d) * (m * d))) / d_1)) / l)))
end if
code = tmp
end function
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 tmp;
if ((1.0 - (Math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l))) <= 2e+292) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0 * Math.sqrt((1.0 - (((0.25 / d) * ((h * ((M * D) * (M * D))) / d)) / l)));
}
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):
tmp = 0
if (1.0 - (math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l))) <= 2e+292:
tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M / d) * (D / 2.0)), 2.0))))
else:
tmp = w0 * math.sqrt((1.0 - (((0.25 / d) * ((h * ((M * D) * (M * D))) / d)) / l)))
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)
tmp = 0.0
if (Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(h / l))) <= 2e+292)
tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0)))));
else
tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(0.25 / d) * Float64(Float64(h * Float64(Float64(M * D) * Float64(M * D))) / d)) / l))));
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)
tmp = 0.0;
if ((1.0 - ((((M * D) / (d * 2.0)) ^ 2.0) * (h / l))) <= 2e+292)
tmp = w0 * sqrt((1.0 - ((h / l) * (((M / d) * (D / 2.0)) ^ 2.0))));
else
tmp = w0 * sqrt((1.0 - (((0.25 / d) * ((h * ((M * D) * (M * D))) / d)) / l)));
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_] := If[LessEqual[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+292], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(0.25 / d), $MachinePrecision] * N[(N[(h * N[(N[(M * D), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
↓
\begin{array}{l}
\mathbf{if}\;1 - {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell} \leq 2 \cdot 10^{+292}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{0.25}{d} \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{d}}{\ell}}\\
\end{array}
Alternatives Alternative 1 Accuracy 86.8% Cost 21188
\[\begin{array}{l}
\mathbf{if}\;1 - {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell} \leq 2 \cdot 10^{+292}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{0.25}{d} \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{d}}{\ell}}\\
\end{array}
\]
Alternative 2 Accuracy 82.2% Cost 13956
\[\begin{array}{l}
\mathbf{if}\;M \leq -8.5 \cdot 10^{-48}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{0.25}{d} \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{d}}{\ell}}\\
\end{array}
\]
Alternative 3 Accuracy 85.9% Cost 13824
\[w0 \cdot \sqrt{1 - \frac{{\left(\frac{M}{d} \cdot \left(D \cdot 0.5\right)\right)}^{2} \cdot h}{\ell}}
\]
Alternative 4 Accuracy 76.6% Cost 8004
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{-133}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
Alternative 5 Accuracy 81.0% Cost 7876
\[\begin{array}{l}
\mathbf{if}\;d \leq -2.35 \cdot 10^{+188}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{0.25}{d} \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{d}}{\ell}}\\
\end{array}
\]
Alternative 6 Accuracy 71.9% Cost 1609
\[\begin{array}{l}
\mathbf{if}\;M \leq -3.7 \cdot 10^{+147} \lor \neg \left(M \leq 3.3 \cdot 10^{-80}\right):\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\frac{h}{d} \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
Alternative 7 Accuracy 72.3% Cost 1608
\[\begin{array}{l}
\mathbf{if}\;M \leq -2.85 \cdot 10^{+147}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\frac{h}{d} \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\
\mathbf{elif}\;M \leq 2.1 \cdot 10^{-202}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{\ell} \cdot \left(D \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \frac{h}{d}\right)\right)\\
\end{array}
\]
Alternative 8 Accuracy 72.9% Cost 1608
\[\begin{array}{l}
\mathbf{if}\;M \leq -3.1 \cdot 10^{+151}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{M}}{M \cdot h} \cdot \frac{\ell}{D}}\right)\\
\mathbf{elif}\;M \leq 1.8 \cdot 10^{-203}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{\ell} \cdot \left(D \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \frac{h}{d}\right)\right)\\
\end{array}
\]
Alternative 9 Accuracy 74.2% Cost 1604
\[\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{-133}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{D \cdot D}{\left(\ell \cdot \frac{d}{M}\right) \cdot \frac{d}{M \cdot h}} \cdot -0.125\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
Alternative 10 Accuracy 69.0% Cost 1481
\[\begin{array}{l}
\mathbf{if}\;M \leq -1.12 \cdot 10^{+254} \lor \neg \left(M \leq 0.11\right):\\
\;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{w0 \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot \ell}\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\]
Alternative 11 Accuracy 68.9% Cost 1480
\[\begin{array}{l}
t_0 := \frac{D \cdot D}{d}\\
\mathbf{if}\;M \leq -1.1 \cdot 10^{+252}:\\
\;\;\;\;-0.125 \cdot \left(t_0 \cdot \frac{w0 \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot \ell}\right)\\
\mathbf{elif}\;M \leq 0.11:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.125}{d} \cdot \left(t_0 \cdot \frac{w0}{\frac{\frac{\ell}{h}}{M \cdot M}}\right)\\
\end{array}
\]
Alternative 12 Accuracy 69.1% Cost 1480
\[\begin{array}{l}
\mathbf{if}\;M \leq -2.5 \cdot 10^{+248}:\\
\;\;\;\;\frac{-0.125}{d} \cdot \frac{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \left(w0 \cdot h\right)}{d \cdot \ell}\\
\mathbf{elif}\;M \leq 0.11:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.125}{d} \cdot \left(\frac{D \cdot D}{d} \cdot \frac{w0}{\frac{\frac{\ell}{h}}{M \cdot M}}\right)\\
\end{array}
\]
Alternative 13 Accuracy 67.6% Cost 64
\[w0
\]