w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}w0 \cdot \sqrt{1 - \left({\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(h \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{\left(\frac{2}{2}\right)}\right)\right) \cdot \frac{1}{\ell}}(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
(*
w0
(sqrt
(-
1.0
(*
(*
(pow (* (/ D d) (/ M 2.0)) (/ 2.0 2.0))
(* h (pow (* (/ D d) (/ M 2.0)) (/ 2.0 2.0))))
(/ 1.0 l))))))double code(double w0, double M, double D, double h, double l, double d) {
return ((double) (w0 * ((double) sqrt(((double) (1.0 - ((double) (((double) pow((((double) (M * D)) / ((double) (2.0 * d))), 2.0)) * (h / l)))))))));
}
double code(double w0, double M, double D, double h, double l, double d) {
return ((double) (w0 * ((double) sqrt(((double) (1.0 - ((double) (((double) (((double) pow(((double) ((D / d) * (M / 2.0))), (2.0 / 2.0))) * ((double) (h * ((double) pow(((double) ((D / d) * (M / 2.0))), (2.0 / 2.0))))))) * (1.0 / l)))))))));
}



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
Initial program 13.9
rmApplied div-inv_binary6413.9
Applied associate-*r*_binary6410.6
Simplified10.6
rmApplied times-frac_binary6410.6
rmApplied sqr-pow_binary6410.6
Applied associate-*r*_binary649.1
Simplified9.1
Final simplification9.1
herbie shell --seed 2020204
(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))))))