| Alternative 1 | |
|---|---|
| Error | 16.7 |
| Cost | 33796 |
(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
(+ 1.0 (* (pow (* (* M (* 0.5 (/ D d))) (sqrt (/ h l))) 2.0) -0.5)))
(t_1 (sqrt (- d))))
(if (<= h -4.7e-14)
(* (* (sqrt (/ d h)) (/ t_1 (sqrt (- l)))) t_0)
(if (<= h -5e-310)
(* t_0 (* (/ t_1 (sqrt (- h))) (sqrt (/ d l))))
(*
(/ d (* (sqrt h) (sqrt l)))
(+ 1.0 (* -0.5 (* h (* (/ (pow (/ M (/ d D)) 2.0) l) 0.25)))))))))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 = 1.0 + (pow(((M * (0.5 * (D / d))) * sqrt((h / l))), 2.0) * -0.5);
double t_1 = sqrt(-d);
double tmp;
if (h <= -4.7e-14) {
tmp = (sqrt((d / h)) * (t_1 / sqrt(-l))) * t_0;
} else if (h <= -5e-310) {
tmp = t_0 * ((t_1 / sqrt(-h)) * sqrt((d / l)));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 + (-0.5 * (h * ((pow((M / (d / D)), 2.0) / l) * 0.25))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + ((((m * (0.5d0 * (d_1 / d))) * sqrt((h / l))) ** 2.0d0) * (-0.5d0))
t_1 = sqrt(-d)
if (h <= (-4.7d-14)) then
tmp = (sqrt((d / h)) * (t_1 / sqrt(-l))) * t_0
else if (h <= (-5d-310)) then
tmp = t_0 * ((t_1 / sqrt(-h)) * sqrt((d / l)))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 + ((-0.5d0) * (h * ((((m / (d / d_1)) ** 2.0d0) / l) * 0.25d0))))
end if
code = tmp
end function
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 = 1.0 + (Math.pow(((M * (0.5 * (D / d))) * Math.sqrt((h / l))), 2.0) * -0.5);
double t_1 = Math.sqrt(-d);
double tmp;
if (h <= -4.7e-14) {
tmp = (Math.sqrt((d / h)) * (t_1 / Math.sqrt(-l))) * t_0;
} else if (h <= -5e-310) {
tmp = t_0 * ((t_1 / Math.sqrt(-h)) * Math.sqrt((d / l)));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 + (-0.5 * (h * ((Math.pow((M / (d / D)), 2.0) / l) * 0.25))));
}
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 = 1.0 + (math.pow(((M * (0.5 * (D / d))) * math.sqrt((h / l))), 2.0) * -0.5) t_1 = math.sqrt(-d) tmp = 0 if h <= -4.7e-14: tmp = (math.sqrt((d / h)) * (t_1 / math.sqrt(-l))) * t_0 elif h <= -5e-310: tmp = t_0 * ((t_1 / math.sqrt(-h)) * math.sqrt((d / l))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 + (-0.5 * (h * ((math.pow((M / (d / D)), 2.0) / l) * 0.25)))) 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(1.0 + Float64((Float64(Float64(M * Float64(0.5 * Float64(D / d))) * sqrt(Float64(h / l))) ^ 2.0) * -0.5)) t_1 = sqrt(Float64(-d)) tmp = 0.0 if (h <= -4.7e-14) tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(t_1 / sqrt(Float64(-l)))) * t_0); elseif (h <= -5e-310) tmp = Float64(t_0 * Float64(Float64(t_1 / sqrt(Float64(-h))) * sqrt(Float64(d / l)))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 + Float64(-0.5 * Float64(h * Float64(Float64((Float64(M / Float64(d / D)) ^ 2.0) / l) * 0.25))))); 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_2 = code(d, h, l, M, D) t_0 = 1.0 + ((((M * (0.5 * (D / d))) * sqrt((h / l))) ^ 2.0) * -0.5); t_1 = sqrt(-d); tmp = 0.0; if (h <= -4.7e-14) tmp = (sqrt((d / h)) * (t_1 / sqrt(-l))) * t_0; elseif (h <= -5e-310) tmp = t_0 * ((t_1 / sqrt(-h)) * sqrt((d / l))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 + (-0.5 * (h * ((((M / (d / D)) ^ 2.0) / l) * 0.25)))); end tmp_2 = 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[(1.0 + N[(N[Power[N[(N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-d)], $MachinePrecision]}, If[LessEqual[h, -4.7e-14], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[h, -5e-310], N[(t$95$0 * N[(N[(t$95$1 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.5 * N[(h * N[(N[(N[Power[N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 1 + {\left(\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2} \cdot -0.5\\
t_1 := \sqrt{-d}\\
\mathbf{if}\;h \leq -4.7 \cdot 10^{-14}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{t_1}{\sqrt{-\ell}}\right) \cdot t_0\\
\mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_0 \cdot \left(\frac{t_1}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + -0.5 \cdot \left(h \cdot \left(\frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\ell} \cdot 0.25\right)\right)\right)\\
\end{array}
Results
if h < -4.7000000000000002e-14Initial program 24.8
Simplified24.7
[Start]24.8 | \[ \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)
\] |
|---|---|
metadata-eval [=>]24.8 | \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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)
\] |
unpow1/2 [=>]24.8 | \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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)
\] |
metadata-eval [=>]24.8 | \[ \left(\sqrt{\frac{d}{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\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)
\] |
unpow1/2 [=>]24.8 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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)
\] |
associate-*l* [=>]24.8 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
metadata-eval [=>]24.8 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.5} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
times-frac [=>]24.7 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
Applied egg-rr24.1
Applied egg-rr20.5
if -4.7000000000000002e-14 < h < -4.999999999999985e-310Initial program 27.6
Simplified28.5
[Start]27.6 | \[ \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)
\] |
|---|---|
metadata-eval [=>]27.6 | \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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)
\] |
unpow1/2 [=>]27.6 | \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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)
\] |
metadata-eval [=>]27.6 | \[ \left(\sqrt{\frac{d}{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\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)
\] |
unpow1/2 [=>]27.6 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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)
\] |
associate-*l* [=>]27.7 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
metadata-eval [=>]27.7 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.5} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
times-frac [=>]28.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
Applied egg-rr25.9
Applied egg-rr14.0
if -4.999999999999985e-310 < h Initial program 26.3
Simplified26.7
[Start]26.3 | \[ \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)
\] |
|---|---|
metadata-eval [=>]26.3 | \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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)
\] |
unpow1/2 [=>]26.3 | \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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)
\] |
metadata-eval [=>]26.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\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)
\] |
unpow1/2 [=>]26.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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)
\] |
associate-*l* [=>]26.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
metadata-eval [=>]26.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.5} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
times-frac [=>]26.7 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
Applied egg-rr27.2
Simplified25.9
[Start]27.2 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(e^{\mathsf{log1p}\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)} - 1\right)\right)
\] |
|---|---|
expm1-def [=>]27.2 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}\right)
\] |
expm1-log1p [=>]26.7 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
associate-*r/ [=>]26.2 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot h}{\ell}}\right)
\] |
associate-*l/ [<=]25.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\ell} \cdot h\right)}\right)
\] |
*-commutative [=>]25.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left(h \cdot \frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)}\right)
\] |
*-commutative [=>]25.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(M \cdot \color{blue}{\left(\frac{D}{d} \cdot 0.5\right)}\right)}^{2}}{\ell}\right)\right)
\] |
associate-*r* [=>]25.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\color{blue}{\left(\left(M \cdot \frac{D}{d}\right) \cdot 0.5\right)}}^{2}}{\ell}\right)\right)
\] |
Applied egg-rr13.4
Simplified13.5
[Start]13.4 | \[ \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} + \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(\left(-0.5 \cdot h\right) \cdot \frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\frac{\ell}{0.25}}\right)
\] |
|---|---|
*-rgt-identity [<=]13.4 | \[ \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot 1} + \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(\left(-0.5 \cdot h\right) \cdot \frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\frac{\ell}{0.25}}\right)
\] |
distribute-lft-in [<=]13.4 | \[ \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + \left(-0.5 \cdot h\right) \cdot \frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\frac{\ell}{0.25}}\right)}
\] |
associate-*l* [=>]13.5 | \[ \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + \color{blue}{-0.5 \cdot \left(h \cdot \frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\frac{\ell}{0.25}}\right)}\right)
\] |
associate-/r/ [=>]13.5 | \[ \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + -0.5 \cdot \left(h \cdot \color{blue}{\left(\frac{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}}{\ell} \cdot 0.25\right)}\right)\right)
\] |
Final simplification15.4
| Alternative 1 | |
|---|---|
| Error | 16.7 |
| Cost | 33796 |
| Alternative 2 | |
|---|---|
| Error | 17.1 |
| Cost | 33796 |
| Alternative 3 | |
|---|---|
| Error | 17.0 |
| Cost | 27724 |
| Alternative 4 | |
|---|---|
| Error | 18.1 |
| Cost | 27664 |
| Alternative 5 | |
|---|---|
| Error | 17.0 |
| Cost | 27660 |
| Alternative 6 | |
|---|---|
| Error | 17.0 |
| Cost | 27660 |
| Alternative 7 | |
|---|---|
| Error | 19.4 |
| Cost | 21844 |
| Alternative 8 | |
|---|---|
| Error | 19.2 |
| Cost | 21844 |
| Alternative 9 | |
|---|---|
| Error | 18.2 |
| Cost | 21844 |
| Alternative 10 | |
|---|---|
| Error | 18.4 |
| Cost | 21448 |
| Alternative 11 | |
|---|---|
| Error | 19.1 |
| Cost | 21264 |
| Alternative 12 | |
|---|---|
| Error | 19.1 |
| Cost | 21136 |
| Alternative 13 | |
|---|---|
| Error | 18.9 |
| Cost | 21004 |
| Alternative 14 | |
|---|---|
| Error | 17.5 |
| Cost | 20872 |
| Alternative 15 | |
|---|---|
| Error | 22.0 |
| Cost | 14920 |
| Alternative 16 | |
|---|---|
| Error | 22.0 |
| Cost | 14920 |
| Alternative 17 | |
|---|---|
| Error | 23.2 |
| Cost | 13384 |
| Alternative 18 | |
|---|---|
| Error | 22.7 |
| Cost | 13384 |
| Alternative 19 | |
|---|---|
| Error | 27.5 |
| Cost | 7176 |
| Alternative 20 | |
|---|---|
| Error | 27.4 |
| Cost | 7176 |
| Alternative 21 | |
|---|---|
| Error | 33.1 |
| Cost | 6980 |
| Alternative 22 | |
|---|---|
| Error | 33.1 |
| Cost | 6980 |
| Alternative 23 | |
|---|---|
| Error | 44.1 |
| Cost | 6720 |
herbie shell --seed 2022354
(FPCore (d h l M D)
:name "Henrywood and Agarwal, Equation (12)"
: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)))))