Average Error: 14.1 → 10.3
Time: 22.5s
Precision: binary64
Cost: 28296
\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
\[\begin{array}{l} t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\frac{\frac{h}{d} \cdot {\left(M \cdot D\right)}^{2}}{d}}{\ell}, -0.25, 1\right)}\\ \mathbf{elif}\;t_0 \leq 10^{-61}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\ \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
(FPCore (w0 M D h l d)
 :precision binary64
 (let* ((t_0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))
   (if (<= t_0 (- INFINITY))
     (* w0 (sqrt (fma (/ (/ (* (/ h d) (pow (* M D) 2.0)) d) l) -0.25 1.0)))
     (if (<= t_0 1e-61)
       (* w0 (sqrt (- 1.0 t_0)))
       (*
        w0
        (sqrt
         (+
          1.0
          (* (/ D (/ l D)) (* 0.25 (* M (/ -1.0 (/ d (* M (/ h d))))))))))))))
double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = w0 * sqrt(fma(((((h / d) * pow((M * D), 2.0)) / d) / l), -0.25, 1.0));
	} else if (t_0 <= 1e-61) {
		tmp = w0 * sqrt((1.0 - t_0));
	} else {
		tmp = w0 * sqrt((1.0 + ((D / (l / D)) * (0.25 * (M * (-1.0 / (d / (M * (h / d)))))))));
	}
	return tmp;
}
function code(w0, M, D, h, l, d)
	return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)))))
end
function code(w0, M, D, h, l, d)
	t_0 = Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(w0 * sqrt(fma(Float64(Float64(Float64(Float64(h / d) * (Float64(M * D) ^ 2.0)) / d) / l), -0.25, 1.0)));
	elseif (t_0 <= 1e-61)
		tmp = Float64(w0 * sqrt(Float64(1.0 - t_0)));
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(D / Float64(l / D)) * Float64(0.25 * Float64(M * Float64(-1.0 / Float64(d / Float64(M * Float64(h / d))))))))));
	end
	return tmp
