Average Error: 13.6 → 9.5
Time: 16.3s
Precision: binary64
Cost: 28296
\[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} \cdot \frac{h}{\ell}\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{+250}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{M \cdot \left(-0.25 \cdot {\left(\frac{D}{d}\right)}^{2}\right)}{\frac{\ell}{M \cdot h}}}\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{-12}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t_0}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\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
 (let* ((t_0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))
   (if (<= t_0 -1e+250)
     (* w0 (sqrt (+ 1.0 (/ (* M (* -0.25 (pow (/ D d) 2.0))) (/ l (* M h))))))
     (if (<= t_0 2e-12)
       (* w0 (sqrt (- 1.0 t_0)))
       (*
        w0
        (sqrt
         (+ 1.0 (/ (/ (/ (* -0.25 (* h (* (* M D) (* M D)))) d) d) 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 t_0 = pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
	double tmp;
	if (t_0 <= -1e+250) {
		tmp = w0 * sqrt((1.0 + ((M * (-0.25 * pow((D / d), 2.0))) / (l / (M * h)))));
	} else if (t_0 <= 2e-12) {
		tmp = w0 * sqrt((1.0 - t_0));
	} else {
		tmp = w0 * sqrt((1.0 + ((((-0.25 * (h * ((M * D) * (M * D)))) / d) / d) / 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) :: t_0
    real(8) :: tmp
    t_0 = (((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)
    if (t_0 <= (-1d+250)) then
        tmp = w0 * sqrt((1.0d0 + ((m * ((-0.25d0) * ((d / d_1) ** 2.0d0))) / (l / (m * h)))))
    else if (t_0 <= 2d-12) then
        tmp = w0 * sqrt((1.0d0 - t_0))
    else
        tmp = w0 * sqrt((1.0d0 + (((((-0.25d0) * (h * ((m * d) * (m * d)))) / d_1) / d_1) / 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 t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
	double tmp;
	if (t_0 <= -1e+250) {
		tmp = w0 * Math.sqrt((1.0 + ((M * (-0.25 * Math.pow((D / d), 2.0))) / (l / (M * h)))));
	} else if (t_0 <= 2e-12) {
		tmp = w0 * Math.sqrt((1.0 - t_0));
	} else {
		tmp = w0 * Math.sqrt((1.0 + ((((-0.25 * (h * ((M * D) * (M * D)))) / d) / d) / 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):
	t_0 = math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)
	tmp = 0
	if t_0 <= -1e+250:
		tmp = w0 * math.sqrt((1.0 + ((M * (-0.25 * math.pow((D / d), 2.0))) / (l / (M * h)))))
	elif t_0 <= 2e-12:
		tmp = w0 * math.sqrt((1.0 - t_0))
	else:
		tmp = w0 * math.sqrt((1.0 + ((((-0.25 * (h * ((M * D) * (M * D)))) / d) / d) / 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)
	t_0 = Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))
	tmp = 0.0
	if (t_0 <= -1e+250)
		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(M * Float64(-0.25 * (Float64(D / d) ^ 2.0))) / Float64(l / Float64(M * h))))));
	elseif (t_0 <= 2e-12)
		tmp = Float64(w0 * sqrt(Float64(1.0 - t_0)));
	else
		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(Float64(-0.25 * Float64(h * Float64(Float64(M * D) * Float64(M * D)))) / d) / d) / 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)
	t_0 = (((M * D) / (2.0 * d)) ^ 2.0) * (h / l);
	tmp = 0.0;
	if (t_0 <= -1e+250)
		tmp = w0 * sqrt((1.0 + ((M * (-0.25 * ((D / d) ^ 2.0))) / (l / (M * h)))));
	elseif (t_0 <= 2e-12)
		tmp = w0 * sqrt((1.0 - t_0));
	else
		tmp = w0 * sqrt((1.0 + ((((-0.25 * (h * ((M * D) * (M * D)))) / d) / d) / 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_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+250], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(M * N[(-0.25 * N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-12], N[(w0 * N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(N[(-0.25 * N[(h * N[(N[(M * D), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $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} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{+250}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{M \cdot \left(-0.25 \cdot {\left(\frac{D}{d}\right)}^{2}\right)}{\frac{\ell}{M \cdot h}}}\\

\mathbf{elif}\;t_0 \leq 2 \cdot 10^{-12}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\

\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\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 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < -9.9999999999999992e249

    1. Initial program 59.9

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

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 - {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h}{\ell}}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (*.f64 (/.f64 D 2) (/.f64 M d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D M) (*.f64 2 d))) 2) (/.f64 h l))))): 2 points increase in error, 3 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 M D)) (*.f64 2 d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in w0 around 0 62.0

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

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \left(-0.25 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (*.f64 (/.f64 D d) (/.f64 D d))) (/.f64 (*.f64 M M) (/.f64 l h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D D) (*.f64 d d)))) (/.f64 (*.f64 M M) (/.f64 l h)))))): 27 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (*.f64 d d))) (/.f64 (*.f64 M M) (/.f64 l h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (/.f64 (pow.f64 D 2) (Rewrite<= unpow2_binary64 (pow.f64 d 2)))) (/.f64 (*.f64 M M) (/.f64 l h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (/.f64 (pow.f64 D 2) (pow.f64 d 2))) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 M 2)) (/.f64 l h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (/.f64 (pow.f64 D 2) (pow.f64 d 2))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 M 2) h) l)))))): 5 points increase in error, 6 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (*.f64 -1/4 (/.f64 (pow.f64 D 2) (pow.f64 d 2))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 h (pow.f64 M 2))) l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (Rewrite<= associate-*r*_binary64 (*.f64 -1/4 (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (/.f64 (*.f64 h (pow.f64 M 2)) l))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (Rewrite<= metadata-eval (neg.f64 1/4)) (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (/.f64 (*.f64 h (pow.f64 M 2)) l)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (+.f64 1 (*.f64 (neg.f64 1/4) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))))): 13 points increase in error, 14 points decrease in error
      (*.f64 w0 (sqrt.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 1 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (-.f64 1 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l))))) w0)): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr55.0

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

    if -9.9999999999999992e249 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < 1.99999999999999996e-12

    1. Initial program 0.1

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

    if 1.99999999999999996e-12 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))

    1. Initial program 61.0

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

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 - {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h}{\ell}}} \]
      Proof
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (*.f64 (/.f64 D 2) (/.f64 M d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D M) (*.f64 2 d))) 2) (/.f64 h l))))): 2 points increase in error, 3 points decrease in error
      (*.f64 w0 (sqrt.f64 (-.f64 1 (*.f64 (pow.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 M D)) (*.f64 2 d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr23.9

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

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

      \[\leadsto w0 \cdot \sqrt{1 - \frac{\color{blue}{\frac{\frac{0.25 \cdot \left(h \cdot \left(\left(D \cdot M\right) \cdot \left(D \cdot M\right)\right)\right)}{d}}{d}}}{\ell}} \]
      Proof
      (/.f64 (/.f64 (*.f64 1/4 (*.f64 h (*.f64 (*.f64 D M) (*.f64 D M)))) d) d): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (*.f64 h (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 D D) (*.f64 M M))))) d) d): 45 points increase in error, 9 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (*.f64 h (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (*.f64 M M)))) d) d): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (*.f64 h (*.f64 (pow.f64 D 2) (Rewrite<= unpow2_binary64 (pow.f64 M 2))))) d) d): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (*.f64 h (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 M 2) (pow.f64 D 2))))) d) d): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 h (pow.f64 M 2)) (pow.f64 D 2)))) d) d): 12 points increase in error, 7 points decrease in error
      (/.f64 (/.f64 (*.f64 1/4 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))))) d) d): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 1/4 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2)))) (*.f64 d d))): 26 points increase in error, 9 points decrease in error
      (/.f64 (*.f64 1/4 (*.f64 (pow.f64 D 2) (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 M 2) h)))) (*.f64 d d)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 1/4 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h))) (Rewrite<= unpow2_binary64 (pow.f64 d 2))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification9.5

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

