?

Average Accuracy: 6.9% → 70.6%
Time: 43.1s
Precision: binary64
Cost: 26505

?

\[\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)}\\ t_1 := \frac{c0}{2 \cdot w}\\ t_2 := t_1 \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\ \mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \frac{d}{D}\right) \cdot \left(c0 + c0\right)\right)\\ \end{array} \]
(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))))
        (t_1 (/ c0 (* 2.0 w)))
        (t_2 (* t_1 (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
   (if (or (<= t_2 0.0) (not (<= t_2 INFINITY)))
     (* 0.25 (* h (pow (* M (/ D d)) 2.0)))
     (* t_1 (* (* (/ d (* (* w h) D)) (/ d D)) (+ c0 c0))))))
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 t_1 = c0 / (2.0 * w);
	double t_2 = t_1 * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	double tmp;
	if ((t_2 <= 0.0) || !(t_2 <= ((double) INFINITY))) {
		tmp = 0.25 * (h * pow((M * (D / d)), 2.0));
	} else {
		tmp = t_1 * (((d / ((w * h) * D)) * (d / D)) * (c0 + c0));
	}
	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 t_1 = c0 / (2.0 * w);
	double t_2 = t_1 * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
	double tmp;
	if ((t_2 <= 0.0) || !(t_2 <= Double.POSITIVE_INFINITY)) {
		tmp = 0.25 * (h * Math.pow((M * (D / d)), 2.0));
	} else {
		tmp = t_1 * (((d / ((w * h) * D)) * (d / D)) * (c0 + c0));
	}
	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))
	t_1 = c0 / (2.0 * w)
	t_2 = t_1 * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
	tmp = 0
	if (t_2 <= 0.0) or not (t_2 <= math.inf):
		tmp = 0.25 * (h * math.pow((M * (D / d)), 2.0))
	else:
		tmp = t_1 * (((d / ((w * h) * D)) * (d / D)) * (c0 + c0))
	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)))
	t_1 = Float64(c0 / Float64(2.0 * w))
	t_2 = Float64(t_1 * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
	tmp = 0.0
	if ((t_2 <= 0.0) || !(t_2 <= Inf))
		tmp = Float64(0.25 * Float64(h * (Float64(M * Float64(D / d)) ^ 2.0)));
	else
		tmp = Float64(t_1 * Float64(Float64(Float64(d / Float64(Float64(w * h) * D)) * Float64(d / D)) * Float64(c0 + c0)));
	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));
	t_1 = c0 / (2.0 * w);
	t_2 = t_1 * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	tmp = 0.0;
	if ((t_2 <= 0.0) || ~((t_2 <= Inf)))
		tmp = 0.25 * (h * ((M * (D / d)) ^ 2.0));
	else
		tmp = t_1 * (((d / ((w * h) * D)) * (d / D)) * (c0 + c0));
	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]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, 0.0], N[Not[LessEqual[t$95$2, Infinity]], $MachinePrecision]], N[(0.25 * N[(h * N[Power[N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(N[(d / N[(N[(w * h), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(c0 + c0), $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 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_1 := \frac{c0}{2 \cdot w}\\
t_2 := t_1 \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\
\mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq \infty\right):\\
\;\;\;\;0.25 \cdot \left(h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \frac{d}{D}\right) \cdot \left(c0 + c0\right)\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. 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))))) < -0.0 or +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)))))

    1. Initial program 5.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) \]
    2. Simplified2.5%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{D \cdot \left(h \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \left(\frac{d}{D} \cdot {\left(\frac{d}{D}\right)}^{3}\right) \cdot \frac{c0}{w \cdot h}, -M \cdot M\right)}\right)} \]
      Proof

      [Start]5.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) \]

      associate-*l/ [<=]4.8

      \[ \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 [=>]4.8

      \[ \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 [=>]3.9

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)} \]

      associate-*l* [=>]3.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]

      associate-/r* [=>]3.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \color{blue}{\frac{\frac{c0}{w}}{h \cdot \left(D \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]

      associate-*r* [=>]3.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{\left(h \cdot D\right) \cdot D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]

      *-commutative [=>]3.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{D \cdot \left(h \cdot D\right)}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    3. Taylor expanded in c0 around -inf 5.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\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)} \]
    4. Simplified46.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\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 0\right)} \]
      Proof

      [Start]5.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 [=>]5.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)} \]
    5. Taylor expanded in c0 around 0 45.4%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    6. Simplified48.8%

      \[\leadsto \color{blue}{0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}{d \cdot d}} \]
      Proof

      [Start]45.4

      \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      unpow2 [=>]45.4

      \[ 0.25 \cdot \frac{\color{blue}{\left(D \cdot D\right)} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      unpow2 [=>]45.4

      \[ 0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(\color{blue}{\left(M \cdot M\right)} \cdot h\right)}{{d}^{2}} \]

      associate-*r* [<=]48.8

      \[ 0.25 \cdot \frac{\left(D \cdot D\right) \cdot \color{blue}{\left(M \cdot \left(M \cdot h\right)\right)}}{{d}^{2}} \]

      *-commutative [<=]48.8

      \[ 0.25 \cdot \frac{\color{blue}{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}}{{d}^{2}} \]

      unpow2 [=>]48.8

      \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}{\color{blue}{d \cdot d}} \]
    7. Applied egg-rr62.0%

      \[\leadsto 0.25 \cdot \color{blue}{\left(-\frac{M \cdot \left(M \cdot h\right)}{\frac{d}{D} \cdot \left(-\frac{d}{D}\right)}\right)} \]
      Proof

      [Start]48.8

      \[ 0.25 \cdot \frac{\left(M \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot D\right)}{d \cdot d} \]

      associate-/l* [=>]48.5

      \[ 0.25 \cdot \color{blue}{\frac{M \cdot \left(M \cdot h\right)}{\frac{d \cdot d}{D \cdot D}}} \]

      frac-2neg [=>]48.5

      \[ 0.25 \cdot \color{blue}{\frac{-M \cdot \left(M \cdot h\right)}{-\frac{d \cdot d}{D \cdot D}}} \]

      distribute-frac-neg [=>]48.5

      \[ 0.25 \cdot \color{blue}{\left(-\frac{M \cdot \left(M \cdot h\right)}{-\frac{d \cdot d}{D \cdot D}}\right)} \]

      times-frac [=>]62.0

      \[ 0.25 \cdot \left(-\frac{M \cdot \left(M \cdot h\right)}{-\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}\right) \]

      distribute-rgt-neg-in [=>]62.0

      \[ 0.25 \cdot \left(-\frac{M \cdot \left(M \cdot h\right)}{\color{blue}{\frac{d}{D} \cdot \left(-\frac{d}{D}\right)}}\right) \]
    8. Simplified70.5%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(-\frac{M}{d} \cdot D\right) \cdot \left(\frac{M}{\frac{-d}{h}} \cdot D\right)\right)} \]
      Proof

      [Start]62.0

      \[ 0.25 \cdot \left(-\frac{M \cdot \left(M \cdot h\right)}{\frac{d}{D} \cdot \left(-\frac{d}{D}\right)}\right) \]

      times-frac [=>]73.2

      \[ 0.25 \cdot \left(-\color{blue}{\frac{M}{\frac{d}{D}} \cdot \frac{M \cdot h}{-\frac{d}{D}}}\right) \]

      distribute-lft-neg-in [=>]73.2

      \[ 0.25 \cdot \color{blue}{\left(\left(-\frac{M}{\frac{d}{D}}\right) \cdot \frac{M \cdot h}{-\frac{d}{D}}\right)} \]

      associate-/r/ [=>]70.9

      \[ 0.25 \cdot \left(\left(-\color{blue}{\frac{M}{d} \cdot D}\right) \cdot \frac{M \cdot h}{-\frac{d}{D}}\right) \]

      distribute-neg-frac [=>]70.9

      \[ 0.25 \cdot \left(\left(-\frac{M}{d} \cdot D\right) \cdot \frac{M \cdot h}{\color{blue}{\frac{-d}{D}}}\right) \]

      associate-/r/ [=>]70.1

      \[ 0.25 \cdot \left(\left(-\frac{M}{d} \cdot D\right) \cdot \color{blue}{\left(\frac{M \cdot h}{-d} \cdot D\right)}\right) \]

      associate-/l* [=>]70.5

      \[ 0.25 \cdot \left(\left(-\frac{M}{d} \cdot D\right) \cdot \left(\color{blue}{\frac{M}{\frac{-d}{h}}} \cdot D\right)\right) \]
    9. Taylor expanded in M around 0 45.4%

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    10. Simplified72.6%

      \[\leadsto 0.25 \cdot \color{blue}{\left(h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)} \]
      Proof

      [Start]45.4

      \[ 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}} \]

      *-commutative [<=]45.4

      \[ 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left({M}^{2} \cdot h\right)}}{{d}^{2}} \]

      associate-*r* [=>]46.2

      \[ 0.25 \cdot \frac{\color{blue}{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}}{{d}^{2}} \]

      *-commutative [=>]46.2

      \[ 0.25 \cdot \frac{\color{blue}{\left({M}^{2} \cdot {D}^{2}\right)} \cdot h}{{d}^{2}} \]

      unpow2 [=>]46.2

      \[ 0.25 \cdot \frac{\left(\color{blue}{\left(M \cdot M\right)} \cdot {D}^{2}\right) \cdot h}{{d}^{2}} \]

      unpow2 [=>]46.2

      \[ 0.25 \cdot \frac{\left(\left(M \cdot M\right) \cdot \color{blue}{\left(D \cdot D\right)}\right) \cdot h}{{d}^{2}} \]

      swap-sqr [<=]58.7

      \[ 0.25 \cdot \frac{\color{blue}{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)} \cdot h}{{d}^{2}} \]

      unpow2 [=>]58.7

      \[ 0.25 \cdot \frac{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot h}{\color{blue}{d \cdot d}} \]

      associate-/l* [=>]58.0

      \[ 0.25 \cdot \color{blue}{\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\frac{d \cdot d}{h}}} \]

      associate-*r/ [<=]62.9

      \[ 0.25 \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\color{blue}{d \cdot \frac{d}{h}}} \]

      times-frac [=>]74.1

      \[ 0.25 \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \frac{M \cdot D}{\frac{d}{h}}\right)} \]

      associate-/l* [=>]71.7

      \[ 0.25 \cdot \left(\color{blue}{\frac{M}{\frac{d}{D}}} \cdot \frac{M \cdot D}{\frac{d}{h}}\right) \]

      associate-/r/ [=>]75.0

      \[ 0.25 \cdot \left(\frac{M}{\frac{d}{D}} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot h\right)}\right) \]

      associate-/l* [=>]77.5

      \[ 0.25 \cdot \left(\frac{M}{\frac{d}{D}} \cdot \left(\color{blue}{\frac{M}{\frac{d}{D}}} \cdot h\right)\right) \]

      associate-*r* [=>]72.4

      \[ 0.25 \cdot \color{blue}{\left(\left(\frac{M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}\right) \cdot h\right)} \]

      unpow2 [<=]72.4

      \[ 0.25 \cdot \left(\color{blue}{{\left(\frac{M}{\frac{d}{D}}\right)}^{2}} \cdot h\right) \]

      *-commutative [=>]72.4

      \[ 0.25 \cdot \color{blue}{\left(h \cdot {\left(\frac{M}{\frac{d}{D}}\right)}^{2}\right)} \]

      associate-/l* [<=]72.5

      \[ 0.25 \cdot \left(h \cdot {\color{blue}{\left(\frac{M \cdot D}{d}\right)}}^{2}\right) \]

      *-commutative [<=]72.5

      \[ 0.25 \cdot \left(h \cdot {\left(\frac{\color{blue}{D \cdot M}}{d}\right)}^{2}\right) \]

      associate-*l/ [<=]72.6

      \[ 0.25 \cdot \left(h \cdot {\color{blue}{\left(\frac{D}{d} \cdot M\right)}}^{2}\right) \]

      *-commutative [=>]72.6

      \[ 0.25 \cdot \left(h \cdot {\color{blue}{\left(M \cdot \frac{D}{d}\right)}}^{2}\right) \]

    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.0

    1. Initial program 25.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) \]
    2. Taylor expanded in c0 around -inf 11.0%

      \[\leadsto \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)} + \color{blue}{-1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}}\right) \]
    3. Simplified4.2%

      \[\leadsto \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)} + \color{blue}{\left(-\frac{\frac{c0}{\frac{D}{d} \cdot \frac{D}{d}}}{w \cdot h}\right)}\right) \]
      Proof

      [Start]11.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)} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \]

      mul-1-neg [=>]11.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)} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right) \]

      associate-/r* [=>]5.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\color{blue}{\frac{\frac{{d}^{2} \cdot c0}{{D}^{2}}}{w \cdot h}}\right)\right) \]

      *-commutative [=>]5.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\frac{\frac{\color{blue}{c0 \cdot {d}^{2}}}{{D}^{2}}}{w \cdot h}\right)\right) \]

      unpow2 [=>]5.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\frac{\frac{c0 \cdot \color{blue}{\left(d \cdot d\right)}}{{D}^{2}}}{w \cdot h}\right)\right) \]

      unpow2 [=>]5.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\frac{\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{D \cdot D}}}{w \cdot h}\right)\right) \]

      associate-/l* [=>]4.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)} + \left(-\frac{\color{blue}{\frac{c0}{\frac{D \cdot D}{d \cdot d}}}}{w \cdot h}\right)\right) \]

      times-frac [=>]4.2

      \[ \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)} + \left(-\frac{\frac{c0}{\color{blue}{\frac{D}{d} \cdot \frac{D}{d}}}}{w \cdot h}\right)\right) \]
    4. Applied egg-rr28.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{D}{d}\right)}^{-2}, {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right)\right)} - 1\right)} \]
      Proof

      [Start]4.2

      \[ \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)} + \left(-\frac{\frac{c0}{\frac{D}{d} \cdot \frac{D}{d}}}{w \cdot h}\right)\right) \]

      expm1-log1p-u [=>]4.1

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\frac{\frac{c0}{\frac{D}{d} \cdot \frac{D}{d}}}{w \cdot h}\right)\right)\right)} \]

      expm1-udef [=>]3.7

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \left(-\frac{\frac{c0}{\frac{D}{d} \cdot \frac{D}{d}}}{w \cdot h}\right)\right)} - 1\right)} \]
    5. Simplified35.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} \cdot \left(c0 + c0\right)\right)} \]
      Proof

      [Start]28.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(e^{\mathsf{log1p}\left(\mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{D}{d}\right)}^{-2}, {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right)\right)} - 1\right) \]

      expm1-def [=>]36.7

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{D}{d}\right)}^{-2}, {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right)\right)\right)} \]

      expm1-log1p [=>]39.0

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{D}{d}\right)}^{-2}, {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right)} \]

      fma-udef [=>]39.0

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{D}{d}\right)}^{-2} + {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right)} \]

      associate-*l/ [=>]33.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot {\left(\frac{D}{d}\right)}^{-2}}{w \cdot h}} + {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right) \]

      associate-*r/ [<=]34.5

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{c0 \cdot \frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h}} + {\left(\frac{D}{d}\right)}^{-2} \cdot \frac{c0}{w \cdot h}\right) \]

      associate-*r/ [=>]29.9

      \[ \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} + \color{blue}{\frac{{\left(\frac{D}{d}\right)}^{-2} \cdot c0}{w \cdot h}}\right) \]

      *-commutative [<=]29.9

      \[ \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} + \frac{\color{blue}{c0 \cdot {\left(\frac{D}{d}\right)}^{-2}}}{w \cdot h}\right) \]

      associate-*r/ [<=]35.2

      \[ \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} + \color{blue}{c0 \cdot \frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h}}\right) \]

      distribute-rgt-out [=>]35.2

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} \cdot \left(c0 + c0\right)\right)} \]
    6. Applied egg-rr43.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \frac{d}{D}\right)} \cdot \left(c0 + c0\right)\right) \]
      Proof

      [Start]35.2

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{{\left(\frac{D}{d}\right)}^{-2}}{w \cdot h} \cdot \left(c0 + c0\right)\right) \]

      add-sqr-sqrt [=>]35.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\color{blue}{\sqrt{{\left(\frac{D}{d}\right)}^{-2}} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}}}{w \cdot h} \cdot \left(c0 + c0\right)\right) \]

      associate-/l* [=>]35.2

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{\sqrt{{\left(\frac{D}{d}\right)}^{-2}}}{\frac{w \cdot h}{\sqrt{{\left(\frac{D}{d}\right)}^{-2}}}}} \cdot \left(c0 + c0\right)\right) \]

      associate-/r/ [=>]35.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(\frac{\sqrt{{\left(\frac{D}{d}\right)}^{-2}}}{w \cdot h} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right)} \cdot \left(c0 + c0\right)\right) \]

      sqrt-pow1 [=>]15.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{\color{blue}{{\left(\frac{D}{d}\right)}^{\left(\frac{-2}{2}\right)}}}{w \cdot h} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right) \cdot \left(c0 + c0\right)\right) \]

      metadata-eval [=>]15.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{{\left(\frac{D}{d}\right)}^{\color{blue}{-1}}}{w \cdot h} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right) \cdot \left(c0 + c0\right)\right) \]

      unpow-1 [=>]15.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{\color{blue}{\frac{1}{\frac{D}{d}}}}{w \cdot h} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right) \cdot \left(c0 + c0\right)\right) \]

      clear-num [<=]15.8

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{\color{blue}{\frac{d}{D}}}{w \cdot h} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right) \cdot \left(c0 + c0\right)\right) \]

      associate-/l/ [=>]15.8

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\color{blue}{\frac{d}{\left(w \cdot h\right) \cdot D}} \cdot \sqrt{{\left(\frac{D}{d}\right)}^{-2}}\right) \cdot \left(c0 + c0\right)\right) \]

      sqrt-pow1 [=>]43.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \color{blue}{{\left(\frac{D}{d}\right)}^{\left(\frac{-2}{2}\right)}}\right) \cdot \left(c0 + c0\right)\right) \]

      metadata-eval [=>]43.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot {\left(\frac{D}{d}\right)}^{\color{blue}{-1}}\right) \cdot \left(c0 + c0\right)\right) \]

      unpow-1 [=>]43.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \color{blue}{\frac{1}{\frac{D}{d}}}\right) \cdot \left(c0 + c0\right)\right) \]

      clear-num [<=]43.2

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \color{blue}{\frac{d}{D}}\right) \cdot \left(c0 + c0\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq 0 \lor \neg \left(\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) \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\left(\frac{d}{\left(w \cdot h\right) \cdot D} \cdot \frac{d}{D}\right) \cdot \left(c0 + c0\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy63.7%
Cost1489
\[\begin{array}{l} \mathbf{if}\;M \leq -1.52 \cdot 10^{+144}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \frac{\left(h \cdot M\right) \cdot \left(D \cdot M\right)}{d}\right)\\ \mathbf{elif}\;M \leq -1 \cdot 10^{-242} \lor \neg \left(M \leq 2 \cdot 10^{-82}\right) \land M \leq 2.15 \cdot 10^{+156}:\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot M\right) \cdot \frac{M}{\frac{d}{D} \cdot \frac{d}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \left(D \cdot \frac{h}{d}\right)\right)}{d}\\ \end{array} \]
Alternative 2
Accuracy58.9%
Cost1480
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 5 \cdot 10^{-212}:\\ \;\;\;\;0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(M \cdot \left(h \cdot M\right)\right)\right)\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+225}:\\ \;\;\;\;0.25 \cdot \left(\frac{M}{d \cdot d} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot M\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{\frac{d}{D}}\right)\\ \end{array} \]
Alternative 3
Accuracy61.6%
Cost1357
\[\begin{array}{l} \mathbf{if}\;M \leq -1.8 \cdot 10^{+144}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \frac{\left(h \cdot M\right) \cdot \left(D \cdot M\right)}{d}\right)\\ \mathbf{elif}\;M \leq -2 \cdot 10^{-303} \lor \neg \left(M \leq 7.5 \cdot 10^{-83}\right):\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot M\right) \cdot \frac{M}{\frac{d}{D} \cdot \frac{d}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d \cdot \frac{d}{h}}\\ \end{array} \]
Alternative 4
Accuracy68.8%
Cost1225
\[\begin{array}{l} \mathbf{if}\;w \leq -9 \cdot 10^{-156} \lor \neg \left(w \leq 3.3 \cdot 10^{-305}\right):\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{D}{d}}{\frac{\frac{d}{D}}{h \cdot M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \left(D \cdot \frac{h}{d}\right)\right)}{d}\\ \end{array} \]
Alternative 5
Accuracy68.2%
Cost1225
\[\begin{array}{l} \mathbf{if}\;w \leq -3.6 \cdot 10^{-97} \lor \neg \left(w \leq 7.5\right):\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{D}{d}}{\frac{\frac{d}{D}}{h \cdot M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot \frac{M}{d}\right) \cdot \left(M \cdot \frac{D}{\frac{d}{h}}\right)\right)\\ \end{array} \]
Alternative 6
Accuracy62.8%
Cost1092
\[\begin{array}{l} \mathbf{if}\;M \leq -1.1 \cdot 10^{+141}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \frac{\left(h \cdot M\right) \cdot \left(D \cdot M\right)}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot M\right) \cdot \frac{M}{\frac{d}{D} \cdot \frac{d}{D}}\right)\\ \end{array} \]
Alternative 7
Accuracy59.1%
Cost960
\[0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(M \cdot \left(h \cdot M\right)\right)\right) \]
Alternative 8
Accuracy62.7%
Cost960
\[0.25 \cdot \left(\left(h \cdot M\right) \cdot \frac{M}{\frac{d}{D} \cdot \frac{d}{D}}\right) \]
Alternative 9
Accuracy49.5%
Cost64
\[0 \]

Error

Reproduce?

herbie shell --seed 2023133 
(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))))))