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

\mathbf{elif}\;t_3 \leq 1.560132044575989 \cdot 10^{+23}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h}\right)\right)\\

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


\end{array}

Error

Bits error versus c0

Bits error versus w

Bits error versus h

Bits error versus D

Bits error versus d

Bits error versus M

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. Taylor expanded in c0 around -inf 52.2

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

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

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

      \[\leadsto \color{blue}{\frac{D \cdot \left(D \cdot 0.25\right)}{d} \cdot \left(\frac{M}{d} \cdot \left(M \cdot h\right)\right)} \]
    6. Applied egg-rr49.4

      \[\leadsto \color{blue}{\frac{D \cdot \left(M \cdot \left(h \cdot \frac{M}{d}\right)\right)}{4 \cdot \frac{d}{D}}} \]
    7. Applied egg-rr49.0

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

    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.5601320445759891e23

    1. Initial program 23.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) \]

    if 1.5601320445759891e23 < (*.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 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. Taylor expanded in c0 around inf 49.8

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

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

    if +inf.0 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M)))))

    1. Initial program 64.0

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

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

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

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

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

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

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

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

Reproduce

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