Average Error: 26.5 → 15.0
Time: 14.8s
Precision: binary64
\[[M, D] = \mathsf{sort}([M, D]) \\]
\[\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 := \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\\ t_1 := \left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\\ \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 -8.226158848812984 \cdot 10^{-212}:\\ \;\;\;\;\left(\left(\sqrt{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}} \cdot t_0\right) \cdot t_1\right) \cdot \mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(t_0 \cdot \left(t_0 \cdot t_0\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
 (let* ((t_0 (sqrt (/ (cbrt d) (cbrt h))))
        (t_1 (* (fabs (cbrt d)) (sqrt (/ (cbrt d) l)))))
   (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))))
        -8.226158848812984e-212)
     (*
      (* (* (sqrt (/ (* (cbrt d) (cbrt d)) (* (cbrt h) (cbrt h)))) t_0) t_1)
      (fma (pow (* (/ M d) (/ D 2.0)) 2.0) (* (/ h l) -0.5) 1.0))
     (* t_1 (* t_0 (* t_0 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 = sqrt((cbrt(d) / cbrt(h)));
	double t_1 = fabs(cbrt(d)) * sqrt((cbrt(d) / l));
	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)))) <= -8.226158848812984e-212) {
		tmp = ((sqrt(((cbrt(d) * cbrt(d)) / (cbrt(h) * cbrt(h)))) * t_0) * t_1) * fma(pow(((M / d) * (D / 2.0)), 2.0), ((h / l) * -0.5), 1.0);
	} else {
		tmp = t_1 * (t_0 * (t_0 * t_0));
	}
	return tmp;
}
function code(d, h, l, M, D)
	return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(cbrt(d) / cbrt(h)))
	t_1 = Float64(abs(cbrt(d)) * sqrt(Float64(cbrt(d) / l)))
	tmp = 0.0
	if (Float64(Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5)) * Float64(1.0 - Float64(Float64(0.5 * (Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0)) * Float64(h / l)))) <= -8.226158848812984e-212)
		tmp = Float64(Float64(Float64(sqrt(Float64(Float64(cbrt(d) * cbrt(d)) / Float64(cbrt(h) * cbrt(h)))) * t_0) * t_1) * fma((Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0));
	else
		tmp = Float64(t_1 * Float64(t_0 * Float64(t_0 * t_0)));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[Power[d, 1/3], $MachinePrecision] / N[Power[h, 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[Power[d, 1/3], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[Power[d, 1/3], $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.5 * N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -8.226158848812984e-212], N[(N[(N[(N[Sqrt[N[(N[(N[Power[d, 1/3], $MachinePrecision] * N[Power[d, 1/3], $MachinePrecision]), $MachinePrecision] / N[(N[Power[h, 1/3], $MachinePrecision] * N[Power[h, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 := \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\\
t_1 := \left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\\
\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 -8.226158848812984 \cdot 10^{-212}:\\
\;\;\;\;\left(\left(\sqrt{\frac{\sqrt[3]{d} \cdot \sqrt[3]{d}}{\sqrt[3]{h} \cdot \sqrt[3]{h}}} \cdot t_0\right) \cdot t_1\right) \cdot \mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_0 \cdot \left(t_0 \cdot t_0\right)\right)\\


\end{array}

Error

Bits error versus d

Bits error versus h

Bits error versus l

Bits error versus M

Bits error versus D

Derivation

  1. Split input into 2 regimes
  2. 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)))) < -8.2261588488129841e-212

    1. Initial program 28.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. Simplified28.3

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

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    4. Applied add-cube-cbrt_binary6428.5

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    5. Applied times-frac_binary6428.5

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    6. Applied sqrt-prod_binary6428.0

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    7. Applied *-un-lft-identity_binary6428.0

      \[\leadsto \left(\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}{\color{blue}{1 \cdot \ell}}}\right) \cdot \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    8. Applied add-cube-cbrt_binary6428.2

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

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

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

      \[\leadsto \left(\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 \left(\color{blue}{\left|\sqrt[3]{d}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)\right) \cdot \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    12. Applied times-frac_binary6428.5

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

    if -8.2261588488129841e-212 < (*.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))))

    1. Initial program 26.1

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

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

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    4. Applied add-cube-cbrt_binary6426.5

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    5. Applied times-frac_binary6426.5

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    6. Applied sqrt-prod_binary6419.7

      \[\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    7. Applied *-un-lft-identity_binary6419.7

      \[\leadsto \left(\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}{\color{blue}{1 \cdot \ell}}}\right) \cdot \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    8. Applied add-cube-cbrt_binary6419.9

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

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

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

      \[\leadsto \left(\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 \left(\color{blue}{\left|\sqrt[3]{d}\right|} \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)\right) \cdot \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    12. Applied add-sqr-sqrt_binary6415.7

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

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

      \[\leadsto \left(\left(\left(\sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}} \cdot \color{blue}{\sqrt{\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 \mathsf{fma}\left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \]
    15. Taylor expanded in M around 0 12.1

      \[\leadsto \left(\left(\left(\sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}} \cdot \sqrt{\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 \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification15.0

    \[\leadsto \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 -8.226158848812984 \cdot 10^{-212}:\\ \;\;\;\;\left(\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 \left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right)\right) \cdot \mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left|\sqrt[3]{d}\right| \cdot \sqrt{\frac{\sqrt[3]{d}}{\ell}}\right) \cdot \left(\sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}} \cdot \left(\sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}} \cdot \sqrt{\frac{\sqrt[3]{d}}{\sqrt[3]{h}}}\right)\right)\\ \end{array} \]

Reproduce

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