
(FPCore (w0 M D h l d) :precision binary64 (* 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) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
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
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))));
}
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))))
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 tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); 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]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w0 M D h l d) :precision binary64 (* 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) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
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
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))));
}
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))))
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 tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); 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]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* (* (/ M_m d) (* D 0.5)) h) (* (* (/ 2.0 M_m) (/ d D)) l))))))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((((M_m / d) * (D * 0.5)) * h) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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_m / d_1) * (d * 0.5d0)) * h) / (((2.0d0 / m_m) * (d_1 / d)) * l))))
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((((M_m / d) * (D * 0.5)) * h) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): return w0 * math.sqrt((1.0 - ((((M_m / d) * (D * 0.5)) * h) / (((2.0 / M_m) * (d / D)) * l))))
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(Float64(M_m / d) * Float64(D * 0.5)) * h) / Float64(Float64(Float64(2.0 / M_m) * Float64(d / D)) * l))))) end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp = code(w0, M_m, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((((M_m / d) * (D * 0.5)) * h) / (((2.0 / M_m) * (d / D)) * l))));
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(N[(M$95$m / d), $MachinePrecision] * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / N[(N[(N[(2.0 / M$95$m), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
w0 \cdot \sqrt{1 - \frac{\left(\frac{M\_m}{d} \cdot \left(D \cdot 0.5\right)\right) \cdot h}{\left(\frac{2}{M\_m} \cdot \frac{d}{D}\right) \cdot \ell}}
\end{array}
Initial program 81.8%
Simplified82.9%
unpow282.9%
associate-*r/81.4%
clear-num81.4%
un-div-inv81.4%
*-un-lft-identity81.4%
times-frac81.4%
metadata-eval81.4%
times-frac82.9%
Applied egg-rr82.9%
frac-times90.2%
associate-*r/90.2%
Applied egg-rr90.2%
clear-num90.3%
inv-pow90.3%
Applied egg-rr90.3%
unpow-190.3%
Simplified90.3%
un-div-inv90.2%
Applied egg-rr90.2%
associate-/r/88.7%
*-commutative88.7%
Simplified88.7%
M_m = (fabs.f64 M)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
(FPCore (w0 M_m D h l d)
:precision binary64
(if (<= (* M_m D) 2e-208)
w0
(*
w0
(sqrt
(-
1.0
(* (* D (/ (* M_m 0.5) d)) (/ (* D (/ h d)) (* (/ 2.0 M_m) l))))))))M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if ((M_m * D) <= 2e-208) {
tmp = w0;
} else {
tmp = w0 * sqrt((1.0 - ((D * ((M_m * 0.5) / d)) * ((D * (h / d)) / ((2.0 / M_m) * l)))));
}
return tmp;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 ((m_m * d) <= 2d-208) then
tmp = w0
else
tmp = w0 * sqrt((1.0d0 - ((d * ((m_m * 0.5d0) / d_1)) * ((d * (h / d_1)) / ((2.0d0 / m_m) * l)))))
end if
code = tmp
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if ((M_m * D) <= 2e-208) {
tmp = w0;
} else {
tmp = w0 * Math.sqrt((1.0 - ((D * ((M_m * 0.5) / d)) * ((D * (h / d)) / ((2.0 / M_m) * l)))));
}
return tmp;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): tmp = 0 if (M_m * D) <= 2e-208: tmp = w0 else: tmp = w0 * math.sqrt((1.0 - ((D * ((M_m * 0.5) / d)) * ((D * (h / d)) / ((2.0 / M_m) * l))))) return tmp
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) tmp = 0.0 if (Float64(M_m * D) <= 2e-208) tmp = w0; else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(D * Float64(Float64(M_m * 0.5) / d)) * Float64(Float64(D * Float64(h / d)) / Float64(Float64(2.0 / M_m) * l)))))); end return tmp end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp_2 = code(w0, M_m, D, h, l, d)
tmp = 0.0;
if ((M_m * D) <= 2e-208)
tmp = w0;
else
tmp = w0 * sqrt((1.0 - ((D * ((M_m * 0.5) / d)) * ((D * (h / d)) / ((2.0 / M_m) * l)))));
end
tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := If[LessEqual[N[(M$95$m * D), $MachinePrecision], 2e-208], w0, N[(w0 * N[Sqrt[N[(1.0 - N[(N[(D * N[(N[(M$95$m * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * N[(h / d), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 / M$95$m), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \cdot D \leq 2 \cdot 10^{-208}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(D \cdot \frac{M\_m \cdot 0.5}{d}\right) \cdot \frac{D \cdot \frac{h}{d}}{\frac{2}{M\_m} \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 M D) < 2.0000000000000002e-208Initial program 85.7%
Simplified86.2%
Taylor expanded in M around 0 78.2%
if 2.0000000000000002e-208 < (*.f64 M D) Initial program 74.3%
Simplified76.5%
unpow276.5%
associate-*r/73.2%
clear-num73.2%
un-div-inv73.2%
*-un-lft-identity73.2%
times-frac73.2%
metadata-eval73.2%
times-frac76.5%
Applied egg-rr76.5%
frac-times84.5%
associate-*r/84.5%
Applied egg-rr84.5%
clear-num84.6%
inv-pow84.6%
Applied egg-rr84.6%
unpow-184.6%
Simplified84.6%
associate-/l*84.5%
clear-num84.5%
*-commutative84.5%
associate-*l*77.9%
associate-/l*77.8%
*-un-lft-identity77.8%
associate-/l*77.9%
associate-/l*77.9%
associate-*l*77.9%
*-commutative77.9%
*-commutative77.9%
Applied egg-rr77.9%
*-lft-identity77.9%
associate-*r/75.7%
rem-cube-cbrt75.7%
*-commutative75.7%
associate-/l*74.6%
rem-cube-cbrt74.5%
associate-/r*73.3%
associate-/r/74.4%
*-commutative74.4%
Simplified74.4%
Final simplification76.9%
M_m = (fabs.f64 M)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
(FPCore (w0 M_m D h l d)
:precision binary64
(if (<= M_m 9.6e-13)
w0
(*
h
(-
(/ w0 h)
(/ (* 0.125 (/ (* w0 (* (* M_m D) (* M_m D))) (pow d 2.0))) l)))))M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 9.6e-13) {
tmp = w0;
} else {
tmp = h * ((w0 / h) - ((0.125 * ((w0 * ((M_m * D) * (M_m * D))) / pow(d, 2.0))) / l));
}
return tmp;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 (m_m <= 9.6d-13) then
tmp = w0
else
tmp = h * ((w0 / h) - ((0.125d0 * ((w0 * ((m_m * d) * (m_m * d))) / (d_1 ** 2.0d0))) / l))
end if
code = tmp
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 9.6e-13) {
tmp = w0;
} else {
tmp = h * ((w0 / h) - ((0.125 * ((w0 * ((M_m * D) * (M_m * D))) / Math.pow(d, 2.0))) / l));
}
return tmp;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): tmp = 0 if M_m <= 9.6e-13: tmp = w0 else: tmp = h * ((w0 / h) - ((0.125 * ((w0 * ((M_m * D) * (M_m * D))) / math.pow(d, 2.0))) / l)) return tmp
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) tmp = 0.0 if (M_m <= 9.6e-13) tmp = w0; else tmp = Float64(h * Float64(Float64(w0 / h) - Float64(Float64(0.125 * Float64(Float64(w0 * Float64(Float64(M_m * D) * Float64(M_m * D))) / (d ^ 2.0))) / l))); end return tmp end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp_2 = code(w0, M_m, D, h, l, d)
tmp = 0.0;
if (M_m <= 9.6e-13)
tmp = w0;
else
tmp = h * ((w0 / h) - ((0.125 * ((w0 * ((M_m * D) * (M_m * D))) / (d ^ 2.0))) / l));
end
tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := If[LessEqual[M$95$m, 9.6e-13], w0, N[(h * N[(N[(w0 / h), $MachinePrecision] - N[(N[(0.125 * N[(N[(w0 * N[(N[(M$95$m * D), $MachinePrecision] * N[(M$95$m * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[d, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 9.6 \cdot 10^{-13}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;h \cdot \left(\frac{w0}{h} - \frac{0.125 \cdot \frac{w0 \cdot \left(\left(M\_m \cdot D\right) \cdot \left(M\_m \cdot D\right)\right)}{{d}^{2}}}{\ell}\right)\\
\end{array}
\end{array}
if M < 9.5999999999999995e-13Initial program 82.7%
Simplified84.1%
Taylor expanded in M around 0 78.5%
if 9.5999999999999995e-13 < M Initial program 79.0%
Simplified78.9%
Taylor expanded in M around 0 47.4%
+-commutative47.4%
*-commutative47.4%
fma-define47.4%
associate-*r*49.0%
*-commutative49.0%
unpow249.0%
unpow249.0%
swap-sqr61.0%
unpow261.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in h around -inf 37.9%
mul-1-neg37.9%
distribute-rgt-neg-in37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
Simplified48.4%
unpow248.4%
*-commutative48.4%
*-commutative48.4%
Applied egg-rr48.4%
Final simplification71.4%
M_m = (fabs.f64 M)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
(FPCore (w0 M_m D h l d)
:precision binary64
(if (<= M_m 1.05e-12)
w0
(*
h
(-
(/ w0 h)
(/ (* 0.125 (* (* (* M_m D) (* M_m D)) (* w0 (pow d -2.0)))) l)))))M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 1.05e-12) {
tmp = w0;
} else {
tmp = h * ((w0 / h) - ((0.125 * (((M_m * D) * (M_m * D)) * (w0 * pow(d, -2.0)))) / l));
}
return tmp;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 (m_m <= 1.05d-12) then
tmp = w0
else
tmp = h * ((w0 / h) - ((0.125d0 * (((m_m * d) * (m_m * d)) * (w0 * (d_1 ** (-2.0d0))))) / l))
end if
code = tmp
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 1.05e-12) {
tmp = w0;
} else {
tmp = h * ((w0 / h) - ((0.125 * (((M_m * D) * (M_m * D)) * (w0 * Math.pow(d, -2.0)))) / l));
}
return tmp;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): tmp = 0 if M_m <= 1.05e-12: tmp = w0 else: tmp = h * ((w0 / h) - ((0.125 * (((M_m * D) * (M_m * D)) * (w0 * math.pow(d, -2.0)))) / l)) return tmp
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) tmp = 0.0 if (M_m <= 1.05e-12) tmp = w0; else tmp = Float64(h * Float64(Float64(w0 / h) - Float64(Float64(0.125 * Float64(Float64(Float64(M_m * D) * Float64(M_m * D)) * Float64(w0 * (d ^ -2.0)))) / l))); end return tmp end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp_2 = code(w0, M_m, D, h, l, d)
tmp = 0.0;
if (M_m <= 1.05e-12)
tmp = w0;
else
tmp = h * ((w0 / h) - ((0.125 * (((M_m * D) * (M_m * D)) * (w0 * (d ^ -2.0)))) / l));
end
tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := If[LessEqual[M$95$m, 1.05e-12], w0, N[(h * N[(N[(w0 / h), $MachinePrecision] - N[(N[(0.125 * N[(N[(N[(M$95$m * D), $MachinePrecision] * N[(M$95$m * D), $MachinePrecision]), $MachinePrecision] * N[(w0 * N[Power[d, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 1.05 \cdot 10^{-12}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;h \cdot \left(\frac{w0}{h} - \frac{0.125 \cdot \left(\left(\left(M\_m \cdot D\right) \cdot \left(M\_m \cdot D\right)\right) \cdot \left(w0 \cdot {d}^{-2}\right)\right)}{\ell}\right)\\
\end{array}
\end{array}
if M < 1.04999999999999997e-12Initial program 82.7%
Simplified84.1%
Taylor expanded in M around 0 78.5%
if 1.04999999999999997e-12 < M Initial program 79.0%
Simplified78.9%
Taylor expanded in M around 0 47.4%
+-commutative47.4%
*-commutative47.4%
fma-define47.4%
associate-*r*49.0%
*-commutative49.0%
unpow249.0%
unpow249.0%
swap-sqr61.0%
unpow261.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in h around -inf 37.9%
mul-1-neg37.9%
distribute-rgt-neg-in37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
Simplified48.4%
div-inv48.4%
*-commutative48.4%
pow-flip48.4%
metadata-eval48.4%
Applied egg-rr48.4%
associate-*l*48.4%
*-commutative48.4%
Simplified48.4%
unpow248.4%
*-commutative48.4%
*-commutative48.4%
Applied egg-rr48.4%
Final simplification71.4%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (if (<= M_m 4e-5) w0 (* -0.125 (/ (* (* (* M_m D) (* M_m D)) (* w0 h)) (* l (pow d 2.0))))))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 4e-5) {
tmp = w0;
} else {
tmp = -0.125 * ((((M_m * D) * (M_m * D)) * (w0 * h)) / (l * pow(d, 2.0)));
}
return tmp;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 (m_m <= 4d-5) then
tmp = w0
else
tmp = (-0.125d0) * ((((m_m * d) * (m_m * d)) * (w0 * h)) / (l * (d_1 ** 2.0d0)))
end if
code = tmp
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 4e-5) {
tmp = w0;
} else {
tmp = -0.125 * ((((M_m * D) * (M_m * D)) * (w0 * h)) / (l * Math.pow(d, 2.0)));
}
return tmp;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): tmp = 0 if M_m <= 4e-5: tmp = w0 else: tmp = -0.125 * ((((M_m * D) * (M_m * D)) * (w0 * h)) / (l * math.pow(d, 2.0))) return tmp
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) tmp = 0.0 if (M_m <= 4e-5) tmp = w0; else tmp = Float64(-0.125 * Float64(Float64(Float64(Float64(M_m * D) * Float64(M_m * D)) * Float64(w0 * h)) / Float64(l * (d ^ 2.0)))); end return tmp end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp_2 = code(w0, M_m, D, h, l, d)
tmp = 0.0;
if (M_m <= 4e-5)
tmp = w0;
else
tmp = -0.125 * ((((M_m * D) * (M_m * D)) * (w0 * h)) / (l * (d ^ 2.0)));
end
tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := If[LessEqual[M$95$m, 4e-5], w0, N[(-0.125 * N[(N[(N[(N[(M$95$m * D), $MachinePrecision] * N[(M$95$m * D), $MachinePrecision]), $MachinePrecision] * N[(w0 * h), $MachinePrecision]), $MachinePrecision] / N[(l * N[Power[d, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 4 \cdot 10^{-5}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;-0.125 \cdot \frac{\left(\left(M\_m \cdot D\right) \cdot \left(M\_m \cdot D\right)\right) \cdot \left(w0 \cdot h\right)}{\ell \cdot {d}^{2}}\\
\end{array}
\end{array}
if M < 4.00000000000000033e-5Initial program 82.8%
Simplified84.2%
Taylor expanded in M around 0 78.1%
if 4.00000000000000033e-5 < M Initial program 78.6%
Simplified78.6%
Taylor expanded in M around 0 46.5%
+-commutative46.5%
*-commutative46.5%
fma-define46.5%
associate-*r*48.2%
*-commutative48.2%
unpow248.2%
unpow248.2%
swap-sqr60.3%
unpow260.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in D around inf 22.0%
associate-*r*22.0%
unpow222.0%
unpow222.0%
swap-sqr23.1%
unpow223.1%
*-commutative23.1%
Simplified23.1%
unpow247.5%
*-commutative47.5%
*-commutative47.5%
Applied egg-rr23.1%
Final simplification65.5%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* h (* M_m (/ (* D 0.5) d))) (* (* (/ 2.0 M_m) (/ d D)) l))))))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 - ((h * (m_m * ((d * 0.5d0) / d_1))) / (((2.0d0 / m_m) * (d_1 / d)) * l))))
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): return w0 * math.sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / (((2.0 / M_m) * (d / D)) * l))))
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * Float64(M_m * Float64(Float64(D * 0.5) / d))) / Float64(Float64(Float64(2.0 / M_m) * Float64(d / D)) * l))))) end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp = code(w0, M_m, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / (((2.0 / M_m) * (d / D)) * l))));
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[(M$95$m * N[(N[(D * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(2.0 / M$95$m), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
w0 \cdot \sqrt{1 - \frac{h \cdot \left(M\_m \cdot \frac{D \cdot 0.5}{d}\right)}{\left(\frac{2}{M\_m} \cdot \frac{d}{D}\right) \cdot \ell}}
\end{array}
Initial program 81.8%
Simplified82.9%
unpow282.9%
associate-*r/81.4%
clear-num81.4%
un-div-inv81.4%
*-un-lft-identity81.4%
times-frac81.4%
metadata-eval81.4%
times-frac82.9%
Applied egg-rr82.9%
frac-times90.2%
associate-*r/90.2%
Applied egg-rr90.2%
Final simplification90.2%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* h (* M_m (/ (* D 0.5) d))) (* (/ d D) (* (/ 2.0 M_m) l)))))))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / ((d / D) * ((2.0 / M_m) * l)))));
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 - ((h * (m_m * ((d * 0.5d0) / d_1))) / ((d_1 / d) * ((2.0d0 / m_m) * l)))))
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / ((d / D) * ((2.0 / M_m) * l)))));
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): return w0 * math.sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / ((d / D) * ((2.0 / M_m) * l)))))
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * Float64(M_m * Float64(Float64(D * 0.5) / d))) / Float64(Float64(d / D) * Float64(Float64(2.0 / M_m) * l)))))) end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp = code(w0, M_m, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((h * (M_m * ((D * 0.5) / d))) / ((d / D) * ((2.0 / M_m) * l)))));
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[(M$95$m * N[(N[(D * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d / D), $MachinePrecision] * N[(N[(2.0 / M$95$m), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
w0 \cdot \sqrt{1 - \frac{h \cdot \left(M\_m \cdot \frac{D \cdot 0.5}{d}\right)}{\frac{d}{D} \cdot \left(\frac{2}{M\_m} \cdot \ell\right)}}
\end{array}
Initial program 81.8%
Simplified82.9%
unpow282.9%
associate-*r/81.4%
clear-num81.4%
un-div-inv81.4%
*-un-lft-identity81.4%
times-frac81.4%
metadata-eval81.4%
times-frac82.9%
Applied egg-rr82.9%
frac-times90.2%
associate-*r/90.2%
Applied egg-rr90.2%
pow190.2%
*-commutative90.2%
Applied egg-rr90.2%
unpow190.2%
associate-*r*86.5%
Simplified86.5%
Final simplification86.5%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* 0.5 (* D (/ (* M_m h) d))) (* (* (/ 2.0 M_m) (/ d D)) l))))))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((0.5 * (D * ((M_m * h) / d))) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 - ((0.5d0 * (d * ((m_m * h) / d_1))) / (((2.0d0 / m_m) * (d_1 / d)) * l))))
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((0.5 * (D * ((M_m * h) / d))) / (((2.0 / M_m) * (d / D)) * l))));
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): return w0 * math.sqrt((1.0 - ((0.5 * (D * ((M_m * h) / d))) / (((2.0 / M_m) * (d / D)) * l))))
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(0.5 * Float64(D * Float64(Float64(M_m * h) / d))) / Float64(Float64(Float64(2.0 / M_m) * Float64(d / D)) * l))))) end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp = code(w0, M_m, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((0.5 * (D * ((M_m * h) / d))) / (((2.0 / M_m) * (d / D)) * l))));
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(0.5 * N[(D * N[(N[(M$95$m * h), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(2.0 / M$95$m), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
w0 \cdot \sqrt{1 - \frac{0.5 \cdot \left(D \cdot \frac{M\_m \cdot h}{d}\right)}{\left(\frac{2}{M\_m} \cdot \frac{d}{D}\right) \cdot \ell}}
\end{array}
Initial program 81.8%
Simplified82.9%
unpow282.9%
associate-*r/81.4%
clear-num81.4%
un-div-inv81.4%
*-un-lft-identity81.4%
times-frac81.4%
metadata-eval81.4%
times-frac82.9%
Applied egg-rr82.9%
frac-times90.2%
associate-*r/90.2%
Applied egg-rr90.2%
Taylor expanded in M around 0 85.0%
associate-/l*84.8%
Simplified84.8%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 (if (<= M_m 3.1e-62) w0 (/ (* w0 h) h)))
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 3.1e-62) {
tmp = w0;
} else {
tmp = (w0 * h) / h;
}
return tmp;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_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 (m_m <= 3.1d-62) then
tmp = w0
else
tmp = (w0 * h) / h
end if
code = tmp
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
double tmp;
if (M_m <= 3.1e-62) {
tmp = w0;
} else {
tmp = (w0 * h) / h;
}
return tmp;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): tmp = 0 if M_m <= 3.1e-62: tmp = w0 else: tmp = (w0 * h) / h return tmp
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) tmp = 0.0 if (M_m <= 3.1e-62) tmp = w0; else tmp = Float64(Float64(w0 * h) / h); end return tmp end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp_2 = code(w0, M_m, D, h, l, d)
tmp = 0.0;
if (M_m <= 3.1e-62)
tmp = w0;
else
tmp = (w0 * h) / h;
end
tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := If[LessEqual[M$95$m, 3.1e-62], w0, N[(N[(w0 * h), $MachinePrecision] / h), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 3.1 \cdot 10^{-62}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\frac{w0 \cdot h}{h}\\
\end{array}
\end{array}
if M < 3.0999999999999999e-62Initial program 82.2%
Simplified83.7%
Taylor expanded in M around 0 78.8%
if 3.0999999999999999e-62 < M Initial program 80.9%
Simplified80.9%
Taylor expanded in M around 0 48.7%
+-commutative48.7%
*-commutative48.7%
fma-define48.7%
associate-*r*50.1%
*-commutative50.1%
unpow250.1%
unpow250.1%
swap-sqr60.2%
unpow260.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in h around inf 38.0%
fma-define38.0%
associate-*r*38.2%
unpow238.2%
unpow238.2%
swap-sqr46.1%
unpow246.1%
Simplified46.1%
Taylor expanded in D around 0 36.5%
associate-*r/49.3%
Applied egg-rr49.3%
Final simplification70.6%
M_m = (fabs.f64 M) NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. (FPCore (w0 M_m D h l d) :precision binary64 w0)
M_m = fabs(M);
assert(w0 < M_m && M_m < D && D < h && h < l && l < d);
double code(double w0, double M_m, double D, double h, double l, double d) {
return w0;
}
M_m = abs(m)
NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function.
real(8) function code(w0, m_m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0
end function
M_m = Math.abs(M);
assert w0 < M_m && M_m < D && D < h && h < l && l < d;
public static double code(double w0, double M_m, double D, double h, double l, double d) {
return w0;
}
M_m = math.fabs(M) [w0, M_m, D, h, l, d] = sort([w0, M_m, D, h, l, d]) def code(w0, M_m, D, h, l, d): return w0
M_m = abs(M) w0, M_m, D, h, l, d = sort([w0, M_m, D, h, l, d]) function code(w0, M_m, D, h, l, d) return w0 end
M_m = abs(M);
w0, M_m, D, h, l, d = num2cell(sort([w0, M_m, D, h, l, d])){:}
function tmp = code(w0, M_m, D, h, l, d)
tmp = w0;
end
M_m = N[Abs[M], $MachinePrecision] NOTE: w0, M_m, D, h, l, and d should be sorted in increasing order before calling this function. code[w0_, M$95$m_, D_, h_, l_, d_] := w0
\begin{array}{l}
M_m = \left|M\right|
\\
[w0, M_m, D, h, l, d] = \mathsf{sort}([w0, M_m, D, h, l, d])\\
\\
w0
\end{array}
Initial program 81.8%
Simplified82.9%
Taylor expanded in M around 0 71.0%
herbie shell --seed 2024138
(FPCore (w0 M D h l d)
:name "Henrywood and Agarwal, Equation (9a)"
:precision binary64
(* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))