| Alternative 1 | |
|---|---|
| Error | 21.2 |
| 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
(/ (* (/ 2.0 (* 2.0 (/ w c0))) (* c0 (/ d D))) (/ (* w h) (/ d D))))
(t_1 (/ (* c0 (* d d)) (* (* w h) (* D D))))
(t_2 (* (/ c0 (* 2.0 w)) (+ t_1 (sqrt (- (* t_1 t_1) (* M M)))))))
(if (<= t_2 -5e+277)
t_0
(if (<= t_2 2e-247)
(* (/ (/ D d) (/ (/ d D) M)) (* M (* h 0.25)))
(if (<= t_2 INFINITY) t_0 (* h (* 0.25 (pow (* M (/ D d)) 2.0))))))))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 = ((2.0 / (2.0 * (w / c0))) * (c0 * (d / D))) / ((w * h) / (d / D));
double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
double t_2 = (c0 / (2.0 * w)) * (t_1 + sqrt(((t_1 * t_1) - (M * M))));
double tmp;
if (t_2 <= -5e+277) {
tmp = t_0;
} else if (t_2 <= 2e-247) {
tmp = ((D / d) / ((d / D) / M)) * (M * (h * 0.25));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = h * (0.25 * pow((M * (D / d)), 2.0));
}
return tmp;
}
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 = ((2.0 / (2.0 * (w / c0))) * (c0 * (d / D))) / ((w * h) / (d / D));
double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
double t_2 = (c0 / (2.0 * w)) * (t_1 + Math.sqrt(((t_1 * t_1) - (M * M))));
double tmp;
if (t_2 <= -5e+277) {
tmp = t_0;
} else if (t_2 <= 2e-247) {
tmp = ((D / d) / ((d / D) / M)) * (M * (h * 0.25));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = h * (0.25 * Math.pow((M * (D / d)), 2.0));
}
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 = ((2.0 / (2.0 * (w / c0))) * (c0 * (d / D))) / ((w * h) / (d / D)) t_1 = (c0 * (d * d)) / ((w * h) * (D * D)) t_2 = (c0 / (2.0 * w)) * (t_1 + math.sqrt(((t_1 * t_1) - (M * M)))) tmp = 0 if t_2 <= -5e+277: tmp = t_0 elif t_2 <= 2e-247: tmp = ((D / d) / ((d / D) / M)) * (M * (h * 0.25)) elif t_2 <= math.inf: tmp = t_0 else: tmp = h * (0.25 * math.pow((M * (D / d)), 2.0)) 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(Float64(Float64(2.0 / Float64(2.0 * Float64(w / c0))) * Float64(c0 * Float64(d / D))) / Float64(Float64(w * h) / Float64(d / D))) t_1 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) t_2 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_1 + sqrt(Float64(Float64(t_1 * t_1) - Float64(M * M))))) tmp = 0.0 if (t_2 <= -5e+277) tmp = t_0; elseif (t_2 <= 2e-247) tmp = Float64(Float64(Float64(D / d) / Float64(Float64(d / D) / M)) * Float64(M * Float64(h * 0.25))); elseif (t_2 <= Inf) tmp = t_0; else tmp = Float64(h * Float64(0.25 * (Float64(M * Float64(D / d)) ^ 2.0))); 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 = ((2.0 / (2.0 * (w / c0))) * (c0 * (d / D))) / ((w * h) / (d / D)); t_1 = (c0 * (d * d)) / ((w * h) * (D * D)); t_2 = (c0 / (2.0 * w)) * (t_1 + sqrt(((t_1 * t_1) - (M * M)))); tmp = 0.0; if (t_2 <= -5e+277) tmp = t_0; elseif (t_2 <= 2e-247) tmp = ((D / d) / ((d / D) / M)) * (M * (h * 0.25)); elseif (t_2 <= Inf) tmp = t_0; else tmp = h * (0.25 * ((M * (D / d)) ^ 2.0)); 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[(N[(N[(2.0 / N[(2.0 * N[(w / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c0 * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 + N[Sqrt[N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+277], t$95$0, If[LessEqual[t$95$2, 2e-247], N[(N[(N[(D / d), $MachinePrecision] / N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] * N[(M * N[(h * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$0, N[(h * N[(0.25 * N[Power[N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $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{\frac{2}{2 \cdot \frac{w}{c0}} \cdot \left(c0 \cdot \frac{d}{D}\right)}{\frac{w \cdot h}{\frac{d}{D}}}\\
t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_2 := \frac{c0}{2 \cdot w} \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+277}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-247}:\\
\;\;\;\;\frac{\frac{D}{d}}{\frac{\frac{d}{D}}{M}} \cdot \left(M \cdot \left(h \cdot 0.25\right)\right)\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;h \cdot \left(0.25 \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\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))))) < -4.99999999999999982e277 or 2e-247 < (*.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 55.4
Taylor expanded in c0 around inf 49.0
Simplified43.2
[Start]49.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)
\] |
|---|---|
associate-/r* [=>]49.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{{d}^{2} \cdot c0}{{D}^{2}}}{w \cdot h}}\right)
\] |
*-commutative [=>]49.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\color{blue}{c0 \cdot {d}^{2}}}{{D}^{2}}}{w \cdot h}\right)
\] |
unpow2 [=>]49.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{c0 \cdot \color{blue}{\left(d \cdot d\right)}}{{D}^{2}}}{w \cdot h}\right)
\] |
unpow2 [=>]49.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{D \cdot D}}}{w \cdot h}\right)
\] |
times-frac [=>]45.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\frac{c0}{D} \cdot \frac{d \cdot d}{D}}}{w \cdot h}\right)
\] |
associate-/l* [=>]43.2 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{c0}{D} \cdot \color{blue}{\frac{d}{\frac{D}{d}}}}{w \cdot h}\right)
\] |
Applied egg-rr37.0
Applied egg-rr30.1
if -4.99999999999999982e277 < (*.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))))) < 2e-247Initial program 24.8
Simplified30.7
[Start]24.8 | \[ \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 [=>]36.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 [=>]36.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 [=>]33.8 | \[ \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 [=>]30.7 | \[ \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 37.7
Simplified32.8
[Start]37.7 | \[ \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 [=>]37.7 | \[ \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 [=>]36.9 | \[ \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)
\] |
*-commutative [<=]36.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{{D}^{2}}{{d}^{2}} \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 [=>]36.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \frac{w \cdot \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 [=>]36.9 | \[ \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(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)
\] |
associate-/r* [=>]35.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{\frac{D \cdot D}{d}}{d}} \cdot \frac{w \cdot \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)
\] |
associate-*r/ [<=]34.5 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{D \cdot \frac{D}{d}}}{d} \cdot \frac{w \cdot \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)
\] |
associate-*l/ [<=]34.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \frac{w \cdot \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)
\] |
*-commutative [=>]34.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{w \cdot \color{blue}{\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)
\] |
associate-*r* [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{\color{blue}{\left(w \cdot {M}^{2}\right) \cdot h}}{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 [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{\color{blue}{h \cdot \left(w \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 [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \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* [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \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)
\] |
*-commutative [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \cdot \left(M \cdot M\right)\right)}{c0}, \color{blue}{c0 \cdot \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)}\right)
\] |
distribute-rgt1-in [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \cdot \left(M \cdot M\right)\right)}{c0}, c0 \cdot \left(-1 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)\right)
\] |
metadata-eval [=>]34.2 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \cdot \left(M \cdot M\right)\right)}{c0}, c0 \cdot \left(-1 \cdot \left(\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\right)\right)
\] |
mul0-lft [=>]32.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \cdot \left(M \cdot M\right)\right)}{c0}, c0 \cdot \left(-1 \cdot \color{blue}{0}\right)\right)
\] |
metadata-eval [=>]32.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot \left(w \cdot \left(M \cdot M\right)\right)}{c0}, c0 \cdot \color{blue}{0}\right)
\] |
Taylor expanded in c0 around 0 32.0
Simplified27.3
[Start]32.0 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}
\] |
|---|---|
associate-/l* [=>]32.7 | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}}
\] |
unpow2 [=>]32.7 | \[ 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}
\] |
unpow2 [=>]32.7 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}}
\] |
unpow2 [=>]32.7 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}}
\] |
associate-/r/ [=>]32.3 | \[ 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)}
\] |
times-frac [=>]29.5 | \[ 0.25 \cdot \left(\color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)
\] |
unpow2 [<=]29.5 | \[ 0.25 \cdot \left(\color{blue}{{\left(\frac{D}{d}\right)}^{2}} \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)
\] |
associate-*l* [=>]27.3 | \[ 0.25 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \color{blue}{\left(M \cdot \left(M \cdot h\right)\right)}\right)
\] |
Applied egg-rr25.5
Applied egg-rr22.0
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 64.0
Simplified63.9
[Start]64.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/ [<=]64.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 [=>]64.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 [=>]64.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)}
\] |
times-frac [=>]64.0 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{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 [=>]63.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}\right) \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}\right)} - M \cdot M}\right)
\] |
swap-sqr [=>]63.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{c0}{w \cdot h}\right) \cdot \left(\frac{d \cdot d}{D \cdot D} \cdot \frac{d \cdot d}{D \cdot D}\right)} - M \cdot M}\right)
\] |
associate-*l* [=>]63.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\color{blue}{\frac{c0}{w \cdot h} \cdot \left(\frac{c0}{w \cdot h} \cdot \left(\frac{d \cdot d}{D \cdot D} \cdot \frac{d \cdot d}{D \cdot D}\right)\right)} - M \cdot M}\right)
\] |
fma-neg [=>]63.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\color{blue}{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot \left(\frac{d \cdot d}{D \cdot D} \cdot \frac{d \cdot d}{D \cdot D}\right), -M \cdot M\right)}}\right)
\] |
times-frac [=>]63.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot \left(\color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{d \cdot d}{D \cdot D}\right), -M \cdot M\right)}\right)
\] |
associate-*l* [=>]63.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot \color{blue}{\left(\frac{d}{D} \cdot \left(\frac{d}{D} \cdot \frac{d \cdot d}{D \cdot D}\right)\right)}, -M \cdot M\right)}\right)
\] |
times-frac [=>]63.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot \left(\frac{d}{D} \cdot \left(\frac{d}{D} \cdot \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\right), -M \cdot M\right)}\right)
\] |
cube-unmult [=>]63.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot \left(\frac{d}{D} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{3}}\right), -M \cdot M\right)}\right)
\] |
Taylor expanded in c0 around -inf 62.9
Simplified32.9
[Start]62.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 [=>]62.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)}
\] |
times-frac [=>]62.8 | \[ \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)
\] |
*-commutative [<=]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{{D}^{2}}{{d}^{2}} \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)
\] |
times-frac [<=]62.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\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)
\] |
associate-/r* [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{\frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2}}}{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 [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{\color{blue}{\left(w \cdot \left(h \cdot {M}^{2}\right)\right) \cdot {D}^{2}}}{{d}^{2}}}{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 [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{\left(w \cdot \left(h \cdot {M}^{2}\right)\right) \cdot {D}^{2}}{\color{blue}{d \cdot d}}}{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-/l* [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{\frac{w \cdot \left(h \cdot {M}^{2}\right)}{\frac{d \cdot d}{{D}^{2}}}}}{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 [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \color{blue}{\left({M}^{2} \cdot h\right)}}{\frac{d \cdot d}{{D}^{2}}}}{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 [=>]62.8 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(\color{blue}{\left(M \cdot M\right)} \cdot h\right)}{\frac{d \cdot d}{{D}^{2}}}}{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-*l* [=>]62.7 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \color{blue}{\left(M \cdot \left(M \cdot h\right)\right)}}{\frac{d \cdot d}{{D}^{2}}}}{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 [=>]62.7 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{\frac{d \cdot d}{\color{blue}{D \cdot D}}}}{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 [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}}{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 [<=]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{\color{blue}{{\left(\frac{d}{D}\right)}^{2}}}}{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)
\] |
mul-1-neg [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, \color{blue}{-\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)
\] |
*-commutative [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, -\color{blue}{c0 \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)
\] |
distribute-rgt-neg-in [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, \color{blue}{c0 \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)\right)}\right)
\] |
distribute-rgt1-in [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, c0 \cdot \left(-\color{blue}{\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}}\right)\right)
\] |
metadata-eval [=>]62.4 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, c0 \cdot \left(-\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\right)
\] |
mul0-lft [=>]32.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, c0 \cdot \left(-\color{blue}{0}\right)\right)
\] |
metadata-eval [=>]32.9 | \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, c0 \cdot \color{blue}{0}\right)
\] |
Taylor expanded in c0 around 0 34.4
Simplified24.0
[Start]34.4 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}
\] |
|---|---|
*-commutative [<=]34.4 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}}{{d}^{2}}
\] |
associate-/l* [=>]34.4 | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}}
\] |
*-commutative [=>]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{{M}^{2} \cdot h}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}}
\] |
associate-*r* [<=]32.2 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{M \cdot \left(M \cdot h\right)}}}
\] |
associate-/r/ [=>]32.3 | \[ 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* [=>]28.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/ [<=]24.0 | \[ 0.25 \cdot \left(\frac{\color{blue}{D \cdot \frac{D}{d}}}{d} \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)
\] |
Taylor expanded in D around 0 34.4
Simplified25.0
[Start]34.4 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}
\] |
|---|---|
*-commutative [=>]34.4 | \[ 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}}
\] |
*-commutative [<=]34.4 | \[ 0.25 \cdot \frac{\color{blue}{\left({M}^{2} \cdot h\right)} \cdot {D}^{2}}{{d}^{2}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{\left(\color{blue}{\left(M \cdot M\right)} \cdot h\right) \cdot {D}^{2}}{{d}^{2}}
\] |
associate-*r* [<=]32.2 | \[ 0.25 \cdot \frac{\color{blue}{\left(M \cdot \left(M \cdot h\right)\right)} \cdot {D}^{2}}{{d}^{2}}
\] |
unpow2 [=>]32.2 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \color{blue}{\left(D \cdot D\right)}}{{d}^{2}}
\] |
remove-double-neg [<=]32.2 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \color{blue}{\left(-\left(-D \cdot D\right)\right)}}{{d}^{2}}
\] |
distribute-rgt-neg-out [<=]32.2 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(-\color{blue}{D \cdot \left(-D\right)}\right)}{{d}^{2}}
\] |
unpow2 [=>]32.2 | \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(-D \cdot \left(-D\right)\right)}{\color{blue}{d \cdot d}}
\] |
associate-*r/ [<=]32.3 | \[ 0.25 \cdot \color{blue}{\left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{-D \cdot \left(-D\right)}{d \cdot d}\right)}
\] |
distribute-neg-frac [<=]32.3 | \[ 0.25 \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \color{blue}{\left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)}\right)
\] |
associate-*r* [=>]34.4 | \[ 0.25 \cdot \left(\color{blue}{\left(\left(M \cdot M\right) \cdot h\right)} \cdot \left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)\right)
\] |
unpow2 [<=]34.4 | \[ 0.25 \cdot \left(\left(\color{blue}{{M}^{2}} \cdot h\right) \cdot \left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)\right)
\] |
*-commutative [=>]34.4 | \[ 0.25 \cdot \left(\color{blue}{\left(h \cdot {M}^{2}\right)} \cdot \left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)\right)
\] |
associate-*l* [=>]33.5 | \[ 0.25 \cdot \color{blue}{\left(h \cdot \left({M}^{2} \cdot \left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)\right)\right)}
\] |
unpow2 [=>]33.5 | \[ 0.25 \cdot \left(h \cdot \left(\color{blue}{\left(M \cdot M\right)} \cdot \left(-\frac{D \cdot \left(-D\right)}{d \cdot d}\right)\right)\right)
\] |
distribute-neg-frac [=>]33.5 | \[ 0.25 \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{\frac{-D \cdot \left(-D\right)}{d \cdot d}}\right)\right)
\] |
distribute-rgt-neg-out [=>]33.5 | \[ 0.25 \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot \frac{-\color{blue}{\left(-D \cdot D\right)}}{d \cdot d}\right)\right)
\] |
remove-double-neg [=>]33.5 | \[ 0.25 \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot \frac{\color{blue}{D \cdot D}}{d \cdot d}\right)\right)
\] |
times-frac [=>]25.0 | \[ 0.25 \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right)\right)
\] |
unpow2 [<=]25.0 | \[ 0.25 \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{{\left(\frac{D}{d}\right)}^{2}}\right)\right)
\] |
Taylor expanded in h around 0 34.4
Simplified15.0
[Start]34.4 | \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}
\] |
|---|---|
associate-/l* [=>]34.4 | \[ 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}}
\] |
unpow2 [=>]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}
\] |
*-commutative [<=]34.4 | \[ 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right) \cdot h}}}
\] |
associate-/l* [<=]34.4 | \[ 0.25 \cdot \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot d}}
\] |
times-frac [=>]30.7 | \[ 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot h}{d}\right)}
\] |
associate-*r/ [<=]27.1 | \[ 0.25 \cdot \left(\color{blue}{\left(D \cdot \frac{D}{d}\right)} \cdot \frac{\left(M \cdot M\right) \cdot h}{d}\right)
\] |
*-commutative [=>]27.1 | \[ 0.25 \cdot \color{blue}{\left(\frac{\left(M \cdot M\right) \cdot h}{d} \cdot \left(D \cdot \frac{D}{d}\right)\right)}
\] |
associate-/r/ [<=]27.0 | \[ 0.25 \cdot \color{blue}{\frac{\left(M \cdot M\right) \cdot h}{\frac{d}{D \cdot \frac{D}{d}}}}
\] |
associate-/r* [=>]26.0 | \[ 0.25 \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{\frac{\frac{d}{D}}{\frac{D}{d}}}}
\] |
associate-/l* [<=]27.3 | \[ 0.25 \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{\frac{\frac{d}{D} \cdot d}{D}}}
\] |
associate-*r/ [<=]26.0 | \[ 0.25 \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}
\] |
associate-/l* [=>]25.1 | \[ 0.25 \cdot \color{blue}{\frac{M \cdot M}{\frac{\frac{d}{D} \cdot \frac{d}{D}}{h}}}
\] |
associate-/r/ [=>]25.0 | \[ 0.25 \cdot \color{blue}{\left(\frac{M \cdot M}{\frac{d}{D} \cdot \frac{d}{D}} \cdot h\right)}
\] |
times-frac [=>]15.1 | \[ 0.25 \cdot \left(\color{blue}{\left(\frac{M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}\right)} \cdot h\right)
\] |
associate-/l* [<=]15.8 | \[ 0.25 \cdot \left(\left(\color{blue}{\frac{M \cdot D}{d}} \cdot \frac{M}{\frac{d}{D}}\right) \cdot h\right)
\] |
associate-/l* [<=]14.7 | \[ 0.25 \cdot \left(\left(\frac{M \cdot D}{d} \cdot \color{blue}{\frac{M \cdot D}{d}}\right) \cdot h\right)
\] |
associate-*r/ [<=]15.7 | \[ 0.25 \cdot \left(\left(\color{blue}{\left(M \cdot \frac{D}{d}\right)} \cdot \frac{M \cdot D}{d}\right) \cdot h\right)
\] |
associate-*r/ [<=]15.0 | \[ 0.25 \cdot \left(\left(\left(M \cdot \frac{D}{d}\right) \cdot \color{blue}{\left(M \cdot \frac{D}{d}\right)}\right) \cdot h\right)
\] |
unpow2 [<=]15.0 | \[ 0.25 \cdot \left(\color{blue}{{\left(M \cdot \frac{D}{d}\right)}^{2}} \cdot h\right)
\] |
*-commutative [=>]15.0 | \[ 0.25 \cdot \color{blue}{\left(h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)}
\] |
associate-*l* [<=]14.9 | \[ \color{blue}{\left(0.25 \cdot h\right) \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}}
\] |
*-commutative [<=]14.9 | \[ \color{blue}{\left(h \cdot 0.25\right)} \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}
\] |
associate-*l* [=>]15.0 | \[ \color{blue}{h \cdot \left(0.25 \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)}
\] |
Final simplification17.2
| Alternative 1 | |
|---|---|
| Error | 21.2 |
| Cost | 1608 |
| Alternative 2 | |
|---|---|
| Error | 21.6 |
| Cost | 1608 |
| Alternative 3 | |
|---|---|
| Error | 24.6 |
| Cost | 1225 |
| Alternative 4 | |
|---|---|
| Error | 24.8 |
| Cost | 1224 |
| Alternative 5 | |
|---|---|
| Error | 26.1 |
| Cost | 1220 |
| Alternative 6 | |
|---|---|
| Error | 24.5 |
| Cost | 1220 |
| Alternative 7 | |
|---|---|
| Error | 21.9 |
| Cost | 960 |
| Alternative 8 | |
|---|---|
| Error | 20.1 |
| Cost | 960 |
| Alternative 9 | |
|---|---|
| Error | 31.8 |
| Cost | 64 |
herbie shell --seed 2023010
(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))))))