\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\begin{array}{l}
t_0 := \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\
\mathbf{if}\;\ell \leq 1.062904038339468 \cdot 10^{-264}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{d} \cdot \sqrt{d}}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{t_0}}\\
\end{array}
(FPCore (d h l M D) :precision binary64 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (fma (pow (/ (* M D) (* d 2.0)) 2.0) (* (/ h l) -0.5) 1.0)))
(if (<= l 1.062904038339468e-264)
(* (* (sqrt (/ d h)) (sqrt (/ d l))) t_0)
(/ (* (sqrt d) (sqrt d)) (/ (* (sqrt h) (sqrt l)) t_0)))))double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
double code(double d, double h, double l, double M, double D) {
double t_0 = fma(pow(((M * D) / (d * 2.0)), 2.0), ((h / l) * -0.5), 1.0);
double tmp;
if (l <= 1.062904038339468e-264) {
tmp = (sqrt(d / h) * sqrt(d / l)) * t_0;
} else {
tmp = (sqrt(d) * sqrt(d)) / ((sqrt(h) * sqrt(l)) / t_0);
}
return tmp;
}



Bits error versus d



Bits error versus h



Bits error versus l



Bits error versus M



Bits error versus D
if l < 1.06290403833946789e-264Initial program 26.8
Simplified26.8
if 1.06290403833946789e-264 < l Initial program 26.3
Simplified26.3
Applied sqrt-div_binary6422.2
Applied sqrt-div_binary6416.3
Applied frac-times_binary6416.3
Applied associate-*l/_binary6416.0
Applied associate-/l*_binary6416.0
Final simplification21.6
herbie shell --seed 2021215
(FPCore (d h l M D)
:name "Henrywood and Agarwal, Equation (12)"
:precision binary64
(* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))