\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}
\mathbf{if}\;\ell \le -2.93820792991894733 \cdot 10^{-34} \lor \neg \left(\ell \le 7.80090800219720779 \cdot 10^{-33}\right):\\
\;\;\;\;\left({\left(\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left({\left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\sqrt[3]{\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)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{\left(\left({\left(\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left({\left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)}\right)\right) \cdot \left(1 - \frac{\left(1 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{2 \cdot \ell}\right)} \cdot \sqrt[3]{\left(\left({\left(\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left({\left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)}\right)\right) \cdot \left(1 - \frac{\left(1 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{2 \cdot \ell}\right)}\right) \cdot \sqrt[3]{\left(\left({\left(\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left({\left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\sqrt[3]{\ell}}\right)}^{\left(\frac{1}{2}\right)}\right)\right) \cdot \left(1 - \frac{\left(1 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{2 \cdot \ell}\right)}\\
\end{array}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 VAR;
if (((l <= -2.9382079299189473e-34) || !(l <= 7.800908002197208e-33))) {
VAR = ((pow(((cbrt(d) * cbrt(d)) / (cbrt(h) * cbrt(h))), (1.0 / 2.0)) * pow((cbrt(d) / cbrt(h)), (1.0 / 2.0))) * ((pow((1.0 / (cbrt(l) * cbrt(l))), (1.0 / 2.0)) * pow((d / cbrt(l)), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))));
} else {
VAR = ((cbrt((((pow(((cbrt(d) * cbrt(d)) / (cbrt(h) * cbrt(h))), (1.0 / 2.0)) * pow((cbrt(d) / cbrt(h)), (1.0 / 2.0))) * (pow((1.0 / (cbrt(l) * cbrt(l))), (1.0 / 2.0)) * pow((d / cbrt(l)), (1.0 / 2.0)))) * (1.0 - (((1.0 * pow(((M * D) / (2.0 * d)), 2.0)) * h) / (2.0 * l))))) * cbrt((((pow(((cbrt(d) * cbrt(d)) / (cbrt(h) * cbrt(h))), (1.0 / 2.0)) * pow((cbrt(d) / cbrt(h)), (1.0 / 2.0))) * (pow((1.0 / (cbrt(l) * cbrt(l))), (1.0 / 2.0)) * pow((d / cbrt(l)), (1.0 / 2.0)))) * (1.0 - (((1.0 * pow(((M * D) / (2.0 * d)), 2.0)) * h) / (2.0 * l)))))) * cbrt((((pow(((cbrt(d) * cbrt(d)) / (cbrt(h) * cbrt(h))), (1.0 / 2.0)) * pow((cbrt(d) / cbrt(h)), (1.0 / 2.0))) * (pow((1.0 / (cbrt(l) * cbrt(l))), (1.0 / 2.0)) * pow((d / cbrt(l)), (1.0 / 2.0)))) * (1.0 - (((1.0 * pow(((M * D) / (2.0 * d)), 2.0)) * h) / (2.0 * l))))));
}
return VAR;
}



Bits error versus d



Bits error versus h



Bits error versus l



Bits error versus M



Bits error versus D
Results
if l < -2.9382079299189473e-34 or 7.800908002197208e-33 < l Initial program 25.9
rmApplied add-cube-cbrt26.2
Applied add-cube-cbrt26.3
Applied times-frac26.3
Applied unpow-prod-down19.8
rmApplied add-cube-cbrt19.9
Applied *-un-lft-identity19.9
Applied times-frac19.9
Applied unpow-prod-down16.9
rmApplied associate-*l*16.3
if -2.9382079299189473e-34 < l < 7.800908002197208e-33Initial program 28.7
rmApplied add-cube-cbrt29.0
Applied add-cube-cbrt29.1
Applied times-frac29.1
Applied unpow-prod-down26.4
rmApplied add-cube-cbrt26.5
Applied *-un-lft-identity26.5
Applied times-frac26.5
Applied unpow-prod-down21.6
rmApplied associate-*l/21.6
Applied frac-times11.0
rmApplied add-cube-cbrt11.3
Final simplification14.7
herbie shell --seed 2020079
(FPCore (d h l M D)
:name "Henrywood and Agarwal, Equation (12)"
:precision binary64
(* (* (pow (/ d h) (/ 1 2)) (pow (/ d l) (/ 1 2))) (- 1 (* (* (/ 1 2) (pow (/ (* M D) (* 2 d)) 2)) (/ h l)))))