?

Average Error: 59.6 → 29.2
Time: 34.4s
Precision: binary64
Cost: 42700

?

\[\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 := {\left(d \cdot c0\right)}^{2}\\ t_1 := {\left(D \cdot w\right)}^{2}\\ t_2 := \frac{c0}{2 \cdot w}\\ t_3 := d \cdot \frac{c0}{D \cdot \left(h \cdot \left(D \cdot w\right)\right)}\\ t_4 := d \cdot t_3\\ t_5 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_6 := t_2 \cdot \left(t_5 + \sqrt{t_5 \cdot t_5 - M \cdot M}\right)\\ \mathbf{if}\;t_6 \leq -\infty:\\ \;\;\;\;\frac{t_0}{h \cdot t_1}\\ \mathbf{elif}\;t_6 \leq 10^{+151}:\\ \;\;\;\;t_2 \cdot \left(t_4 + \sqrt{d \cdot \left(t_3 \cdot t_4\right) - M \cdot M}\right)\\ \mathbf{elif}\;t_6 \leq \infty:\\ \;\;\;\;\frac{\frac{t_0}{h}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \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 (pow (* d c0) 2.0))
        (t_1 (pow (* D w) 2.0))
        (t_2 (/ c0 (* 2.0 w)))
        (t_3 (* d (/ c0 (* D (* h (* D w))))))
        (t_4 (* d t_3))
        (t_5 (/ (* c0 (* d d)) (* (* w h) (* D D))))
        (t_6 (* t_2 (+ t_5 (sqrt (- (* t_5 t_5) (* M M)))))))
   (if (<= t_6 (- INFINITY))
     (/ t_0 (* h t_1))
     (if (<= t_6 1e+151)
       (* t_2 (+ t_4 (sqrt (- (* d (* t_3 t_4)) (* M M)))))
       (if (<= t_6 INFINITY) (/ (/ t_0 h) t_1) 0.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = pow((d * c0), 2.0);
	double t_1 = pow((D * w), 2.0);
	double t_2 = c0 / (2.0 * w);
	double t_3 = d * (c0 / (D * (h * (D * w))));
	double t_4 = d * t_3;
	double t_5 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_6 = t_2 * (t_5 + sqrt(((t_5 * t_5) - (M * M))));
	double tmp;
	if (t_6 <= -((double) INFINITY)) {
		tmp = t_0 / (h * t_1);
	} else if (t_6 <= 1e+151) {
		tmp = t_2 * (t_4 + sqrt(((d * (t_3 * t_4)) - (M * M))));
	} else if (t_6 <= ((double) INFINITY)) {
		tmp = (t_0 / h) / t_1;
	} else {
		tmp = 0.0;
	}
	return tmp;
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + Math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = Math.pow((d * c0), 2.0);
	double t_1 = Math.pow((D * w), 2.0);
	double t_2 = c0 / (2.0 * w);
	double t_3 = d * (c0 / (D * (h * (D * w))));
	double t_4 = d * t_3;
	double t_5 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_6 = t_2 * (t_5 + Math.sqrt(((t_5 * t_5) - (M * M))));
	double tmp;
	if (t_6 <= -Double.POSITIVE_INFINITY) {
		tmp = t_0 / (h * t_1);
	} else if (t_6 <= 1e+151) {
		tmp = t_2 * (t_4 + Math.sqrt(((d * (t_3 * t_4)) - (M * M))));
	} else if (t_6 <= Double.POSITIVE_INFINITY) {
		tmp = (t_0 / h) / t_1;
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))))
def code(c0, w, h, D, d, M):
	t_0 = math.pow((d * c0), 2.0)
	t_1 = math.pow((D * w), 2.0)
	t_2 = c0 / (2.0 * w)
	t_3 = d * (c0 / (D * (h * (D * w))))
	t_4 = d * t_3
	t_5 = (c0 * (d * d)) / ((w * h) * (D * D))
	t_6 = t_2 * (t_5 + math.sqrt(((t_5 * t_5) - (M * M))))
	tmp = 0
	if t_6 <= -math.inf:
		tmp = t_0 / (h * t_1)
	elif t_6 <= 1e+151:
		tmp = t_2 * (t_4 + math.sqrt(((d * (t_3 * t_4)) - (M * M))))
	elif t_6 <= math.inf:
		tmp = (t_0 / h) / t_1
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M)))))
end
function code(c0, w, h, D, d, M)
	t_0 = Float64(d * c0) ^ 2.0
	t_1 = Float64(D * w) ^ 2.0
	t_2 = Float64(c0 / Float64(2.0 * w))
	t_3 = Float64(d * Float64(c0 / Float64(D * Float64(h * Float64(D * w)))))
	t_4 = Float64(d * t_3)
	t_5 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	t_6 = Float64(t_2 * Float64(t_5 + sqrt(Float64(Float64(t_5 * t_5) - Float64(M * M)))))
	tmp = 0.0
	if (t_6 <= Float64(-Inf))
		tmp = Float64(t_0 / Float64(h * t_1));
	elseif (t_6 <= 1e+151)
		tmp = Float64(t_2 * Float64(t_4 + sqrt(Float64(Float64(d * Float64(t_3 * t_4)) - Float64(M * M)))));
	elseif (t_6 <= Inf)
		tmp = Float64(Float64(t_0 / h) / t_1);
	else
		tmp = 0.0;
	end
	return tmp
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (d * c0) ^ 2.0;
	t_1 = (D * w) ^ 2.0;
	t_2 = c0 / (2.0 * w);
	t_3 = d * (c0 / (D * (h * (D * w))));
	t_4 = d * t_3;
	t_5 = (c0 * (d * d)) / ((w * h) * (D * D));
	t_6 = t_2 * (t_5 + sqrt(((t_5 * t_5) - (M * M))));
	tmp = 0.0;
	if (t_6 <= -Inf)
		tmp = t_0 / (h * t_1);
	elseif (t_6 <= 1e+151)
		tmp = t_2 * (t_4 + sqrt(((d * (t_3 * t_4)) - (M * M))));
	elseif (t_6 <= Inf)
		tmp = (t_0 / h) / t_1;
	else
		tmp = 0.0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[Power[N[(d * c0), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(D * w), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(d * N[(c0 / N[(D * N[(h * N[(D * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(d * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 * N[(t$95$5 + N[Sqrt[N[(N[(t$95$5 * t$95$5), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], N[(t$95$0 / N[(h * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 1e+151], N[(t$95$2 * N[(t$95$4 + N[Sqrt[N[(N[(d * N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, Infinity], N[(N[(t$95$0 / h), $MachinePrecision] / t$95$1), $MachinePrecision], 0.0]]]]]]]]]]
\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
\begin{array}{l}
t_0 := {\left(d \cdot c0\right)}^{2}\\
t_1 := {\left(D \cdot w\right)}^{2}\\
t_2 := \frac{c0}{2 \cdot w}\\
t_3 := d \cdot \frac{c0}{D \cdot \left(h \cdot \left(D \cdot w\right)\right)}\\
t_4 := d \cdot t_3\\
t_5 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_6 := t_2 \cdot \left(t_5 + \sqrt{t_5 \cdot t_5 - M \cdot M}\right)\\
\mathbf{if}\;t_6 \leq -\infty:\\
\;\;\;\;\frac{t_0}{h \cdot t_1}\\

\mathbf{elif}\;t_6 \leq 10^{+151}:\\
\;\;\;\;t_2 \cdot \left(t_4 + \sqrt{d \cdot \left(t_3 \cdot t_4\right) - M \cdot M}\right)\\

\mathbf{elif}\;t_6 \leq \infty:\\
\;\;\;\;\frac{\frac{t_0}{h}}{t_1}\\

\mathbf{else}:\\
\;\;\;\;0\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 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))))) < -inf.0

    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. Simplified62.9

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

      rational.json-simplify-49 [=>]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) \]

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-43 [=>]64.0

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

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

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

      [Start]58.2

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

      exponential.json-simplify-27 [=>]49.0

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

      rational.json-simplify-43 [=>]50.2

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

      rational.json-simplify-43 [=>]48.0

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

      exponential.json-simplify-27 [=>]38.9

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

    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.00000000000000002e151

    1. Initial program 24.3

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

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

      [Start]24.3

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

      rational.json-simplify-49 [=>]29.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) \]

      rational.json-simplify-2 [=>]29.4

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

      rational.json-simplify-2 [=>]29.4

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

      rational.json-simplify-43 [=>]33.3

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    3. Applied egg-rr37.0

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{d \cdot d}{\frac{w \cdot D}{\frac{\frac{c0}{D}}{h}}}} + \sqrt{\left(\left(d \cdot d\right) \cdot \frac{c0}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right) \cdot \left(\left(d \cdot d\right) \cdot \frac{c0}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right) - M \cdot M}\right) \]
    4. Applied egg-rr26.7

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(d \cdot \left(d \cdot \frac{c0}{\left(w \cdot D\right) \cdot \left(D \cdot h\right)}\right) + \sqrt{d \cdot \left(\left(d \cdot \left(d \cdot \frac{c0}{\left(w \cdot D\right) \cdot \left(D \cdot h\right)}\right)\right) \cdot \left(d \cdot \frac{c0}{\left(w \cdot D\right) \cdot \left(D \cdot h\right)}\right)\right) - M \cdot M}\right) - 0\right)} \]
    5. Simplified25.8

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

      [Start]26.7

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

      rational.json-simplify-5 [=>]26.7

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

      rational.json-simplify-43 [=>]29.0

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

      rational.json-simplify-2 [=>]29.0

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

    if 1.00000000000000002e151 < (*.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 59.8

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

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

      [Start]59.8

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

      rational.json-simplify-46 [=>]60.0

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

      rational.json-simplify-2 [=>]60.0

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

      rational.json-simplify-49 [=>]60.4

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

      rational.json-simplify-49 [=>]60.6

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

      rational.json-simplify-46 [=>]60.9

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{\frac{d \cdot d}{w}}{h}} \cdot \frac{c0}{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) \]
    3. Taylor expanded in d around inf 53.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. Simplified50.7

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

      [Start]53.4

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

      rational.json-simplify-46 [=>]52.6

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

      rational.json-simplify-44 [=>]52.1

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

      rational.json-simplify-2 [=>]52.1

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

      rational.json-simplify-49 [=>]51.8

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

      rational.json-simplify-46 [=>]50.7

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

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

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

      [Start]57.3

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

      rational.json-simplify-43 [=>]58.9

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

      rational.json-simplify-43 [=>]57.0

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

      rational.json-simplify-46 [=>]57.7

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

      exponential.json-simplify-27 [=>]51.4

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

      exponential.json-simplify-27 [=>]43.2

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

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

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

      rational.json-simplify-49 [=>]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) \]

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-43 [=>]64.0

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

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

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

      [Start]62.8

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

      rational.json-simplify-43 [=>]62.8

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

      rational.json-simplify-2 [=>]62.8

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

      rational.json-simplify-9 [=>]62.8

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

      rational.json-simplify-10 [=>]62.8

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

      rational.json-simplify-31 [=>]62.8

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

      metadata-eval [=>]62.8

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

      rational.json-simplify-10 [<=]62.8

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

      rational.json-simplify-9 [=>]62.8

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{0} \cdot \left(-c0\right)\right) \]
    6. Taylor expanded in c0 around 0 28.2

      \[\leadsto \color{blue}{0} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification29.2

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

Alternatives

Alternative 1
Error29.3
Cost42700
\[\begin{array}{l} t_0 := \frac{c0}{2 \cdot w}\\ t_1 := d \cdot \frac{c0}{D \cdot \left(h \cdot \left(D \cdot w\right)\right)}\\ t_2 := d \cdot t_1\\ t_3 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_4 := t_0 \cdot \left(t_3 + \sqrt{t_3 \cdot t_3 - M \cdot M}\right)\\ t_5 := \frac{\frac{{\left(d \cdot c0\right)}^{2}}{h}}{{\left(D \cdot w\right)}^{2}}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_4 \leq 10^{+151}:\\ \;\;\;\;t_0 \cdot \left(t_2 + \sqrt{d \cdot \left(t_1 \cdot t_2\right) - M \cdot M}\right)\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 2
Error31.2
Cost19396
\[\begin{array}{l} t_0 := d \cdot \frac{d}{w \cdot \frac{D}{\frac{c0}{D \cdot h}}}\\ t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right) \leq 10^{+151}:\\ \;\;\;\;c0 \cdot \left(\left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right) \cdot \frac{0.5}{w}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 3
Error31.9
Cost64
\[0 \]

Error

Reproduce?

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