
(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 11 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}
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)))))
(if (<= t_0 5e+172)
(* w0 (sqrt t_0))
(*
w0
(sqrt (- 1.0 (* (/ 0.25 l) (* (/ D d) (* M (* (/ D d) (* M h)))))))))))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = 1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l));
double tmp;
if (t_0 <= 5e+172) {
tmp = w0 * sqrt(t_0);
} else {
tmp = w0 * sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this 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) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))
if (t_0 <= 5d+172) then
tmp = w0 * sqrt(t_0)
else
tmp = w0 * sqrt((1.0d0 - ((0.25d0 / l) * ((d / d_1) * (m * ((d / d_1) * (m * h)))))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = 1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l));
double tmp;
if (t_0 <= 5e+172) {
tmp = w0 * Math.sqrt(t_0);
} else {
tmp = w0 * Math.sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): t_0 = 1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) tmp = 0 if t_0 <= 5e+172: tmp = w0 * math.sqrt(t_0) else: tmp = w0 * math.sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h))))))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) t_0 = Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))) tmp = 0.0 if (t_0 <= 5e+172) tmp = Float64(w0 * sqrt(t_0)); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(0.25 / l) * Float64(Float64(D / d) * Float64(M * Float64(Float64(D / d) * Float64(M * h)))))))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
t_0 = 1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l));
tmp = 0.0;
if (t_0 <= 5e+172)
tmp = w0 * sqrt(t_0);
else
tmp = w0 * sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function.
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 5e+172], N[(w0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(0.25 / l), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(M * N[(N[(D / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := 1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+172}:\\
\;\;\;\;w0 \cdot \sqrt{t_0}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{0.25}{\ell} \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot h\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) < 5.0000000000000001e172Initial program 99.9%
if 5.0000000000000001e172 < (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) Initial program 42.8%
Simplified45.2%
Taylor expanded in D around 0 42.3%
associate-*r/42.3%
*-commutative42.3%
times-frac44.9%
*-commutative44.9%
associate-/l*44.9%
unpow244.9%
associate-*l*47.3%
unpow247.3%
unpow247.3%
Simplified47.3%
*-un-lft-identity47.3%
*-commutative47.3%
times-frac59.7%
Applied egg-rr59.7%
*-lft-identity59.7%
associate-*l/54.8%
times-frac58.6%
*-commutative58.6%
Simplified58.6%
expm1-log1p-u58.4%
expm1-udef58.4%
div-inv58.4%
clear-num58.4%
div-inv58.4%
clear-num58.4%
Applied egg-rr58.4%
expm1-def58.4%
expm1-log1p58.6%
associate-*l*60.9%
associate-*l*62.2%
Simplified62.2%
Final simplification88.0%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= (/ h l) -4e+181) (* w0 (sqrt (- 1.0 (* 0.25 (* (/ D d) (* (/ D d) (/ (* M h) (/ l M)))))))) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ D 2.0) (/ M d)) 2.0)))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -4e+181) {
tmp = w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
} else {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((D / 2.0) * (M / d)), 2.0))));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this 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 ((h / l) <= (-4d+181)) then
tmp = w0 * sqrt((1.0d0 - (0.25d0 * ((d / d_1) * ((d / d_1) * ((m * h) / (l / m)))))))
else
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((d / 2.0d0) * (m / d_1)) ** 2.0d0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -4e+181) {
tmp = w0 * Math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
} else {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((D / 2.0) * (M / d)), 2.0))));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -4e+181: tmp = w0 * math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M))))))) else: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((D / 2.0) * (M / d)), 2.0)))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -4e+181) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(D / d) * Float64(Float64(D / d) * Float64(Float64(M * h) / Float64(l / M)))))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(D / 2.0) * Float64(M / d)) ^ 2.0))))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -4e+181)
tmp = w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
else
tmp = w0 * sqrt((1.0 - ((h / l) * (((D / 2.0) * (M / d)) ^ 2.0))));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -4e+181], N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(D / d), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(N[(M * h), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D / 2.0), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{+181}:\\
\;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{D}{d} \cdot \left(\frac{D}{d} \cdot \frac{M \cdot h}{\frac{\ell}{M}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2}}\\
\end{array}
\end{array}
if (/.f64 h l) < -3.9999999999999997e181Initial program 53.2%
Simplified51.0%
*-commutative51.0%
frac-times53.2%
*-commutative53.2%
associate-*l/73.3%
div-inv73.3%
associate-*l*73.3%
associate-/r*73.3%
metadata-eval73.3%
Applied egg-rr73.3%
Taylor expanded in h around 0 45.2%
unpow245.2%
times-frac45.3%
unpow245.3%
*-commutative45.3%
associate-/r*48.3%
unpow248.3%
associate-*r/58.4%
associate-*l/61.0%
*-commutative61.0%
associate-/l*50.6%
associate-*l*50.9%
associate-/r/61.3%
associate-/l*65.9%
associate-*l/65.9%
Simplified65.9%
if -3.9999999999999997e181 < (/.f64 h l) Initial program 87.0%
Simplified87.9%
Final simplification84.6%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= (/ h l) -4e+181) (* w0 (sqrt (- 1.0 (* 0.25 (* (/ D d) (* (/ D d) (/ (* M h) (/ l M)))))))) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (/ (* D 0.5) (/ d M)) 2.0)))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -4e+181) {
tmp = w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
} else {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((D * 0.5) / (d / M)), 2.0))));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this 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 ((h / l) <= (-4d+181)) then
tmp = w0 * sqrt((1.0d0 - (0.25d0 * ((d / d_1) * ((d / d_1) * ((m * h) / (l / m)))))))
else
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((d * 0.5d0) / (d_1 / m)) ** 2.0d0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -4e+181) {
tmp = w0 * Math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
} else {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((D * 0.5) / (d / M)), 2.0))));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -4e+181: tmp = w0 * math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M))))))) else: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((D * 0.5) / (d / M)), 2.0)))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -4e+181) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(D / d) * Float64(Float64(D / d) * Float64(Float64(M * h) / Float64(l / M)))))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(D * 0.5) / Float64(d / M)) ^ 2.0))))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -4e+181)
tmp = w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
else
tmp = w0 * sqrt((1.0 - ((h / l) * (((D * 0.5) / (d / M)) ^ 2.0))));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -4e+181], N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(D / d), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(N[(M * h), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D * 0.5), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{+181}:\\
\;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{D}{d} \cdot \left(\frac{D}{d} \cdot \frac{M \cdot h}{\frac{\ell}{M}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D \cdot 0.5}{\frac{d}{M}}\right)}^{2}}\\
\end{array}
\end{array}
if (/.f64 h l) < -3.9999999999999997e181Initial program 53.2%
Simplified51.0%
*-commutative51.0%
frac-times53.2%
*-commutative53.2%
associate-*l/73.3%
div-inv73.3%
associate-*l*73.3%
associate-/r*73.3%
metadata-eval73.3%
Applied egg-rr73.3%
Taylor expanded in h around 0 45.2%
unpow245.2%
times-frac45.3%
unpow245.3%
*-commutative45.3%
associate-/r*48.3%
unpow248.3%
associate-*r/58.4%
associate-*l/61.0%
*-commutative61.0%
associate-/l*50.6%
associate-*l*50.9%
associate-/r/61.3%
associate-/l*65.9%
associate-*l/65.9%
Simplified65.9%
if -3.9999999999999997e181 < (/.f64 h l) Initial program 87.0%
Simplified87.9%
clear-num87.9%
un-div-inv87.9%
div-inv87.9%
metadata-eval87.9%
Applied egg-rr87.9%
Final simplification84.6%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* 0.25 (* (/ D d) (* (/ D d) (/ (* M h) (/ l M)))))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * sqrt((1.0d0 - (0.25d0 * ((d / d_1) * ((d / d_1) * ((m * h) / (l / m)))))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(D / d) * Float64(Float64(D / d) * Float64(Float64(M * h) / Float64(l / M)))))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * sqrt((1.0 - (0.25 * ((D / d) * ((D / d) * ((M * h) / (l / M)))))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(D / d), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(N[(M * h), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{D}{d} \cdot \left(\frac{D}{d} \cdot \frac{M \cdot h}{\frac{\ell}{M}}\right)\right)}
\end{array}
Initial program 81.9%
Simplified82.3%
*-commutative82.3%
frac-times81.9%
*-commutative81.9%
associate-*l/85.4%
div-inv85.4%
associate-*l*85.4%
associate-/r*85.4%
metadata-eval85.4%
Applied egg-rr85.4%
Taylor expanded in h around 0 54.1%
unpow254.1%
times-frac54.5%
unpow254.5%
*-commutative54.5%
associate-/r*60.5%
unpow260.5%
associate-*r/66.3%
associate-*l/67.5%
*-commutative67.5%
associate-/l*66.2%
associate-*l*71.0%
associate-/r/71.6%
associate-/l*74.6%
associate-*l/77.9%
Simplified77.9%
Final simplification77.9%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (/ 0.25 l) (* (/ D d) (* M (* (/ D d) (* M h)))))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * sqrt((1.0d0 - ((0.25d0 / l) * ((d / d_1) * (m * ((d / d_1) * (m * h)))))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(0.25 / l) * Float64(Float64(D / d) * Float64(M * Float64(Float64(D / d) * Float64(M * h)))))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((0.25 / l) * ((D / d) * (M * ((D / d) * (M * h)))))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(0.25 / l), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(M * N[(N[(D / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \sqrt{1 - \frac{0.25}{\ell} \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot h\right)\right)\right)\right)}
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 54.1%
associate-*r/54.1%
*-commutative54.1%
times-frac56.1%
*-commutative56.1%
associate-/l*56.9%
unpow256.9%
associate-*l*60.0%
unpow260.0%
unpow260.0%
Simplified60.0%
*-un-lft-identity60.0%
*-commutative60.0%
times-frac73.7%
Applied egg-rr73.7%
*-lft-identity73.7%
associate-*l/70.6%
times-frac76.4%
*-commutative76.4%
Simplified76.4%
expm1-log1p-u76.3%
expm1-udef76.3%
div-inv75.9%
clear-num75.9%
div-inv75.9%
clear-num75.9%
Applied egg-rr75.9%
expm1-def75.9%
expm1-log1p76.0%
associate-*l*78.1%
associate-*l*83.0%
Simplified83.0%
Final simplification83.0%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= M 4e+101) w0 (* -0.125 (* (/ (* D D) (* d d)) (/ (* M M) (/ l (* h w0)))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 4e+101) {
tmp = w0;
} else {
tmp = -0.125 * (((D * D) / (d * d)) * ((M * M) / (l / (h * w0))));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this 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 (m <= 4d+101) then
tmp = w0
else
tmp = (-0.125d0) * (((d * d) / (d_1 * d_1)) * ((m * m) / (l / (h * w0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 4e+101) {
tmp = w0;
} else {
tmp = -0.125 * (((D * D) / (d * d)) * ((M * M) / (l / (h * w0))));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= 4e+101: tmp = w0 else: tmp = -0.125 * (((D * D) / (d * d)) * ((M * M) / (l / (h * w0)))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= 4e+101) tmp = w0; else tmp = Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(d * d)) * Float64(Float64(M * M) / Float64(l / Float64(h * w0))))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= 4e+101)
tmp = w0;
else
tmp = -0.125 * (((D * D) / (d * d)) * ((M * M) / (l / (h * w0))));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 4e+101], w0, N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / N[(h * w0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq 4 \cdot 10^{+101}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{M \cdot M}{\frac{\ell}{h \cdot w0}}\right)\\
\end{array}
\end{array}
if M < 3.9999999999999999e101Initial program 84.6%
Simplified85.1%
Taylor expanded in D around 0 71.1%
if 3.9999999999999999e101 < M Initial program 60.5%
Simplified60.5%
Taylor expanded in D around 0 32.8%
*-commutative32.8%
times-frac26.1%
unpow226.1%
unpow226.1%
unpow226.1%
Simplified26.1%
associate-*r/33.0%
times-frac33.2%
*-commutative33.2%
Applied egg-rr33.2%
Taylor expanded in h around 0 33.2%
unpow233.2%
associate-*r*36.7%
Simplified36.7%
Taylor expanded in D around inf 19.4%
times-frac19.6%
unpow219.6%
unpow219.6%
associate-/l*19.3%
unpow219.3%
Simplified19.3%
Final simplification65.3%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (+ 1.0 (* -0.125 (* (/ D d) (* (* h (/ M l)) (/ (* M D) d)))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * ((h * (M / l)) * ((M * D) / d)))));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * (1.0d0 + ((-0.125d0) * ((d / d_1) * ((h * (m / l)) * ((m * d) / d_1)))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * ((h * (M / l)) * ((M * D) / d)))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * (1.0 + (-0.125 * ((D / d) * ((h * (M / l)) * ((M * D) / d)))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D / d) * Float64(Float64(h * Float64(M / l)) * Float64(Float64(M * D) / d)))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * (1.0 + (-0.125 * ((D / d) * ((h * (M / l)) * ((M * D) / d)))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D / d), $MachinePrecision] * N[(N[(h * N[(M / l), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \left(1 + -0.125 \cdot \left(\frac{D}{d} \cdot \left(\left(h \cdot \frac{M}{\ell}\right) \cdot \frac{M \cdot D}{d}\right)\right)\right)
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 52.7%
*-commutative52.7%
times-frac53.1%
unpow253.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in D around 0 52.7%
unpow252.7%
times-frac53.1%
unpow253.1%
*-commutative53.1%
associate-/r*58.7%
unpow258.7%
associate-*r/63.8%
associate-*l/64.6%
*-commutative64.6%
associate-/l*64.1%
associate-*l*68.6%
associate-/r/68.7%
associate-/l*70.6%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in D around 0 67.4%
times-frac69.1%
unpow269.1%
associate-*r*71.0%
*-commutative71.0%
associate-*l/72.9%
*-commutative72.9%
associate-*l*74.5%
*-commutative74.5%
associate-*l/73.8%
Simplified73.8%
expm1-log1p-u65.6%
expm1-udef63.5%
associate-/l*64.6%
Applied egg-rr64.6%
expm1-def67.0%
expm1-log1p74.8%
associate-/r/74.9%
Simplified74.9%
Final simplification74.9%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (+ 1.0 (* -0.125 (* (/ D d) (* (/ D d) (* M (* h (/ M l)))))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * ((D / d) * (M * (h * (M / l)))))));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * (1.0d0 + ((-0.125d0) * ((d / d_1) * ((d / d_1) * (m * (h * (m / l)))))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * ((D / d) * (M * (h * (M / l)))))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * (1.0 + (-0.125 * ((D / d) * ((D / d) * (M * (h * (M / l)))))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D / d) * Float64(Float64(D / d) * Float64(M * Float64(h * Float64(M / l)))))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * (1.0 + (-0.125 * ((D / d) * ((D / d) * (M * (h * (M / l)))))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D / d), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(M * N[(h * N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \left(1 + -0.125 \cdot \left(\frac{D}{d} \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(h \cdot \frac{M}{\ell}\right)\right)\right)\right)\right)
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 52.7%
*-commutative52.7%
times-frac53.1%
unpow253.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in D around 0 52.7%
unpow252.7%
times-frac53.1%
unpow253.1%
*-commutative53.1%
associate-/r*58.7%
unpow258.7%
associate-*r/63.8%
associate-*l/64.6%
*-commutative64.6%
associate-/l*64.1%
associate-*l*68.6%
associate-/r/68.7%
associate-/l*70.6%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in D around 0 67.4%
times-frac69.1%
unpow269.1%
associate-*r*71.0%
*-commutative71.0%
associate-*l/72.9%
*-commutative72.9%
associate-*l*74.5%
*-commutative74.5%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in M around 0 67.4%
times-frac69.1%
associate-/l*68.6%
unpow268.6%
associate-*r/72.1%
associate-/r/73.3%
*-commutative73.3%
Simplified73.3%
Final simplification73.3%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (+ 1.0 (* -0.125 (* (/ D d) (* (/ (* M h) l) (* M (/ D d))))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * (((M * h) / l) * (M * (D / d))))));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * (1.0d0 + ((-0.125d0) * ((d / d_1) * (((m * h) / l) * (m * (d / d_1))))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (-0.125 * ((D / d) * (((M * h) / l) * (M * (D / d))))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * (1.0 + (-0.125 * ((D / d) * (((M * h) / l) * (M * (D / d))))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D / d) * Float64(Float64(Float64(M * h) / l) * Float64(M * Float64(D / d))))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * (1.0 + (-0.125 * ((D / d) * (((M * h) / l) * (M * (D / d))))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D / d), $MachinePrecision] * N[(N[(N[(M * h), $MachinePrecision] / l), $MachinePrecision] * N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \left(1 + -0.125 \cdot \left(\frac{D}{d} \cdot \left(\frac{M \cdot h}{\ell} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right)\right)
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 52.7%
*-commutative52.7%
times-frac53.1%
unpow253.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in D around 0 52.7%
unpow252.7%
times-frac53.1%
unpow253.1%
*-commutative53.1%
associate-/r*58.7%
unpow258.7%
associate-*r/63.8%
associate-*l/64.6%
*-commutative64.6%
associate-/l*64.1%
associate-*l*68.6%
associate-/r/68.7%
associate-/l*70.6%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in D around 0 67.4%
times-frac69.1%
unpow269.1%
associate-*r*71.0%
*-commutative71.0%
associate-*l/72.9%
*-commutative72.9%
associate-*l*74.5%
*-commutative74.5%
associate-*l/73.8%
Simplified73.8%
expm1-log1p-u65.4%
expm1-udef65.2%
associate-/l*66.0%
Applied egg-rr66.0%
expm1-def66.1%
expm1-log1p74.5%
associate-/r/74.5%
Simplified74.5%
Final simplification74.5%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (+ 1.0 (* (* (/ D d) (/ (* (/ D d) (* M h)) (/ l M))) -0.125))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (((D / d) * (((D / d) * (M * h)) / (l / M))) * -0.125));
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0 * (1.0d0 + (((d / d_1) * (((d / d_1) * (m * h)) / (l / m))) * (-0.125d0)))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + (((D / d) * (((D / d) * (M * h)) / (l / M))) * -0.125));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * (1.0 + (((D / d) * (((D / d) * (M * h)) / (l / M))) * -0.125))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * Float64(1.0 + Float64(Float64(Float64(D / d) * Float64(Float64(Float64(D / d) * Float64(M * h)) / Float64(l / M))) * -0.125))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * (1.0 + (((D / d) * (((D / d) * (M * h)) / (l / M))) * -0.125));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[(1.0 + N[(N[(N[(D / d), $MachinePrecision] * N[(N[(N[(D / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \left(1 + \left(\frac{D}{d} \cdot \frac{\frac{D}{d} \cdot \left(M \cdot h\right)}{\frac{\ell}{M}}\right) \cdot -0.125\right)
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 52.7%
*-commutative52.7%
times-frac53.1%
unpow253.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in D around 0 52.7%
unpow252.7%
times-frac53.1%
unpow253.1%
*-commutative53.1%
associate-/r*58.7%
unpow258.7%
associate-*r/63.8%
associate-*l/64.6%
*-commutative64.6%
associate-/l*64.1%
associate-*l*68.6%
associate-/r/68.7%
associate-/l*70.6%
associate-*l/72.9%
Simplified72.9%
associate-*r/75.4%
Applied egg-rr75.4%
Final simplification75.4%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 w0)
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
NOTE: M and D should be sorted in increasing order before calling this 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
code = w0
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return w0 end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0
\end{array}
Initial program 81.9%
Simplified82.3%
Taylor expanded in D around 0 68.0%
Final simplification68.0%
herbie shell --seed 2023287
(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))))))