?

Average Accuracy: 78.1% → 84.7%
Time: 24.6s
Precision: binary64
Cost: 14088

?

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

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

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


\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 h < -2e20

    1. Initial program 65.5%

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

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

      [Start]65.5

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

      associate-*l/ [<=]65.1

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

      *-commutative [=>]65.1

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

      \[\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)}}} \]
      Proof
    4. No proof available- proof too large to flatten.
    5. Simplified60.6%

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

      [Start]52.1

      \[ 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)}} \]

      times-frac [=>]56.7

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

      *-commutative [=>]56.7

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

      associate-/l* [=>]53.5

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

      *-commutative [=>]53.5

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

      associate-*l* [=>]53.6

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

      times-frac [=>]60.6

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

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\left(D \cdot \frac{M}{d}\right) \cdot M}{\left(d \cdot 4\right) \cdot \frac{\ell}{h \cdot D}}}} \]
      Proof
    7. No proof available- proof too large to flatten.
    8. Applied egg-rr67.9%

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{D \cdot \frac{M}{d}}{\frac{\ell}{D \cdot h}} \cdot \frac{M}{d \cdot 4}}} \]
      Proof
    9. No proof available- proof too large to flatten.
    10. Applied egg-rr77.7%

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left(\frac{D \cdot \frac{M}{d}}{\frac{\ell}{D}} \cdot h\right)} \cdot \frac{M}{d \cdot 4}} \]
      Proof
    11. No proof available- proof too large to flatten.

    if -2e20 < h < 2.00000000000000004e64

    1. Initial program 86.3%

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

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

      [Start]86.3

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

      associate-*l/ [<=]85.8

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

      *-commutative [=>]85.8

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

      \[\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)}}} \]
      Proof
    4. No proof available- proof too large to flatten.
    5. Simplified84.1%

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

      [Start]68.2

      \[ 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)}} \]

      times-frac [=>]75.4

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

      *-commutative [=>]75.4

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

      associate-/l* [=>]74.2

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

      *-commutative [=>]74.2

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

      associate-*l* [=>]74.2

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

      times-frac [=>]84.1

      \[ w0 \cdot \sqrt{1 - \frac{M}{\frac{\frac{\ell}{h}}{D}} \cdot \color{blue}{\left(\frac{M}{d} \cdot \frac{D}{d \cdot 4}\right)}} \]
    6. Applied egg-rr84.7%

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\left(D \cdot \frac{M}{d}\right) \cdot M}{\left(d \cdot 4\right) \cdot \frac{\ell}{h \cdot D}}}} \]
      Proof
    7. No proof available- proof too large to flatten.
    8. Applied egg-rr87.7%

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{D \cdot \frac{M}{d}}{\frac{\ell}{D \cdot h}} \cdot \frac{M}{d \cdot 4}}} \]
      Proof
    9. No proof available- proof too large to flatten.
    10. Applied egg-rr88.1%

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{D}{\frac{d \cdot 4}{M} \cdot \left(\frac{\ell}{D \cdot h} \cdot \frac{d}{M}\right)}}} \]
      Proof
    11. No proof available- proof too large to flatten.

    if 2.00000000000000004e64 < h

    1. Initial program 63.1%

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

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

      [Start]63.1

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

      associate-*l/ [<=]63.3

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

      *-commutative [=>]63.3

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

      \[\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)}} \]
      Proof
    4. No proof available- proof too large to flatten.
    5. Simplified80.7%

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

      [Start]63.3

      \[ 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 [=>]63.3

      \[ 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/ [=>]78.4

      \[ 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/ [<=]80.8

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

      *-commutative [=>]80.8

      \[ 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* [=>]80.8

      \[ 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/ [=>]80.6

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

      *-commutative [<=]80.6

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

      metadata-eval [<=]80.6

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

      times-frac [<=]80.6

      \[ 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 [<=]80.6

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

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

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

      *-commutative [<=]80.6

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

      associate-/l* [=>]80.8

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

      *-commutative [=>]80.8

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

      neg-mul-1 [=>]80.8

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

      times-frac [=>]80.8

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

      metadata-eval [=>]80.8

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

      associate-*r/ [=>]80.8

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

      associate-/l* [<=]80.6

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

      times-frac [=>]80.7

      \[ w0 \cdot \sqrt{1 - h \cdot \frac{{\color{blue}{\left(\frac{D}{2} \cdot \frac{M}{d}\right)}}^{2}}{\ell}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.7%

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

Alternatives

Alternative 1
Accuracy78.1%
Cost8140
\[\begin{array}{l} \mathbf{if}\;M \leq -15000:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq -9.5 \cdot 10^{-173}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{M \cdot \frac{D}{d}}{\frac{d \cdot -4}{D}}}{\frac{\ell}{h \cdot M}}}\\ \mathbf{elif}\;M \leq 5.2 \cdot 10^{-227}:\\ \;\;\;\;w0 \cdot \left(1 + \left(D \cdot \left(D \cdot \frac{h}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{M}\right)}\right)\right) \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(D \cdot M\right) \cdot \left(h \cdot \left(D \cdot M\right)\right)}{d \cdot \left(d \cdot \ell\right)} \cdot -0.25}\\ \end{array} \]
Alternative 2
Accuracy82.7%
Cost8009
\[\begin{array}{l} \mathbf{if}\;h \leq -5 \cdot 10^{-114} \lor \neg \left(h \leq 5 \cdot 10^{-89}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(h \cdot \frac{D \cdot \frac{M}{d}}{\frac{\ell}{D}}\right) \cdot \frac{M}{d \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{M \cdot \frac{D}{d}}{\frac{d \cdot -4}{D}}}{\frac{\ell}{h \cdot M}}}\\ \end{array} \]
Alternative 3
Accuracy84.0%
Cost8009
\[\begin{array}{l} t_0 := D \cdot \frac{M}{d}\\ t_1 := \frac{M}{d \cdot 4}\\ \mathbf{if}\;h \leq -2 \cdot 10^{+59} \lor \neg \left(h \leq 5 \cdot 10^{-88}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(h \cdot \frac{t_0}{\frac{\ell}{D}}\right) \cdot t_1}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_1 \cdot \frac{t_0}{\frac{\ell}{h \cdot D}}}\\ \end{array} \]
Alternative 4
Accuracy84.3%
Cost8009
\[\begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{+24} \lor \neg \left(h \leq 5 \cdot 10^{+43}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(h \cdot \frac{D \cdot \frac{M}{d}}{\frac{\ell}{D}}\right) \cdot \frac{M}{d \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{D}{\frac{d \cdot 4}{M} \cdot \left(\frac{\ell}{h \cdot D} \cdot \frac{d}{M}\right)}}\\ \end{array} \]
Alternative 5
Accuracy79.7%
Cost8008
\[\begin{array}{l} \mathbf{if}\;D \leq 1.15 \cdot 10^{-141}:\\ \;\;\;\;w0\\ \mathbf{elif}\;D \leq 5.3 \cdot 10^{+185}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{M \cdot \frac{D}{d}}{\frac{d \cdot -4}{D}}}{\frac{\ell}{h \cdot M}}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 6
Accuracy78.5%
Cost64
\[w0 \]

Error

Reproduce?

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