w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;M \le -2.3090407106292327 \cdot 10^{-243}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left({\left(\frac{M}{\frac{2 \cdot d}{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}}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left({\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{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\\
\end{array}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 VAR;
if ((M <= -2.3090407106292327e-243)) {
VAR = (w0 * sqrt((1.0 - ((pow((M / ((2.0 * d) / D)), 2.0) * ((cbrt(h) * cbrt(h)) / (cbrt(l) * cbrt(l)))) * (cbrt(h) / cbrt(l))))));
} else {
VAR = (w0 * sqrt((1.0 - ((pow(((M * D) / (2.0 * d)), (2.0 / 2.0)) * (pow(((M * D) / (2.0 * d)), (2.0 / 2.0)) * ((cbrt(h) * cbrt(h)) / (cbrt(l) * cbrt(l))))) * (cbrt(h) / cbrt(l))))));
}
return VAR;
}



Bits error versus w0



Bits error versus M



Bits error versus D



Bits error versus h



Bits error versus l



Bits error versus d
Results
if M < -2.3090407106292327e-243Initial program 15.0
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied associate-*r*12.3
rmApplied associate-/l*11.8
if -2.3090407106292327e-243 < M Initial program 13.3
rmApplied add-cube-cbrt13.4
Applied add-cube-cbrt13.4
Applied times-frac13.4
Applied associate-*r*10.4
rmApplied sqr-pow10.4
Applied associate-*l*8.8
Final simplification10.1
herbie shell --seed 2020106 +o rules:numerics
(FPCore (w0 M D h l d)
:name "Henrywood and Agarwal, Equation (9a)"
:precision binary64
(* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))