w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\begin{array}{l}
\mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq -9.847464148794244 \cdot 10^{+154}:\\
\;\;\;\;w0\\
\mathbf{elif}\;\frac{M \cdot D}{2 \cdot d} \leq 6.9228871330212264 \cdot 10^{+75}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{h}{\sqrt[3]{\ell}}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \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 (<= (/ (* M D) (* 2.0 d)) -9.847464148794244e+154)
w0
(if (<= (/ (* M D) (* 2.0 d)) 6.9228871330212264e+75)
(*
w0
(sqrt
(-
1.0
(*
(/ (pow (/ (* M D) (* 2.0 d)) 2.0) (* (cbrt l) (cbrt l)))
(/ h (cbrt l))))))
(*
w0
(sqrt
(- 1.0 (* (* (/ M 2.0) (/ D d)) (* (* (/ M 2.0) (/ D 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 (((M * D) / (2.0 * d)) <= -9.847464148794244e+154) {
tmp = w0;
} else if (((M * D) / (2.0 * d)) <= 6.9228871330212264e+75) {
tmp = w0 * sqrt(1.0 - ((pow(((M * D) / (2.0 * d)), 2.0) / (cbrt(l) * cbrt(l))) * (h / cbrt(l))));
} else {
tmp = w0 * sqrt(1.0 - (((M / 2.0) * (D / d)) * (((M / 2.0) * (D / 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 (/.f64 (*.f64 M D) (*.f64 2 d)) < -9.84746414879424359e154Initial program 64.0
Taylor expanded around 0 53.5
if -9.84746414879424359e154 < (/.f64 (*.f64 M D) (*.f64 2 d)) < 6.9228871330212264e75Initial program 6.7
rmApplied add-cube-cbrt_binary64_11366.7
Applied *-un-lft-identity_binary64_11016.7
Applied times-frac_binary64_11076.7
Applied associate-*r*_binary64_10413.5
Simplified3.5
if 6.9228871330212264e75 < (/.f64 (*.f64 M D) (*.f64 2 d)) Initial program 46.9
rmApplied times-frac_binary64_110746.9
rmApplied unpow2_binary64_116646.9
Applied associate-*l*_binary64_104238.2
Final simplification9.7
herbie shell --seed 2020346
(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))))))