\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}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq \infty:\\
\;\;\;\;\left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{d}{\sqrt[3]{\ell}}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{d}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \log \left({\left(\sqrt{e^{{\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}}}\right)}^{\left(\frac{h}{\ell}\right)}\right)\right)\\
\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
(if (<=
(*
(* (pow (/ d h) 0.5) (pow (/ d l) 0.5))
(- 1.0 (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (/ h l))))
INFINITY)
(*
(- 1.0 (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (/ h l)))
(*
(* (fabs (/ (cbrt d) (cbrt h))) (sqrt (/ (cbrt d) (cbrt h))))
(* (sqrt (/ 1.0 (* (cbrt l) (cbrt l)))) (sqrt (/ d (cbrt l))))))
(*
(*
(* (fabs (/ (cbrt d) (cbrt h))) (sqrt (/ (cbrt d) (cbrt h))))
(* (sqrt (/ 1.0 (* (cbrt l) (cbrt l)))) (sqrt (/ d (cbrt l)))))
(- 1.0 (log (pow (sqrt (exp (pow (/ (* M D) (* d 2.0)) 2.0))) (/ h l)))))))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 tmp;
if (((pow((d / h), 0.5) * pow((d / l), 0.5)) * (1.0 - ((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)))) <= ((double) INFINITY)) {
tmp = (1.0 - ((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (h / l))) * ((fabs(cbrt(d) / cbrt(h)) * sqrt(cbrt(d) / cbrt(h))) * (sqrt(1.0 / (cbrt(l) * cbrt(l))) * sqrt(d / cbrt(l))));
} else {
tmp = ((fabs(cbrt(d) / cbrt(h)) * sqrt(cbrt(d) / cbrt(h))) * (sqrt(1.0 / (cbrt(l) * cbrt(l))) * sqrt(d / cbrt(l)))) * (1.0 - log(pow(sqrt(exp(pow(((M * D) / (d * 2.0)), 2.0))), (h / l))));
}
return tmp;
}



Bits error versus d



Bits error versus h



Bits error versus l



Bits error versus M



Bits error versus D
Results
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < +inf.0Initial program 19.5
Simplified19.5
rmApplied add-cube-cbrt_binary64_113619.8
Applied add-cube-cbrt_binary64_113619.9
Applied times-frac_binary64_110719.9
Applied sqrt-prod_binary64_111713.4
Simplified12.5
rmApplied add-cube-cbrt_binary64_113612.6
Applied *-un-lft-identity_binary64_110112.6
Applied times-frac_binary64_110712.6
Applied sqrt-prod_binary64_11178.2
if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) Initial program 64.0
Simplified64.0
rmApplied add-cube-cbrt_binary64_113664.0
Applied add-cube-cbrt_binary64_113664.0
Applied times-frac_binary64_110764.0
Applied sqrt-prod_binary64_111764.0
Simplified64.0
rmApplied add-cube-cbrt_binary64_113664.0
Applied *-un-lft-identity_binary64_110164.0
Applied times-frac_binary64_110764.0
Applied sqrt-prod_binary64_111764.0
rmApplied add-log-exp_binary64_114064.0
Simplified45.1
Final simplification14.2
herbie shell --seed 2020343
(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)))))