w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \leq 2.032656749707616 \cdot 10^{-191} \lor \neg \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \leq 3.1589775460686644 \cdot 10^{+261}\right):\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot h\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;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)}\\
\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 (<= (pow (/ (* M D) (* 2.0 d)) 2.0) 2.032656749707616e-191)
(not (<= (pow (/ (* M D) (* 2.0 d)) 2.0) 3.1589775460686644e+261)))
(*
w0
(sqrt (- 1.0 (/ (* (* (/ M 2.0) (/ D d)) (* (* (/ M 2.0) (/ D d)) h)) l))))
(*
w0
(sqrt
(- 1.0 (* (/ (* M D) (* 2.0 d)) (* (/ (* M D) (* 2.0 d)) (/ 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 ((pow(((M * D) / (2.0 * d)), 2.0) <= 2.032656749707616e-191) || !(pow(((M * D) / (2.0 * d)), 2.0) <= 3.1589775460686644e+261)) {
tmp = w0 * sqrt(1.0 - ((((M / 2.0) * (D / d)) * (((M / 2.0) * (D / d)) * h)) / l));
} else {
tmp = w0 * sqrt(1.0 - (((M * D) / (2.0 * d)) * (((M * D) / (2.0 * d)) * (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 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) < 2.03265674970761598e-191 or 3.15897754606866437e261 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) Initial program 17.0
rmApplied associate-*r/_binary6411.8
Simplified11.8
rmApplied times-frac_binary6411.3
rmApplied unpow2_binary6411.3
Applied associate-*r*_binary649.3
Simplified9.3
if 2.03265674970761598e-191 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) < 3.15897754606866437e261Initial program 5.9
rmApplied unpow2_binary645.9
Applied associate-*l*_binary645.9
Final simplification8.4
herbie shell --seed 2020233
(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))))))