| Alternative 1 | |
|---|---|
| Accuracy | 68.4% |
| Cost | 1608 |
(FPCore (c0 w h D d M)
:precision binary64
(*
(/ c0 (* 2.0 w))
(+
(/ (* c0 (* d d)) (* (* w h) (* D D)))
(sqrt
(-
(*
(/ (* c0 (* d d)) (* (* w h) (* D D)))
(/ (* c0 (* d d)) (* (* w h) (* D D))))
(* M M))))))(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (* c0 (* d d)))
(t_1 (/ c0 (* 2.0 w)))
(t_2 (/ t_0 (* (* w h) (* D D))))
(t_3 (* t_1 (+ t_2 (sqrt (- (* t_2 t_2) (* M M)))))))
(if (<= t_3 -2e-251)
(/ (/ (* 2.0 d) (* h (/ w c0))) (* (* 2.0 (/ w c0)) (* D (/ D d))))
(if (<= t_3 1e-290)
(* 0.25 (* D (/ (* D (* h (/ M d))) (/ d M))))
(if (<= t_3 4e+272)
(* t_1 (* 2.0 (/ (/ (/ t_0 (* w h)) D) D)))
(* 0.25 (* (/ D d) (* M (* (/ D d) (* h M))))))))))double code(double c0, double w, double h, double D, double d, double M) {
return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 * (d * d);
double t_1 = c0 / (2.0 * w);
double t_2 = t_0 / ((w * h) * (D * D));
double t_3 = t_1 * (t_2 + sqrt(((t_2 * t_2) - (M * M))));
double tmp;
if (t_3 <= -2e-251) {
tmp = ((2.0 * d) / (h * (w / c0))) / ((2.0 * (w / c0)) * (D * (D / d)));
} else if (t_3 <= 1e-290) {
tmp = 0.25 * (D * ((D * (h * (M / d))) / (d / M)));
} else if (t_3 <= 4e+272) {
tmp = t_1 * (2.0 * (((t_0 / (w * h)) / D) / D));
} else {
tmp = 0.25 * ((D / d) * (M * ((D / d) * (h * M))));
}
return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m
code = (c0 / (2.0d0 * w)) * (((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) + sqrt(((((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) * ((c0 * (d_1 * d_1)) / ((w * h) * (d * d)))) - (m * m))))
end function
real(8) function code(c0, w, h, d, d_1, m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = c0 * (d_1 * d_1)
t_1 = c0 / (2.0d0 * w)
t_2 = t_0 / ((w * h) * (d * d))
t_3 = t_1 * (t_2 + sqrt(((t_2 * t_2) - (m * m))))
if (t_3 <= (-2d-251)) then
tmp = ((2.0d0 * d_1) / (h * (w / c0))) / ((2.0d0 * (w / c0)) * (d * (d / d_1)))
else if (t_3 <= 1d-290) then
tmp = 0.25d0 * (d * ((d * (h * (m / d_1))) / (d_1 / m)))
else if (t_3 <= 4d+272) then
tmp = t_1 * (2.0d0 * (((t_0 / (w * h)) / d) / d))
else
tmp = 0.25d0 * ((d / d_1) * (m * ((d / d_1) * (h * m))))
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + Math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 * (d * d);
double t_1 = c0 / (2.0 * w);
double t_2 = t_0 / ((w * h) * (D * D));
double t_3 = t_1 * (t_2 + Math.sqrt(((t_2 * t_2) - (M * M))));
double tmp;
if (t_3 <= -2e-251) {
tmp = ((2.0 * d) / (h * (w / c0))) / ((2.0 * (w / c0)) * (D * (D / d)));
} else if (t_3 <= 1e-290) {
tmp = 0.25 * (D * ((D * (h * (M / d))) / (d / M)));
} else if (t_3 <= 4e+272) {
tmp = t_1 * (2.0 * (((t_0 / (w * h)) / D) / D));
} else {
tmp = 0.25 * ((D / d) * (M * ((D / d) * (h * M))));
}
return tmp;
}
def code(c0, w, h, D, d, M): return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))))
def code(c0, w, h, D, d, M): t_0 = c0 * (d * d) t_1 = c0 / (2.0 * w) t_2 = t_0 / ((w * h) * (D * D)) t_3 = t_1 * (t_2 + math.sqrt(((t_2 * t_2) - (M * M)))) tmp = 0 if t_3 <= -2e-251: tmp = ((2.0 * d) / (h * (w / c0))) / ((2.0 * (w / c0)) * (D * (D / d))) elif t_3 <= 1e-290: tmp = 0.25 * (D * ((D * (h * (M / d))) / (d / M))) elif t_3 <= 4e+272: tmp = t_1 * (2.0 * (((t_0 / (w * h)) / D) / D)) else: tmp = 0.25 * ((D / d) * (M * ((D / d) * (h * M)))) return tmp
function code(c0, w, h, D, d, M) return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M))))) end
function code(c0, w, h, D, d, M) t_0 = Float64(c0 * Float64(d * d)) t_1 = Float64(c0 / Float64(2.0 * w)) t_2 = Float64(t_0 / Float64(Float64(w * h) * Float64(D * D))) t_3 = Float64(t_1 * Float64(t_2 + sqrt(Float64(Float64(t_2 * t_2) - Float64(M * M))))) tmp = 0.0 if (t_3 <= -2e-251) tmp = Float64(Float64(Float64(2.0 * d) / Float64(h * Float64(w / c0))) / Float64(Float64(2.0 * Float64(w / c0)) * Float64(D * Float64(D / d)))); elseif (t_3 <= 1e-290) tmp = Float64(0.25 * Float64(D * Float64(Float64(D * Float64(h * Float64(M / d))) / Float64(d / M)))); elseif (t_3 <= 4e+272) tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(Float64(t_0 / Float64(w * h)) / D) / D))); else tmp = Float64(0.25 * Float64(Float64(D / d) * Float64(M * Float64(Float64(D / d) * Float64(h * M))))); end return tmp end
function tmp = code(c0, w, h, D, d, M) tmp = (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M)))); end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = c0 * (d * d); t_1 = c0 / (2.0 * w); t_2 = t_0 / ((w * h) * (D * D)); t_3 = t_1 * (t_2 + sqrt(((t_2 * t_2) - (M * M)))); tmp = 0.0; if (t_3 <= -2e-251) tmp = ((2.0 * d) / (h * (w / c0))) / ((2.0 * (w / c0)) * (D * (D / d))); elseif (t_3 <= 1e-290) tmp = 0.25 * (D * ((D * (h * (M / d))) / (d / M))); elseif (t_3 <= 4e+272) tmp = t_1 * (2.0 * (((t_0 / (w * h)) / D) / D)); else tmp = 0.25 * ((D / d) * (M * ((D / d) * (h * M)))); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + N[Sqrt[N[(N[(t$95$2 * t$95$2), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-251], N[(N[(N[(2.0 * d), $MachinePrecision] / N[(h * N[(w / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 * N[(w / c0), $MachinePrecision]), $MachinePrecision] * N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e-290], N[(0.25 * N[(D * N[(N[(D * N[(h * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+272], N[(t$95$1 * N[(2.0 * N[(N[(N[(t$95$0 / N[(w * h), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(D / d), $MachinePrecision] * N[(M * N[(N[(D / d), $MachinePrecision] * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\begin{array}{l}
t_0 := c0 \cdot \left(d \cdot d\right)\\
t_1 := \frac{c0}{2 \cdot w}\\
t_2 := \frac{t_0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_3 := t_1 \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\
\mathbf{if}\;t_3 \leq -2 \cdot 10^{-251}:\\
\;\;\;\;\frac{\frac{2 \cdot d}{h \cdot \frac{w}{c0}}}{\left(2 \cdot \frac{w}{c0}\right) \cdot \left(D \cdot \frac{D}{d}\right)}\\
\mathbf{elif}\;t_3 \leq 10^{-290}:\\
\;\;\;\;0.25 \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \frac{M}{d}\right)}{\frac{d}{M}}\right)\\
\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+272}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \frac{\frac{\frac{t_0}{w \cdot h}}{D}}{D}\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot M\right)\right)\right)\right)\\
\end{array}
Results
if (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < -2.00000000000000003e-251Initial program 24.3%
Simplified29.2%
[Start]24.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
|---|---|
times-frac [=>]21.5 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
fma-def [=>]21.5 | \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d \cdot d}{D \cdot D}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}
\] |
associate-/r* [=>]21.5 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\color{blue}{\frac{\frac{c0}{w}}{h}}, \frac{d \cdot d}{D \cdot D}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
times-frac [=>]21.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{\frac{c0}{w}}{h}, \color{blue}{\frac{d}{D} \cdot \frac{d}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
difference-of-squares [=>]21.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{\frac{c0}{w}}{h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}}\right)
\] |
sub-neg [=>]21.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{\frac{c0}{w}}{h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-M\right)\right)}}\right)
\] |
Taylor expanded in c0 around inf 32.6%
Simplified35.1%
[Start]32.6 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)
\] |
|---|---|
times-frac [=>]31.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)}\right)
\] |
associate-*l/ [=>]34.6 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{{d}^{2} \cdot \frac{c0}{w \cdot h}}{{D}^{2}}}\right)
\] |
unpow2 [=>]34.6 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\left(d \cdot d\right)} \cdot \frac{c0}{w \cdot h}}{{D}^{2}}\right)
\] |
unpow2 [=>]34.6 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(d \cdot d\right) \cdot \frac{c0}{w \cdot h}}{\color{blue}{D \cdot D}}\right)
\] |
times-frac [=>]41.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{d \cdot d}{D} \cdot \frac{\frac{c0}{w \cdot h}}{D}\right)}\right)
\] |
associate-*r/ [=>]41.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{d \cdot d}{D} \cdot \frac{c0}{w \cdot h}}{D}}\right)
\] |
associate-*l/ [<=]34.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{\frac{d \cdot d}{D}}{D} \cdot \frac{c0}{w \cdot h}\right)}\right)
\] |
associate-*l/ [<=]39.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{\color{blue}{\frac{d}{D} \cdot d}}{D} \cdot \frac{c0}{w \cdot h}\right)\right)
\] |
associate-*r/ [<=]41.5 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)\right)
\] |
unpow2 [<=]41.5 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)\right)
\] |
associate-*r/ [=>]39.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{{\left(\frac{d}{D}\right)}^{2} \cdot c0}{w \cdot h}}\right)
\] |
associate-/l* [=>]41.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{{\left(\frac{d}{D}\right)}^{2}}{\frac{w \cdot h}{c0}}}\right)
\] |
associate-/r/ [=>]35.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{{\left(\frac{d}{D}\right)}^{2}}{w \cdot h} \cdot c0\right)}\right)
\] |
Applied egg-rr47.9%
[Start]35.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{{\left(\frac{d}{D}\right)}^{2}}{w \cdot h} \cdot c0\right)\right)
\] |
|---|---|
associate-/r/ [<=]41.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{{\left(\frac{d}{D}\right)}^{2}}{\frac{w \cdot h}{c0}}}\right)
\] |
unpow2 [=>]41.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}{\frac{w \cdot h}{c0}}\right)
\] |
clear-num [=>]41.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{D} \cdot \color{blue}{\frac{1}{\frac{D}{d}}}}{\frac{w \cdot h}{c0}}\right)
\] |
un-div-inv [=>]41.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\frac{\frac{d}{D}}{\frac{D}{d}}}}{\frac{w \cdot h}{c0}}\right)
\] |
associate-/l/ [=>]41.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\frac{d}{\frac{D}{d} \cdot D}}}{\frac{w \cdot h}{c0}}\right)
\] |
associate-/l/ [=>]47.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}}\right)
\] |
Applied egg-rr54.0%
[Start]47.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}\right)
\] |
|---|---|
*-commutative [=>]47.9 | \[ \color{blue}{\left(2 \cdot \frac{d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}\right) \cdot \frac{c0}{2 \cdot w}}
\] |
clear-num [=>]47.7 | \[ \left(2 \cdot \frac{d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}\right) \cdot \color{blue}{\frac{1}{\frac{2 \cdot w}{c0}}}
\] |
un-div-inv [=>]47.7 | \[ \color{blue}{\frac{2 \cdot \frac{d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}}{\frac{2 \cdot w}{c0}}}
\] |
associate-*r/ [=>]47.7 | \[ \frac{\color{blue}{\frac{2 \cdot d}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}}}{\frac{2 \cdot w}{c0}}
\] |
associate-/r* [=>]47.1 | \[ \frac{\color{blue}{\frac{\frac{2 \cdot d}{\frac{w \cdot h}{c0}}}{\frac{D}{d} \cdot D}}}{\frac{2 \cdot w}{c0}}
\] |
associate-/l/ [=>]52.5 | \[ \color{blue}{\frac{\frac{2 \cdot d}{\frac{w \cdot h}{c0}}}{\frac{2 \cdot w}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}}
\] |
*-commutative [=>]52.5 | \[ \frac{\frac{\color{blue}{d \cdot 2}}{\frac{w \cdot h}{c0}}}{\frac{2 \cdot w}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
associate-/l* [=>]45.6 | \[ \frac{\frac{d \cdot 2}{\color{blue}{\frac{w}{\frac{c0}{h}}}}}{\frac{2 \cdot w}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
associate-/r/ [=>]54.0 | \[ \frac{\frac{d \cdot 2}{\color{blue}{\frac{w}{c0} \cdot h}}}{\frac{2 \cdot w}{c0} \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
*-un-lft-identity [=>]54.0 | \[ \frac{\frac{d \cdot 2}{\frac{w}{c0} \cdot h}}{\frac{2 \cdot w}{\color{blue}{1 \cdot c0}} \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
times-frac [=>]54.0 | \[ \frac{\frac{d \cdot 2}{\frac{w}{c0} \cdot h}}{\color{blue}{\left(\frac{2}{1} \cdot \frac{w}{c0}\right)} \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
metadata-eval [=>]54.0 | \[ \frac{\frac{d \cdot 2}{\frac{w}{c0} \cdot h}}{\left(\color{blue}{2} \cdot \frac{w}{c0}\right) \cdot \left(\frac{D}{d} \cdot D\right)}
\] |
*-commutative [=>]54.0 | \[ \frac{\frac{d \cdot 2}{\frac{w}{c0} \cdot h}}{\left(2 \cdot \frac{w}{c0}\right) \cdot \color{blue}{\left(D \cdot \frac{D}{d}\right)}}
\] |
if -2.00000000000000003e-251 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < 1.0000000000000001e-290Initial program 55.7%
Simplified15.1%
[Start]55.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
|---|---|
associate-*l/ [<=]46.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \left(d \cdot d\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
*-commutative [=>]46.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(d \cdot d\right) \cdot \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
fma-def [=>]32.5 | \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}
\] |
associate-*l* [=>]28.6 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
associate-/r* [=>]27.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \color{blue}{\frac{\frac{c0}{w}}{h \cdot \left(D \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
associate-*r* [=>]26.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{\left(h \cdot D\right) \cdot D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
*-commutative [=>]26.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{D \cdot \left(h \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
Taylor expanded in c0 around -inf 54.9%
Simplified63.6%
[Start]54.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)
\] |
|---|---|
fma-def [=>]54.9 | \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)}
\] |
Taylor expanded in c0 around 0 60.9%
Simplified64.6%
[Start]60.9 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}
\] |
|---|---|
unpow2 [=>]60.9 | \[ 0.25 \cdot \frac{\color{blue}{\left(D \cdot D\right)} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}
\] |
unpow2 [=>]60.9 | \[ 0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(\color{blue}{\left(M \cdot M\right)} \cdot h\right)}{{d}^{2}}
\] |
associate-*r* [<=]64.6 | \[ 0.25 \cdot \frac{\left(D \cdot D\right) \cdot \color{blue}{\left(M \cdot \left(M \cdot h\right)\right)}}{{d}^{2}}
\] |
*-commutative [<=]64.6 | \[ 0.25 \cdot \frac{\color{blue}{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}}{{d}^{2}}
\] |
unpow2 [=>]64.6 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}{\color{blue}{d \cdot d}}
\] |
Applied egg-rr64.3%
[Start]64.6 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}{d \cdot d}
\] |
|---|---|
associate-/l* [=>]65.2 | \[ 0.25 \cdot \color{blue}{\frac{M \cdot \left(M \cdot h\right)}{\frac{d \cdot d}{D \cdot D}}}
\] |
frac-2neg [=>]65.2 | \[ 0.25 \cdot \frac{M \cdot \left(M \cdot h\right)}{\color{blue}{\frac{-d \cdot d}{-D \cdot D}}}
\] |
associate-/r/ [=>]64.3 | \[ 0.25 \cdot \color{blue}{\left(\frac{M \cdot \left(M \cdot h\right)}{-d \cdot d} \cdot \left(-D \cdot D\right)\right)}
\] |
distribute-rgt-neg-in [=>]64.3 | \[ 0.25 \cdot \left(\frac{M \cdot \left(M \cdot h\right)}{\color{blue}{d \cdot \left(-d\right)}} \cdot \left(-D \cdot D\right)\right)
\] |
Simplified76.0%
[Start]64.3 | \[ 0.25 \cdot \left(\frac{M \cdot \left(M \cdot h\right)}{d \cdot \left(-d\right)} \cdot \left(-D \cdot D\right)\right)
\] |
|---|---|
*-commutative [=>]64.3 | \[ 0.25 \cdot \color{blue}{\left(\left(-D \cdot D\right) \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \left(-d\right)}\right)}
\] |
distribute-rgt-neg-in [=>]64.3 | \[ 0.25 \cdot \left(\color{blue}{\left(D \cdot \left(-D\right)\right)} \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \left(-d\right)}\right)
\] |
associate-*l* [=>]67.9 | \[ 0.25 \cdot \color{blue}{\left(D \cdot \left(\left(-D\right) \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \left(-d\right)}\right)\right)}
\] |
times-frac [=>]74.1 | \[ 0.25 \cdot \left(D \cdot \left(\left(-D\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot \frac{M \cdot h}{-d}\right)}\right)\right)
\] |
*-commutative [=>]74.1 | \[ 0.25 \cdot \left(D \cdot \left(\left(-D\right) \cdot \left(\frac{M}{d} \cdot \frac{\color{blue}{h \cdot M}}{-d}\right)\right)\right)
\] |
associate-/l* [=>]76.0 | \[ 0.25 \cdot \left(D \cdot \left(\left(-D\right) \cdot \left(\frac{M}{d} \cdot \color{blue}{\frac{h}{\frac{-d}{M}}}\right)\right)\right)
\] |
Applied egg-rr78.6%
[Start]76.0 | \[ 0.25 \cdot \left(D \cdot \left(\left(-D\right) \cdot \left(\frac{M}{d} \cdot \frac{h}{\frac{-d}{M}}\right)\right)\right)
\] |
|---|---|
*-commutative [=>]76.0 | \[ 0.25 \cdot \left(D \cdot \color{blue}{\left(\left(\frac{M}{d} \cdot \frac{h}{\frac{-d}{M}}\right) \cdot \left(-D\right)\right)}\right)
\] |
associate-*r/ [=>]76.0 | \[ 0.25 \cdot \left(D \cdot \left(\color{blue}{\frac{\frac{M}{d} \cdot h}{\frac{-d}{M}}} \cdot \left(-D\right)\right)\right)
\] |
associate-*l/ [=>]78.6 | \[ 0.25 \cdot \left(D \cdot \color{blue}{\frac{\left(\frac{M}{d} \cdot h\right) \cdot \left(-D\right)}{\frac{-d}{M}}}\right)
\] |
*-commutative [=>]78.6 | \[ 0.25 \cdot \left(D \cdot \frac{\color{blue}{\left(h \cdot \frac{M}{d}\right)} \cdot \left(-D\right)}{\frac{-d}{M}}\right)
\] |
add-sqr-sqrt [=>]38.3 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot \color{blue}{\left(\sqrt{-D} \cdot \sqrt{-D}\right)}}{\frac{-d}{M}}\right)
\] |
sqrt-unprod [=>]61.9 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot \color{blue}{\sqrt{\left(-D\right) \cdot \left(-D\right)}}}{\frac{-d}{M}}\right)
\] |
sqr-neg [=>]61.9 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot \sqrt{\color{blue}{D \cdot D}}}{\frac{-d}{M}}\right)
\] |
sqrt-unprod [<=]27.2 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot \color{blue}{\left(\sqrt{D} \cdot \sqrt{D}\right)}}{\frac{-d}{M}}\right)
\] |
add-sqr-sqrt [<=]54.0 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot \color{blue}{D}}{\frac{-d}{M}}\right)
\] |
add-sqr-sqrt [=>]27.1 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot D}{\frac{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}}}{M}}\right)
\] |
sqrt-unprod [=>]64.2 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot D}{\frac{\color{blue}{\sqrt{\left(-d\right) \cdot \left(-d\right)}}}{M}}\right)
\] |
sqr-neg [=>]64.2 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot D}{\frac{\sqrt{\color{blue}{d \cdot d}}}{M}}\right)
\] |
sqrt-unprod [<=]40.6 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot D}{\frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{M}}\right)
\] |
add-sqr-sqrt [<=]78.6 | \[ 0.25 \cdot \left(D \cdot \frac{\left(h \cdot \frac{M}{d}\right) \cdot D}{\frac{\color{blue}{d}}{M}}\right)
\] |
if 1.0000000000000001e-290 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < 4.0000000000000003e272Initial program 88.9%
Simplified79.0%
[Start]88.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
|---|---|
times-frac [=>]79.2 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
fma-neg [=>]79.2 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D} + \sqrt{\color{blue}{\mathsf{fma}\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, -M \cdot M\right)}}\right)
\] |
times-frac [=>]79.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D} + \sqrt{\mathsf{fma}\left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}}, \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, -M \cdot M\right)}\right)
\] |
times-frac [=>]79.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}, \color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}}, -M \cdot M\right)}\right)
\] |
Taylor expanded in c0 around inf 88.8%
Simplified86.7%
[Start]88.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)
\] |
|---|---|
*-commutative [=>]88.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{\color{blue}{\left(w \cdot h\right) \cdot {D}^{2}}}\right)
\] |
unpow2 [=>]88.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)
\] |
*-commutative [=>]88.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{c0 \cdot {d}^{2}}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right)
\] |
unpow2 [=>]88.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \color{blue}{\left(d \cdot d\right)}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right)
\] |
associate-/r* [=>]86.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}}\right)
\] |
*-commutative [=>]86.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\color{blue}{\left(d \cdot d\right) \cdot c0}}{w \cdot h}}{D \cdot D}\right)
\] |
associate-/l* [=>]80.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\frac{d \cdot d}{\frac{w \cdot h}{c0}}}}{D \cdot D}\right)
\] |
*-commutative [=>]80.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d \cdot d}{\frac{\color{blue}{h \cdot w}}{c0}}}{D \cdot D}\right)
\] |
associate-*l/ [<=]66.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d \cdot d}{\color{blue}{\frac{h}{c0} \cdot w}}}{D \cdot D}\right)
\] |
associate-/r* [=>]66.8 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{\frac{d \cdot d}{\frac{h}{c0} \cdot w}}{D}}{D}}\right)
\] |
associate-*l/ [=>]80.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot w}{c0}}}}{D}}{D}\right)
\] |
*-commutative [<=]80.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{d \cdot d}{\frac{\color{blue}{w \cdot h}}{c0}}}{D}}{D}\right)
\] |
associate-/l* [<=]86.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\color{blue}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot h}}}{D}}{D}\right)
\] |
*-commutative [<=]86.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{\color{blue}{c0 \cdot \left(d \cdot d\right)}}{w \cdot h}}{D}}{D}\right)
\] |
if 4.0000000000000003e272 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) Initial program 0.0%
Simplified0.7%
[Start]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
|---|---|
associate-*l/ [<=]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \left(d \cdot d\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
*-commutative [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(d \cdot d\right) \cdot \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
fma-def [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}
\] |
associate-*l* [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
associate-/r* [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \color{blue}{\frac{\frac{c0}{w}}{h \cdot \left(D \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
associate-*r* [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{\left(h \cdot D\right) \cdot D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
*-commutative [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{D \cdot \left(h \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\] |
Taylor expanded in c0 around -inf 2.0%
Simplified47.8%
[Start]2.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)
\] |
|---|---|
fma-def [=>]2.0 | \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)}
\] |
Taylor expanded in c0 around 0 46.3%
Simplified61.5%
[Start]46.3 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}
\] |
|---|---|
*-commutative [<=]46.3 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}}{{d}^{2}}
\] |
associate-/l* [=>]46.2 | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}}
\] |
unpow2 [=>]46.2 | \[ 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}
\] |
unpow2 [=>]46.2 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}}
\] |
*-commutative [=>]46.2 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{{M}^{2} \cdot h}}}
\] |
unpow2 [=>]46.2 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}}
\] |
associate-*r* [<=]49.2 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{M \cdot \left(M \cdot h\right)}}}
\] |
associate-/r/ [=>]49.0 | \[ 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)}
\] |
associate-/r* [=>]53.8 | \[ 0.25 \cdot \left(\color{blue}{\frac{\frac{D \cdot D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)
\] |
associate-*r/ [<=]61.5 | \[ 0.25 \cdot \left(\frac{\color{blue}{D \cdot \frac{D}{d}}}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)
\] |
Applied egg-rr67.3%
[Start]61.5 | \[ 0.25 \cdot \left(\frac{D \cdot \frac{D}{d}}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)
\] |
|---|---|
add-sqr-sqrt [=>]61.5 | \[ 0.25 \cdot \left(\color{blue}{\left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \sqrt{\frac{D \cdot \frac{D}{d}}{d}}\right)} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)
\] |
associate-*l* [=>]61.5 | \[ 0.25 \cdot \color{blue}{\left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)}
\] |
associate-*l/ [<=]61.5 | \[ 0.25 \cdot \left(\sqrt{\color{blue}{\frac{D}{d} \cdot \frac{D}{d}}} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
sqrt-unprod [<=]38.3 | \[ 0.25 \cdot \left(\color{blue}{\left(\sqrt{\frac{D}{d}} \cdot \sqrt{\frac{D}{d}}\right)} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
add-sqr-sqrt [<=]55.8 | \[ 0.25 \cdot \left(\color{blue}{\frac{D}{d}} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
frac-2neg [=>]55.8 | \[ 0.25 \cdot \left(\color{blue}{\frac{-D}{-d}} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
distribute-frac-neg [=>]55.8 | \[ 0.25 \cdot \left(\color{blue}{\left(-\frac{D}{-d}\right)} \cdot \left(\sqrt{\frac{D \cdot \frac{D}{d}}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
associate-*l/ [<=]57.4 | \[ 0.25 \cdot \left(\left(-\frac{D}{-d}\right) \cdot \left(\sqrt{\color{blue}{\frac{D}{d} \cdot \frac{D}{d}}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
sqrt-unprod [<=]41.2 | \[ 0.25 \cdot \left(\left(-\frac{D}{-d}\right) \cdot \left(\color{blue}{\left(\sqrt{\frac{D}{d}} \cdot \sqrt{\frac{D}{d}}\right)} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
add-sqr-sqrt [<=]67.3 | \[ 0.25 \cdot \left(\left(-\frac{D}{-d}\right) \cdot \left(\color{blue}{\frac{D}{d}} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
distribute-lft-neg-out [=>]67.3 | \[ 0.25 \cdot \color{blue}{\left(-\frac{D}{-d} \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)}
\] |
Applied egg-rr73.6%
[Start]67.3 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \left(\frac{D}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)
\] |
|---|---|
associate-*l/ [=>]64.7 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \color{blue}{\frac{D \cdot \left(M \cdot \left(M \cdot h\right)\right)}{d}}\right)
\] |
*-un-lft-identity [=>]64.7 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \frac{D \cdot \left(M \cdot \left(M \cdot h\right)\right)}{\color{blue}{1 \cdot d}}\right)
\] |
*-commutative [=>]64.7 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \frac{D \cdot \left(M \cdot \left(M \cdot h\right)\right)}{\color{blue}{d \cdot 1}}\right)
\] |
associate-/r* [=>]64.7 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \color{blue}{\frac{\frac{D \cdot \left(M \cdot \left(M \cdot h\right)\right)}{d}}{1}}\right)
\] |
associate-*l/ [<=]67.3 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \frac{\color{blue}{\frac{D}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)}}{1}\right)
\] |
*-commutative [=>]67.3 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \frac{\color{blue}{\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{D}{d}}}{1}\right)
\] |
associate-*l* [=>]73.6 | \[ 0.25 \cdot \left(-\frac{-D}{d} \cdot \frac{\color{blue}{M \cdot \left(\left(M \cdot h\right) \cdot \frac{D}{d}\right)}}{1}\right)
\] |
Final simplification73.0%
| Alternative 1 | |
|---|---|
| Accuracy | 68.4% |
| Cost | 1608 |
| Alternative 2 | |
|---|---|
| Accuracy | 71.7% |
| Cost | 1481 |
| Alternative 3 | |
|---|---|
| Accuracy | 68.0% |
| Cost | 1480 |
| Alternative 4 | |
|---|---|
| Accuracy | 70.2% |
| Cost | 1225 |
| Alternative 5 | |
|---|---|
| Accuracy | 64.5% |
| Cost | 1092 |
| Alternative 6 | |
|---|---|
| Accuracy | 64.5% |
| Cost | 960 |
| Alternative 7 | |
|---|---|
| Accuracy | 69.9% |
| Cost | 960 |
| Alternative 8 | |
|---|---|
| Accuracy | 50.5% |
| Cost | 64 |
herbie shell --seed 2023138
(FPCore (c0 w h D d M)
:name "Henrywood and Agarwal, Equation (13)"
:precision binary64
(* (/ c0 (* 2.0 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))