?

Average Error: 14.0 → 8.8
Time: 18.8s
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}\\ t_1 := \left(D \cdot \frac{M}{d}\right) \cdot 0.5\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{-48}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{-1}{\frac{\ell}{t_1} \cdot \frac{\frac{1}{h}}{t_1}}}\\ \mathbf{elif}\;t_0 \leq 10^{+278}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot \frac{M}{\ell}\right)\right)\right)}{\frac{d}{D}}}{d}}\\ \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)) (t_1 (* (* D (/ M d)) 0.5)))
   (if (<= t_0 5e-48)
     (* w0 (sqrt (+ 1.0 (/ -1.0 (* (/ l t_1) (/ (/ 1.0 h) t_1))))))
     (if (<= t_0 1e+278)
       (* w0 (sqrt (- 1.0 (* t_0 (/ h l)))))
       (*
        w0
        (sqrt
         (- 1.0 (/ (/ (* D (* 0.25 (* h (* M (/ M l))))) (/ d D)) 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);
	double t_1 = (D * (M / d)) * 0.5;
	double tmp;
	if (t_0 <= 5e-48) {
		tmp = w0 * sqrt((1.0 + (-1.0 / ((l / t_1) * ((1.0 / h) / t_1)))));
	} else if (t_0 <= 1e+278) {
		tmp = w0 * sqrt((1.0 - (t_0 * (h / l))));
	} else {
		tmp = w0 * sqrt((1.0 - (((D * (0.25 * (h * (M * (M / l))))) / (d / D)) / d)));
	}
	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) :: t_1
    real(8) :: tmp
    t_0 = ((m * d) / (2.0d0 * d_1)) ** 2.0d0
    t_1 = (d * (m / d_1)) * 0.5d0
    if (t_0 <= 5d-48) then
        tmp = w0 * sqrt((1.0d0 + ((-1.0d0) / ((l / t_1) * ((1.0d0 / h) / t_1)))))
    else if (t_0 <= 1d+278) then
        tmp = w0 * sqrt((1.0d0 - (t_0 * (h / l))))
    else
        tmp = w0 * sqrt((1.0d0 - (((d * (0.25d0 * (h * (m * (m / l))))) / (d_1 / d)) / d_1)))
    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 t_1 = (D * (M / d)) * 0.5;
	double tmp;
	if (t_0 <= 5e-48) {
		tmp = w0 * Math.sqrt((1.0 + (-1.0 / ((l / t_1) * ((1.0 / h) / t_1)))));
	} else if (t_0 <= 1e+278) {
		tmp = w0 * Math.sqrt((1.0 - (t_0 * (h / l))));
	} else {
		tmp = w0 * Math.sqrt((1.0 - (((D * (0.25 * (h * (M * (M / l))))) / (d / D)) / d)));
	}
	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)
	t_1 = (D * (M / d)) * 0.5
	tmp = 0
	if t_0 <= 5e-48:
		tmp = w0 * math.sqrt((1.0 + (-1.0 / ((l / t_1) * ((1.0 / h) / t_1)))))
	elif t_0 <= 1e+278:
		tmp = w0 * math.sqrt((1.0 - (t_0 * (h / l))))
	else:
		tmp = w0 * math.sqrt((1.0 - (((D * (0.25 * (h * (M * (M / l))))) / (d / D)) / 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(M * D) / Float64(2.0 * d)) ^ 2.0
	t_1 = Float64(Float64(D * Float64(M / d)) * 0.5)
	tmp = 0.0
	if (t_0 <= 5e-48)
		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-1.0 / Float64(Float64(l / t_1) * Float64(Float64(1.0 / h) / t_1))))));
	elseif (t_0 <= 1e+278)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(t_0 * Float64(h / l)))));
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D * Float64(0.25 * Float64(h * Float64(M * Float64(M / l))))) / Float64(d / D)) / d))));
	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;
	t_1 = (D * (M / d)) * 0.5;
	tmp = 0.0;
	if (t_0 <= 5e-48)
		tmp = w0 * sqrt((1.0 + (-1.0 / ((l / t_1) * ((1.0 / h) / t_1)))));
	elseif (t_0 <= 1e+278)
		tmp = w0 * sqrt((1.0 - (t_0 * (h / l))));
	else
		tmp = w0 * sqrt((1.0 - (((D * (0.25 * (h * (M * (M / l))))) / (d / D)) / d)));
	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]}, Block[{t$95$1 = N[(N[(D * N[(M / d), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-48], N[(w0 * N[Sqrt[N[(1.0 + N[(-1.0 / N[(N[(l / t$95$1), $MachinePrecision] * N[(N[(1.0 / h), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+278], N[(w0 * N[Sqrt[N[(1.0 - N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D * N[(0.25 * N[(h * N[(M * N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision] / d), $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}\\
t_1 := \left(D \cdot \frac{M}{d}\right) \cdot 0.5\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-48}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{-1}{\frac{\ell}{t_1} \cdot \frac{\frac{1}{h}}{t_1}}}\\

\mathbf{elif}\;t_0 \leq 10^{+278}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{h}{\ell}}\\

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


\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.9999999999999999e-48

    1. Initial program 6.2

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

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{1}{\frac{\ell}{h} \cdot \left(\left(\frac{2}{D} \cdot \frac{d}{M}\right) \cdot \left(\frac{2}{D} \cdot \frac{d}{M}\right)\right)}}} \]
    3. Applied egg-rr5.7

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

      \[\leadsto w0 \cdot \sqrt{1 - \frac{1}{\color{blue}{\frac{\frac{\ell}{h}}{0.25 \cdot \frac{D \cdot \frac{M}{d}}{\frac{d}{D \cdot M}}}}}} \]
      Proof

      [Start]5.7

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

      associate-/l* [=>]5.7

      \[ w0 \cdot \sqrt{1 - \frac{1}{\color{blue}{\frac{\frac{\ell}{h}}{\frac{0.5 \cdot \frac{D}{\frac{d}{M}}}{\frac{2}{D} \cdot \frac{d}{M}}}}}} \]

      times-frac [<=]5.8

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{\frac{0.5 \cdot \frac{D}{\frac{d}{M}}}{\color{blue}{\frac{2 \cdot d}{D \cdot M}}}}}} \]

      associate-*r/ [<=]5.8

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{\frac{0.5 \cdot \frac{D}{\frac{d}{M}}}{\color{blue}{2 \cdot \frac{d}{D \cdot M}}}}}} \]

      times-frac [=>]5.8

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{\color{blue}{\frac{0.5}{2} \cdot \frac{\frac{D}{\frac{d}{M}}}{\frac{d}{D \cdot M}}}}}} \]

      metadata-eval [=>]5.8

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{\color{blue}{0.25} \cdot \frac{\frac{D}{\frac{d}{M}}}{\frac{d}{D \cdot M}}}}} \]

      associate-/l* [<=]5.6

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{0.25 \cdot \frac{\color{blue}{\frac{D \cdot M}{d}}}{\frac{d}{D \cdot M}}}}} \]

      associate-*r/ [<=]5.7

      \[ w0 \cdot \sqrt{1 - \frac{1}{\frac{\frac{\ell}{h}}{0.25 \cdot \frac{\color{blue}{D \cdot \frac{M}{d}}}{\frac{d}{D \cdot M}}}}} \]
    5. Applied egg-rr0.5

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

    if 4.9999999999999999e-48 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) < 9.99999999999999964e277

    1. Initial program 8.4

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

    if 9.99999999999999964e277 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)

    1. Initial program 60.7

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

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

      [Start]60.7

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

      associate-/l* [=>]56.4

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

      \[\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. Simplified62.0

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

      [Start]61.2

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

      *-commutative [=>]61.2

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

      *-commutative [=>]61.2

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

      *-commutative [=>]61.2

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

      times-frac [=>]62.1

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

      associate-*l* [=>]62.1

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

      unpow2 [=>]62.1

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

      unpow2 [=>]62.1

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

      *-commutative [<=]62.1

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

      associate-/l* [=>]62.0

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

      unpow2 [=>]62.0

      \[ w0 \cdot \sqrt{1 - \frac{D \cdot D}{d \cdot d} \cdot \left(\frac{\color{blue}{M \cdot M}}{\frac{\ell}{h}} \cdot 0.25\right)} \]
    5. Applied egg-rr58.4

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

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

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

      [Start]57.9

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

      associate-/l* [=>]57.8

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

      unpow2 [=>]57.8

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

      associate-/r* [=>]53.4

      \[ w0 \cdot \sqrt{1 - \frac{\left(\frac{D}{d} \cdot D\right) \cdot \left(0.25 \cdot \frac{h}{\color{blue}{\frac{\frac{\ell}{M}}{M}}}\right)}{d}} \]
    8. Applied egg-rr51.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \leq 5 \cdot 10^{-48}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{-1}{\frac{\ell}{\left(D \cdot \frac{M}{d}\right) \cdot 0.5} \cdot \frac{\frac{1}{h}}{\left(D \cdot \frac{M}{d}\right) \cdot 0.5}}}\\ \mathbf{elif}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \leq 10^{+278}:\\ \;\;\;\;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{\frac{D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot \frac{M}{\ell}\right)\right)\right)}{\frac{d}{D}}}{d}}\\ \end{array} \]

