Average Error: 13.9 → 5.9
Time: 5.1min
Precision: binary64
Cost: 106178
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 1.08920402407815 \cdot 10^{+109}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right|\right) \cdot \left(\sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|} \cdot \left(\sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|} \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{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}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\
\;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\

\mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 1.08920402407815 \cdot 10^{+109}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right|\right) \cdot \left(\sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|} \cdot \left(\sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|} \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)\right)\right)}\\

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

\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 (<= (/ (* M D) (* 2.0 d)) -4.161846827840788e+133)
   (- (/ (* (sqrt (* -0.25 (/ h l))) (* M (* D w0))) d))
   (if (<= (/ (* M D) (* 2.0 d)) 1.08920402407815e+109)
     (*
      w0
      (sqrt
       (-
        1.0
        (*
         (/ (cbrt h) (cbrt l))
         (*
          (* (fabs (/ (cbrt h) (cbrt l))) (fabs (/ 1.0 (/ (* 2.0 d) (* M D)))))
          (*
           (sqrt (fabs (/ (cbrt h) (cbrt l))))
           (*
            (sqrt (fabs (/ (cbrt h) (cbrt l))))
            (fabs (/ (* M D) (* 2.0 d))))))))))
     (/ (* (sqrt (* -0.25 (/ h l))) (* M (* D w0))) 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 tmp;
	if (((M * D) / (2.0 * d)) <= -4.161846827840788e+133) {
		tmp = -((sqrt(-0.25 * (h / l)) * (M * (D * w0))) / d);
	} else if (((M * D) / (2.0 * d)) <= 1.08920402407815e+109) {
		tmp = w0 * sqrt(1.0 - ((cbrt(h) / cbrt(l)) * ((fabs(cbrt(h) / cbrt(l)) * fabs(1.0 / ((2.0 * d) / (M * D)))) * (sqrt(fabs(cbrt(h) / cbrt(l))) * (sqrt(fabs(cbrt(h) / cbrt(l))) * fabs((M * D) / (2.0 * d)))))));
	} else {
		tmp = (sqrt(-0.25 * (h / l)) * (M * (D * w0))) / d;
	}
	return tmp;
}

Error

Bits error versus w0

Bits error versus M

Bits error versus D

Bits error versus h

Bits error versus l

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error6.1
Cost54146
\[\begin{array}{l} \mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 1.08920402407815 \cdot 10^{+109}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \end{array}\]
Alternative 2
Error5.9
Cost48194
\[\begin{array}{l} \mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 1.08920402407815 \cdot 10^{+109}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \end{array}\]
Alternative 3
Error7.3
Cost49539
\[\begin{array}{l} \mathbf{if}\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \leq -\infty:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \leq 1.475679605662533 \cdot 10^{+306}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\\ \mathbf{elif}\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \leq \infty:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]
Alternative 4
Error7.3
Cost15234
\[\begin{array}{l} \mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 3.637509067820617 \cdot 10^{+51}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \end{array}\]
Alternative 5
Error8.9
Cost9347
\[\begin{array}{l} \mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -4.161846827840788 \cdot 10^{+133}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq -3.773434935464474 \cdot 10^{-110}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\\ \mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 3.637509067820617 \cdot 10^{+51}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \end{array}\]
Alternative 6
Error13.7
Cost9540
\[\begin{array}{l} \mathbf{if}\;M \cdot D \leq -5.803934256390374 \cdot 10^{+169}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;M \cdot D \leq -8.24865786762444 \cdot 10^{-139}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{h}{\ell} \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{d \cdot d}\right)}\\ \mathbf{elif}\;M \cdot D \leq 1.4591750786860564 \cdot 10^{-75}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \cdot D \leq 1.2378053483978202 \cdot 10^{+150}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \frac{h \cdot \left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right)}{\ell \cdot \left(d \cdot d\right)}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]
Alternative 7
Error13.7
Cost9037
\[\begin{array}{l} \mathbf{if}\;M \cdot D \leq -5.803934256390374 \cdot 10^{+169}:\\ \;\;\;\;-\frac{\sqrt{-0.25 \cdot \frac{h}{\ell}} \cdot \left(M \cdot \left(D \cdot w0\right)\right)}{d}\\ \mathbf{elif}\;M \cdot D \leq -8.24865786762444 \cdot 10^{-139} \lor \neg \left(M \cdot D \leq 5.55407397019203 \cdot 10^{-93}\right) \land M \cdot D \leq 1.2378053483978202 \cdot 10^{+150}:\\ \;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{h}{\ell} \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{d \cdot d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]
Alternative 8
Error14.9
Cost8130
\[\begin{array}{l} \mathbf{if}\;d \leq 6.621422145171273 \cdot 10^{-282}:\\ \;\;\;\;w0\\ \mathbf{elif}\;d \leq 4.903805071547444 \cdot 10^{-170}:\\ \;\;\;\;w0 \cdot \frac{\sqrt{-0.25 \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(D \cdot h\right)\right)}{\ell}}}{d}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]
Alternative 9
Error14.2
Cost8002
\[\begin{array}{l} \mathbf{if}\;w0 \leq -4.7741656768332877 \cdot 10^{-132}:\\ \;\;\;\;w0\\ \mathbf{elif}\;w0 \leq -1.1036119002235898 \cdot 10^{-144}:\\ \;\;\;\;\frac{M \cdot \left(w0 \cdot \sqrt{-0.25 \cdot \frac{D \cdot \left(D \cdot h\right)}{\ell}}\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]
Alternative 10
Error13.7
Cost64
\[w0\]
Alternative 11
Error61.7
Cost64
\[0\]
Alternative 12
Error61.8
Cost64
\[-1\]

Error

Derivation

  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 M D) (*.f64 2 d)) < -4.16184682784078783e133

    1. Initial program 59.4

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied sqr-pow_binary64_175559.4

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\left(\frac{2}{2}\right)} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\left(\frac{2}{2}\right)}\right)} \cdot \frac{h}{\ell}}\]
    4. Applied associate-*l*_binary64_172450.0

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

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

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

      \[\leadsto w0 \cdot \color{blue}{\frac{\sqrt{\frac{\left(M \cdot D\right) \cdot \left(\left(M \cdot D\right) \cdot h\right)}{\ell} \cdot -0.25}}{d}}\]
    8. Taylor expanded around 0 56.7

      \[\leadsto w0 \cdot \frac{\color{blue}{\sqrt{-0.25 \cdot \frac{{M}^{2} \cdot h}{\ell}} \cdot D}}{d}\]
    9. Simplified56.7

      \[\leadsto w0 \cdot \frac{\color{blue}{D \cdot \sqrt{-0.25 \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}}}}{d}\]
    10. Taylor expanded around -inf 30.7

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

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

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

    if -4.16184682784078783e133 < (/.f64 (*.f64 M D) (*.f64 2 d)) < 1.08920402407814998e109

    1. Initial program 6.8

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt_binary64_18186.8

      \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\]
    4. Applied add-cube-cbrt_binary64_18186.8

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

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

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt_binary64_18053.1

      \[\leadsto w0 \cdot \sqrt{1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    9. Applied add-sqr-sqrt_binary64_18053.1

      \[\leadsto w0 \cdot \sqrt{1 - \left(\color{blue}{\left(\sqrt{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \sqrt{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right)} \cdot \left(\sqrt{\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    10. Applied unswap-sqr_binary64_17513.1

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

      \[\leadsto w0 \cdot \sqrt{1 - \left(\color{blue}{\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)} \cdot \left(\sqrt{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \sqrt{\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    12. Simplified1.8

      \[\leadsto w0 \cdot \sqrt{1 - \left(\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right) \cdot \color{blue}{\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    13. Using strategy rm
    14. Applied clear-num_binary64_17821.8

      \[\leadsto w0 \cdot \sqrt{1 - \left(\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\color{blue}{\frac{1}{\frac{2 \cdot d}{M \cdot D}}}\right|\right) \cdot \left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    15. Using strategy rm
    16. Applied add-sqr-sqrt_binary64_18051.8

      \[\leadsto w0 \cdot \sqrt{1 - \left(\left(\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right| \cdot \left|\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right|\right) \cdot \left(\color{blue}{\left(\sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|} \cdot \sqrt{\left|\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right|}\right)} \cdot \left|\frac{M \cdot D}{2 \cdot d}\right|\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
    17. Applied associate-*l*_binary64_17241.8

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

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

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

    if 1.08920402407814998e109 < (/.f64 (*.f64 M D) (*.f64 2 d))

    1. Initial program 54.6

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied sqr-pow_binary64_175554.6

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\left(\frac{2}{2}\right)} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\left(\frac{2}{2}\right)}\right)} \cdot \frac{h}{\ell}}\]
    4. Applied associate-*l*_binary64_172445.7

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

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

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

      \[\leadsto w0 \cdot \color{blue}{\frac{\sqrt{\frac{\left(M \cdot D\right) \cdot \left(\left(M \cdot D\right) \cdot h\right)}{\ell} \cdot -0.25}}{d}}\]
    8. Taylor expanded around 0 57.6

      \[\leadsto w0 \cdot \frac{\color{blue}{\sqrt{-0.25 \cdot \frac{{M}^{2} \cdot h}{\ell}} \cdot D}}{d}\]
    9. Simplified57.6

      \[\leadsto w0 \cdot \frac{\color{blue}{D \cdot \sqrt{-0.25 \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}}}}{d}\]
    10. Taylor expanded around 0 31.9

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

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

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

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

Reproduce

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