| Alternative 1 | |
|---|---|
| Error | 18.4 |
| Cost | 138776 |
(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 (sqrt (/ d h)))
(t_1 (sqrt (- d)))
(t_2 (* (/ D d) M))
(t_3 (* 0.5 t_2))
(t_4 (+ 1.0 (* 0.5 (* (/ t_3 l) (/ (* t_2 -0.5) (/ 1.0 h))))))
(t_5 (* 0.5 (* h (/ (pow t_3 2.0) l)))))
(if (<= d -5.8e+61)
(* (* (/ t_1 (sqrt (- h))) (sqrt (/ d l))) t_4)
(if (<= d -5e-311)
(* t_4 (* t_0 (/ t_1 (sqrt (- l)))))
(if (<= d 4.2e+50)
(* t_4 (* t_0 (/ (sqrt d) (sqrt l))))
(/
(/ d (* (sqrt l) (sqrt h)))
(/ (+ 1.0 t_5) (- 1.0 (pow t_5 2.0)))))))))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 = sqrt((d / h));
double t_1 = sqrt(-d);
double t_2 = (D / d) * M;
double t_3 = 0.5 * t_2;
double t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))));
double t_5 = 0.5 * (h * (pow(t_3, 2.0) / l));
double tmp;
if (d <= -5.8e+61) {
tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4;
} else if (d <= -5e-311) {
tmp = t_4 * (t_0 * (t_1 / sqrt(-l)));
} else if (d <= 4.2e+50) {
tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l)));
} else {
tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0 + t_5) / (1.0 - pow(t_5, 2.0)));
}
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) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = sqrt((d / h))
t_1 = sqrt(-d)
t_2 = (d_1 / d) * m
t_3 = 0.5d0 * t_2
t_4 = 1.0d0 + (0.5d0 * ((t_3 / l) * ((t_2 * (-0.5d0)) / (1.0d0 / h))))
t_5 = 0.5d0 * (h * ((t_3 ** 2.0d0) / l))
if (d <= (-5.8d+61)) then
tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4
else if (d <= (-5d-311)) then
tmp = t_4 * (t_0 * (t_1 / sqrt(-l)))
else if (d <= 4.2d+50) then
tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l)))
else
tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0d0 + t_5) / (1.0d0 - (t_5 ** 2.0d0)))
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 = Math.sqrt((d / h));
double t_1 = Math.sqrt(-d);
double t_2 = (D / d) * M;
double t_3 = 0.5 * t_2;
double t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))));
double t_5 = 0.5 * (h * (Math.pow(t_3, 2.0) / l));
double tmp;
if (d <= -5.8e+61) {
tmp = ((t_1 / Math.sqrt(-h)) * Math.sqrt((d / l))) * t_4;
} else if (d <= -5e-311) {
tmp = t_4 * (t_0 * (t_1 / Math.sqrt(-l)));
} else if (d <= 4.2e+50) {
tmp = t_4 * (t_0 * (Math.sqrt(d) / Math.sqrt(l)));
} else {
tmp = (d / (Math.sqrt(l) * Math.sqrt(h))) / ((1.0 + t_5) / (1.0 - Math.pow(t_5, 2.0)));
}
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 = math.sqrt((d / h)) t_1 = math.sqrt(-d) t_2 = (D / d) * M t_3 = 0.5 * t_2 t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h)))) t_5 = 0.5 * (h * (math.pow(t_3, 2.0) / l)) tmp = 0 if d <= -5.8e+61: tmp = ((t_1 / math.sqrt(-h)) * math.sqrt((d / l))) * t_4 elif d <= -5e-311: tmp = t_4 * (t_0 * (t_1 / math.sqrt(-l))) elif d <= 4.2e+50: tmp = t_4 * (t_0 * (math.sqrt(d) / math.sqrt(l))) else: tmp = (d / (math.sqrt(l) * math.sqrt(h))) / ((1.0 + t_5) / (1.0 - math.pow(t_5, 2.0))) 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 = sqrt(Float64(d / h)) t_1 = sqrt(Float64(-d)) t_2 = Float64(Float64(D / d) * M) t_3 = Float64(0.5 * t_2) t_4 = Float64(1.0 + Float64(0.5 * Float64(Float64(t_3 / l) * Float64(Float64(t_2 * -0.5) / Float64(1.0 / h))))) t_5 = Float64(0.5 * Float64(h * Float64((t_3 ^ 2.0) / l))) tmp = 0.0 if (d <= -5.8e+61) tmp = Float64(Float64(Float64(t_1 / sqrt(Float64(-h))) * sqrt(Float64(d / l))) * t_4); elseif (d <= -5e-311) tmp = Float64(t_4 * Float64(t_0 * Float64(t_1 / sqrt(Float64(-l))))); elseif (d <= 4.2e+50) tmp = Float64(t_4 * Float64(t_0 * Float64(sqrt(d) / sqrt(l)))); else tmp = Float64(Float64(d / Float64(sqrt(l) * sqrt(h))) / Float64(Float64(1.0 + t_5) / Float64(1.0 - (t_5 ^ 2.0)))); 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 = sqrt((d / h)); t_1 = sqrt(-d); t_2 = (D / d) * M; t_3 = 0.5 * t_2; t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h)))); t_5 = 0.5 * (h * ((t_3 ^ 2.0) / l)); tmp = 0.0; if (d <= -5.8e+61) tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4; elseif (d <= -5e-311) tmp = t_4 * (t_0 * (t_1 / sqrt(-l))); elseif (d <= 4.2e+50) tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l))); else tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0 + t_5) / (1.0 - (t_5 ^ 2.0))); 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[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-d)], $MachinePrecision]}, Block[{t$95$2 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(0.5 * N[(N[(t$95$3 / l), $MachinePrecision] * N[(N[(t$95$2 * -0.5), $MachinePrecision] / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(0.5 * N[(h * N[(N[Power[t$95$3, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5.8e+61], N[(N[(N[(t$95$1 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[d, -5e-311], N[(t$95$4 * N[(t$95$0 * N[(t$95$1 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e+50], N[(t$95$4 * N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + t$95$5), $MachinePrecision] / N[(1.0 - N[Power[t$95$5, 2.0], $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 := \sqrt{\frac{d}{h}}\\
t_1 := \sqrt{-d}\\
t_2 := \frac{D}{d} \cdot M\\
t_3 := 0.5 \cdot t_2\\
t_4 := 1 + 0.5 \cdot \left(\frac{t_3}{\ell} \cdot \frac{t_2 \cdot -0.5}{\frac{1}{h}}\right)\\
t_5 := 0.5 \cdot \left(h \cdot \frac{{t_3}^{2}}{\ell}\right)\\
\mathbf{if}\;d \leq -5.8 \cdot 10^{+61}:\\
\;\;\;\;\left(\frac{t_1}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_4\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\
\;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{t_1}{\sqrt{-\ell}}\right)\\
\mathbf{elif}\;d \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}}{\frac{1 + t_5}{1 - {t_5}^{2}}}\\
\end{array}
Results
if d < -5.8000000000000001e61Initial program 26.1
Simplified25.6
[Start]26.1 | \[ \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.1 | \[ \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.1 | \[ \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.1 | \[ \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.1 | \[ \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.1 | \[ \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.1 | \[ \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 [=>]25.6 | \[ \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.4
Applied egg-rr23.9
Applied egg-rr10.4
if -5.8000000000000001e61 < d < -5.00000000000023e-311Initial program 27.3
Simplified28.1
[Start]27.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 [=>]27.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 [=>]27.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 [=>]27.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 [=>]27.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* [=>]27.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 [=>]27.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 [=>]28.1 | \[ \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.9
Applied egg-rr24.1
Applied egg-rr18.6
if -5.00000000000023e-311 < d < 4.1999999999999999e50Initial program 27.2
Simplified28.0
[Start]27.2 | \[ \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.2 | \[ \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.2 | \[ \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.2 | \[ \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.2 | \[ \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.2 | \[ \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.2 | \[ \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.0 | \[ \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.7
Applied egg-rr23.6
Applied egg-rr17.9
Simplified17.9
[Start]17.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{d} \cdot \frac{1}{\sqrt{\ell}}\right)\right) \cdot \left(1 - 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\frac{1}{h}}\right)\right)
\] |
|---|---|
associate-*r/ [=>]17.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot 1}{\sqrt{\ell}}}\right) \cdot \left(1 - 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\frac{1}{h}}\right)\right)
\] |
*-rgt-identity [=>]17.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\frac{1}{h}}\right)\right)
\] |
if 4.1999999999999999e50 < d Initial program 24.7
Simplified24.6
[Start]24.7 | \[ \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.7 | \[ \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.7 | \[ \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.7 | \[ \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.7 | \[ \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.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 [=>]24.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 [=>]24.6 | \[ \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.3
Applied egg-rr10.9
Simplified4.7
[Start]10.9 | \[ \frac{\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 - {\left(0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}^{2}\right)}{1 + 0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)}
\] |
|---|---|
associate-/l* [=>]9.9 | \[ \color{blue}{\frac{\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}}{\frac{1 + 0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)}{1 - {\left(0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}^{2}}}}
\] |
*-commutative [=>]9.9 | \[ \frac{\frac{d}{\color{blue}{\sqrt{h} \cdot \sqrt{\ell}}}}{\frac{1 + 0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)}{1 - {\left(0.5 \cdot \left({\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}^{2}}}
\] |
Final simplification13.8
| Alternative 1 | |
|---|---|
| Error | 18.4 |
| Cost | 138776 |
| Alternative 2 | |
|---|---|
| Error | 14.9 |
| Cost | 22100 |
| Alternative 3 | |
|---|---|
| Error | 13.5 |
| Cost | 21708 |
| Alternative 4 | |
|---|---|
| Error | 16.6 |
| Cost | 21008 |
| Alternative 5 | |
|---|---|
| Error | 17.4 |
| Cost | 20744 |
| Alternative 6 | |
|---|---|
| Error | 21.9 |
| Cost | 15312 |
| Alternative 7 | |
|---|---|
| Error | 20.3 |
| Cost | 15308 |
| Alternative 8 | |
|---|---|
| Error | 20.3 |
| Cost | 15308 |
| Alternative 9 | |
|---|---|
| Error | 20.3 |
| Cost | 15308 |
| Alternative 10 | |
|---|---|
| Error | 21.5 |
| Cost | 15180 |
| Alternative 11 | |
|---|---|
| Error | 23.3 |
| Cost | 14600 |
| Alternative 12 | |
|---|---|
| Error | 22.5 |
| Cost | 14340 |
| Alternative 13 | |
|---|---|
| Error | 23.5 |
| Cost | 13252 |
| Alternative 14 | |
|---|---|
| Error | 27.2 |
| Cost | 7044 |
| Alternative 15 | |
|---|---|
| Error | 34.4 |
| Cost | 6980 |
| Alternative 16 | |
|---|---|
| Error | 33.9 |
| Cost | 6980 |
| Alternative 17 | |
|---|---|
| Error | 33.0 |
| Cost | 6980 |
| Alternative 18 | |
|---|---|
| Error | 32.9 |
| Cost | 6980 |
| Alternative 19 | |
|---|---|
| Error | 43.8 |
| Cost | 6720 |
herbie shell --seed 2023037
(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)))))