end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(w0 * N[Sqrt[N[(N[(N[(N[(N[(h / d), $MachinePrecision] * N[Power[N[(M * D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision] * -0.25 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-61], N[(w0 * N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision] * N[(0.25 * N[(M * N[(-1.0 / N[(d / N[(M * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\frac{\frac{h}{d} \cdot {\left(M \cdot D\right)}^{2}}{d}}{\ell}, -0.25, 1\right)}\\

\mathbf{elif}\;t_0 \leq 10^{-61}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\

\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < -inf.0

    1. Initial program 64.0

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
    2. Applied egg-rr64.0

      \[\leadsto \color{blue}{\sqrt[3]{{\left(\sqrt{1 - {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2} \cdot \frac{h}{\ell}} \cdot w0\right)}^{3}}} \]
    3. Taylor expanded in w0 around 0 62.4

      \[\leadsto \color{blue}{\sqrt{1 - 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell}} \cdot w0} \]
    4. Simplified62.4

      \[\leadsto \color{blue}{w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\left(\frac{h}{d \cdot d} \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot D\right)}{\ell}, -0.25, 1\right)}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (*.f64 (/.f64 h (*.f64 d d)) (*.f64 M M)) (*.f64 D D)) l) -1/4 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (*.f64 (/.f64 h (Rewrite<= unpow2_binary64 (pow.f64 d 2))) (*.f64 M M)) (*.f64 D D)) l) -1/4 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (*.f64 (/.f64 h (pow.f64 d 2)) (Rewrite<= unpow2_binary64 (pow.f64 M 2))) (*.f64 D D)) l) -1/4 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (Rewrite<= associate-/r/_binary64 (/.f64 h (/.f64 (pow.f64 d 2) (pow.f64 M 2)))) (*.f64 D D)) l) -1/4 1))): 2 points increase in error, 10 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 h (pow.f64 M 2)) (pow.f64 d 2))) (*.f64 D D)) l) -1/4 1))): 11 points increase in error, 2 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (/.f64 (*.f64 h (pow.f64 M 2)) (pow.f64 d 2)) (Rewrite<= unpow2_binary64 (pow.f64 D 2))) l) -1/4 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 h (pow.f64 M 2)) (/.f64 (pow.f64 d 2) (pow.f64 D 2)))) l) -1/4 1))): 3 points increase in error, 2 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 h (pow.f64 M 2)) (pow.f64 D 2)) (pow.f64 d 2))) l) -1/4 1))): 2 points increase in error, 3 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2)))) (pow.f64 d 2)) l) -1/4 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))) -1/4 1))): 6 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (fma.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)) (Rewrite<= rem-square-sqrt_binary64 (*.f64 (sqrt.f64 -1/4) (sqrt.f64 -1/4))) 1))): 131 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)) (*.f64 (sqrt.f64 -1/4) (sqrt.f64 -1/4))) 1)))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 (*.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)) (Rewrite=> rem-square-sqrt_binary64 -1/4)) 1))): 0 points increase in error, 131 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 (*.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)) (Rewrite<= metadata-eval (neg.f64 1/4))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)) 1/4))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (Rewrite<= +-commutative_binary64 (+.f64 1 (neg.f64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (Rewrite<= sub-neg_binary64 (-.f64 1 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (-.f64 1 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))) w0)): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr57.6

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

    if -inf.0 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < 1e-61

    1. Initial program 0.1

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]

    if 1e-61 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))

    1. Initial program 52.2

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
    2. Applied egg-rr51.0

      \[\leadsto w0 \cdot \sqrt{1 - {\color{blue}{\left(\frac{M}{2 \cdot d} \cdot D\right)}}^{2} \cdot \frac{h}{\ell}} \]
    3. Taylor expanded in M around 0 38.1

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}} \]
    4. Simplified34.5

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{D}{\frac{\ell}{D}} \cdot \left(\frac{M \cdot M}{\frac{d \cdot d}{h}} \cdot 0.25\right)}} \]
      Proof
      (*.f64 (/.f64 D (/.f64 l D)) (*.f64 (/.f64 (*.f64 M M) (/.f64 (*.f64 d d) h)) 1/4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 D D) l)) (*.f64 (/.f64 (*.f64 M M) (/.f64 (*.f64 d d) h)) 1/4)): 16 points increase in error, 4 points decrease in error
      (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) l) (*.f64 (/.f64 (*.f64 M M) (/.f64 (*.f64 d d) h)) 1/4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 D 2) l) (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 M 2)) (/.f64 (*.f64 d d) h)) 1/4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 D 2) l) (*.f64 (/.f64 (pow.f64 M 2) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) h)) 1/4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 D 2) l) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 M 2) h) (pow.f64 d 2))) 1/4)): 14 points increase in error, 12 points decrease in error
      (*.f64 (/.f64 (pow.f64 D 2) l) (*.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 h (pow.f64 M 2))) (pow.f64 d 2)) 1/4)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 (pow.f64 D 2) l) (/.f64 (*.f64 h (pow.f64 M 2)) (pow.f64 d 2))) 1/4)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 l (pow.f64 d 2)))) 1/4): 10 points increase in error, 11 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 l (pow.f64 d 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/4 (Rewrite=> associate-/l*_binary64 (/.f64 (pow.f64 D 2) (/.f64 (*.f64 l (pow.f64 d 2)) (*.f64 h (pow.f64 M 2)))))): 7 points increase in error, 2 points decrease in error
      (*.f64 1/4 (/.f64 (pow.f64 D 2) (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 d 2) l)) (*.f64 h (pow.f64 M 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/4 (/.f64 (pow.f64 D 2) (/.f64 (*.f64 (pow.f64 d 2) l) (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 M 2) h))))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (*.f64 (pow.f64 d 2) l)))): 2 points increase in error, 7 points decrease in error
      (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (Rewrite<= *-commutative_binary64 (*.f64 l (pow.f64 d 2))))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr25.2

      \[\leadsto w0 \cdot \sqrt{1 - \frac{D}{\frac{\ell}{D}} \cdot \left(\color{blue}{\left(M \cdot \frac{1}{\frac{d}{M \cdot \frac{h}{d}}}\right)} \cdot 0.25\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification10.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\frac{\frac{h}{d} \cdot {\left(M \cdot D\right)}^{2}}{d}}{\ell}, -0.25, 1\right)}\\ \mathbf{elif}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq 10^{-61}:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error9.7
Cost21188
\[\begin{array}{l} t_0 := 1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\ \mathbf{if}\;t_0 \leq 4 \cdot 10^{+302}:\\ \;\;\;\;w0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\ \end{array} \]
Alternative 2
Error9.8
Cost14344
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-246}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(D \cdot \frac{M}{2 \cdot d}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 3
Error13.4
Cost8264
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{+241}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(-0.25 \cdot \left(h \cdot \left(\frac{M}{d} \cdot \frac{M}{d}\right)\right)\right)}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{+101}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 4
Error13.6
Cost8264
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{+241}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(0.25 \cdot \left(M \cdot \frac{-1}{\frac{d}{M \cdot \frac{h}{d}}}\right)\right)}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{+101}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error13.5
Cost8008
\[\begin{array}{l} \mathbf{if}\;M \leq -4.2 \cdot 10^{+87}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq -1.7 \cdot 10^{+79}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 6
Error13.3
Cost8008
\[\begin{array}{l} \mathbf{if}\;M \leq -4.5 \cdot 10^{+122}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq -1.75 \cdot 10^{+32}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{\frac{\ell}{D} \cdot \left(d \cdot \frac{d}{h}\right)}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 7
Error13.5
Cost64
\[w0 \]

Error

Reproduce

herbie shell --seed 2022308 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  :precision binary64
  (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))