?

Average Error: 92.92% → 23.48%
Time: 35.9s
Precision: binary64
Cost: 30540

?

\[\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}}{M}\\ t_1 := \frac{\frac{\frac{c0 \cdot d}{w}}{D} \cdot \frac{2}{h}}{\frac{D}{d} \cdot \left(2 \cdot \frac{w}{c0}\right)}\\ t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_3 := \frac{c0}{2 \cdot w} \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\ \mathbf{if}\;t_3 \leq -4 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{h \cdot D}{d}}{t_0}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_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 (/ (/ d D) M))
        (t_1
         (/ (* (/ (/ (* c0 d) w) D) (/ 2.0 h)) (* (/ D d) (* 2.0 (/ w c0)))))
        (t_2 (/ (* c0 (* d d)) (* (* w h) (* D D))))
        (t_3 (* (/ c0 (* 2.0 w)) (+ t_2 (sqrt (- (* t_2 t_2) (* M M)))))))
   (if (<= t_3 -4e-152)
     t_1
     (if (<= t_3 0.0)
       (* 0.25 (/ (* M (/ (* h D) d)) t_0))
       (if (<= t_3 INFINITY) t_1 (* 0.25 (/ (* (/ D d) (* h M)) t_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 = (d / D) / M;
	double t_1 = ((((c0 * d) / w) / D) * (2.0 / h)) / ((D / d) * (2.0 * (w / c0)));
	double t_2 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_3 = (c0 / (2.0 * w)) * (t_2 + sqrt(((t_2 * t_2) - (M * M))));
	double tmp;
	if (t_3 <= -4e-152) {
		tmp = t_1;
	} else if (t_3 <= 0.0) {
		tmp = 0.25 * ((M * ((h * D) / d)) / t_0);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = 0.25 * (((D / d) * (h * M)) / t_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 = (d / D) / M;
	double t_1 = ((((c0 * d) / w) / D) * (2.0 / h)) / ((D / d) * (2.0 * (w / c0)));
	double t_2 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_3 = (c0 / (2.0 * w)) * (t_2 + Math.sqrt(((t_2 * t_2) - (M * M))));
	double tmp;
	if (t_3 <= -4e-152) {
		tmp = t_1;
	} else if (t_3 <= 0.0) {
		tmp = 0.25 * ((M * ((h * D) / d)) / t_0);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = 0.25 * (((D / d) * (h * M)) / t_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 = (d / D) / M
	t_1 = ((((c0 * d) / w) / D) * (2.0 / h)) / ((D / d) * (2.0 * (w / c0)))
	t_2 = (c0 * (d * d)) / ((w * h) * (D * D))
	t_3 = (c0 / (2.0 * w)) * (t_2 + math.sqrt(((t_2 * t_2) - (M * M))))
	tmp = 0
	if t_3 <= -4e-152:
		tmp = t_1
	elif t_3 <= 0.0:
		tmp = 0.25 * ((M * ((h * D) / d)) / t_0)
	elif t_3 <= math.inf:
		tmp = t_1
	else:
		tmp = 0.25 * (((D / d) * (h * M)) / t_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(d / D) / M)
	t_1 = Float64(Float64(Float64(Float64(Float64(c0 * d) / w) / D) * Float64(2.0 / h)) / Float64(Float64(D / d) * Float64(2.0 * Float64(w / c0))))
	t_2 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	t_3 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_2 + sqrt(Float64(Float64(t_2 * t_2) - Float64(M * M)))))
	tmp = 0.0
	if (t_3 <= -4e-152)
		tmp = t_1;
	elseif (t_3 <= 0.0)
		tmp = Float64(0.25 * Float64(Float64(M * Float64(Float64(h * D) / d)) / t_0));
	elseif (t_3 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(0.25 * Float64(Float64(Float64(D / d) * Float64(h * M)) / t_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 / D) / M;
	t_1 = ((((c0 * d) / w) / D) * (2.0 / h)) / ((D / d) * (2.0 * (w / c0)));
	t_2 = (c0 * (d * d)) / ((w * h) * (D * D));
	t_3 = (c0 / (2.0 * w)) * (t_2 + sqrt(((t_2 * t_2) - (M * M))));
	tmp = 0.0;
	if (t_3 <= -4e-152)
		tmp = t_1;
	elseif (t_3 <= 0.0)
		tmp = 0.25 * ((M * ((h * D) / d)) / t_0);
	elseif (t_3 <= Inf)
		tmp = t_1;
	else
		tmp = 0.25 * (((D / d) * (h * M)) / t_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[(d / D), $MachinePrecision] / M), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(c0 * d), $MachinePrecision] / w), $MachinePrecision] / D), $MachinePrecision] * N[(2.0 / h), $MachinePrecision]), $MachinePrecision] / N[(N[(D / d), $MachinePrecision] * N[(2.0 * N[(w / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 + N[Sqrt[N[(N[(t$95$2 * t$95$2), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4e-152], t$95$1, If[LessEqual[t$95$3, 0.0], N[(0.25 * N[(N[(M * N[(N[(h * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$1, N[(0.25 * N[(N[(N[(D / d), $MachinePrecision] * N[(h * M), $MachinePrecision]), $MachinePrecision] / t$95$0), $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}}{M}\\
t_1 := \frac{\frac{\frac{c0 \cdot d}{w}}{D} \cdot \frac{2}{h}}{\frac{D}{d} \cdot \left(2 \cdot \frac{w}{c0}\right)}\\
t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_3 := \frac{c0}{2 \cdot w} \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\
\mathbf{if}\;t_3 \leq -4 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;0.25 \cdot \frac{M \cdot \frac{h \cdot D}{d}}{t_0}\\

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

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_0}\\


\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))))) < -4.00000000000000026e-152 or 0.0 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < +inf.0

    1. Initial program 76.26

      \[\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. Simplified70.78

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

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

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

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

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

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

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

      \[ \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 67.11

      \[\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. Simplified63.42

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

      [Start]67.11

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

      times-frac [=>]68.42

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

      associate-*l/ [=>]67.04

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

      unpow2 [=>]67.04

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

      unpow2 [=>]67.04

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

      times-frac [=>]56.52

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

      associate-*r/ [=>]57.01

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

      associate-*l/ [<=]63.46

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

      associate-*l/ [<=]59.97

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

      associate-*r/ [<=]58.33

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

      unpow2 [<=]58.33

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

      associate-*r/ [=>]60.5

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

      associate-/l* [=>]58.2

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

      associate-/r/ [=>]63.42

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{1}{\frac{w \cdot h}{c0} \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)}}\right) \]
    6. Applied egg-rr24.08

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

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

      [Start]24.08

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

      associate-/r/ [=>]24.08

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

      *-commutative [=>]24.08

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

      associate-*l/ [=>]24.96

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

      associate-*r/ [=>]26.21

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

      *-commutative [=>]26.21

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

    if -4.00000000000000026e-152 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < 0.0

    1. Initial program 44.26

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

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

      [Start]44.26

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

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

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

      times-frac [=>]57.15

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

      times-frac [=>]50.46

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

      \[\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. Simplified48.71

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

      [Start]48.12

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

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

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

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

      [Start]40.76

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

      *-commutative [=>]40.76

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

      associate-/l* [=>]41.78

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

      unpow2 [=>]41.78

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

      *-commutative [<=]41.78

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

      associate-/r/ [=>]41.11

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

      unpow2 [=>]41.11

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

      unpow2 [=>]41.11

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

      times-frac [=>]36.68

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{\frac{\frac{d}{D}}{M}}} \]
    8. Applied egg-rr22.21

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

    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 100

      \[\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. Simplified98.91

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

      [Start]100

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

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

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

      times-frac [=>]100

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

      times-frac [=>]98.91

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

      \[\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. Simplified89.96

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

      [Start]98.35

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

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

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

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

      [Start]52.7

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

      *-commutative [=>]52.7

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

      associate-/l* [=>]52.96

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

      unpow2 [=>]52.96

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

      *-commutative [<=]52.96

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

      associate-/r/ [=>]52.94

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

      unpow2 [=>]52.94

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

      unpow2 [=>]52.94

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

      times-frac [=>]40.22

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

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

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

Alternatives

Alternative 1
Error32.39%
Cost2384
\[\begin{array}{l} t_0 := \frac{\frac{d}{D}}{M}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{d \cdot \frac{d}{D}}{D \cdot \frac{w \cdot h}{c0}}\right)\\ t_2 := 0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_0}\\ \mathbf{if}\;d \cdot d \leq 4 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \cdot d \leq 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{-110}:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{h \cdot D}{d}}{t_0}\\ \mathbf{elif}\;d \cdot d \leq 2 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{+200}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error32.37%
Cost2384
\[\begin{array}{l} t_0 := \frac{\frac{d}{D}}{M}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{D}}{\frac{D}{d} \cdot \frac{w \cdot h}{c0}}\right)\\ t_2 := 0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_0}\\ \mathbf{if}\;d \cdot d \leq 4 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \cdot d \leq 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{-110}:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{h \cdot D}{d}}{t_0}\\ \mathbf{elif}\;d \cdot d \leq 2 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{+200}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error31.97%
Cost2384
\[\begin{array}{l} t_0 := \frac{\frac{d}{D}}{M}\\ t_1 := \frac{2}{\left(\frac{D}{d} \cdot \left(2 \cdot \frac{w}{c0}\right)\right) \cdot \frac{h}{\frac{d}{D} \cdot \frac{c0}{w}}}\\ t_2 := 0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_0}\\ \mathbf{if}\;d \cdot d \leq 4 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \cdot d \leq 4 \cdot 10^{-213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{-110}:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \frac{h \cdot D}{d}}{t_0}\\ \mathbf{elif}\;d \cdot d \leq 2 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \cdot d \leq 10^{+200}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error45.23%
Cost1225
\[\begin{array}{l} \mathbf{if}\;d \leq -7.6 \cdot 10^{-93} \lor \neg \left(d \leq 4.1 \cdot 10^{-162}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \frac{M}{\frac{d \cdot d}{M}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 5
Error44.2%
Cost1225
\[\begin{array}{l} \mathbf{if}\;M \leq -5 \cdot 10^{+107} \lor \neg \left(M \leq 1.9 \cdot 10^{+25}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \frac{M}{\frac{d \cdot d}{M}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\right)\\ \end{array} \]
Alternative 6
Error41.65%
Cost1225
\[\begin{array}{l} \mathbf{if}\;M \leq -5.4 \cdot 10^{+118} \lor \neg \left(M \leq 2 \cdot 10^{+19}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{h \cdot M}{d \cdot \frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\right)\\ \end{array} \]
Alternative 7
Error40.61%
Cost1225
\[\begin{array}{l} \mathbf{if}\;M \leq -1.9 \cdot 10^{+119} \lor \neg \left(M \leq 2.6 \cdot 10^{+226}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{h \cdot M}{d \cdot \frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \frac{M}{d}}{\frac{d}{h}}\right)\right)\\ \end{array} \]
Alternative 8
Error39.64%
Cost1224
\[\begin{array}{l} \mathbf{if}\;d \leq -1.05 \cdot 10^{-183}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{h \cdot M}{d \cdot \frac{d}{M}}\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-248}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \frac{M}{d}}{\frac{d}{h}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{h \cdot D}{\frac{d}{M} \cdot \frac{d}{M}}\right)\\ \end{array} \]
Alternative 9
Error34.04%
Cost1224
\[\begin{array}{l} \mathbf{if}\;d \leq 2 \cdot 10^{+104}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \left(\left(h \cdot M\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+215}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{h \cdot D}{\frac{d}{M} \cdot \frac{d}{M}}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \frac{M}{d}}{\frac{d}{h}}\right)\right)\\ \end{array} \]
Alternative 10
Error34.25%
Cost1224
\[\begin{array}{l} t_0 := D \cdot \frac{M}{d}\\ \mathbf{if}\;d \leq 9 \cdot 10^{+27}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \left(\left(h \cdot M\right) \cdot t_0\right)\right)\\ \mathbf{elif}\;d \leq 10^{+215}:\\ \;\;\;\;0.25 \cdot \left(\frac{h \cdot D}{d} \cdot \left(M \cdot t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \frac{M}{d}}{\frac{d}{h}}\right)\right)\\ \end{array} \]
Alternative 11
Error32.73%
Cost1224
\[\begin{array}{l} \mathbf{if}\;d \leq -1.6 \cdot 10^{+26}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \left(\left(h \cdot M\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 1.4 \cdot 10^{+101}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{h \cdot D}{\frac{d}{M} \cdot \frac{d}{M}}\right)\\ \end{array} \]
Alternative 12
Error32.83%
Cost1224
\[\begin{array}{l} \mathbf{if}\;d \leq -6 \cdot 10^{+25}:\\ \;\;\;\;0.25 \cdot \left(\frac{D}{d} \cdot \left(\left(h \cdot M\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 10^{+195}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \frac{M}{\frac{d}{h}}}{\frac{\frac{d}{D}}{M}}\\ \end{array} \]
Alternative 13
Error30.75%
Cost1224
\[\begin{array}{l} t_0 := \frac{\frac{d}{D}}{M}\\ \mathbf{if}\;d \leq 2.2 \cdot 10^{-120}:\\ \;\;\;\;0.25 \cdot \frac{\frac{D}{d} \cdot \left(h \cdot M\right)}{t_0}\\ \mathbf{elif}\;d \leq 10^{+195}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot M\right) \cdot \frac{\frac{h \cdot \left(D \cdot M\right)}{d}}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \frac{M}{\frac{d}{h}}}{t_0}\\ \end{array} \]
Alternative 14
Error37.5%
Cost1092
\[\begin{array}{l} \mathbf{if}\;d \leq 2.95 \cdot 10^{-120}:\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(\left(h \cdot M\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{h \cdot D}{\frac{d}{M} \cdot \frac{d}{M}}\right)\\ \end{array} \]
Alternative 15
Error51.23%
Cost64
\[0 \]

Error

Reproduce?

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