| Alternative 1 | |
|---|---|
| Accuracy | 61.9% |
| Cost | 44484 |

(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 (* w h)))
(t_1 (* h (* M M)))
(t_2 (* t_0 (pow (/ d D) 2.0)))
(t_3 (/ c0 (* 2.0 w)))
(t_4 (/ (* c0 (* d d)) (* (* w h) (* D D))))
(t_5 (* t_3 (+ t_4 (sqrt (- (* t_4 t_4) (* M M)))))))
(if (<= t_5 -2e-304)
(*
t_3
(fma t_0 (* (/ d D) (/ d D)) (* (sqrt (+ M t_2)) (sqrt (- t_2 M)))))
(if (<= t_5 0.0)
(* 0.25 (/ (* D t_1) (* d (/ d D))))
(if (<= t_5 INFINITY)
(/ (pow (* c0 d) 2.0) (* w (* w (* D (* h D)))))
(* 0.25 (* t_1 (* (/ D d) (/ D d)))))))))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 / (w * h);
double t_1 = h * (M * M);
double t_2 = t_0 * pow((d / D), 2.0);
double t_3 = c0 / (2.0 * w);
double t_4 = (c0 * (d * d)) / ((w * h) * (D * D));
double t_5 = t_3 * (t_4 + sqrt(((t_4 * t_4) - (M * M))));
double tmp;
if (t_5 <= -2e-304) {
tmp = t_3 * fma(t_0, ((d / D) * (d / D)), (sqrt((M + t_2)) * sqrt((t_2 - M))));
} else if (t_5 <= 0.0) {
tmp = 0.25 * ((D * t_1) / (d * (d / D)));
} else if (t_5 <= ((double) INFINITY)) {
tmp = pow((c0 * d), 2.0) / (w * (w * (D * (h * D))));
} else {
tmp = 0.25 * (t_1 * ((D / d) * (D / d)));
}
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(w * h)) t_1 = Float64(h * Float64(M * M)) t_2 = Float64(t_0 * (Float64(d / D) ^ 2.0)) t_3 = Float64(c0 / Float64(2.0 * w)) t_4 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) t_5 = Float64(t_3 * Float64(t_4 + sqrt(Float64(Float64(t_4 * t_4) - Float64(M * M))))) tmp = 0.0 if (t_5 <= -2e-304) tmp = Float64(t_3 * fma(t_0, Float64(Float64(d / D) * Float64(d / D)), Float64(sqrt(Float64(M + t_2)) * sqrt(Float64(t_2 - M))))); elseif (t_5 <= 0.0) tmp = Float64(0.25 * Float64(Float64(D * t_1) / Float64(d * Float64(d / D)))); elseif (t_5 <= Inf) tmp = Float64((Float64(c0 * d) ^ 2.0) / Float64(w * Float64(w * Float64(D * Float64(h * D))))); else tmp = Float64(0.25 * Float64(t_1 * Float64(Float64(D / d) * Float64(D / d)))); end return 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[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[(t$95$4 + N[Sqrt[N[(N[(t$95$4 * t$95$4), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-304], N[(t$95$3 * N[(t$95$0 * N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(M + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$2 - M), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(0.25 * N[(N[(D * t$95$1), $MachinePrecision] / N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Power[N[(c0 * d), $MachinePrecision], 2.0], $MachinePrecision] / N[(w * N[(w * N[(D * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(t$95$1 * N[(N[(D / d), $MachinePrecision] * N[(D / d), $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 := \frac{c0}{w \cdot h}\\
t_1 := h \cdot \left(M \cdot M\right)\\
t_2 := t_0 \cdot {\left(\frac{d}{D}\right)}^{2}\\
t_3 := \frac{c0}{2 \cdot w}\\
t_4 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_5 := t_3 \cdot \left(t_4 + \sqrt{t_4 \cdot t_4 - M \cdot M}\right)\\
\mathbf{if}\;t_5 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t_3 \cdot \mathsf{fma}\left(t_0, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{M + t_2} \cdot \sqrt{t_2 - M}\right)\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;0.25 \cdot \frac{D \cdot t_1}{d \cdot \frac{d}{D}}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\frac{{\left(c0 \cdot d\right)}^{2}}{w \cdot \left(w \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(t_1 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\
\end{array}
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
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))))) < -1.99999999999999994e-304Initial program 84.6%
Simplified82.7%
[Start]84.6% | \[ \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 [=>]82.6% | \[ \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 [=>]82.6% | \[ \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)}
\] |
times-frac [=>]82.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot 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 [=>]82.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot 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)
\] |
Applied egg-rr77.4%
[Start]82.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\left(d \cdot d\right) \cdot \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right)
\] |
|---|---|
associate-*r/ [=>]82.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\left(d \cdot d\right) \cdot c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right)
\] |
*-commutative [<=]82.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{c0 \cdot \left(d \cdot d\right)}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right)
\] |
times-frac [=>]82.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} - M\right)}\right)
\] |
associate-/l/ [<=]85.0% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{\frac{d \cdot d}{D}}{D}} - M\right)}\right)
\] |
associate-*r/ [=>]85.0% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D}}{D}} - M\right)}\right)
\] |
associate-/l/ [<=]77.5% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{\frac{\frac{c0}{h}}{w}} \cdot \frac{d \cdot d}{D}}{D} - M\right)}\right)
\] |
associate-/l* [=>]77.5% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \color{blue}{\frac{d}{\frac{D}{d}}}}{D} - M\right)}\right)
\] |
div-inv [=>]77.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \color{blue}{\left(d \cdot \frac{1}{\frac{D}{d}}\right)}}{D} - M\right)}\right)
\] |
clear-num [<=]77.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \left(d \cdot \color{blue}{\frac{d}{D}}\right)}{D} - M\right)}\right)
\] |
Simplified84.9%
[Start]77.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{D} - M\right)}\right)
\] |
|---|---|
associate-/l* [=>]77.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\frac{\frac{c0}{h}}{w}}{\frac{D}{d \cdot \frac{d}{D}}}} - M\right)}\right)
\] |
associate-/l/ [=>]84.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{\frac{c0}{w \cdot h}}}{\frac{D}{d \cdot \frac{d}{D}}} - M\right)}\right)
\] |
Applied egg-rr90.4%
[Start]84.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{c0}{w \cdot h}}{\frac{D}{d \cdot \frac{d}{D}}} - M\right)}\right)
\] |
|---|---|
sqrt-prod [=>]88.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \color{blue}{\sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right)} \cdot \sqrt{\frac{\frac{c0}{w \cdot h}}{\frac{D}{d \cdot \frac{d}{D}}} - M}}\right)
\] |
if -1.99999999999999994e-304 < (*.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))))) < 0.0Initial program 62.7%
Taylor expanded in c0 around -inf 61.6%
Simplified61.4%
[Start]61.6% | \[ \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 [=>]61.6% | \[ \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)}
\] |
times-frac [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{{D}^{2}}{{d}^{2}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
unpow2 [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
unpow2 [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
*-commutative [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}}{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)
\] |
unpow2 [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{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)
\] |
associate-*r* [=>]61.4% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{c0}, \color{blue}{\left(-1 \cdot \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)\right) \cdot c0}\right)
\] |
Taylor expanded in c0 around 0 66.9%
Simplified78.2%
[Start]66.9% | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}
\] |
|---|---|
unpow2 [=>]66.9% | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{\color{blue}{d \cdot d}}
\] |
associate-/l* [=>]61.9% | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{d \cdot d}{h \cdot {M}^{2}}}}
\] |
unpow2 [=>]61.9% | \[ 0.25 \cdot \frac{{D}^{2}}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}
\] |
associate-/r/ [=>]66.7% | \[ 0.25 \cdot \color{blue}{\left(\frac{{D}^{2}}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}
\] |
unpow2 [=>]66.7% | \[ 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
associate-/l* [=>]72.3% | \[ 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d \cdot d}{D}}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
associate-*r/ [<=]78.2% | \[ 0.25 \cdot \left(\frac{D}{\color{blue}{d \cdot \frac{d}{D}}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
Applied egg-rr78.8%
[Start]78.2% | \[ 0.25 \cdot \left(\frac{D}{d \cdot \frac{d}{D}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
|---|---|
associate-*l/ [=>]78.8% | \[ 0.25 \cdot \color{blue}{\frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot \frac{d}{D}}}
\] |
if 0.0 < (*.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))))) < +inf.0Initial program 72.0%
Simplified71.9%
[Start]72.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)
\] |
|---|---|
times-frac [=>]71.9% | \[ \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 [=>]71.9% | \[ \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)}
\] |
times-frac [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot 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 [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot 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)
\] |
Applied egg-rr68.7%
[Start]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\left(d \cdot d\right) \cdot \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right)
\] |
|---|---|
associate-*r/ [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\left(d \cdot d\right) \cdot c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right)
\] |
*-commutative [<=]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{c0 \cdot \left(d \cdot d\right)}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right)
\] |
times-frac [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} - M\right)}\right)
\] |
associate-/l/ [<=]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{\frac{d \cdot d}{D}}{D}} - M\right)}\right)
\] |
associate-*r/ [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D}}{D}} - M\right)}\right)
\] |
associate-/l/ [<=]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{\frac{\frac{c0}{h}}{w}} \cdot \frac{d \cdot d}{D}}{D} - M\right)}\right)
\] |
associate-/l* [=>]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \color{blue}{\frac{d}{\frac{D}{d}}}}{D} - M\right)}\right)
\] |
div-inv [=>]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \color{blue}{\left(d \cdot \frac{1}{\frac{D}{d}}\right)}}{D} - M\right)}\right)
\] |
clear-num [<=]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \left(d \cdot \color{blue}{\frac{d}{D}}\right)}{D} - M\right)}\right)
\] |
Simplified71.9%
[Start]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\frac{\frac{c0}{h}}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{D} - M\right)}\right)
\] |
|---|---|
associate-/l* [=>]68.7% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\color{blue}{\frac{\frac{\frac{c0}{h}}{w}}{\frac{D}{d \cdot \frac{d}{D}}}} - M\right)}\right)
\] |
associate-/l/ [=>]71.9% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{\left(w \cdot h\right) \cdot D}, \frac{d}{\frac{D}{d}}, M\right) \cdot \left(\frac{\color{blue}{\frac{c0}{w \cdot h}}}{\frac{D}{d \cdot \frac{d}{D}}} - M\right)}\right)
\] |
Taylor expanded in c0 around inf 61.8%
Simplified80.9%
[Start]61.8% | \[ \frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
|---|---|
unpow2 [=>]61.8% | \[ \frac{\color{blue}{\left(d \cdot d\right)} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
unpow2 [=>]61.8% | \[ \frac{\left(d \cdot d\right) \cdot \color{blue}{\left(c0 \cdot c0\right)}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
swap-sqr [<=]77.7% | \[ \frac{\color{blue}{\left(d \cdot c0\right) \cdot \left(d \cdot c0\right)}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
unpow2 [<=]77.7% | \[ \frac{\color{blue}{{\left(d \cdot c0\right)}^{2}}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
*-commutative [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{{D}^{2} \cdot \color{blue}{\left(h \cdot {w}^{2}\right)}}
\] |
unpow2 [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{\left(D \cdot D\right)} \cdot \left(h \cdot {w}^{2}\right)}
\] |
unpow2 [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\left(D \cdot D\right) \cdot \left(h \cdot \color{blue}{\left(w \cdot w\right)}\right)}
\] |
associate-*l* [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{D \cdot \left(D \cdot \left(h \cdot \left(w \cdot w\right)\right)\right)}}
\] |
associate-*r* [=>]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{D \cdot \left(D \cdot \color{blue}{\left(\left(h \cdot w\right) \cdot w\right)}\right)}
\] |
*-commutative [<=]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{D \cdot \left(D \cdot \left(\color{blue}{\left(w \cdot h\right)} \cdot w\right)\right)}
\] |
Taylor expanded in d around 0 61.8%
Simplified80.9%
[Start]61.8% | \[ \frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
|---|---|
unpow2 [=>]61.8% | \[ \frac{\color{blue}{\left(d \cdot d\right)} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
unpow2 [=>]61.8% | \[ \frac{\left(d \cdot d\right) \cdot \color{blue}{\left(c0 \cdot c0\right)}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
swap-sqr [<=]77.7% | \[ \frac{\color{blue}{\left(d \cdot c0\right) \cdot \left(d \cdot c0\right)}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
unpow2 [<=]77.7% | \[ \frac{\color{blue}{{\left(d \cdot c0\right)}^{2}}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
unpow2 [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{{D}^{2} \cdot \left(\color{blue}{\left(w \cdot w\right)} \cdot h\right)}
\] |
associate-*r* [<=]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{{D}^{2} \cdot \color{blue}{\left(w \cdot \left(w \cdot h\right)\right)}}
\] |
*-commutative [=>]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{\left(w \cdot \left(w \cdot h\right)\right) \cdot {D}^{2}}}
\] |
associate-*r* [=>]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{\left(\left(w \cdot w\right) \cdot h\right)} \cdot {D}^{2}}
\] |
unpow2 [<=]77.7% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\left(\color{blue}{{w}^{2}} \cdot h\right) \cdot {D}^{2}}
\] |
associate-*l* [=>]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{{w}^{2} \cdot \left(h \cdot {D}^{2}\right)}}
\] |
unpow2 [=>]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{\left(w \cdot w\right)} \cdot \left(h \cdot {D}^{2}\right)}
\] |
*-commutative [<=]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\left(w \cdot w\right) \cdot \color{blue}{\left({D}^{2} \cdot h\right)}}
\] |
unpow2 [=>]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\left(w \cdot w\right) \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot h\right)}
\] |
Applied egg-rr84.1%
[Start]80.9% | \[ \frac{{\left(d \cdot c0\right)}^{2}}{\left(w \cdot w\right) \cdot \left(\left(D \cdot D\right) \cdot h\right)}
\] |
|---|---|
*-un-lft-identity [=>]80.9% | \[ \color{blue}{1 \cdot \frac{{\left(d \cdot c0\right)}^{2}}{\left(w \cdot w\right) \cdot \left(\left(D \cdot D\right) \cdot h\right)}}
\] |
associate-*l* [=>]84.1% | \[ 1 \cdot \frac{{\left(d \cdot c0\right)}^{2}}{\color{blue}{w \cdot \left(w \cdot \left(\left(D \cdot D\right) \cdot h\right)\right)}}
\] |
associate-*l* [=>]84.1% | \[ 1 \cdot \frac{{\left(d \cdot c0\right)}^{2}}{w \cdot \left(w \cdot \color{blue}{\left(D \cdot \left(D \cdot h\right)\right)}\right)}
\] |
if +inf.0 < (*.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%
Taylor expanded in c0 around -inf 1.3%
Simplified29.1%
[Start]1.3% | \[ \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 [=>]1.3% | \[ \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)}
\] |
times-frac [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{{D}^{2}}{{d}^{2}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
unpow2 [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
unpow2 [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \frac{w \cdot \left({M}^{2} \cdot h\right)}{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)
\] |
*-commutative [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}}{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)
\] |
unpow2 [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{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)
\] |
associate-*r* [=>]2.6% | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{d \cdot d} \cdot \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{c0}, \color{blue}{\left(-1 \cdot \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)\right) \cdot c0}\right)
\] |
Taylor expanded in c0 around 0 41.3%
Simplified52.3%
[Start]41.3% | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}
\] |
|---|---|
unpow2 [=>]41.3% | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{\color{blue}{d \cdot d}}
\] |
associate-/l* [=>]40.7% | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{d \cdot d}{h \cdot {M}^{2}}}}
\] |
unpow2 [=>]40.7% | \[ 0.25 \cdot \frac{{D}^{2}}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}
\] |
associate-/r/ [=>]41.3% | \[ 0.25 \cdot \color{blue}{\left(\frac{{D}^{2}}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}
\] |
unpow2 [=>]41.3% | \[ 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
associate-/l* [=>]47.8% | \[ 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d \cdot d}{D}}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
associate-*r/ [<=]52.3% | \[ 0.25 \cdot \left(\frac{D}{\color{blue}{d \cdot \frac{d}{D}}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
Taylor expanded in D around 0 41.3%
Simplified54.9%
[Start]41.3% | \[ 0.25 \cdot \left(\frac{{D}^{2}}{{d}^{2}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
|---|---|
unpow2 [=>]41.3% | \[ 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
unpow2 [=>]41.3% | \[ 0.25 \cdot \left(\frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
times-frac [=>]54.9% | \[ 0.25 \cdot \left(\color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)
\] |
Final simplification67.0%
| Alternative 1 | |
|---|---|
| Accuracy | 61.9% |
| Cost | 44484 |
| Alternative 2 | |
|---|---|
| Accuracy | 62.0% |
| Cost | 36492 |
| Alternative 3 | |
|---|---|
| Accuracy | 41.8% |
| Cost | 7825 |
| Alternative 4 | |
|---|---|
| Accuracy | 41.0% |
| Cost | 7824 |
| Alternative 5 | |
|---|---|
| Accuracy | 44.2% |
| Cost | 2389 |
| Alternative 6 | |
|---|---|
| Accuracy | 41.5% |
| Cost | 2244 |
| Alternative 7 | |
|---|---|
| Accuracy | 41.2% |
| Cost | 1616 |
| Alternative 8 | |
|---|---|
| Accuracy | 41.1% |
| Cost | 1616 |
| Alternative 9 | |
|---|---|
| Accuracy | 41.7% |
| Cost | 1353 |
| Alternative 10 | |
|---|---|
| Accuracy | 42.2% |
| Cost | 1352 |
| Alternative 11 | |
|---|---|
| Accuracy | 41.4% |
| Cost | 960 |
| Alternative 12 | |
|---|---|
| Accuracy | 32.4% |
| Cost | 64 |
herbie shell --seed 2023165
(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))))))