w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;M \leq -7.585162659511325 \cdot 10^{+212} \lor \neg \left(M \leq -8.913855756833514 \cdot 10^{+196}\right):\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(h \cdot \left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)\right) \cdot \frac{0.5 \cdot \frac{M \cdot D}{d}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{w0}{M \cdot \sqrt{\left(\frac{h}{\ell} \cdot {\left(\frac{D}{d}\right)}^{2}\right) \cdot -0.25}} \cdot -0.5 - M \cdot \left(w0 \cdot \sqrt{\left(\frac{h}{\ell} \cdot {\left(\frac{D}{d}\right)}^{2}\right) \cdot -0.25}\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 (<= M -7.585162659511325e+212) (not (<= M -8.913855756833514e+196)))
(*
w0
(sqrt (- 1.0 (* (* h (* (* M D) (/ 0.5 d))) (/ (* 0.5 (/ (* M D) d)) l)))))
(-
(* (/ w0 (* M (sqrt (* (* (/ h l) (pow (/ D d) 2.0)) -0.25)))) -0.5)
(* M (* w0 (sqrt (* (* (/ h l) (pow (/ D d) 2.0)) -0.25)))))))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 <= -7.585162659511325e+212) || !(M <= -8.913855756833514e+196)) {
tmp = w0 * sqrt(1.0 - ((h * ((M * D) * (0.5 / d))) * ((0.5 * ((M * D) / d)) / l)));
} else {
tmp = ((w0 / (M * sqrt(((h / l) * pow((D / d), 2.0)) * -0.25))) * -0.5) - (M * (w0 * sqrt(((h / l) * pow((D / d), 2.0)) * -0.25)));
}
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 M < -7.58516265951132523e212 or -8.91385575683351356e196 < M Initial program 13.7
rmApplied div-inv_binary6413.7
Applied associate-*r*_binary6410.7
Simplified10.7
rmApplied unpow2_binary6410.7
Applied associate-*r*_binary649.1
Simplified9.1
rmApplied div-inv_binary649.1
Simplified9.1
rmApplied associate-*l*_binary648.4
Simplified8.4
if -7.58516265951132523e212 < M < -8.91385575683351356e196Initial program 28.9
Taylor expanded around -inf 54.3
Simplified49.3
Final simplification9.1
herbie shell --seed 2021174
(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))))))