?

Average Error: 21.65% → 14.48%
Time: 17.7s
Precision: binary64
Cost: 14856

?

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

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

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


\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 (/.f64 (*.f64 M D) (*.f64 2 d)) < -9.99999999999999962e134

    1. Initial program 94.63

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

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

      [Start]94.63

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

      associate-*l/ [<=]88.01

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

      *-commutative [=>]88.01

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

      \[\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. Simplified79.51

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

      [Start]95.95

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

      *-commutative [=>]95.95

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

      *-commutative [=>]95.95

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

      *-commutative [<=]95.95

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

      associate-*r* [=>]96.68

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

      unpow2 [=>]96.68

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

      unpow2 [=>]96.68

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

      swap-sqr [<=]91.73

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

      associate-*l* [=>]87.32

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

      unpow2 [=>]87.32

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

      associate-*l* [=>]79.51

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

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

    if -9.99999999999999962e134 < (/.f64 (*.f64 M D) (*.f64 2 d)) < 2.0000000000000001e92

    1. Initial program 9.84

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

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

      [Start]9.84

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

      associate-*l/ [<=]10.48

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

      *-commutative [=>]10.48

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

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

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

      [Start]10.5

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

      +-rgt-identity [=>]10.5

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

      associate-*r/ [=>]4.42

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

      associate-*l/ [<=]4.29

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

      *-commutative [=>]4.29

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

      associate-*r* [=>]4.29

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

      associate-*l/ [=>]3.67

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

      *-commutative [<=]3.67

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

      metadata-eval [<=]3.67

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

      times-frac [<=]3.67

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

      neg-mul-1 [<=]3.67

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

      distribute-rgt-neg-in [=>]3.67

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

      *-commutative [<=]3.67

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

      associate-/l* [=>]4.09

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

      *-commutative [=>]4.09

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

      neg-mul-1 [=>]4.09

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

      times-frac [=>]4.09

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

      metadata-eval [=>]4.09

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

      associate-*r/ [=>]4.09

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

      associate-/l* [<=]3.67

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

      times-frac [=>]4.29

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

    if 2.0000000000000001e92 < (/.f64 (*.f64 M D) (*.f64 2 d))

    1. Initial program 79.47

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

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

      [Start]79.47

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

      associate-*l/ [<=]77.18

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

      *-commutative [=>]77.18

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

      \[\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. Simplified71.07

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

      [Start]92.62

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

      *-commutative [=>]92.62

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

      *-commutative [=>]92.62

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

      *-commutative [<=]92.62

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

      associate-*r* [=>]93.97

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

      unpow2 [=>]93.97

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

      unpow2 [=>]93.97

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

      swap-sqr [<=]86.31

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

      associate-*l* [=>]80.12

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

      unpow2 [=>]80.12

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

      associate-*l* [=>]71.07

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

      \[\leadsto w0 \cdot \sqrt{1 - 0.25 \cdot \color{blue}{\left(\left(\frac{D}{d} \cdot M\right) \cdot \left(\left(\frac{D}{d} \cdot M\right) \cdot \frac{h}{\ell}\right)\right)}} \]
    6. Applied egg-rr62.35

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

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

Alternatives

Alternative 1
Error14.89%
Cost8524
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\left(M \cdot D\right) \cdot \frac{M \cdot D}{\frac{d \cdot \left(d \cdot \ell\right)}{h}}\right) \cdot -0.25}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -4 \cdot 10^{-66}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right) \cdot -0.25}\\ \mathbf{elif}\;\frac{h}{\ell} \leq 0:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(M \cdot \frac{D}{\frac{d \cdot \ell}{h} \cdot \frac{d}{M \cdot D}}\right) \cdot -0.25}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 2
Error14.44%
Cost8524
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot D\right) \cdot \left(\left(M \cdot D\right) \cdot h\right)}{d \cdot \left(d \cdot \ell\right)} \cdot -0.25}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -4 \cdot 10^{-66}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right) \cdot -0.25}\\ \mathbf{elif}\;\frac{h}{\ell} \leq 0:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(M \cdot \frac{D}{\frac{d \cdot \ell}{h} \cdot \frac{d}{M \cdot D}}\right) \cdot -0.25}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 3
Error13.86%
Cost8264
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\ \;\;\;\;w0\\ \mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-313}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right) \cdot -0.25}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 4
Error15.02%
Cost8264
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{-66}:\\ \;\;\;\;w0 \cdot \sqrt{1 + h \cdot \frac{\frac{M \cdot D}{\frac{-4}{\frac{\frac{M \cdot D}{d}}{d}}}}{\ell}}\\ \mathbf{elif}\;\frac{h}{\ell} \leq 0:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(M \cdot \frac{D}{\frac{d \cdot \ell}{h} \cdot \frac{d}{M \cdot D}}\right) \cdot -0.25}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error14.93%
Cost7876
\[\begin{array}{l} \mathbf{if}\;M \leq -7 \cdot 10^{+51}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(M \cdot \frac{D}{\frac{d \cdot \ell}{h} \cdot \frac{d}{M \cdot D}}\right) \cdot -0.25}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\left(M \cdot \frac{D}{d}\right) \cdot \frac{\frac{D}{d} \cdot \left(M \cdot h\right)}{\ell}\right) \cdot -0.25}\\ \end{array} \]
Alternative 6
Error21.14%
Cost64
\[w0 \]

Error

Reproduce?

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