w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;M \cdot D \leq -3.94026349234034 \cdot 10^{+201} \lor \neg \left(M \cdot D \leq 1.1846669072932626 \cdot 10^{+225}\right):\\
\;\;\;\;w0 \cdot \left(D \cdot \sqrt{-0.25 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{M}{d}\right)}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{d \cdot 2} \cdot \sqrt[3]{h}\right)}^{2} \cdot \frac{\sqrt[3]{h}}{\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 (or (<= (* M D) -3.94026349234034e+201)
(not (<= (* M D) 1.1846669072932626e+225)))
(* w0 (* D (sqrt (* -0.25 (* (/ h l) (pow (/ M d) 2.0))))))
(*
w0
(sqrt
(-
1.0
(* (pow (* (/ (* M D) (* d 2.0)) (cbrt h)) 2.0) (/ (cbrt h) 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 (((M * D) <= -3.94026349234034e+201) || !((M * D) <= 1.1846669072932626e+225)) {
tmp = w0 * (D * sqrt(-0.25 * ((h / l) * pow((M / d), 2.0))));
} else {
tmp = w0 * sqrt(1.0 - (pow((((M * D) / (d * 2.0)) * cbrt(h)), 2.0) * (cbrt(h) / l)));
}
return tmp;
}



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 (*.f64 M D) < -3.94026349234034022e201 or 1.18466690729326264e225 < (*.f64 M D) Initial program 46.6
rmApplied *-un-lft-identity_binary6446.6
Applied add-cube-cbrt_binary6446.6
Applied times-frac_binary6446.6
Applied associate-*r*_binary6446.9
Simplified46.9
rmApplied associate-/l*_binary6440.7
Simplified40.8
Taylor expanded around inf 59.3
Simplified49.3
if -3.94026349234034022e201 < (*.f64 M D) < 1.18466690729326264e225Initial program 10.8
rmApplied *-un-lft-identity_binary6410.8
Applied add-cube-cbrt_binary6410.9
Applied times-frac_binary6410.9
Applied associate-*r*_binary648.1
Simplified8.1
rmApplied pow2_binary648.1
Applied pow-prod-down_binary647.0
Final simplification10.8
herbie shell --seed 2021139
(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))))))