?

Average Accuracy: 77.8% → 86.4%
Time: 20.5s
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} t_0 := \frac{M}{d} \cdot D\\ \mathbf{if}\;\ell \leq -20000:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \left(t_0 \cdot \frac{\frac{h}{\ell}}{4}\right)}\\ \mathbf{elif}\;\ell \leq -8 \cdot 10^{-237}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{t_0 \cdot h}{\ell \cdot 4}}\\ \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) D)))
   (if (<= l -20000.0)
     (* w0 (sqrt (- 1.0 (* t_0 (* t_0 (/ (/ h l) 4.0))))))
     (if (<= l -8e-237)
       (* w0 (sqrt (- 1.0 (/ (* h (pow (/ (* 0.5 (* M D)) d) 2.0)) l))))
       (* w0 (sqrt (- 1.0 (* t_0 (/ (* t_0 h) (* l 4.0))))))))))
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) * D;
	double tmp;
	if (l <= -20000.0) {
		tmp = w0 * sqrt((1.0 - (t_0 * (t_0 * ((h / l) / 4.0)))));
	} else if (l <= -8e-237) {
		tmp = w0 * sqrt((1.0 - ((h * pow(((0.5 * (M * D)) / d), 2.0)) / l)));
	} else {
		tmp = w0 * sqrt((1.0 - (t_0 * ((t_0 * h) / (l * 4.0)))));
	}
	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_1) * d
    if (l <= (-20000.0d0)) then
        tmp = w0 * sqrt((1.0d0 - (t_0 * (t_0 * ((h / l) / 4.0d0)))))
    else if (l <= (-8d-237)) then
        tmp = w0 * sqrt((1.0d0 - ((h * (((0.5d0 * (m * d)) / d_1) ** 2.0d0)) / l)))
    else
        tmp = w0 * sqrt((1.0d0 - (t_0 * ((t_0 * h) / (l * 4.0d0)))))
    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) * D;
	double tmp;
	if (l <= -20000.0) {
		tmp = w0 * Math.sqrt((1.0 - (t_0 * (t_0 * ((h / l) / 4.0)))));
	} else if (l <= -8e-237) {
		tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow(((0.5 * (M * D)) / d), 2.0)) / l)));
	} else {
		tmp = w0 * Math.sqrt((1.0 - (t_0 * ((t_0 * h) / (l * 4.0)))));
	}
	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) * D
	tmp = 0
	if l <= -20000.0:
		tmp = w0 * math.sqrt((1.0 - (t_0 * (t_0 * ((h / l) / 4.0)))))
	elif l <= -8e-237:
		tmp = w0 * math.sqrt((1.0 - ((h * math.pow(((0.5 * (M * D)) / d), 2.0)) / l)))
	else:
		tmp = w0 * math.sqrt((1.0 - (t_0 * ((t_0 * h) / (l * 4.0)))))
	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) * D)
	tmp = 0.0
	if (l <= -20000.0)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(t_0 * Float64(t_0 * Float64(Float64(h / l) / 4.0))))));
	elseif (l <= -8e-237)
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(0.5 * Float64(M * D)) / d) ^ 2.0)) / l))));
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(t_0 * Float64(Float64(t_0 * h) / Float64(l * 4.0))))));
	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) * D;
	tmp = 0.0;
	if (l <= -20000.0)
		tmp = w0 * sqrt((1.0 - (t_0 * (t_0 * ((h / l) / 4.0)))));
	elseif (l <= -8e-237)
		tmp = w0 * sqrt((1.0 - ((h * (((0.5 * (M * D)) / d) ^ 2.0)) / l)));
	else
		tmp = w0 * sqrt((1.0 - (t_0 * ((t_0 * h) / (l * 4.0)))));
	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] * D), $MachinePrecision]}, If[LessEqual[l, -20000.0], N[(w0 * N[Sqrt[N[(1.0 - N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -8e-237], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(0.5 * N[(M * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(t$95$0 * N[(N[(t$95$0 * h), $MachinePrecision] / N[(l * 4.0), $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 := \frac{M}{d} \cdot D\\
\mathbf{if}\;\ell \leq -20000:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \left(t_0 \cdot \frac{\frac{h}{\ell}}{4}\right)}\\

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

\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{t_0 \cdot h}{\ell \cdot 4}}\\


\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 l < -2e4

    1. Initial program 84.0%

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

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

      [Start]84.0

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

      times-frac [=>]83.6

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

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

      [Start]83.6

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

      associate-*r/ [=>]82.1

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

      associate-/l* [=>]83.6

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

      unpow2 [=>]83.6

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

      associate-*l/ [=>]83.6

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

      associate-*l/ [=>]83.6

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

      frac-times [=>]83.6

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

      associate-/l/ [=>]83.6

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

      clear-num [=>]83.6

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

      un-div-inv [=>]83.6

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

      associate-/r/ [=>]82.4

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

      clear-num [=>]82.4

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

      un-div-inv [=>]82.6

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

      associate-/r/ [=>]84.1

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

      metadata-eval [=>]84.1

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

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

      [Start]84.1

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

      div-inv [=>]84.1

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

      associate-*l* [=>]88.2

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

      associate-/r* [=>]88.2

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

      clear-num [<=]88.4

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

    if -2e4 < l < -7.9999999999999999e-237

    1. Initial program 71.6%

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

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

      [Start]71.6

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

      times-frac [=>]71.8

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

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

      [Start]71.8

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

      associate-*r/ [=>]84.4

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

      div-inv [=>]84.4

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

      metadata-eval [=>]84.4

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

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

      [Start]84.4

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

      associate-*r/ [=>]84.4

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

      *-commutative [=>]84.4

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

      associate-*l* [=>]84.4

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

    if -7.9999999999999999e-237 < l

    1. Initial program 76.7%

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

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

      [Start]76.7

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

      times-frac [=>]76.5

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

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

      [Start]76.5

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

      associate-*r/ [=>]83.1

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

      associate-/l* [=>]77.2

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

      unpow2 [=>]77.2

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

      associate-*l/ [=>]77.2

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

      associate-*l/ [=>]77.2

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

      frac-times [=>]77.2

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

      associate-/l/ [=>]77.2

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

      clear-num [=>]77.1

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

      un-div-inv [=>]77.2

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

      associate-/r/ [=>]76.4

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

      clear-num [=>]76.3

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

      un-div-inv [=>]76.4

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

      associate-/r/ [=>]77.1

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

      metadata-eval [=>]77.1

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

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

      [Start]77.1

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

      div-inv [=>]76.5

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

      associate-*l* [=>]78.5

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

      associate-/r* [=>]78.4

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

      clear-num [<=]78.4

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

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

      [Start]78.4

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

      associate-/l/ [=>]78.5

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

      associate-*r/ [=>]86.0

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

      *-commutative [=>]86.0

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

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

Alternatives

Alternative 1
Accuracy87.5%
Cost27785
\[\begin{array}{l} t_0 := {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\\ t_1 := \frac{M}{d} \cdot D\\ \mathbf{if}\;t_0 \leq 4 \cdot 10^{-151} \lor \neg \left(t_0 \leq 2 \cdot 10^{+292}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - t_1 \cdot \frac{t_1 \cdot h}{\ell \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot t_0}\\ \end{array} \]
Alternative 2
Accuracy87.1%
Cost14344
\[\begin{array}{l} t_0 := \frac{M}{d} \cdot D\\ \mathbf{if}\;\frac{h}{\ell} \leq -2 \cdot 10^{+241}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\left(M \cdot 0.5\right) \cdot \frac{D}{d}\right)}^{2}}{\ell}}\\ \mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-28}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \frac{t_0 \cdot h}{\ell \cdot 4}}\\ \end{array} \]
Alternative 3
Accuracy79.5%
Cost8141
\[\begin{array}{l} \mathbf{if}\;M \leq -3 \cdot 10^{+29}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq -1.55 \cdot 10^{-147} \lor \neg \left(M \leq 1.15 \cdot 10^{-122}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(0.25 \cdot \frac{M \cdot \left(M \cdot h\right)}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 4
Accuracy83.6%
Cost7876
\[\begin{array}{l} \mathbf{if}\;D \leq 4.2 \cdot 10^{-189}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(\frac{M}{d} \cdot D\right) \cdot \left(\frac{D}{\frac{\ell}{\frac{h}{\frac{d}{M}}}} \cdot -0.25\right)}\\ \end{array} \]
Alternative 5
Accuracy86.7%
Cost7744
\[\begin{array}{l} t_0 := \frac{M}{d} \cdot D\\ w0 \cdot \sqrt{1 - t_0 \cdot \frac{t_0 \cdot h}{\ell \cdot 4}} \end{array} \]
Alternative 6
Accuracy78.9%
Cost64
\[w0 \]

Error

Reproduce?

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