w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\begin{array}{l}
\mathbf{if}\;2 \cdot d \leq -1.4801122808780888 \cdot 10^{+72}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{{\left(\frac{M}{\frac{2 \cdot d}{D}}\right)}^{2} \cdot h}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := \frac{M \cdot D}{2 \cdot d}\\
\mathbf{if}\;2 \cdot d \leq -1.2928189090676206 \cdot 10^{-136}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \left(\left(t_0 \cdot \frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \left(\left(h \cdot t_0\right) \cdot \frac{1}{\ell}\right)}\\
\end{array}\\
\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 (<= (* 2.0 d) -1.4801122808780888e+72)
(* w0 (sqrt (- 1.0 (/ (* (pow (/ M (/ (* 2.0 d) D)) 2.0) h) l))))
(let* ((t_0 (/ (* M D) (* 2.0 d))))
(if (<= (* 2.0 d) -1.2928189090676206e-136)
(*
w0
(sqrt
(-
1.0
(*
t_0
(*
(* t_0 (/ (* (cbrt h) (cbrt h)) (* (cbrt l) (cbrt l))))
(/ (cbrt h) (cbrt l)))))))
(* w0 (sqrt (- 1.0 (* t_0 (* (* h t_0) (/ 1.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 ((2.0 * d) <= -1.4801122808780888e+72) {
tmp = w0 * sqrt(1.0 - ((pow((M / ((2.0 * d) / D)), 2.0) * h) / l));
} else {
double t_0 = (M * D) / (2.0 * d);
double tmp_1;
if ((2.0 * d) <= -1.2928189090676206e-136) {
tmp_1 = w0 * sqrt(1.0 - (t_0 * ((t_0 * ((cbrt(h) * cbrt(h)) / (cbrt(l) * cbrt(l)))) * (cbrt(h) / cbrt(l)))));
} else {
tmp_1 = w0 * sqrt(1.0 - (t_0 * ((h * t_0) * (1.0 / l))));
}
tmp = tmp_1;
}
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 2 d) < -1.4801122808780888e72Initial program 10.9
Applied associate-*r/_binary646.0
Applied associate-/l*_binary645.3
if -1.4801122808780888e72 < (*.f64 2 d) < -1.29281890906762062e-136Initial program 12.4
Applied unpow2_binary6412.4
Applied associate-*l*_binary6410.5
Applied add-cube-cbrt_binary6410.6
Applied add-cube-cbrt_binary6410.6
Applied times-frac_binary6410.6
Applied associate-*r*_binary648.2
Simplified8.2
if -1.29281890906762062e-136 < (*.f64 2 d) Initial program 16.3
Applied unpow2_binary6416.3
Applied associate-*l*_binary6414.3
Applied div-inv_binary6414.3
Applied associate-*r*_binary6410.2
Simplified10.2
Final simplification8.7
herbie shell --seed 2022077
(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))))))