Average Error: 59.6 → 46.5
Time: 1.2min
Precision: binary64
Cost: 28232
\[\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{c0 \cdot d}{D}}{w \cdot h}\\ t_1 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -3.5 \cdot 10^{-148}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(d \cdot \left(\frac{1}{D} \cdot t_0\right)\right)}^{2}\right)}\right)\\ \mathbf{elif}\;M \leq 1.56 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{1}{D} \cdot \left(d \cdot t_0\right)\right)}^{2}\right)}\right)\\ \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (*
  (/ c0 (* 2.0 w))
  (+
   (/ (* c0 (* d d)) (* (* w h) (* D D)))
   (sqrt
    (-
     (*
      (/ (* c0 (* d d)) (* (* w h) (* D D)))
      (/ (* c0 (* d d)) (* (* w h) (* D D))))
     (* M M))))))
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ (* c0 d) D) (* w h))) (t_1 (/ c0 (* 2.0 w))))
   (if (<= M -3.5e-148)
     (*
      t_1
      (fma t_0 (/ d D) (sqrt (fma M (- M) (pow (* d (* (/ 1.0 D) t_0)) 2.0)))))
     (if (<= M 1.56e-162)
       (* c0 (* (/ 0.5 w) (sqrt (- (* M M)))))
       (*
        t_1
        (fma
         t_0
         (/ d D)
         (sqrt (fma M (- M) (pow (* (/ 1.0 D) (* d t_0)) 2.0)))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((c0 * d) / D) / (w * h);
	double t_1 = c0 / (2.0 * w);
	double tmp;
	if (M <= -3.5e-148) {
		tmp = t_1 * fma(t_0, (d / D), sqrt(fma(M, -M, pow((d * ((1.0 / D) * t_0)), 2.0))));
	} else if (M <= 1.56e-162) {
		tmp = c0 * ((0.5 / w) * sqrt(-(M * M)));
	} else {
		tmp = t_1 * fma(t_0, (d / D), sqrt(fma(M, -M, pow(((1.0 / D) * (d * t_0)), 2.0))));
	}
	return tmp;
}
function code(c0, w, h, D, d, M)
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M)))))
end
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(c0 * d) / D) / Float64(w * h))
	t_1 = Float64(c0 / Float64(2.0 * w))
	tmp = 0.0
	if (M <= -3.5e-148)
		tmp = Float64(t_1 * fma(t_0, Float64(d / D), sqrt(fma(M, Float64(-M), (Float64(d * Float64(Float64(1.0 / D) * t_0)) ^ 2.0)))));
	elseif (M <= 1.56e-162)
		tmp = Float64(c0 * Float64(Float64(0.5 / w) * sqrt(Float64(-Float64(M * M)))));
	else
		tmp = Float64(t_1 * fma(t_0, Float64(d / D), sqrt(fma(M, Float64(-M), (Float64(Float64(1.0 / D) * Float64(d * t_0)) ^ 2.0)))));
	end
	return 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[(c0 * d), $MachinePrecision] / D), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, -3.5e-148], N[(t$95$1 * N[(t$95$0 * N[(d / D), $MachinePrecision] + N[Sqrt[N[(M * (-M) + N[Power[N[(d * N[(N[(1.0 / D), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.56e-162], N[(c0 * N[(N[(0.5 / w), $MachinePrecision] * N[Sqrt[(-N[(M * M), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 * N[(d / D), $MachinePrecision] + N[Sqrt[N[(M * (-M) + N[Power[N[(N[(1.0 / D), $MachinePrecision] * N[(d * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $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{c0 \cdot d}{D}}{w \cdot h}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;M \leq -3.5 \cdot 10^{-148}:\\
\;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(d \cdot \left(\frac{1}{D} \cdot t_0\right)\right)}^{2}\right)}\right)\\

\mathbf{elif}\;M \leq 1.56 \cdot 10^{-162}:\\
\;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{1}{D} \cdot \left(d \cdot t_0\right)\right)}^{2}\right)}\right)\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if M < -3.5e-148

    1. Initial program 62.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. Simplified59.7

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(\frac{\frac{c0 \cdot d}{D}}{w \cdot h}, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right)}\right)} \]
      Proof
    5. Applied egg-rr59.4

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

    if -3.5e-148 < M < 1.5600000000000001e-162

    1. Initial program 55.7

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

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

      \[\leadsto c0 \cdot \left(\frac{0.5}{w} \cdot \color{blue}{\sqrt{-{M}^{2}}}\right) \]
    4. Simplified24.2

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

    if 1.5600000000000001e-162 < M

    1. Initial program 61.6

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{d}{D}\right)}^{2}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right)}\right)} \]
      Proof
    3. Applied egg-rr59.9

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(\frac{\frac{c0 \cdot d}{D}}{w \cdot h}, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right)}\right)} \]
      Proof
    5. Applied egg-rr58.8

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{\frac{c0 \cdot d}{D}}{w \cdot h}, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\color{blue}{\left(\frac{1}{D} \cdot \left(d \cdot \frac{\frac{c0 \cdot d}{D}}{w \cdot h}\right)\right)}}^{2}\right)}\right) \]
  3. Recombined 3 regimes into one program.

Alternatives

Alternative 1
Error46.4
Cost28104
\[\begin{array}{l} t_0 := \frac{\frac{c0 \cdot d}{D}}{w \cdot h}\\ t_1 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -3.5 \cdot 10^{-148}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(t_0 \cdot \frac{d}{D}\right)}^{2}\right)}\right)\\ \mathbf{elif}\;M \leq 1.56 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{t_0 \cdot d}{D}\right)}^{2}\right)}\right)\\ \end{array} \]
Alternative 2
Error46.5
Cost28104
\[\begin{array}{l} t_0 := \frac{\frac{c0 \cdot d}{D}}{w \cdot h}\\ t_1 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -3.5 \cdot 10^{-148}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(d \cdot \left(\frac{1}{D} \cdot t_0\right)\right)}^{2}\right)}\right)\\ \mathbf{elif}\;M \leq 5 \cdot 10^{-163}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(\frac{t_0 \cdot d}{D}\right)}^{2}\right)}\right)\\ \end{array} \]
Alternative 3
Error46.2
Cost28100
\[\begin{array}{l} t_0 := \frac{\frac{c0 \cdot d}{D}}{w \cdot h}\\ \mathbf{if}\;M \cdot M \leq 0:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(t_0, \frac{d}{D}, \sqrt{\mathsf{fma}\left(M, -M, {\left(t_0 \cdot \frac{d}{D}\right)}^{2}\right)}\right)\\ \end{array} \]
Alternative 4
Error46.3
Cost27780
\[\begin{array}{l} t_0 := \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\\ t_1 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w \cdot \left(h \cdot D\right)}}{D}\\ t_2 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -1.55 \cdot 10^{-162}:\\ \;\;\;\;t_2 \cdot \left(t_0 + \sqrt{{t_0}^{2} - M \cdot M}\right)\\ \mathbf{elif}\;M \leq 5 \cdot 10^{-163}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \left(t_1 + \sqrt{{t_1}^{2} - M \cdot M}\right)\\ \end{array} \]
Alternative 5
Error46.4
Cost27780
\[\begin{array}{l} t_0 := \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\\ t_1 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w \cdot \left(h \cdot D\right)}}{D}\\ t_2 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -2 \cdot 10^{-162}:\\ \;\;\;\;t_2 \cdot \left(t_0 + \sqrt{{t_0}^{2} - M \cdot M}\right)\\ \mathbf{elif}\;M \leq 5 \cdot 10^{-163}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \left(t_1 + \sqrt{{t_1}^{2} - M \cdot M}\right)\\ \end{array} \]
Alternative 6
Error46.4
Cost21572
\[\begin{array}{l} t_0 := \frac{c0}{w \cdot h}\\ t_1 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w \cdot \left(h \cdot D\right)}}{D}\\ t_2 := \frac{c0}{2 \cdot w}\\ \mathbf{if}\;M \leq -1 \cdot 10^{-161}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot {\left(\frac{d}{D}\right)}^{2} + \sqrt{{\left(\frac{d}{D} \cdot \left(t_0 \cdot \frac{d}{D}\right)\right)}^{2} - M \cdot M}\right)\\ \mathbf{elif}\;M \leq 5 \cdot 10^{-163}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \left(t_1 + \sqrt{{t_1}^{2} - M \cdot M}\right)\\ \end{array} \]
Alternative 7
Error46.7
Cost21572
\[\begin{array}{l} t_0 := \frac{\frac{c0}{h}}{w}\\ t_1 := \frac{c0}{2 \cdot w}\\ t_2 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w \cdot \left(h \cdot D\right)}}{D}\\ \mathbf{if}\;M \leq -5 \cdot 10^{-149}:\\ \;\;\;\;t_1 \cdot \left(\frac{\left(t_0 \cdot \frac{d}{D}\right) \cdot d}{D} + \sqrt{{\left(t_0 \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}\right)\\ \mathbf{elif}\;M \leq 1.56 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(t_2 + \sqrt{{t_2}^{2} - M \cdot M}\right)\\ \end{array} \]
Alternative 8
Error46.8
Cost15496
\[\begin{array}{l} t_0 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w \cdot \left(h \cdot D\right)}}{D}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{{t_0}^{2} - M \cdot M}\right)\\ \mathbf{if}\;M \leq -4 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;M \leq 1.56 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error48.6
Cost9924
\[\begin{array}{l} t_0 := \left(w \cdot h\right) \cdot \left(D \cdot D\right)\\ \mathbf{if}\;M \cdot M \leq 0:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{t_0} \cdot \left(d \cdot d\right) + \sqrt{\left(\frac{c0 \cdot d}{w} \cdot \frac{d}{\left(h \cdot D\right) \cdot D}\right) \cdot \left(\frac{d}{t_0} \cdot \left(c0 \cdot d\right)\right) - M \cdot M}\right)\\ \end{array} \]
Alternative 10
Error48.1
Cost9924
\[\begin{array}{l} t_0 := \frac{c0 \cdot d}{w} \cdot \frac{d}{\left(h \cdot D\right) \cdot D}\\ \mathbf{if}\;M \cdot M \leq 0:\\ \;\;\;\;c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot \left(\frac{d}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \left(c0 \cdot d\right)\right) - M \cdot M}\right)\\ \end{array} \]
Alternative 11
Error49.7
Cost7040
\[c0 \cdot \left(\frac{0.5}{w} \cdot \sqrt{-M \cdot M}\right) \]

Error

Reproduce

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