?

Average Error: 14.4 → 9.5
Time: 21.2s
Precision: binary64
Cost: 14992

?

\[ \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 := d \cdot \left(\ell \cdot 4\right)\\ t_1 := w0 \cdot \sqrt{1 - \frac{h \cdot \frac{{\left(M \cdot D\right)}^{2}}{t_0}}{d}}\\ \mathbf{if}\;M \cdot D \leq -4 \cdot 10^{+141}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{\frac{\ell}{h} \cdot \left(\left(\frac{d}{M} \cdot \frac{2}{D}\right) \cdot \left(d \cdot \frac{2}{D}\right)\right)}}\\ \mathbf{elif}\;M \cdot D \leq -2 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;M \cdot D \leq 2 \cdot 10^{-39}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{M \cdot 0.5}{\frac{d}{D}}\right)}^{2}}{\ell}}\\ \mathbf{elif}\;M \cdot D \leq 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{t_0}\right) \cdot \frac{D}{d}\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 (* d (* l 4.0)))
        (t_1 (* w0 (sqrt (- 1.0 (/ (* h (/ (pow (* M D) 2.0) t_0)) d))))))
   (if (<= (* M D) -4e+141)
     (*
      w0
      (sqrt
       (- 1.0 (/ M (* (/ l h) (* (* (/ d M) (/ 2.0 D)) (* d (/ 2.0 D))))))))
     (if (<= (* M D) -2e-141)
       t_1
       (if (<= (* M D) 2e-39)
         (* w0 (sqrt (- 1.0 (/ (* h (pow (/ (* M 0.5) (/ d D)) 2.0)) l))))
         (if (<= (* M D) 1e+36)
           t_1
           (* w0 (sqrt (- 1.0 (* (* M D) (* (* h (/ M t_0)) (/ 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 = d * (l * 4.0);
	double t_1 = w0 * sqrt((1.0 - ((h * (pow((M * D), 2.0) / t_0)) / d)));
	double tmp;
	if ((M * D) <= -4e+141) {
		tmp = w0 * sqrt((1.0 - (M / ((l / h) * (((d / M) * (2.0 / D)) * (d * (2.0 / D)))))));
	} else if ((M * D) <= -2e-141) {
		tmp = t_1;
	} else if ((M * D) <= 2e-39) {
		tmp = w0 * sqrt((1.0 - ((h * pow(((M * 0.5) / (d / D)), 2.0)) / l)));
	} else if ((M * D) <= 1e+36) {
		tmp = t_1;
	} else {
		tmp = w0 * sqrt((1.0 - ((M * D) * ((h * (M / t_0)) * (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 = d_1 * (l * 4.0d0)
    t_1 = w0 * sqrt((1.0d0 - ((h * (((m * d) ** 2.0d0) / t_0)) / d_1)))
    if ((m * d) <= (-4d+141)) then
        tmp = w0 * sqrt((1.0d0 - (m / ((l / h) * (((d_1 / m) * (2.0d0 / d)) * (d_1 * (2.0d0 / d)))))))
    else if ((m * d) <= (-2d-141)) then
        tmp = t_1
    else if ((m * d) <= 2d-39) then
        tmp = w0 * sqrt((1.0d0 - ((h * (((m * 0.5d0) / (d_1 / d)) ** 2.0d0)) / l)))
    else if ((m * d) <= 1d+36) then
        tmp = t_1
    else
        tmp = w0 * sqrt((1.0d0 - ((m * d) * ((h * (m / t_0)) * (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 = d * (l * 4.0);
	double t_1 = w0 * Math.sqrt((1.0 - ((h * (Math.pow((M * D), 2.0) / t_0)) / d)));
	double tmp;
	if ((M * D) <= -4e+141) {
		tmp = w0 * Math.sqrt((1.0 - (M / ((l / h) * (((d / M) * (2.0 / D)) * (d * (2.0 / D)))))));
	} else if ((M * D) <= -2e-141) {
		tmp = t_1;
	} else if ((M * D) <= 2e-39) {
		tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow(((M * 0.5) / (d / D)), 2.0)) / l)));
	} else if ((M * D) <= 1e+36) {
		tmp = t_1;
	} else {
		tmp = w0 * Math.sqrt((1.0 - ((M * D) * ((h * (M / t_0)) * (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 = d * (l * 4.0)
	t_1 = w0 * math.sqrt((1.0 - ((h * (math.pow((M * D), 2.0) / t_0)) / d)))
	tmp = 0
	if (M * D) <= -4e+141:
		tmp = w0 * math.sqrt((1.0 - (M / ((l / h) * (((d / M) * (2.0 / D)) * (d * (2.0 / D)))))))
	elif (M * D) <= -2e-141:
		tmp = t_1
	elif (M * D) <= 2e-39:
		tmp = w0 * math.sqrt((1.0 - ((h * math.pow(((M * 0.5) / (d / D)), 2.0)) / l)))
	elif (M * D) <= 1e+36:
		tmp = t_1
	else:
		tmp = w0 * math.sqrt((1.0 - ((M * D) * ((h * (M / t_0)) * (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(d * Float64(l * 4.0))
	t_1 = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * Float64((Float64(M * D) ^ 2.0) / t_0)) / d))))
	tmp = 0.0
	if (Float64(M * D) <= -4e+141)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(M / Float64(Float64(l / h) * Float64(Float64(Float64(d / M) * Float64(2.0 / D)) * Float64(d * Float64(2.0 / D))))))));
	elseif (Float64(M * D) <= -2e-141)
		tmp = t_1;
	elseif (Float64(M * D) <= 2e-39)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(M * 0.5) / Float64(d / D)) ^ 2.0)) / l))));
	elseif (Float64(M * D) <= 1e+36)
		tmp = t_1;
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M * D) * Float64(Float64(h * Float64(M / t_0)) * Float64(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 = d * (l * 4.0);
	t_1 = w0 * sqrt((1.0 - ((h * (((M * D) ^ 2.0) / t_0)) / d)));
	tmp = 0.0;
	if ((M * D) <= -4e+141)
		tmp = w0 * sqrt((1.0 - (M / ((l / h) * (((d / M) * (2.0 / D)) * (d * (2.0 / D)))))));
	elseif ((M * D) <= -2e-141)
		tmp = t_1;
	elseif ((M * D) <= 2e-39)
		tmp = w0 * sqrt((1.0 - ((h * (((M * 0.5) / (d / D)) ^ 2.0)) / l)));
	elseif ((M * D) <= 1e+36)
		tmp = t_1;
	else
		tmp = w0 * sqrt((1.0 - ((M * D) * ((h * (M / t_0)) * (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[(d * N[(l * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[(N[Power[N[(M * D), $MachinePrecision], 2.0], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(M * D), $MachinePrecision], -4e+141], N[(w0 * N[Sqrt[N[(1.0 - N[(M / N[(N[(l / h), $MachinePrecision] * N[(N[(N[(d / M), $MachinePrecision] * N[(2.0 / D), $MachinePrecision]), $MachinePrecision] * N[(d * N[(2.0 / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(M * D), $MachinePrecision], -2e-141], t$95$1, If[LessEqual[N[(M * D), $MachinePrecision], 2e-39], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(M * 0.5), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(M * D), $MachinePrecision], 1e+36], t$95$1, N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M * D), $MachinePrecision] * N[(N[(h * N[(M / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(D / d), $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 := d \cdot \left(\ell \cdot 4\right)\\
t_1 := w0 \cdot \sqrt{1 - \frac{h \cdot \frac{{\left(M \cdot D\right)}^{2}}{t_0}}{d}}\\
\mathbf{if}\;M \cdot D \leq -4 \cdot 10^{+141}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{\frac{\ell}{h} \cdot \left(\left(\frac{d}{M} \cdot \frac{2}{D}\right) \cdot \left(d \cdot \frac{2}{D}\right)\right)}}\\

\mathbf{elif}\;M \cdot D \leq -2 \cdot 10^{-141}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;M \cdot D \leq 10^{+36}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if (*.f64 M D) < -4.00000000000000007e141

    1. Initial program 35.2

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

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

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

      [Start]32.5

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

      associate-/r/ [=>]32.5

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

      *-commutative [=>]32.5

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

      *-commutative [=>]32.5

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

      *-commutative [=>]32.5

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

      associate-*l/ [=>]32.5

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

      associate-*r/ [=>]36.4

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

      associate-/l* [=>]32.6

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

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

    if -4.00000000000000007e141 < (*.f64 M D) < -2.0000000000000001e-141 or 1.99999999999999986e-39 < (*.f64 M D) < 1.00000000000000004e36

    1. Initial program 13.7

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

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

      [Start]13.7

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

      associate-*l/ [<=]14.8

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

      *-commutative [=>]14.8

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

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

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

      [Start]14.5

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

      associate-/l* [=>]14.5

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

      associate-/r/ [=>]14.5

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

      *-commutative [=>]14.5

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

      unpow2 [<=]14.5

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

      associate-*r* [=>]14.5

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

      unpow2 [=>]14.5

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

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

    if -2.0000000000000001e-141 < (*.f64 M D) < 1.99999999999999986e-39

    1. Initial program 8.1

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

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

      [Start]8.1

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

      associate-*l/ [<=]8.4

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

      *-commutative [=>]8.4

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

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

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

    if 1.00000000000000004e36 < (*.f64 M D)

    1. Initial program 27.3

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

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

      [Start]27.3

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

      associate-*l/ [<=]26.0

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

      *-commutative [=>]26.0

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

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

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

      [Start]39.6

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

      associate-/l* [=>]27.2

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

      associate-/r/ [=>]27.2

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

      *-commutative [=>]27.2

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

      unpow2 [<=]27.2

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

      associate-*r* [=>]27.2

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

      unpow2 [=>]27.2

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

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

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

Alternatives

Alternative 1
Error9.3
Cost29452
\[\begin{array}{l} t_0 := {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{D}{\frac{\ell}{D}} \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot -0.25\right)}\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0}\\ \mathbf{elif}\;t_0 \leq \infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{h}{\ell \cdot 4}}{\frac{\frac{d}{D}}{M}} \cdot \left(M \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 2
Error8.8
Cost20804
\[\begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \leq 5 \cdot 10^{+265}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell \cdot {\left(2 \cdot \frac{d}{M \cdot D}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{h}{\ell \cdot 4}}{\frac{\frac{d}{D}}{M}} \cdot \left(M \cdot \frac{D}{d}\right)}\\ \end{array} \]
Alternative 3
Error9.3
Cost8264
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{d \cdot \left(\ell \cdot 4\right)}\right) \cdot \frac{D}{d}\right)}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-261}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{h}{\ell \cdot 4}}{\frac{\frac{d}{D}}{M}} \cdot \left(M \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 4
Error13.1
Cost8141
\[\begin{array}{l} \mathbf{if}\;M \leq -5 \cdot 10^{+139}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\frac{D}{\frac{\ell}{h} \cdot \left(d \cdot 4\right)} \cdot \frac{M}{d}\right)}\\ \mathbf{elif}\;M \leq -3.5 \cdot 10^{+30} \lor \neg \left(M \leq 2 \cdot 10^{-223}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{d \cdot \left(\ell \cdot 4\right)}\right) \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error13.1
Cost8141
\[\begin{array}{l} \mathbf{if}\;M \leq -1 \cdot 10^{+141}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\frac{h}{\ell} \cdot \frac{\frac{M \cdot D}{d \cdot d}}{4}\right)}\\ \mathbf{elif}\;M \leq -2.15 \cdot 10^{+30} \lor \neg \left(M \leq 8 \cdot 10^{-221}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{d \cdot \left(\ell \cdot 4\right)}\right) \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 6
Error14.1
Cost8008
\[\begin{array}{l} \mathbf{if}\;w0 \leq -2.05 \cdot 10^{-251}:\\ \;\;\;\;w0\\ \mathbf{elif}\;w0 \leq 4.8 \cdot 10^{-93}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{d \cdot \left(\ell \cdot 4\right)}\right) \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 7
Error13.3
Cost8008
\[\begin{array}{l} \mathbf{if}\;M \leq -5.1 \cdot 10^{+129}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{h}{\ell \cdot 4}}{d} \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot \frac{D}{d}\right)\right)}\\ \mathbf{elif}\;M \leq 10^{-220}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(M \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{d \cdot \left(\ell \cdot 4\right)}\right) \cdot \frac{D}{d}\right)}\\ \end{array} \]
Alternative 8
Error14.2
Cost64
\[w0 \]

Error

Reproduce?

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