?

Average Error: 59.4 → 30.7
Time: 2.0min
Precision: binary64
Cost: 15312

?

\[\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{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h}\\ t_1 := \frac{c0}{2 \cdot w}\\ t_2 := {\left(M \cdot D\right)}^{2}\\ t_3 := \frac{d}{D} \cdot \frac{d}{D}\\ t_4 := \frac{c0 \cdot t_3}{w \cdot h}\\ \mathbf{if}\;d \cdot d \leq 10^{-233}:\\ \;\;\;\;t_1 \cdot \left(t_0 + \sqrt{\left(M + t_0\right) \cdot \left(t_0 - M\right)}\right)\\ \mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-224}:\\ \;\;\;\;c0 \cdot \frac{\frac{\left(h \cdot t_2\right) \cdot \frac{w}{{d}^{2} \cdot c0}}{2} + 0}{2 \cdot w}\\ \mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-210}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{\left(t_4 + M\right) \cdot \left(t_4 - M\right)} + \left(-\left(-t_3\right) \cdot \frac{c0}{w \cdot h}\right)\right)\\ \mathbf{elif}\;d \cdot d \leq 5 \cdot 10^{+278}:\\ \;\;\;\;c0 \cdot \frac{\frac{\frac{t_2 \cdot \left(h \cdot w\right)}{c0 + c0}}{{d}^{2}} + 0}{2 \cdot w}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{0}{2 \cdot w}\\ \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 (/ (* (/ d D) (* (/ d D) c0)) (* w h)))
        (t_1 (/ c0 (* 2.0 w)))
        (t_2 (pow (* M D) 2.0))
        (t_3 (* (/ d D) (/ d D)))
        (t_4 (/ (* c0 t_3) (* w h))))
   (if (<= (* d d) 1e-233)
     (* t_1 (+ t_0 (sqrt (* (+ M t_0) (- t_0 M)))))
     (if (<= (* d d) 4e-224)
       (*
        c0
        (/ (+ (/ (* (* h t_2) (/ w (* (pow d 2.0) c0))) 2.0) 0.0) (* 2.0 w)))
       (if (<= (* d d) 4e-210)
         (*
          t_1
          (+ (sqrt (* (+ t_4 M) (- t_4 M))) (- (* (- t_3) (/ c0 (* w h))))))
         (if (<= (* d d) 5e+278)
           (*
            c0
            (/
             (+ (/ (/ (* t_2 (* h w)) (+ c0 c0)) (pow d 2.0)) 0.0)
             (* 2.0 w)))
           (* c0 (/ 0.0 (* 2.0 w)))))))))
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 = ((d / D) * ((d / D) * c0)) / (w * h);
	double t_1 = c0 / (2.0 * w);
	double t_2 = pow((M * D), 2.0);
	double t_3 = (d / D) * (d / D);
	double t_4 = (c0 * t_3) / (w * h);
	double tmp;
	if ((d * d) <= 1e-233) {
		tmp = t_1 * (t_0 + sqrt(((M + t_0) * (t_0 - M))));
	} else if ((d * d) <= 4e-224) {
		tmp = c0 * (((((h * t_2) * (w / (pow(d, 2.0) * c0))) / 2.0) + 0.0) / (2.0 * w));
	} else if ((d * d) <= 4e-210) {
		tmp = t_1 * (sqrt(((t_4 + M) * (t_4 - M))) + -(-t_3 * (c0 / (w * h))));
	} else if ((d * d) <= 5e+278) {
		tmp = c0 * (((((t_2 * (h * w)) / (c0 + c0)) / pow(d, 2.0)) + 0.0) / (2.0 * w));
	} else {
		tmp = c0 * (0.0 / (2.0 * w));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = (c0 / (2.0d0 * w)) * (((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) + sqrt(((((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) * ((c0 * (d_1 * d_1)) / ((w * h) * (d * d)))) - (m * m))))
end function
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_0 = ((d_1 / d) * ((d_1 / d) * c0)) / (w * h)
    t_1 = c0 / (2.0d0 * w)
    t_2 = (m * d) ** 2.0d0
    t_3 = (d_1 / d) * (d_1 / d)
    t_4 = (c0 * t_3) / (w * h)
    if ((d_1 * d_1) <= 1d-233) then
        tmp = t_1 * (t_0 + sqrt(((m + t_0) * (t_0 - m))))
    else if ((d_1 * d_1) <= 4d-224) then
        tmp = c0 * (((((h * t_2) * (w / ((d_1 ** 2.0d0) * c0))) / 2.0d0) + 0.0d0) / (2.0d0 * w))
    else if ((d_1 * d_1) <= 4d-210) then
        tmp = t_1 * (sqrt(((t_4 + m) * (t_4 - m))) + -(-t_3 * (c0 / (w * h))))
    else if ((d_1 * d_1) <= 5d+278) then
        tmp = c0 * (((((t_2 * (h * w)) / (c0 + c0)) / (d_1 ** 2.0d0)) + 0.0d0) / (2.0d0 * w))
    else
        tmp = c0 * (0.0d0 / (2.0d0 * w))
    end if
    code = tmp
end function
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 = ((d / D) * ((d / D) * c0)) / (w * h);
	double t_1 = c0 / (2.0 * w);
	double t_2 = Math.pow((M * D), 2.0);
	double t_3 = (d / D) * (d / D);
	double t_4 = (c0 * t_3) / (w * h);
	double tmp;
	if ((d * d) <= 1e-233) {
		tmp = t_1 * (t_0 + Math.sqrt(((M + t_0) * (t_0 - M))));
	} else if ((d * d) <= 4e-224) {
		tmp = c0 * (((((h * t_2) * (w / (Math.pow(d, 2.0) * c0))) / 2.0) + 0.0) / (2.0 * w));
	} else if ((d * d) <= 4e-210) {
		tmp = t_1 * (Math.sqrt(((t_4 + M) * (t_4 - M))) + -(-t_3 * (c0 / (w * h))));
	} else if ((d * d) <= 5e+278) {
		tmp = c0 * (((((t_2 * (h * w)) / (c0 + c0)) / Math.pow(d, 2.0)) + 0.0) / (2.0 * w));
	} else {
		tmp = c0 * (0.0 / (2.0 * w));
	}
	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 = ((d / D) * ((d / D) * c0)) / (w * h)
	t_1 = c0 / (2.0 * w)
	t_2 = math.pow((M * D), 2.0)
	t_3 = (d / D) * (d / D)
	t_4 = (c0 * t_3) / (w * h)
	tmp = 0
	if (d * d) <= 1e-233:
		tmp = t_1 * (t_0 + math.sqrt(((M + t_0) * (t_0 - M))))
	elif (d * d) <= 4e-224:
		tmp = c0 * (((((h * t_2) * (w / (math.pow(d, 2.0) * c0))) / 2.0) + 0.0) / (2.0 * w))
	elif (d * d) <= 4e-210:
		tmp = t_1 * (math.sqrt(((t_4 + M) * (t_4 - M))) + -(-t_3 * (c0 / (w * h))))
	elif (d * d) <= 5e+278:
		tmp = c0 * (((((t_2 * (h * w)) / (c0 + c0)) / math.pow(d, 2.0)) + 0.0) / (2.0 * w))
	else:
		tmp = c0 * (0.0 / (2.0 * w))
	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(Float64(d / D) * Float64(Float64(d / D) * c0)) / Float64(w * h))
	t_1 = Float64(c0 / Float64(2.0 * w))
	t_2 = Float64(M * D) ^ 2.0
	t_3 = Float64(Float64(d / D) * Float64(d / D))
	t_4 = Float64(Float64(c0 * t_3) / Float64(w * h))
	tmp = 0.0
	if (Float64(d * d) <= 1e-233)
		tmp = Float64(t_1 * Float64(t_0 + sqrt(Float64(Float64(M + t_0) * Float64(t_0 - M)))));
	elseif (Float64(d * d) <= 4e-224)
		tmp = Float64(c0 * Float64(Float64(Float64(Float64(Float64(h * t_2) * Float64(w / Float64((d ^ 2.0) * c0))) / 2.0) + 0.0) / Float64(2.0 * w)));
	elseif (Float64(d * d) <= 4e-210)
		tmp = Float64(t_1 * Float64(sqrt(Float64(Float64(t_4 + M) * Float64(t_4 - M))) + Float64(-Float64(Float64(-t_3) * Float64(c0 / Float64(w * h))))));
	elseif (Float64(d * d) <= 5e+278)
		tmp = Float64(c0 * Float64(Float64(Float64(Float64(Float64(t_2 * Float64(h * w)) / Float64(c0 + c0)) / (d ^ 2.0)) + 0.0) / Float64(2.0 * w)));
	else
		tmp = Float64(c0 * Float64(0.0 / Float64(2.0 * w)));
	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 / D) * ((d / D) * c0)) / (w * h);
	t_1 = c0 / (2.0 * w);
	t_2 = (M * D) ^ 2.0;
	t_3 = (d / D) * (d / D);
	t_4 = (c0 * t_3) / (w * h);
	tmp = 0.0;
	if ((d * d) <= 1e-233)
		tmp = t_1 * (t_0 + sqrt(((M + t_0) * (t_0 - M))));
	elseif ((d * d) <= 4e-224)
		tmp = c0 * (((((h * t_2) * (w / ((d ^ 2.0) * c0))) / 2.0) + 0.0) / (2.0 * w));
	elseif ((d * d) <= 4e-210)
		tmp = t_1 * (sqrt(((t_4 + M) * (t_4 - M))) + -(-t_3 * (c0 / (w * h))));
	elseif ((d * d) <= 5e+278)
		tmp = c0 * (((((t_2 * (h * w)) / (c0 + c0)) / (d ^ 2.0)) + 0.0) / (2.0 * w));
	else
		tmp = c0 * (0.0 / (2.0 * w));
	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[(N[(d / D), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] * c0), $MachinePrecision]), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(M * D), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c0 * t$95$3), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(d * d), $MachinePrecision], 1e-233], N[(t$95$1 * N[(t$95$0 + N[Sqrt[N[(N[(M + t$95$0), $MachinePrecision] * N[(t$95$0 - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(d * d), $MachinePrecision], 4e-224], N[(c0 * N[(N[(N[(N[(N[(h * t$95$2), $MachinePrecision] * N[(w / N[(N[Power[d, 2.0], $MachinePrecision] * c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] + 0.0), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(d * d), $MachinePrecision], 4e-210], N[(t$95$1 * N[(N[Sqrt[N[(N[(t$95$4 + M), $MachinePrecision] * N[(t$95$4 - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-N[((-t$95$3) * N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(d * d), $MachinePrecision], 5e+278], N[(c0 * N[(N[(N[(N[(N[(t$95$2 * N[(h * w), $MachinePrecision]), $MachinePrecision] / N[(c0 + c0), $MachinePrecision]), $MachinePrecision] / N[Power[d, 2.0], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(0.0 / N[(2.0 * w), $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{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h}\\
t_1 := \frac{c0}{2 \cdot w}\\
t_2 := {\left(M \cdot D\right)}^{2}\\
t_3 := \frac{d}{D} \cdot \frac{d}{D}\\
t_4 := \frac{c0 \cdot t_3}{w \cdot h}\\
\mathbf{if}\;d \cdot d \leq 10^{-233}:\\
\;\;\;\;t_1 \cdot \left(t_0 + \sqrt{\left(M + t_0\right) \cdot \left(t_0 - M\right)}\right)\\

\mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-224}:\\
\;\;\;\;c0 \cdot \frac{\frac{\left(h \cdot t_2\right) \cdot \frac{w}{{d}^{2} \cdot c0}}{2} + 0}{2 \cdot w}\\

\mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-210}:\\
\;\;\;\;t_1 \cdot \left(\sqrt{\left(t_4 + M\right) \cdot \left(t_4 - M\right)} + \left(-\left(-t_3\right) \cdot \frac{c0}{w \cdot h}\right)\right)\\

\mathbf{elif}\;d \cdot d \leq 5 \cdot 10^{+278}:\\
\;\;\;\;c0 \cdot \frac{\frac{\frac{t_2 \cdot \left(h \cdot w\right)}{c0 + c0}}{{d}^{2}} + 0}{2 \cdot w}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{0}{2 \cdot w}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if (*.f64 d d) < 9.99999999999999958e-234

    1. Initial program 60.9

      \[\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. Simplified59.6

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

      [Start]60.9

      \[ \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_best-simplify-54 [=>]61.5

      \[ \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_best-simplify-49 [=>]61.3

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

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

      rational_best-simplify-3 [=>]61.3

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

      rational_best-simplify-54 [=>]61.5

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

      rational_best-simplify-49 [=>]61.1

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

      rational_best-simplify-54 [=>]60.1

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

      rational_best-simplify-49 [=>]59.6

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

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

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

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

      [Start]60.4

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

      rational_best-simplify-55 [=>]60.5

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

      rational_best-simplify-55 [=>]60.9

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

      rational_best-simplify-55 [=>]60.9

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

      rational_best-simplify-55 [=>]59.4

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

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

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

      [Start]47.3

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

      rational_best-simplify-50 [=>]48.3

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

      rational_best-simplify-3 [=>]48.3

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

      rational_best-simplify-50 [=>]47.9

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

      rational_best-simplify-50 [=>]46.4

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

    if 9.99999999999999958e-234 < (*.f64 d d) < 4.0000000000000001e-224

    1. Initial program 57.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. Simplified61.2

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

      [Start]57.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_best-simplify-1 [=>]57.3

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

      rational_best-simplify-55 [=>]55.9

      \[ \color{blue}{c0 \cdot \frac{\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}}{2 \cdot w}} \]
    3. Applied egg-rr61.0

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

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

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

      [Start]58.3

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

      rational_best-simplify-55 [=>]58.3

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

      rational_best-simplify-1 [=>]58.3

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

      rational_best-simplify-1 [<=]58.3

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

      rational_best-simplify-50 [=>]59.0

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

      rational_best-simplify-50 [=>]59.0

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

      rational_best-simplify-10 [=>]59.0

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

      rational_best-simplify-59 [=>]59.0

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

      rational_best-simplify-10 [<=]59.0

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

      rational_best-simplify-1 [<=]59.0

      \[ c0 \cdot \frac{\left(w \cdot \left(\left(h \cdot {M}^{2}\right) \cdot {D}^{2}\right)\right) \cdot \frac{0.5}{{d}^{2} \cdot c0} + c0 \cdot \left(-\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} - \color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}}\right)\right)}{2 \cdot w} \]
    6. Applied egg-rr42.3

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

    if 4.0000000000000001e-224 < (*.f64 d d) < 4.0000000000000002e-210

    1. Initial program 55.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. Simplified55.7

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

      [Start]55.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_best-simplify-54 [=>]57.5

      \[ \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_best-simplify-49 [=>]57.8

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

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

      rational_best-simplify-3 [=>]57.8

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

      rational_best-simplify-54 [=>]57.5

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

      rational_best-simplify-49 [=>]56.8

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

      rational_best-simplify-54 [=>]57.4

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

      rational_best-simplify-49 [=>]55.7

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

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

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

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

      [Start]53.5

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

      rational_best-simplify-55 [=>]53.5

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

      rational_best-simplify-55 [=>]56.7

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

      rational_best-simplify-55 [=>]56.7

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

      rational_best-simplify-55 [=>]55.4

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \frac{d \cdot d}{D \cdot D}}{w \cdot h} - \left(-\sqrt{\left(c0 \cdot \frac{d \cdot d}{D \cdot D}\right) \cdot \frac{\frac{\color{blue}{c0 \cdot \frac{d \cdot d}{D \cdot D}}}{w \cdot h}}{w \cdot h} - M \cdot M}\right)\right) \]
    6. Applied egg-rr49.8

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

    if 4.0000000000000002e-210 < (*.f64 d d) < 5.00000000000000029e278

    1. Initial program 55.1

      \[\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. Simplified61.1

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

      [Start]55.1

      \[ \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_best-simplify-1 [=>]55.1

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

      rational_best-simplify-55 [=>]55.1

      \[ \color{blue}{c0 \cdot \frac{\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}}{2 \cdot w}} \]
    3. Applied egg-rr60.1

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

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

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

      [Start]55.3

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

      rational_best-simplify-55 [=>]55.3

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

      rational_best-simplify-1 [=>]55.3

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

      rational_best-simplify-1 [<=]55.3

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

      rational_best-simplify-50 [=>]55.1

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

      rational_best-simplify-50 [=>]55.1

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

      rational_best-simplify-10 [=>]55.1

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

      rational_best-simplify-59 [=>]55.1

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

      rational_best-simplify-10 [<=]55.1

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

      rational_best-simplify-1 [<=]55.1

      \[ c0 \cdot \frac{\left(w \cdot \left(\left(h \cdot {M}^{2}\right) \cdot {D}^{2}\right)\right) \cdot \frac{0.5}{{d}^{2} \cdot c0} + c0 \cdot \left(-\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} - \color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}}\right)\right)}{2 \cdot w} \]
    6. Applied egg-rr30.8

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

    if 5.00000000000000029e278 < (*.f64 d d)

    1. Initial program 63.4

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

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

      [Start]63.4

      \[ \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_best-simplify-1 [=>]63.4

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

      rational_best-simplify-55 [=>]63.4

      \[ \color{blue}{c0 \cdot \frac{\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}}{2 \cdot w}} \]
    3. Applied egg-rr62.2

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

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

      \[\leadsto c0 \cdot \frac{\color{blue}{0}}{2 \cdot w} \]
      Proof

      [Start]63.1

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

      rational_best-simplify-50 [=>]63.1

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

      rational_best-simplify-10 [=>]63.1

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

      rational_best-simplify-59 [=>]63.1

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

      rational_best-simplify-10 [<=]63.1

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

      rational_best-simplify-1 [<=]63.1

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

      rational_best-simplify-5 [=>]24.8

      \[ c0 \cdot \frac{c0 \cdot \left(-\color{blue}{0}\right)}{2 \cdot w} \]

      metadata-eval [=>]24.8

      \[ c0 \cdot \frac{c0 \cdot \color{blue}{0}}{2 \cdot w} \]

      rational_best-simplify-16 [<=]24.8

      \[ c0 \cdot \frac{\color{blue}{c0 - c0}}{2 \cdot w} \]

      rational_best-simplify-5 [=>]24.8

      \[ c0 \cdot \frac{\color{blue}{0}}{2 \cdot w} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification30.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \cdot d \leq 10^{-233}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h} + \sqrt{\left(M + \frac{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h}\right) \cdot \left(\frac{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h} - M\right)}\right)\\ \mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-224}:\\ \;\;\;\;c0 \cdot \frac{\frac{\left(h \cdot {\left(M \cdot D\right)}^{2}\right) \cdot \frac{w}{{d}^{2} \cdot c0}}{2} + 0}{2 \cdot w}\\ \mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-210}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\sqrt{\left(\frac{c0 \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}{w \cdot h} + M\right) \cdot \left(\frac{c0 \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}{w \cdot h} - M\right)} + \left(-\left(-\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h}\right)\right)\\ \mathbf{elif}\;d \cdot d \leq 5 \cdot 10^{+278}:\\ \;\;\;\;c0 \cdot \frac{\frac{\frac{{\left(M \cdot D\right)}^{2} \cdot \left(h \cdot w\right)}{c0 + c0}}{{d}^{2}} + 0}{2 \cdot w}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{0}{2 \cdot w}\\ \end{array} \]

Alternatives

Alternative 1
Error30.8
Cost19396
\[\begin{array}{l} t_0 := \frac{c0}{2 \cdot w}\\ t_1 := c0 \cdot \left(d \cdot d\right)\\ t_2 := \frac{t_1}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_3 := \frac{t_1}{\left(D \cdot \left(D \cdot h\right)\right) \cdot w}\\ \mathbf{if}\;t_0 \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right) \leq 10^{+266}:\\ \;\;\;\;t_0 \cdot \left(t_3 + \sqrt{t_3 \cdot t_3 - M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{0}{2 \cdot w}\\ \end{array} \]
Alternative 2
Error30.3
Cost19396
\[\begin{array}{l} t_0 := \frac{\frac{d}{D} \cdot \left(\frac{d}{D} \cdot c0\right)}{w \cdot h}\\ t_1 := \frac{c0}{2 \cdot w}\\ t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \mathbf{if}\;t_1 \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right) \leq 10^{+266}:\\ \;\;\;\;t_1 \cdot \left(t_0 + \sqrt{\left(M + t_0\right) \cdot \left(t_0 - M\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{0}{2 \cdot w}\\ \end{array} \]
Alternative 3
Error32.1
Cost448
\[c0 \cdot \frac{0}{2 \cdot w} \]

Error

Reproduce?

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