?

Average Accuracy: 6.8% → 73.7%
Time: 40.1s
Precision: binary64
Cost: 55949

?

\[\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)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-133}:\\ \;\;\;\;\frac{1}{\frac{h}{{\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}}}\\ \mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{2}{\frac{w}{c0 \cdot 0.5}}} \cdot \frac{d}{\frac{D \cdot \sqrt{h}}{\sqrt{\frac{c0}{w}}}}\right)}^{2}\\ \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)))))))
   (if (<= t_1 -1e-133)
     (/ 1.0 (/ h (pow (* (/ d D) (/ c0 w)) 2.0)))
     (if (or (<= t_1 0.0) (not (<= t_1 INFINITY)))
       (* 0.25 (* (/ (* h M) (/ d D)) (* D (/ M d))))
       (pow
        (*
         (sqrt (/ 2.0 (/ w (* c0 0.5))))
         (/ d (/ (* D (sqrt h)) (sqrt (/ c0 w)))))
        2.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	double tmp;
	if (t_1 <= -1e-133) {
		tmp = 1.0 / (h / pow(((d / D) * (c0 / w)), 2.0));
	} else if ((t_1 <= 0.0) || !(t_1 <= ((double) INFINITY))) {
		tmp = 0.25 * (((h * M) / (d / D)) * (D * (M / d)));
	} else {
		tmp = pow((sqrt((2.0 / (w / (c0 * 0.5)))) * (d / ((D * sqrt(h)) / sqrt((c0 / w))))), 2.0);
	}
	return tmp;
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + Math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (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 tmp;
	if (t_1 <= -1e-133) {
		tmp = 1.0 / (h / Math.pow(((d / D) * (c0 / w)), 2.0));
	} else if ((t_1 <= 0.0) || !(t_1 <= Double.POSITIVE_INFINITY)) {
		tmp = 0.25 * (((h * M) / (d / D)) * (D * (M / d)));
	} else {
		tmp = Math.pow((Math.sqrt((2.0 / (w / (c0 * 0.5)))) * (d / ((D * Math.sqrt(h)) / Math.sqrt((c0 / w))))), 2.0);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))))
def code(c0, w, h, D, d, M):
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D))
	t_1 = (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
	tmp = 0
	if t_1 <= -1e-133:
		tmp = 1.0 / (h / math.pow(((d / D) * (c0 / w)), 2.0))
	elif (t_1 <= 0.0) or not (t_1 <= math.inf):
		tmp = 0.25 * (((h * M) / (d / D)) * (D * (M / d)))
	else:
		tmp = math.pow((math.sqrt((2.0 / (w / (c0 * 0.5)))) * (d / ((D * math.sqrt(h)) / math.sqrt((c0 / w))))), 2.0)
	return tmp
function code(c0, w, h, D, d, M)
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M)))))
end
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(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)))))
	tmp = 0.0
	if (t_1 <= -1e-133)
		tmp = Float64(1.0 / Float64(h / (Float64(Float64(d / D) * Float64(c0 / w)) ^ 2.0)));
	elseif ((t_1 <= 0.0) || !(t_1 <= Inf))
		tmp = Float64(0.25 * Float64(Float64(Float64(h * M) / Float64(d / D)) * Float64(D * Float64(M / d))));
	else
		tmp = Float64(sqrt(Float64(2.0 / Float64(w / Float64(c0 * 0.5)))) * Float64(d / Float64(Float64(D * sqrt(h)) / sqrt(Float64(c0 / w))))) ^ 2.0;
	end
	return tmp
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	tmp = 0.0;
	if (t_1 <= -1e-133)
		tmp = 1.0 / (h / (((d / D) * (c0 / w)) ^ 2.0));
	elseif ((t_1 <= 0.0) || ~((t_1 <= Inf)))
		tmp = 0.25 * (((h * M) / (d / D)) * (D * (M / d)));
	else
		tmp = (sqrt((2.0 / (w / (c0 * 0.5)))) * (d / ((D * sqrt(h)) / sqrt((c0 / w))))) ^ 2.0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(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]}, If[LessEqual[t$95$1, -1e-133], N[(1.0 / N[(h / N[Power[N[(N[(d / D), $MachinePrecision] * N[(c0 / w), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]], N[(0.25 * N[(N[(N[(h * M), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(D * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[N[(2.0 / N[(w / N[(c0 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(d / N[(N[(D * N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(c0 / w), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-133}:\\
\;\;\;\;\frac{1}{\frac{h}{{\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}}}\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\frac{2}{\frac{w}{c0 \cdot 0.5}}} \cdot \frac{d}{\frac{D \cdot \sqrt{h}}{\sqrt{\frac{c0}{w}}}}\right)}^{2}\\


\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.0000000000000001e-133

    1. Initial program 19.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. Simplified24.6%

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

      [Start]19.6

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

      times-frac [=>]16.4

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

      fma-def [=>]16.4

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

      associate-/r* [=>]16.4

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

      times-frac [=>]16.4

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

      difference-of-squares [=>]16.4

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

      sub-neg [=>]16.4

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

      \[\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)} \]
    4. Simplified35.1%

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

      [Start]29.4

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

      associate-/l/ [<=]29.1

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

      associate-/r* [=>]29.2

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

      unpow2 [=>]29.2

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

      associate-*r/ [<=]30.6

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

      associate-/l/ [=>]30.6

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

      unpow2 [=>]30.6

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

      associate-/l* [=>]31.4

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

      associate-*l* [=>]35.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{d \cdot d}{\frac{\color{blue}{D \cdot \left(D \cdot h\right)}}{\frac{c0}{w}}}\right) \]
    5. Applied egg-rr2.0%

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

      [Start]35.1

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

      expm1-log1p-u [=>]8.3

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

      expm1-udef [=>]2.5

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

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

      [Start]2.0

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

      expm1-def [=>]10.5

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

      expm1-log1p [=>]40.1

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

      associate-*r* [=>]54.7

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

      *-commutative [=>]54.7

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

      associate-/r* [=>]56.8

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

      associate-*l/ [=>]55.9

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

      associate-/r/ [=>]55.9

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

      associate-*l/ [=>]56.0

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

      *-commutative [=>]56.0

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

      associate-*r* [=>]56.0

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

      metadata-eval [=>]56.0

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

      associate-*r/ [<=]56.0

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

      *-lft-identity [=>]56.0

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

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

      [Start]56.0

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

      associate-*r/ [=>]51.5

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

      clear-num [=>]51.5

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

      frac-times [=>]41.1

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

      associate-*l/ [=>]43.3

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

      *-commutative [=>]43.3

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

      associate-*r* [<=]47.8

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

      *-commutative [<=]47.8

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

      associate-/r/ [=>]48.1

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

      pow2 [=>]48.1

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

      *-commutative [=>]48.1

      \[ \frac{1}{\frac{w}{{\color{blue}{\left(\frac{d}{D} \cdot c0\right)}}^{2}} \cdot \left(h \cdot w\right)} \]
    8. Simplified60.4%

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

      [Start]48.1

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

      associate-*l/ [=>]44.8

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

      *-commutative [=>]44.8

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

      associate-*l* [=>]36.9

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

      associate-/l* [=>]36.4

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

      unpow2 [=>]36.4

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

      swap-sqr [=>]17.5

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

      unpow2 [<=]17.5

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

      associate-*l* [<=]21.4

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

      associate-/l/ [<=]25.6

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

      associate-*r/ [<=]31.4

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

      associate-*l/ [<=]32.6

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

      *-commutative [=>]32.6

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

      associate-*l/ [<=]35.4

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

      unpow2 [=>]35.4

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

      associate-*r* [=>]54.6

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

      *-commutative [=>]54.6

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

      associate-*r* [<=]60.4

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

      unpow2 [<=]60.4

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

    if -1.0000000000000001e-133 < (*.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 4.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)} + \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. Simplified1.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]4.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)} + \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.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 [=>]3.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 [=>]2.8

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

      \[\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. Simplified50.5%

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

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

      \[ \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. Applied egg-rr50.5%

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

      [Start]50.5

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

      associate-/r/ [<=]56.8

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

      mul0-rgt [=>]56.8

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

      fma-udef [=>]56.8

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

      +-rgt-identity [=>]56.8

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

      clear-num [=>]56.8

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

      un-div-inv [=>]56.8

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

      associate-/r/ [=>]56.8

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

      *-commutative [=>]56.8

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

      div-inv [=>]56.8

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

      clear-num [<=]56.8

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

      *-commutative [=>]56.8

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

      associate-*r* [=>]53.9

      \[ \frac{c0}{\frac{w \cdot 2}{0.5} \cdot \left(c0 \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{\color{blue}{\left(\left(M \cdot M\right) \cdot h\right)} \cdot w}\right)} \]
    6. Simplified56.8%

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

      [Start]50.5

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

      associate-/l* [=>]50.5

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

      metadata-eval [=>]50.5

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

      associate-*r* [=>]53.9

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

      associate-*r* [<=]56.8

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

      *-commutative [<=]56.8

      \[ \frac{c0}{\frac{w}{0.25} \cdot \left(c0 \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{\color{blue}{w \cdot \left(M \cdot \left(M \cdot h\right)\right)}}\right)} \]
    7. Taylor expanded in c0 around 0 48.9%

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

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

      [Start]48.9

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

      *-commutative [=>]48.9

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

      unpow2 [=>]48.9

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

      associate-/l* [=>]48.8

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

      unpow2 [=>]48.8

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

      unpow2 [=>]48.8

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

      times-frac [=>]60.7

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

      unpow2 [<=]60.7

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

      *-commutative [=>]60.7

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

      associate-*l* [=>]65.4

      \[ 0.25 \cdot \frac{\color{blue}{M \cdot \left(M \cdot h\right)}}{{\left(\frac{d}{D}\right)}^{2}} \]
    9. Applied egg-rr74.6%

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

      [Start]65.4

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

      *-commutative [=>]65.4

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

      unpow2 [=>]65.4

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

      times-frac [=>]77.3

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

      associate-/r/ [=>]74.6

      \[ 0.25 \cdot \left(\frac{M \cdot h}{\frac{d}{D}} \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\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 23.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)} + \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. Simplified27.3%

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

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

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

      fma-def [=>]21.0

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

      associate-/r* [=>]21.0

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

      times-frac [=>]20.9

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

      difference-of-squares [=>]20.9

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

      sub-neg [=>]20.9

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

      \[\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)} \]
    4. Simplified38.9%

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

      [Start]33.1

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

      associate-/l/ [<=]34.0

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

      associate-/r* [=>]34.4

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

      unpow2 [=>]34.4

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

      associate-*r/ [<=]35.2

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

      associate-/l/ [=>]35.1

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

      unpow2 [=>]35.1

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

      associate-/l* [=>]34.7

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

      associate-*l* [=>]38.9

      \[ \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{d \cdot d}{\frac{\color{blue}{D \cdot \left(D \cdot h\right)}}{\frac{c0}{w}}}\right) \]
    5. Applied egg-rr74.1%

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

      [Start]38.9

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

      add-sqr-sqrt [=>]38.6

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

      pow2 [=>]38.6

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

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

Alternatives

Alternative 1
Accuracy72.7%
Cost36237
\[\begin{array}{l} t_0 := {\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}\\ 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 -1 \cdot 10^{-133}:\\ \;\;\;\;\frac{1}{\frac{h}{t_0}}\\ \mathbf{elif}\;t_2 \leq 0 \lor \neg \left(t_2 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{h}\\ \end{array} \]
Alternative 2
Accuracy68.5%
Cost14233
\[\begin{array}{l} t_0 := 0.25 \cdot {\left(D \cdot \frac{M}{\frac{d}{\sqrt{h}}}\right)}^{2}\\ t_1 := 0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{if}\;h \leq 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq 2 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 4 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq 3 \cdot 10^{-14}:\\ \;\;\;\;\frac{{\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}}{h}\\ \mathbf{elif}\;h \leq 1.76 \cdot 10^{+174} \lor \neg \left(h \leq 7.5 \cdot 10^{+203}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{2}{\frac{w}{c0 \cdot 0.5}}}{\frac{D \cdot \left(h \cdot D\right)}{\frac{d}{\frac{w}{c0}}}}\\ \end{array} \]
Alternative 3
Accuracy65.1%
Cost7829
\[\begin{array}{l} t_0 := 0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{if}\;h \leq 7.2 \cdot 10^{-35}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 3 \cdot 10^{-14}:\\ \;\;\;\;\frac{{\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}}{h}\\ \mathbf{elif}\;h \leq 2.2 \cdot 10^{+152}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 5.8 \cdot 10^{+234} \lor \neg \left(h \leq 4.5 \cdot 10^{+291}\right):\\ \;\;\;\;\frac{d \cdot \frac{2}{\frac{w}{c0 \cdot 0.5}}}{\frac{D \cdot \left(h \cdot D\right)}{\frac{d}{\frac{w}{c0}}}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(M \cdot \frac{M}{\frac{{\left(\frac{d}{D}\right)}^{2}}{h}}\right)\\ \end{array} \]
Alternative 4
Accuracy64.2%
Cost7304
\[\begin{array}{l} t_0 := 0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{if}\;h \leq 7.2 \cdot 10^{-35}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 3 \cdot 10^{-14}:\\ \;\;\;\;\frac{{\left(\frac{d}{D} \cdot \frac{c0}{w}\right)}^{2}}{h}\\ \mathbf{elif}\;h \leq 3.7 \cdot 10^{+152}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{2}{\frac{w}{c0 \cdot 0.5}}}{\frac{D \cdot \left(h \cdot D\right)}{\frac{d}{\frac{w}{c0}}}}\\ \end{array} \]
Alternative 5
Accuracy67.3%
Cost1736
\[\begin{array}{l} \mathbf{if}\;d \leq 5 \cdot 10^{+283}:\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{elif}\;d \leq 2.05 \cdot 10^{+288}:\\ \;\;\;\;\frac{d \cdot \frac{2}{\frac{w}{c0 \cdot 0.5}}}{\frac{D \cdot \left(h \cdot D\right)}{\frac{d}{\frac{w}{c0}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{w}{0.25} \cdot \left(c0 \cdot \left(\frac{\frac{d}{D}}{w \cdot M} \cdot \frac{\frac{d}{D}}{h \cdot M}\right)\right)}\\ \end{array} \]
Alternative 6
Accuracy67.6%
Cost1609
\[\begin{array}{l} \mathbf{if}\;d \leq 5 \cdot 10^{+283} \lor \neg \left(d \leq 2.05 \cdot 10^{+288}\right):\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{2}{\frac{w}{c0 \cdot 0.5}}}{\frac{D \cdot \left(h \cdot D\right)}{\frac{d}{\frac{w}{c0}}}}\\ \end{array} \]
Alternative 7
Accuracy66.5%
Cost1608
\[\begin{array}{l} \mathbf{if}\;h \leq 3.3 \cdot 10^{+155}:\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right)\\ \mathbf{elif}\;h \leq 9 \cdot 10^{+203}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{d \cdot d}{D \cdot \left(\left(h \cdot D\right) \cdot \frac{w}{c0}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{\frac{d}{h \cdot \left(M \cdot \frac{M}{d}\right)}}{D}}\\ \end{array} \]
Alternative 8
Accuracy52.9%
Cost1480
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 5.9 \cdot 10^{-123}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \cdot D \leq 1.3 \cdot 10^{+308}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 9
Accuracy61.5%
Cost1220
\[\begin{array}{l} \mathbf{if}\;M \cdot M \leq 2 \cdot 10^{+303}:\\ \;\;\;\;0.25 \cdot \left(\frac{M \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{h}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 10
Accuracy68.1%
Cost960
\[0.25 \cdot \left(\frac{h \cdot M}{\frac{d}{D}} \cdot \left(D \cdot \frac{M}{d}\right)\right) \]
Alternative 11
Accuracy50.5%
Cost64
\[0 \]

Error

Reproduce?

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