w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\begin{array}{l}
t_0 := \frac{D \cdot M}{d \cdot 2}\\
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{t_0 \cdot \left(h \cdot \left(0.5 \cdot \frac{D \cdot M}{d}\right)\right)}{\ell}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -6.3510756388060095 \cdot 10^{-292}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0 \cdot \left(\frac{h}{\ell} \cdot t_0\right)}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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
(let* ((t_0 (/ (* D M) (* d 2.0))))
(if (<= (/ h l) (- INFINITY))
(* w0 (sqrt (- 1.0 (/ (* t_0 (* h (* 0.5 (/ (* D M) d)))) l))))
(if (<= (/ h l) -6.3510756388060095e-292)
(* w0 (sqrt (- 1.0 (* t_0 (* (/ h l) t_0)))))
w0))))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 t_0 = (D * M) / (d * 2.0);
double tmp;
if ((h / l) <= -((double) INFINITY)) {
tmp = w0 * sqrt(1.0 - ((t_0 * (h * (0.5 * ((D * M) / d)))) / l));
} else if ((h / l) <= -6.3510756388060095e-292) {
tmp = w0 * sqrt(1.0 - (t_0 * ((h / l) * t_0)));
} else {
tmp = w0;
}
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 h l) < -inf.0Initial program 64.0
rmApplied div-inv_binary6464.0
Applied associate-*r*_binary6425.0
Simplified25.0
rmApplied unpow2_binary6425.0
Applied associate-*r*_binary6420.5
Simplified20.5
Taylor expanded in D around 0 20.5
Simplified20.5
if -inf.0 < (/.f64 h l) < -6.3510756388060095e-292Initial program 15.2
rmApplied unpow2_binary6415.2
Applied associate-*l*_binary6413.3
Simplified13.3
if -6.3510756388060095e-292 < (/.f64 h l) Initial program 7.9
Taylor expanded in M around 0 3.0
Final simplification8.7
herbie shell --seed 2021206
(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))))))