Alternatives

Alternative 1
Error9.9
Cost21188
\[\begin{array}{l} t_0 := 1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\ \mathbf{if}\;t_0 \leq 2 \cdot 10^{+247}:\\ \;\;\;\;w0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\ell}}\\ \end{array} \]
Alternative 2
Error15.1
Cost13956
\[\begin{array}{l} \mathbf{if}\;M \leq -1.65 \cdot 10^{+119}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D}{2} \cdot \frac{M}{d}\right)}^{2}}\\ \mathbf{elif}\;M \leq 5 \cdot 10^{-76}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(-0.25 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{M}{\ell} \cdot \frac{M}{\frac{1}{h}}\right)}\\ \end{array} \]
Alternative 3
Error15.0
Cost13956
\[\begin{array}{l} \mathbf{if}\;M \leq -2.7 \cdot 10^{+119}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}}\\ \mathbf{elif}\;M \leq 2 \cdot 10^{-71}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(-0.25 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{M}{\ell} \cdot \frac{M}{\frac{1}{h}}\right)}\\ \end{array} \]
Alternative 4
Error12.3
Cost8008
\[\begin{array}{l} \mathbf{if}\;d \leq -1 \cdot 10^{+95}:\\ \;\;\;\;w0\\ \mathbf{elif}\;d \leq 3.25 \cdot 10^{-128}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{-0.25 \cdot \left(h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)\right)}{d}}{d}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \]
Alternative 5
Error15.9
Cost7876
\[\begin{array}{l} \mathbf{if}\;M \leq 9.2 \cdot 10^{-96}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \left(-0.25 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right) \cdot \left(h \cdot \frac{M}{\frac{\ell}{M}}\right)}\\ \end{array} \]
Alternative 6
Error13.3
Cost64
\[w0 \]

Error

Reproduce

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