Average Error: 13.5 → 8.6
Time: 18.4s
Precision: binary64
Cost: 27784
\[ \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}\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{-308}:\\ \;\;\;\;w0\\ \mathbf{elif}\;t_0 \leq 10^{+301}:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{0.5}{d} \cdot \left(M \cdot D\right)\right)}^{2} \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \frac{M \cdot \left(D \cdot \left(\frac{D}{\ell} \cdot \frac{h}{d}\right)\right)}{\frac{d}{M}}}\\ \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)))
   (if (<= t_0 5e-308)
     w0
     (if (<= t_0 1e+301)
       (* w0 (sqrt (- 1.0 (* (pow (* (/ 0.5 d) (* M D)) 2.0) (/ h l)))))
       (*
        w0
        (sqrt
         (- 1.0 (* 0.25 (/ (* M (* D (* (/ D l) (/ h d)))) (/ d M))))))))))
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);
	double tmp;
	if (t_0 <= 5e-308) {
		tmp = w0;
	} else if (t_0 <= 1e+301) {
		tmp = w0 * sqrt((1.0 - (pow(((0.5 / d) * (M * D)), 2.0) * (h / l))));
	} else {
		tmp = w0 * sqrt((1.0 - (0.25 * ((M * (D * ((D / l) * (h / d)))) / (d / M)))));
	}
	return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ((m * d) / (2.0d0 * d_1)) ** 2.0d0
    if (t_0 <= 5d-308) then
        tmp = w0
    else if (t_0 <= 1d+301) then
        tmp = w0 * sqrt((1.0d0 - ((((0.5d0 / d_1) * (m * d)) ** 2.0d0) * (h / l))))
    else
        tmp = w0 * sqrt((1.0d0 - (0.25d0 * ((m * (d * ((d / l) * (h / d_1)))) / (d_1 / m)))))
    end if
    code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
public static double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0);
	double tmp;
	if (t_0 <= 5e-308) {
		tmp = w0;
	} else if (t_0 <= 1e+301) {
		tmp = w0 * Math.sqrt((1.0 - (Math.pow(((0.5 / d) * (M * D)), 2.0) * (h / l))));
	} else {
		tmp = w0 * Math.sqrt((1.0 - (0.25 * ((M * (D * ((D / l) * (h / d)))) / (d / M)))));
	}
	return tmp;
}
def code(w0, M, D, h, l, d):
	return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
def code(w0, M, D, h, l, d):
	t_0 = math.pow(((M * D) / (2.0 * d)), 2.0)
	tmp = 0
	if t_0 <= 5e-308:
		tmp = w0
	elif t_0 <= 1e+301:
		tmp = w0 * math.sqrt((1.0 - (math.pow(((0.5 / d) * (M * D)), 2.0) * (h / l))))
	else:
		tmp = w0 * math.sqrt((1.0 - (0.25 * ((M * (D * ((D / l) * (h / d)))) / (d / M)))))
	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(M * D) / Float64(2.0 * d)) ^ 2.0
	tmp = 0.0
	if (t_0 <= 5e-308)
		tmp = w0;
	elseif (t_0 <= 1e+301)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(0.5 / d) * Float64(M * D)) ^ 2.0) * Float64(h / l)))));
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(M * Float64(D * Float64(Float64(D / l) * Float64(h / d)))) / Float64(d / M))))));
	end
	return tmp
end
function tmp = code(w0, M, D, h, l, d)
	tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))));
