Average Error: 26.5 → 14.0
Time: 28.7s
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)\]
\[\begin{array}{l} \mathbf{if}\;d \leq -2.7495816865703752 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)\\ \mathbf{elif}\;d \leq 3.7294275420154245 \cdot 10^{-128}:\\ \;\;\;\;\frac{d \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}{\sqrt{h} \cdot \sqrt{\ell}}\\ \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(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{h}{\sqrt[3]{\ell}}\right)\\ \end{array}\]
\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}\;d \leq -2.7495816865703752 \cdot 10^{-307}:\\
\;\;\;\;\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)\\

\mathbf{elif}\;d \leq 3.7294275420154245 \cdot 10^{-128}:\\
\;\;\;\;\frac{d \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}{\sqrt{h} \cdot \sqrt{\ell}}\\

\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(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{h}{\sqrt[3]{\ell}}\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 (<= d -2.7495816865703752e-307)
   (*
    (*
     (* (fabs (/ (cbrt d) (cbrt h))) (sqrt (/ (cbrt d) (cbrt h))))
     (* (fabs (/ (cbrt d) (cbrt l))) (sqrt (/ (cbrt d) (cbrt l)))))
    (-
     1.0
     (*
      (*
       (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (* (cbrt h) (cbrt h)))
       (/ (cbrt 1.0) (* (cbrt l) (cbrt l))))
      (/ (cbrt h) (cbrt l)))))
   (if (<= d 3.7294275420154245e-128)
     (/
      (* d (- 1.0 (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (/ h l))))
      (* (sqrt h) (sqrt l)))
     (*
      (*
       (* (fabs (/ (cbrt d) (cbrt h))) (sqrt (/ (cbrt d) (cbrt h))))
       (* (fabs (/ (cbrt d) (cbrt l))) (sqrt (/ (cbrt d) (cbrt l)))))
      (-
       1.0
       (*
        (*
         (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0))
         (/ 1.0 (* (cbrt l) (cbrt l))))
        (/ h (cbrt 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 (d <= -2.7495816865703752e-307) {
		tmp = ((fabs(cbrt(d) / cbrt(h)) * sqrt(cbrt(d) / cbrt(h))) * (fabs(cbrt(d) / cbrt(l)) * sqrt(cbrt(d) / cbrt(l)))) * (1.0 - ((((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (cbrt(h) * cbrt(h))) * (cbrt(1.0) / (cbrt(l) * cbrt(l)))) * (cbrt(h) / cbrt(l))));
	} else if (d <= 3.7294275420154245e-128) {
		tmp = (d * (1.0 - ((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)))) / (sqrt(h) * sqrt(l));
	} else {
		tmp = ((fabs(cbrt(d) / cbrt(h)) * sqrt(cbrt(d) / cbrt(h))) * (fabs(cbrt(d) / cbrt(l)) * sqrt(cbrt(d) / cbrt(l)))) * (1.0 - (((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (1.0 / (cbrt(l) * cbrt(l)))) * (h / cbrt(l))));
	}
	return tmp;
}

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. Split input into 3 regimes
  2. if d < -2.74958168657037524e-307

    1. Initial program 26.4

      \[\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.4

      \[\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_binary64_147726.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_binary64_147726.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_binary64_144826.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_binary64_145821.5

      \[\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.8

      \[\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 add-cube-cbrt_binary64_147720.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{d}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\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_binary64_147721.1

      \[\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}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\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_binary64_144821.1

      \[\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}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{d}}{\sqrt[3]{\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_binary64_145817.2

      \[\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}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\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.0

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\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 *-un-lft-identity_binary64_144217.0

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\color{blue}{1 \cdot \ell}}\right)\]
    17. Applied add-cube-cbrt_binary64_147717.0

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{\color{blue}{\left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right) \cdot \sqrt[3]{h}}}{1 \cdot \ell}\right)\]
    18. Applied times-frac_binary64_144817.0

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\left(\frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{1} \cdot \frac{\sqrt[3]{h}}{\ell}\right)}\right)\]
    19. Applied associate-*r*_binary64_138214.6

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{1}\right) \cdot \frac{\sqrt[3]{h}}{\ell}}\right)\]
    20. Simplified14.6

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right)} \cdot \frac{\sqrt[3]{h}}{\ell}\right)\]
    21. Using strategy rm
    22. Applied add-cube-cbrt_binary64_147714.7

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{h}}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\right)\]
    23. Applied *-un-lft-identity_binary64_144214.7

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{\color{blue}{1 \cdot h}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}\right)\]
    24. Applied cbrt-prod_binary64_147314.7

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\color{blue}{\sqrt[3]{1} \cdot \sqrt[3]{h}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}\right)\]
    25. Applied times-frac_binary64_144814.7

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \color{blue}{\left(\frac{\sqrt[3]{1}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)}\right)\]
    26. Applied associate-*r*_binary64_138213.6

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \color{blue}{\left(\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\right)\]

    if -2.74958168657037524e-307 < d < 3.72942754201542449e-128

    1. Initial program 38.2

      \[\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. Simplified38.2

      \[\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 sqrt-div_binary64_145931.6

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\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 sqrt-div_binary64_145930.6

      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\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 frac-times_binary64_145230.7

      \[\leadsto \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{h} \cdot \sqrt{\ell}}} \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 associate-*l/_binary64_138529.0

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

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

    if 3.72942754201542449e-128 < d

    1. Initial program 22.4

      \[\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. Simplified22.4

      \[\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_binary64_147722.7

      \[\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_binary64_147722.8

      \[\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_binary64_144822.8

      \[\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_binary64_145816.6

      \[\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. Simplified15.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 add-cube-cbrt_binary64_147715.8

      \[\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}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\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_binary64_147716.0

      \[\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}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\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_binary64_144816.0

      \[\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}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{d}}{\sqrt[3]{\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_binary64_145812.3

      \[\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}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\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. Simplified12.4

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\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 add-cube-cbrt_binary64_147712.4

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\right)\]
    17. Applied *-un-lft-identity_binary64_144212.4

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{\color{blue}{1 \cdot h}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}\right)\]
    18. Applied times-frac_binary64_144812.4

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{h}{\sqrt[3]{\ell}}\right)}\right)\]
    19. Applied associate-*r*_binary64_13829.2

      \[\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|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{h}{\sqrt[3]{\ell}}}\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification14.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.7495816865703752 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{h}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right) \cdot \left(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right)\right) \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)\\ \mathbf{elif}\;d \leq 3.7294275420154245 \cdot 10^{-128}:\\ \;\;\;\;\frac{d \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}{\sqrt{h} \cdot \sqrt{\ell}}\\ \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(\left|\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{\ell}}}\right)\right) \cdot \left(1 - \left(\left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{h}{\sqrt[3]{\ell}}\right)\\ \end{array}\]

Reproduce

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