Average Error: 59.5 → 17.5
Time: 34.3s
Precision: binary64
Cost: 43020
\[\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} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\ t_2 := \frac{\frac{d}{D}}{\frac{w}{c0}} \cdot \frac{d}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\\ t_3 := M \cdot \frac{D}{d}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot t_3}}\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot {\left(\sqrt[3]{M \cdot t_3}\right)}^{3}\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_0 (sqrt (- (* t_0 t_0) (* M M))))))
        (t_2 (* (/ (/ d D) (/ w c0)) (/ d (* D (* h (/ w c0))))))
        (t_3 (* M (/ D d))))
   (if (<= t_1 -2e-212)
     t_2
     (if (<= t_1 0.0)
       (* 0.25 (* h (/ M (/ d (* D t_3)))))
       (if (<= t_1 INFINITY)
         t_2
         (* 0.25 (* h (* (/ D d) (pow (cbrt (* M t_3)) 3.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 t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	double t_2 = ((d / D) / (w / c0)) * (d / (D * (h * (w / c0))));
	double t_3 = M * (D / d);
	double tmp;
	if (t_1 <= -2e-212) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = 0.25 * (h * (M / (d / (D * t_3))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = 0.25 * (h * ((D / d) * pow(cbrt((M * t_3)), 3.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 t_1 = (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
	double t_2 = ((d / D) / (w / c0)) * (d / (D * (h * (w / c0))));
	double t_3 = M * (D / d);
	double tmp;
	if (t_1 <= -2e-212) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = 0.25 * (h * (M / (d / (D * t_3))));
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = 0.25 * (h * ((D / d) * Math.pow(Math.cbrt((M * t_3)), 3.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)))
	t_1 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
	t_2 = Float64(Float64(Float64(d / D) / Float64(w / c0)) * Float64(d / Float64(D * Float64(h * Float64(w / c0)))))
	t_3 = Float64(M * Float64(D / d))
	tmp = 0.0
	if (t_1 <= -2e-212)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(0.25 * Float64(h * Float64(M / Float64(d / Float64(D * t_3)))));
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(0.25 * Float64(h * Float64(Float64(D / d) * (cbrt(Float64(M * t_3)) ^ 3.0))));
	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[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(N[(d / D), $MachinePrecision] / N[(w / c0), $MachinePrecision]), $MachinePrecision] * N[(d / N[(D * N[(h * N[(w / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-212], t$95$2, If[LessEqual[t$95$1, 0.0], N[(0.25 * N[(h * N[(M / N[(d / N[(D * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(0.25 * N[(h * N[(N[(D / d), $MachinePrecision] * N[Power[N[Power[N[(M * t$95$3), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\
t_2 := \frac{\frac{d}{D}}{\frac{w}{c0}} \cdot \frac{d}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\\
t_3 := M \cdot \frac{D}{d}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-212}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot t_3}}\right)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot {\left(\sqrt[3]{M \cdot t_3}\right)}^{3}\right)\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 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))))) < -1.99999999999999991e-212 or 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 48.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) \]
    2. Taylor expanded in c0 around inf 42.3

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    3. Simplified42.4

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

      [Start]42.3

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

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

      *-commutative [=>]42.3

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

      unpow2 [=>]42.3

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

      *-commutative [=>]42.3

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

      unpow2 [=>]42.3

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

      associate-*r* [=>]38.4

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

      associate-*r* [<=]38.6

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

      *-commutative [<=]38.6

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

      associate-*r/ [<=]38.6

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

      associate-*r/ [<=]41.2

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

      *-commutative [=>]41.2

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

      associate-*r* [=>]40.8

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

      associate-*r* [<=]43.9

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

      associate-/l/ [<=]45.0

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

      associate-/r* [<=]43.9

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

      times-frac [=>]40.6

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

      associate-/r* [=>]42.4

      \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(c0 \cdot \left(\frac{d}{D \cdot D} \cdot \color{blue}{\frac{\frac{d}{w}}{h}}\right)\right)\right) \]
    4. Taylor expanded in c0 around 0 54.8

      \[\leadsto \color{blue}{\frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}} \]
    5. Simplified53.3

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

      [Start]54.8

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

      times-frac [=>]55.1

      \[ \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]

      unpow2 [=>]55.1

      \[ \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]

      unpow2 [=>]55.1

      \[ \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]

      unpow2 [=>]55.1

      \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]

      unpow2 [=>]55.1

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

      associate-*l* [=>]53.3

      \[ \frac{d \cdot d}{D \cdot D} \cdot \frac{c0 \cdot c0}{\color{blue}{w \cdot \left(w \cdot h\right)}} \]
    6. Applied egg-rr38.5

      \[\leadsto \color{blue}{\frac{\frac{d}{D} \cdot d}{\left(\frac{w}{c0} \cdot \frac{w \cdot h}{c0}\right) \cdot D}} \]
    7. Applied egg-rr22.7

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

    if -1.99999999999999991e-212 < (*.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

    1. Initial program 30.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) \]
    2. Simplified53.3

      \[\leadsto \color{blue}{\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}\right)}^{3}\right), -M \cdot M\right)}\right)} \]
      Proof

      [Start]30.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/ [<=]37.4

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

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

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

      times-frac [=>]48.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 [=>]48.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{\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 [=>]55.3

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

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

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

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

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

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

      \[ \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) \]
    3. Taylor expanded in c0 around -inf 29.3

      \[\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. Simplified24.9

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

      [Start]29.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 [=>]29.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)} \]

      *-commutative [=>]29.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{\left(w \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}}}{{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) \]

      *-commutative [<=]29.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\left(w \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}\right) \cdot {D}^{2}}{{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-/l* [=>]29.0

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{w \cdot \left(h \cdot {M}^{2}\right)}{\frac{{d}^{2} \cdot c0}{{D}^{2}}}}, -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 [=>]29.0

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{\frac{{d}^{2} \cdot c0}{{D}^{2}}}, -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* [=>]32.0

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\frac{{d}^{2}}{\frac{{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-/r/ [=>]28.6

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\frac{{d}^{2}}{{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) \]

      unpow2 [=>]28.6

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{\color{blue}{d \cdot d}}{{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) \]

      unpow2 [=>]28.6

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d \cdot d}{\color{blue}{D \cdot D}} \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 [=>]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \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) \]

      unpow2 [<=]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{{\left(\frac{d}{D}\right)}^{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) \]

      mul-1-neg [=>]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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 [=>]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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 [=>]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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 [=>]26.5

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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 [=>]26.5

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

      mul0-lft [=>]24.9

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

      metadata-eval [=>]24.9

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot c0}, c0 \cdot \color{blue}{0}\right) \]
    5. Taylor expanded in c0 around 0 24.6

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

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

      [Start]24.6

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

      *-commutative [<=]24.6

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

      associate-/l* [=>]24.7

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

      unpow2 [=>]24.7

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

      unpow2 [=>]24.7

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

      associate-/r/ [=>]24.5

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

      unpow2 [=>]24.5

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

      times-frac [=>]22.2

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

      *-commutative [=>]22.2

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

      associate-*l* [=>]22.1

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

      associate-*r* [=>]19.6

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

      \[\leadsto 0.25 \cdot \left(h \cdot \color{blue}{\frac{M}{\frac{d}{\left(M \cdot \frac{D}{d}\right) \cdot D}}}\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)))))

    1. Initial program 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) \]
    2. Simplified63.8

      \[\leadsto \color{blue}{\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}\right)}^{3}\right), -M \cdot M\right)}\right)} \]
      Proof

      [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.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(\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.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(\frac{d}{D} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{3}}\right), -M \cdot M\right)}\right) \]
    3. Taylor expanded in c0 around -inf 62.8

      \[\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. Simplified34.4

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

      [Start]62.8

      \[ \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.8

      \[ \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)} \]

      *-commutative [=>]62.8

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\color{blue}{\left(w \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}}}{{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) \]

      *-commutative [<=]62.8

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{\left(w \cdot \color{blue}{\left(h \cdot {M}^{2}\right)}\right) \cdot {D}^{2}}{{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-/l* [=>]62.9

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\frac{w \cdot \left(h \cdot {M}^{2}\right)}{\frac{{d}^{2} \cdot c0}{{D}^{2}}}}, -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.9

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{\frac{{d}^{2} \cdot c0}{{D}^{2}}}, -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{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\frac{{d}^{2}}{\frac{{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-/r/ [=>]62.7

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\frac{{d}^{2}}{{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) \]

      unpow2 [=>]62.7

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{\color{blue}{d \cdot d}}{{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) \]

      unpow2 [=>]62.7

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d \cdot d}{\color{blue}{D \cdot D}} \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.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \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) \]

      unpow2 [<=]62.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{{\left(\frac{d}{D}\right)}^{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) \]

      mul-1-neg [=>]62.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot 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{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot c0}, c0 \cdot \left(-\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\right) \]

      mul0-lft [=>]34.4

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

      metadata-eval [=>]34.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2} \cdot c0}, c0 \cdot \color{blue}{0}\right) \]
    5. Taylor expanded in c0 around 0 34.6

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

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

      [Start]34.6

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

      *-commutative [<=]34.6

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

      associate-/l* [=>]34.6

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

      unpow2 [=>]34.6

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

      unpow2 [=>]34.6

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

      associate-/r/ [=>]34.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 [=>]34.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) \]

      times-frac [=>]25.7

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

      *-commutative [=>]25.7

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

      associate-*l* [=>]24.9

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

      associate-*r* [=>]23.2

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

      \[\leadsto 0.25 \cdot \left(h \cdot \left(\color{blue}{{\left(\sqrt[3]{M \cdot \left(M \cdot \frac{D}{d}\right)}\right)}^{3}} \cdot \frac{D}{d}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification17.5

    \[\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 -2 \cdot 10^{-212}:\\ \;\;\;\;\frac{\frac{d}{D}}{\frac{w}{c0}} \cdot \frac{d}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\\ \mathbf{elif}\;\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:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot \left(M \cdot \frac{D}{d}\right)}}\right)\\ \mathbf{elif}\;\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:\\ \;\;\;\;\frac{\frac{d}{D}}{\frac{w}{c0}} \cdot \frac{d}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot {\left(\sqrt[3]{M \cdot \left(M \cdot \frac{D}{d}\right)}\right)}^{3}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error17.9
Cost30284
\[\begin{array}{l} t_0 := \frac{\frac{d}{D}}{\frac{w}{c0}} \cdot \frac{d}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\\ 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 -2 \cdot 10^{-212}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot \left(M \cdot \frac{D}{d}\right)}}\right)\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\frac{d}{D \cdot M}}\right)\right)\\ \end{array} \]
Alternative 2
Error23.7
Cost1620
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := 0.25 \cdot \frac{h \cdot M}{\frac{\frac{d}{D}}{t_0}}\\ \mathbf{if}\;h \leq -1.6 \cdot 10^{+148}:\\ \;\;\;\;\frac{d}{D} \cdot \left(d \cdot \frac{\frac{c0}{w}}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\right)\\ \mathbf{elif}\;h \leq -9.5 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -5.6 \cdot 10^{-175}:\\ \;\;\;\;\frac{d}{w \cdot h} \cdot \frac{c0}{\frac{D}{d} \cdot \left(w \cdot \frac{D}{c0}\right)}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-219}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(h \cdot \left(M \cdot t_0\right)\right)}{d}\\ \mathbf{elif}\;h \leq 4 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(h \cdot 0.25\right) \cdot \left(M \cdot \left(D \cdot t_0\right)\right)}{d}\\ \end{array} \]
Alternative 3
Error21.1
Cost1480
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{-98}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M \cdot t_0}{\frac{d}{D}}\right)\\ \mathbf{elif}\;D \cdot D \leq 10^{+45}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{M} \cdot \frac{d}{h \cdot M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot t_0}}\right)\\ \end{array} \]
Alternative 4
Error20.6
Cost1480
\[\begin{array}{l} t_0 := M \cdot \left(M \cdot \frac{D}{d}\right)\\ \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{-98}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{t_0}{\frac{d}{D}}\right)\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+99}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{M} \cdot \frac{d}{h \cdot M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{t_0}{\frac{\frac{d}{D}}{h}}\\ \end{array} \]
Alternative 5
Error28.5
Cost1225
\[\begin{array}{l} \mathbf{if}\;D \leq -1.6 \cdot 10^{-127} \lor \neg \left(D \leq 6.2 \cdot 10^{-92}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 6
Error21.3
Cost1225
\[\begin{array}{l} \mathbf{if}\;h \leq -1.02 \cdot 10^{+153} \lor \neg \left(h \leq -6 \cdot 10^{-300}\right):\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\frac{d}{D \cdot M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot M}{\frac{\frac{d}{D}}{M \cdot \frac{D}{d}}}\\ \end{array} \]
Alternative 7
Error21.0
Cost1224
\[\begin{array}{l} \mathbf{if}\;h \leq -5 \cdot 10^{+120}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot \frac{D}{d}}{\frac{\frac{d}{M}}{D \cdot M}}\\ \mathbf{elif}\;h \leq -6 \cdot 10^{-300}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot M}{\frac{\frac{d}{D}}{M \cdot \frac{D}{d}}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\frac{d}{D \cdot M}}\right)\right)\\ \end{array} \]
Alternative 8
Error20.7
Cost1224
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;h \leq -6.2 \cdot 10^{+122}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot \frac{D}{d}}{\frac{\frac{d}{M}}{D \cdot M}}\\ \mathbf{elif}\;h \leq 4.5 \cdot 10^{-100}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot M}{\frac{\frac{d}{D}}{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(h \cdot 0.25\right) \cdot \left(M \cdot \left(D \cdot t_0\right)\right)}{d}\\ \end{array} \]
Alternative 9
Error22.9
Cost1224
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;h \leq -1.6 \cdot 10^{+148}:\\ \;\;\;\;\frac{d}{D} \cdot \left(d \cdot \frac{\frac{c0}{w}}{D \cdot \left(h \cdot \frac{w}{c0}\right)}\right)\\ \mathbf{elif}\;h \leq 8 \cdot 10^{-96}:\\ \;\;\;\;0.25 \cdot \frac{h \cdot M}{\frac{\frac{d}{D}}{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(h \cdot 0.25\right) \cdot \left(M \cdot \left(D \cdot t_0\right)\right)}{d}\\ \end{array} \]
Alternative 10
Error26.7
Cost1220
\[\begin{array}{l} \mathbf{if}\;M \cdot M \leq \infty:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 11
Error21.5
Cost1220
\[\begin{array}{l} \mathbf{if}\;M \cdot M \leq 0:\\ \;\;\;\;0.25 \cdot \left(h \cdot \frac{M}{\frac{d}{D \cdot \left(M \cdot \frac{D}{d}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\frac{d}{D \cdot M}}\right)\right)\\ \end{array} \]
Alternative 12
Error21.8
Cost960
\[0.25 \cdot \left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\frac{d}{D \cdot M}}\right)\right) \]
Alternative 13
Error32.0
Cost64
\[0 \]

Error

Reproduce

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