end
function tmp_2 = code(w0, M, D, h, l, d)
	t_0 = ((M * D) / (2.0 * d)) ^ 2.0;
	tmp = 0.0;
	if (t_0 <= 5e-308)
		tmp = w0;
	elseif (t_0 <= 1e+301)
		tmp = w0 * sqrt((1.0 - ((((0.5 / d) * (M * D)) ^ 2.0) * (h / l))));
	else
		tmp = w0 * sqrt((1.0 - (0.25 * ((M * (D * ((D / l) * (h / d)))) / (d / M)))));
	end
	tmp_2 = 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[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$0, 5e-308], w0, If[LessEqual[t$95$0, 1e+301], N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(0.5 / d), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(M * N[(D * N[(N[(D / l), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / M), $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}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-308}:\\
\;\;\;\;w0\\

\mathbf{elif}\;t_0 \leq 10^{+301}:\\
\;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{0.5}{d} \cdot \left(M \cdot D\right)\right)}^{2} \cdot \frac{h}{\ell}}\\

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


\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 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) < 4.99999999999999955e-308

    1. Initial program 7.0

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

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 - {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h}{\ell}}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (*.f64 (/.f64 D 2) (/.f64 M d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D M) (*.f64 2 d))) 2) (/.f64 h l))))): 4 points increase in error, 4 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 M D)) (*.f64 2 d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in D around 0 0.9

      \[\leadsto \color{blue}{w0} \]

    if 4.99999999999999955e-308 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) < 1.00000000000000005e301

    1. Initial program 5.9

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

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

    if 1.00000000000000005e301 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)

    1. Initial program 63.4

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

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 - {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h}{\ell}}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (*.f64 (/.f64 D 2) (/.f64 M d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D M) (*.f64 2 d))) 2) (/.f64 h l))))): 4 points increase in error, 4 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 M D)) (*.f64 2 d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in D around 0 61.6

      \[\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. Simplified57.2

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

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

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

Alternatives

Alternative 1
Error13.2
Cost8664
\[\begin{array}{l} t_0 := w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(M \cdot D\right) \cdot \frac{M \cdot \left(h \cdot \frac{\frac{D}{d}}{\ell}\right)}{d}\right)}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-77}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 1.6 \cdot 10^{-264}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(D \cdot \left(\frac{D}{\ell} \cdot \frac{\frac{M}{d}}{\frac{d}{M \cdot h}}\right)\right) \cdot -0.25}\\ \mathbf{elif}\;d \leq 1.2 \cdot 10^{-124}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\left(M \cdot D\right) \cdot \frac{\frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}{d}\right) \cdot -0.25}\\ \mathbf{elif}\;d \leq 1.02 \cdot 10^{-66}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)}\\ \mathbf{elif}\;d \leq 5 \cdot 10^{+122}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(D \cdot \left(M \cdot \left(\frac{M}{d} \cdot \left(D \cdot \frac{\frac{h}{\ell}}{d}\right)\right)\right)\right)}\\ \mathbf{elif}\;d \leq 5 \cdot 10^{+197}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \frac{\frac{D \cdot \left(\frac{h}{d} \cdot \left(M \cdot \frac{M}{d}\right)\right)}{\ell}}{\frac{1}{D}}}\\ \end{array} \]
Alternative 2
Error14.1
Cost8404
\[\begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-70}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(M \cdot D\right) \cdot \frac{M \cdot \left(h \cdot \frac{\frac{D}{d}}{\ell}\right)}{d}\right)}\\ \mathbf{elif}\;d \leq 5 \cdot 10^{-266}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{\frac{M}{d}}{\frac{d}{M \cdot h}} \cdot \frac{D}{\frac{\ell}{D}}\right)}\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-170}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\left(M \cdot D\right) \cdot \frac{\frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}{d}\right) \cdot -0.25}\\ \mathbf{elif}\;d \leq 3.5 \cdot 10^{-124}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(D \cdot \left(\frac{M}{d} \cdot \left(\frac{D}{\ell} \cdot \left(M \cdot \frac{h}{d}\right)\right)\right)\right)}\\ \mathbf{elif}\;d \leq 2 \cdot 10^{-29}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\left(d \cdot d\right) \cdot \frac{\ell}{D}}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(D \cdot \left(M \cdot \left(\frac{M}{d} \cdot \left(D \cdot \frac{\frac{h}{\ell}}{d}\right)\right)\right)\right)}\\ \end{array} \]
Alternative 3
Error13.9
Cost8272
\[\begin{array}{l} \mathbf{if}\;d \leq -8.8 \cdot 10^{-71}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(M \cdot D\right) \cdot \frac{M \cdot \left(h \cdot \frac{\frac{D}{d}}{\ell}\right)}{d}\right)}\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-263}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(D \cdot \left(\frac{D}{\ell} \cdot \frac{\frac{M}{d}}{\frac{d}{M \cdot h}}\right)\right) \cdot -0.25}\\ \mathbf{elif}\;d \leq 1.2 \cdot 10^{-124}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\left(M \cdot D\right) \cdot \frac{\frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}{d}\right) \cdot -0.25}\\ \mathbf{elif}\;d \leq 2 \cdot 10^{-64}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(D \cdot \left(M \cdot \left(\frac{M}{d} \cdot \left(D \cdot \frac{\frac{h}{\ell}}{d}\right)\right)\right)\right)}\\ \end{array} \]
Alternative 4
Error12.2
Cost8264
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+283}:\\ \;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \frac{D}{\frac{\ell \cdot {\left(\frac{d}{M}\right)}^{2}}{D \cdot h}}\right)\\ \mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{-111}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(D \cdot \left(M \cdot \left(\frac{M}{d} \cdot \left(D \cdot \frac{\frac{h}{\ell}}{d}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error13.2
Cost8008
\[\begin{array}{l} \mathbf{if}\;M \leq -7.5 \cdot 10^{-5}:\\ \;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(D \cdot \left(M \cdot \left(\frac{M}{d} \cdot \left(D \cdot \frac{\frac{h}{\ell}}{d}\right)\right)\right)\right)}\\ \mathbf{elif}\;M \leq 7.4 \cdot 10^{-273}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(D \cdot \left(\frac{M}{d} \cdot \left(\frac{D}{\ell} \cdot \left(M \cdot \frac{h}{d}\right)\right)\right)\right)}\\ \end{array} \]
Alternative 6
Error12.4
Cost7876
\[\begin{array}{l} \mathbf{if}\;M \leq -2.5 \cdot 10^{-269}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(M \cdot D\right) \cdot \frac{M \cdot \left(h \cdot \frac{\frac{D}{d}}{\ell}\right)}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(D \cdot \left(\frac{M}{d} \cdot \left(\frac{D}{\ell} \cdot \left(M \cdot \frac{h}{d}\right)\right)\right)\right)}\\ \end{array} \]
Alternative 7
Error13.6
Cost64
\[w0 \]

Error

Reproduce

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