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.982420940617468 \cdot 10^{+209}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2}}\\
\mathbf{elif}\;1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq \infty:\\
\;\;\;\;\sqrt{\left(\frac{h}{\ell} \cdot {\left(\frac{D}{d}\right)}^{2}\right) \cdot -0.25} \cdot \left(w0 \cdot \left(-M\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{M}{\frac{2}{\frac{D}{d}}} \cdot \left(h \cdot \frac{M}{\frac{2}{\frac{D}{d}}}\right)}{\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.982420940617468e+209)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (* M D) (/ 0.5 d)) 2.0)))))
(if (<= (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))) INFINITY)
(* (sqrt (* (* (/ h l) (pow (/ D d) 2.0)) -0.25)) (* w0 (- M)))
(*
w0
(sqrt
(- 1.0 (/ (* (/ M (/ 2.0 (/ D d))) (* h (/ M (/ 2.0 (/ 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 tmp;
if ((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= 1.982420940617468e+209) {
tmp = w0 * sqrt(1.0 - ((h / l) * pow(((M * D) * (0.5 / d)), 2.0)));
} else if ((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= ((double) INFINITY)) {
tmp = sqrt(((h / l) * pow((D / d), 2.0)) * -0.25) * (w0 * -M);
} else {
tmp = w0 * sqrt(1.0 - (((M / (2.0 / (D / d))) * (h * (M / (2.0 / (D / d))))) / 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.9824209406174679e209Initial program 0.3
rmApplied div-inv_binary640.3
Simplified0.3
if 1.9824209406174679e209 < (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) < +inf.0Initial program 57.3
Taylor expanded around -inf 56.5
Simplified45.7
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/_binary6427.7
Simplified27.7
rmApplied associate-/l*_binary6425.1
Simplified25.1
rmApplied unpow2_binary6425.1
Applied associate-*r*_binary6411.6
Final simplification7.8
herbie shell --seed 2021118
(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))))))