Alternatives

Alternative 1
Error10.2
Cost8392
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{\left(D \cdot \left(\frac{D}{d} \cdot \left(M \cdot M\right)\right)\right) \cdot \left(h \cdot 0.25\right)}{\ell}}{d}}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{-262}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{-1}{\frac{\frac{\ell}{h}}{0.25 \cdot \frac{D \cdot \frac{M}{d}}{\frac{d}{M \cdot D}}}}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 2
Error9.2
Cost8392
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{\left(D \cdot \left(\frac{D}{d} \cdot \left(M \cdot M\right)\right)\right) \cdot \left(h \cdot 0.25\right)}{\ell}}{d}}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -6 \cdot 10^{-246}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{M \cdot \left(\frac{D}{d} \cdot -0.5\right)}{\frac{\ell}{h} \cdot \frac{2}{M \cdot \frac{D}{d}}}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 3
Error9.2
Cost8392
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+243}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{-1}{\frac{\ell}{\left(D \cdot \frac{M}{d}\right) \cdot 0.5} \cdot \left(2 \cdot \frac{d}{D \cdot \left(M \cdot h\right)}\right)}}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -6 \cdot 10^{-246}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{M \cdot \left(\frac{D}{d} \cdot -0.5\right)}{\frac{\ell}{h} \cdot \frac{2}{M \cdot \frac{D}{d}}}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 4
Error13.9
Cost8008
\[\begin{array}{l} \mathbf{if}\;M \leq -1.08 \cdot 10^{+86}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq -9 \cdot 10^{-56}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{M \cdot M}{\frac{\ell}{h}} \cdot -0.25\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error12.8
Cost8008
\[\begin{array}{l} \mathbf{if}\;d \leq -1.36 \cdot 10^{-21}:\\ \;\;\;\;w0\\ \mathbf{elif}\;d \leq 10^{+144}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{D \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot \left(\frac{h}{\ell} \cdot -0.25\right)\right)\right)}{d}}{d}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 6
Error8.5
Cost8000
\[w0 \cdot \sqrt{1 + \frac{-1}{\frac{\ell}{\left(D \cdot \frac{M}{d}\right) \cdot 0.5} \cdot \frac{\frac{2}{\frac{D}{\frac{d}{M}}}}{h}}} \]
Alternative 7
Error13.8
Cost64
\[w0 \]

Error

Reproduce?

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