w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq 1.1891624526792194 \cdot 10^{+188}:\\
\;\;\;\;w0 \cdot {\left(1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}^{0.5}\\
\mathbf{elif}\;1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq \infty:\\
\;\;\;\;w0 \cdot \left(\sqrt{\left(\frac{h}{\ell} \cdot {\left(\frac{D}{d}\right)}^{2}\right) \cdot -0.25} \cdot \left(-M\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(\left(h \cdot {\left(\sqrt[3]{\sqrt[3]{\frac{M \cdot D}{2 \cdot d}} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d}}}\right)}^{4}\right) \cdot {\left(\sqrt[3]{\sqrt[3]{\frac{M \cdot D}{2 \cdot d}}}\right)}^{4}\right) \cdot \frac{{\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d}}\right)}^{2}}{\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 (<=
(- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)))
1.1891624526792194e+188)
(* w0 (pow (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))) 0.5))
(if (<= (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))) INFINITY)
(* w0 (* (sqrt (* (* (/ h l) (pow (/ D d) 2.0)) -0.25)) (- M)))
(*
w0
(sqrt
(-
1.0
(*
(*
(*
h
(pow
(cbrt
(* (cbrt (/ (* M D) (* 2.0 d))) (cbrt (/ (* M D) (* 2.0 d)))))
4.0))
(pow (cbrt (cbrt (/ (* M D) (* 2.0 d)))) 4.0))
(/ (pow (cbrt (/ (* M D) (* 2.0 d))) 2.0) 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 ((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= 1.1891624526792194e+188) {
tmp = w0 * pow((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))), 0.5);
} else if ((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= ((double) INFINITY)) {
tmp = w0 * (sqrt(((h / l) * pow((D / d), 2.0)) * -0.25) * -M);
} else {
tmp = w0 * sqrt(1.0 - (((h * pow(cbrt(cbrt((M * D) / (2.0 * d)) * cbrt((M * D) / (2.0 * d))), 4.0)) * pow(cbrt(cbrt((M * D) / (2.0 * d))), 4.0)) * (pow(cbrt((M * D) / (2.0 * d)), 2.0) / 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 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) < 1.18916245267921937e188Initial program 0.2
rmApplied pow1/2_binary640.2
if 1.18916245267921937e188 < (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) < +inf.0Initial program 57.1
Taylor expanded around -inf 57.4
Simplified48.0
if +inf.0 < (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) Initial program 64.0
rmApplied associate-*r/_binary6426.9
Simplified26.9
rmApplied add-cube-cbrt_binary6426.9
Applied unpow-prod-down_binary6426.9
Applied associate-*r*_binary6415.9
Simplified15.9
rmApplied *-un-lft-identity_binary6415.9
Applied times-frac_binary6415.5
Simplified15.5
Simplified15.5
rmApplied add-cube-cbrt_binary6415.6
Applied cbrt-prod_binary6415.6
Applied unpow-prod-down_binary6415.6
Applied associate-*r*_binary6411.8
Final simplification8.5
herbie shell --seed 2021110
(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))))))