Average Error: 26.3 → 14.1
Time: 13.4s
Precision: binary64
\[\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)\]
\[\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right)\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\]
\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)
\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right)\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)
(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
 (*
  (*
   (* (fabs (/ (cbrt d) (cbrt h))) (sqrt (/ (cbrt d) (cbrt h))))
   (*
    (fabs (cbrt d))
    (* (sqrt (/ 1.0 (* (cbrt l) (cbrt l)))) (sqrt (/ (cbrt d) (cbrt l))))))
  (- 1.0 (/ (* h (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0))) 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) {
	return ((fabs(cbrt(d) / cbrt(h)) * sqrt(cbrt(d) / cbrt(h))) * (fabs(cbrt(d)) * (sqrt(1.0 / (cbrt(l) * cbrt(l))) * sqrt(cbrt(d) / cbrt(l))))) * (1.0 - ((h * (0.5 * pow(((M * D) / (d * 2.0)), 2.0))) / l));
}

Error

Bits error versus d

Bits error versus h

Bits error versus l

Bits error versus M

Bits error versus D

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 26.3

    \[\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)\]
  2. Simplified26.3

    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt_binary6426.6

    \[\leadsto \left(\sqrt{\frac{d}{\color{blue}{\left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right) \cdot \sqrt[3]{h}}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  5. Applied add-cube-cbrt_binary6426.7

    \[\leadsto \left(\sqrt{\frac{\color{blue}{\left(\sqrt[3]{d} \cdot \sqrt[3]{d}\right) \cdot \sqrt[3]{d}}}{\left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right) \cdot \sqrt[3]{h}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  6. Applied times-frac_binary6426.7

    \[\leadsto \left(\sqrt{\color{blue}{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}} \cdot \frac{\sqrt[3]{d}}{\sqrt[3]{h}}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  7. Applied sqrt-prod_binary6421.4

    \[\leadsto \left(\color{blue}{\left(\sqrt{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  8. Simplified20.7

    \[\leadsto \left(\left(\color{blue}{\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  9. Using strategy rm
  10. Applied *-un-lft-identity_binary6420.7

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \sqrt{\frac{d}{\color{blue}{1 \cdot \ell}}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  11. Applied add-cube-cbrt_binary6420.9

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{d} \cdot \sqrt[3]{d}\right) \cdot \sqrt[3]{d}}}{1 \cdot \ell}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  12. Applied times-frac_binary6420.9

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{1} \cdot \frac{\sqrt[3]{d}}{\ell}}}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  13. Applied sqrt-prod_binary6417.5

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \color{blue}{\left(\sqrt{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{1}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  14. Simplified17.5

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\color{blue}{\left|\sqrt[3]{d}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\]
  15. Using strategy rm
  16. Applied associate-*r/_binary6415.3

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot h}{\ell}}\right)\]
  17. Using strategy rm
  18. Applied add-cube-cbrt_binary6415.3

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\right)\right) \cdot \left(1 - \frac{\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot h}{\ell}\right)\]
  19. Applied *-un-lft-identity_binary6415.3

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\color{blue}{1 \cdot \sqrt[3]{d}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \frac{\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot h}{\ell}\right)\]
  20. Applied times-frac_binary6415.3

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\color{blue}{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}}\right)\right) \cdot \left(1 - \frac{\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot h}{\ell}\right)\]
  21. Applied sqrt-prod_binary6414.1

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \color{blue}{\left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)}\right)\right) \cdot \left(1 - \frac{\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot h}{\ell}\right)\]
  22. Final simplification14.1

    \[\leadsto \left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\sqrt[3]{d}\right| \cdot \left(\sqrt{\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right)\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\]

Reproduce

herbie shell --seed 2020220 
(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)))))