| Alternative 1 | |
|---|---|
| Accuracy | 31.8% |
| Cost | 2129 |
(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)) (* (* w h) (* D D)))))
(if (<=
(* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))
INFINITY)
(/ (* (/ (* c0 d) (* w h)) (/ (* c0 d) w)) (* D D))
0.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 = (c0 * (d * d)) / ((w * h) * (D * D));
double tmp;
if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))))) <= ((double) INFINITY)) {
tmp = (((c0 * d) / (w * h)) * ((c0 * d) / w)) / (D * D);
} else {
tmp = 0.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 = (c0 * (d * d)) / ((w * h) * (D * D));
double tmp;
if (((c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))))) <= Double.POSITIVE_INFINITY) {
tmp = (((c0 * d) / (w * h)) * ((c0 * d) / w)) / (D * D);
} else {
tmp = 0.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 = (c0 * (d * d)) / ((w * h) * (D * D)) tmp = 0 if ((c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))) <= math.inf: tmp = (((c0 * d) / (w * h)) * ((c0 * d) / w)) / (D * D) else: tmp = 0.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(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) tmp = 0.0 if (Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M))))) <= Inf) tmp = Float64(Float64(Float64(Float64(c0 * d) / Float64(w * h)) * Float64(Float64(c0 * d) / w)) / Float64(D * D)); else tmp = 0.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 = (c0 * (d * d)) / ((w * h) * (D * D)); tmp = 0.0; if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))))) <= Inf) tmp = (((c0 * d) / (w * h)) * ((c0 * d) / w)) / (D * D); else tmp = 0.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[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(c0 * d), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * d), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision] / N[(D * D), $MachinePrecision]), $MachinePrecision], 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)
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right) \leq \infty:\\
\;\;\;\;\frac{\frac{c0 \cdot d}{w \cdot h} \cdot \frac{c0 \cdot d}{w}}{D \cdot D}\\
\mathbf{else}:\\
\;\;\;\;0\\
\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))))) < +inf.0Initial program 13.5%
Simplified12.7%
[Start]13.5 | \[ \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* [=>]11.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\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)
\] |
difference-of-squares [=>]11.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \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)
\] |
associate-*l* [=>]11.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\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)
\] |
associate-*l* [=>]12.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} - M\right)}\right)
\] |
Taylor expanded in c0 around inf 12.7%
Simplified11.4%
[Start]12.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)
\] |
|---|---|
unpow2 [=>]12.7 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\left(d \cdot d\right)} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)
\] |
associate-*l/ [<=]12.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{d \cdot d}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0\right)}\right)
\] |
*-commutative [=>]12.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{d \cdot d}{\color{blue}{\left(w \cdot h\right) \cdot {D}^{2}}} \cdot c0\right)\right)
\] |
associate-*r* [<=]11.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{d \cdot d}{\color{blue}{w \cdot \left(h \cdot {D}^{2}\right)}} \cdot c0\right)\right)
\] |
unpow2 [=>]11.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{d \cdot d}{w \cdot \left(h \cdot \color{blue}{\left(D \cdot D\right)}\right)} \cdot c0\right)\right)
\] |
times-frac [=>]11.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\color{blue}{\left(\frac{d}{w} \cdot \frac{d}{h \cdot \left(D \cdot D\right)}\right)} \cdot c0\right)\right)
\] |
unpow2 [<=]11.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\left(\frac{d}{w} \cdot \frac{d}{h \cdot \color{blue}{{D}^{2}}}\right) \cdot c0\right)\right)
\] |
associate-/r* [=>]11.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\left(\frac{d}{w} \cdot \color{blue}{\frac{\frac{d}{h}}{{D}^{2}}}\right) \cdot c0\right)\right)
\] |
unpow2 [=>]11.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\left(\frac{d}{w} \cdot \frac{\frac{d}{h}}{\color{blue}{D \cdot D}}\right) \cdot c0\right)\right)
\] |
Taylor expanded in c0 around 0 8.1%
Simplified7.7%
[Start]8.1 | \[ \frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}
\] |
|---|---|
unpow2 [=>]8.1 | \[ \frac{{d}^{2} \cdot {c0}^{2}}{\color{blue}{\left(D \cdot D\right)} \cdot \left({w}^{2} \cdot h\right)}
\] |
times-frac [=>]7.7 | \[ \color{blue}{\frac{{d}^{2}}{D \cdot D} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}}
\] |
unpow2 [=>]7.7 | \[ \frac{\color{blue}{d \cdot d}}{D \cdot D} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}
\] |
unpow2 [=>]7.7 | \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h}
\] |
*-commutative [=>]7.7 | \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{c0 \cdot c0}{\color{blue}{h \cdot {w}^{2}}}
\] |
unpow2 [=>]7.7 | \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{c0 \cdot c0}{h \cdot \color{blue}{\left(w \cdot w\right)}}
\] |
Applied egg-rr11.7%
[Start]7.7 | \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{c0 \cdot c0}{h \cdot \left(w \cdot w\right)}
\] |
|---|---|
associate-*l/ [=>]8.7 | \[ \color{blue}{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot c0}{h \cdot \left(w \cdot w\right)}}{D \cdot D}}
\] |
associate-*r/ [=>]8.3 | \[ \frac{\color{blue}{\frac{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}{h \cdot \left(w \cdot w\right)}}}{D \cdot D}
\] |
pow2 [=>]8.3 | \[ \frac{\frac{\color{blue}{{d}^{2}} \cdot \left(c0 \cdot c0\right)}{h \cdot \left(w \cdot w\right)}}{D \cdot D}
\] |
pow2 [=>]8.3 | \[ \frac{\frac{{d}^{2} \cdot \color{blue}{{c0}^{2}}}{h \cdot \left(w \cdot w\right)}}{D \cdot D}
\] |
pow-prod-down [=>]11.7 | \[ \frac{\frac{\color{blue}{{\left(d \cdot c0\right)}^{2}}}{h \cdot \left(w \cdot w\right)}}{D \cdot D}
\] |
Applied egg-rr17.2%
[Start]11.7 | \[ \frac{\frac{{\left(d \cdot c0\right)}^{2}}{h \cdot \left(w \cdot w\right)}}{D \cdot D}
\] |
|---|---|
unpow2 [=>]11.7 | \[ \frac{\frac{\color{blue}{\left(d \cdot c0\right) \cdot \left(d \cdot c0\right)}}{h \cdot \left(w \cdot w\right)}}{D \cdot D}
\] |
associate-*r* [=>]12.8 | \[ \frac{\frac{\left(d \cdot c0\right) \cdot \left(d \cdot c0\right)}{\color{blue}{\left(h \cdot w\right) \cdot w}}}{D \cdot D}
\] |
times-frac [=>]17.2 | \[ \frac{\color{blue}{\frac{d \cdot c0}{h \cdot w} \cdot \frac{d \cdot c0}{w}}}{D \cdot D}
\] |
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%
Simplified0.3%
[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(\frac{c0 \cdot \left(d \cdot d\right)}{\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)
\] |
difference-of-squares [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \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)
\] |
associate-*l* [=>]0.0 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\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)
\] |
associate-*l* [=>]0.3 | \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} - M\right)}\right)
\] |
Taylor expanded in c0 around -inf 1.4%
Simplified38.4%
[Start]1.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(-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 [=>]1.4 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \color{blue}{\left(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)}\right)
\] |
distribute-rgt-in [=>]0.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \color{blue}{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)}\right)
\] |
mul-1-neg [=>]0.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \color{blue}{\left(-\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \cdot c0\right)\right)
\] |
distribute-lft-neg-in [<=]0.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \color{blue}{\left(-\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0\right)}\right)\right)
\] |
unpow2 [=>]0.9 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \left(-\frac{\color{blue}{d \cdot d}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0\right)\right)\right)
\] |
associate-*l/ [=>]0.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \left(-\color{blue}{\frac{\left(d \cdot d\right) \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}}\right)\right)\right)
\] |
unpow2 [<=]0.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \left(-\frac{\color{blue}{{d}^{2}} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\right)\right)
\] |
mul-1-neg [<=]0.1 | \[ \frac{c0}{2 \cdot w} \cdot \left(-1 \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} \cdot c0 + \color{blue}{-1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}}\right)\right)
\] |
Taylor expanded in c0 around 0 44.8%
Final simplification35.7%
| Alternative 1 | |
|---|---|
| Accuracy | 31.8% |
| Cost | 2129 |
| Alternative 2 | |
|---|---|
| Accuracy | 32.6% |
| Cost | 1352 |
| Alternative 3 | |
|---|---|
| Accuracy | 33.6% |
| Cost | 64 |
herbie shell --seed 2023153
(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))))))