?

Average Error: 26.7 → 17.6
Time: 39.3s
Precision: binary64
Cost: 33992

?

\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \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} t_0 := \frac{\sqrt[3]{h}}{\ell}\\ \mathbf{if}\;d \leq -3 \cdot 10^{-121}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \left(\left(\left|t_0\right| \cdot \sqrt{t_0}\right) \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \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 (/ (cbrt h) l)))
   (if (<= d -3e-121)
     (*
      (* (/ (sqrt (- d)) (sqrt (- h))) (sqrt (/ d l)))
      (+ 1.0 (* (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)) -0.5)))
     (if (<= d 3.8e-271)
       (-
        (* (/ D (/ (/ d M) (* M D))) (* (* (fabs t_0) (sqrt t_0)) 0.125))
        (* d (sqrt (/ (/ 1.0 l) h))))
       (if (<= d 5.2e+43)
         (*
          (/ (/ d (sqrt h)) (sqrt l))
          (fma (pow (* 0.5 (* M (/ D d))) 2.0) (* (/ h l) -0.5) 1.0))
         (/ d (* (sqrt h) (sqrt 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 t_0 = cbrt(h) / l;
	double tmp;
	if (d <= -3e-121) {
		tmp = ((sqrt(-d) / sqrt(-h)) * sqrt((d / l))) * (1.0 + ((pow(((M / 2.0) * (D / d)), 2.0) * (h / l)) * -0.5));
	} else if (d <= 3.8e-271) {
		tmp = ((D / ((d / M) / (M * D))) * ((fabs(t_0) * sqrt(t_0)) * 0.125)) - (d * sqrt(((1.0 / l) / h)));
	} else if (d <= 5.2e+43) {
		tmp = ((d / sqrt(h)) / sqrt(l)) * fma(pow((0.5 * (M * (D / d))), 2.0), ((h / l) * -0.5), 1.0);
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	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 = Float64(cbrt(h) / l)
	tmp = 0.0
	if (d <= -3e-121)
		tmp = Float64(Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))) * sqrt(Float64(d / l))) * Float64(1.0 + Float64(Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)) * -0.5)));
	elseif (d <= 3.8e-271)
		tmp = Float64(Float64(Float64(D / Float64(Float64(d / M) / Float64(M * D))) * Float64(Float64(abs(t_0) * sqrt(t_0)) * 0.125)) - Float64(d * sqrt(Float64(Float64(1.0 / l) / h))));
	elseif (d <= 5.2e+43)
		tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * fma((Float64(0.5 * Float64(M * Float64(D / d))) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	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[(N[Power[h, 1/3], $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[d, -3e-121], N[(N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e-271], N[(N[(N[(D / N[(N[(d / M), $MachinePrecision] / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[t$95$0], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] - N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.2e+43], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(0.5 * N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $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 := \frac{\sqrt[3]{h}}{\ell}\\
\mathbf{if}\;d \leq -3 \cdot 10^{-121}:\\
\;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right) \cdot -0.5\right)\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\
\;\;\;\;\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \left(\left(\left|t_0\right| \cdot \sqrt{t_0}\right) \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\

\mathbf{elif}\;d \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if d < -2.9999999999999999e-121

    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 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)} \]
      Proof

      [Start]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) \]

      metadata-eval [=>]22.4

      \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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) \]

      unpow1/2 [=>]22.4

      \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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) \]

      metadata-eval [=>]22.4

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

      unpow1/2 [=>]22.4

      \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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) \]

      associate-*l* [=>]22.4

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

      metadata-eval [=>]22.4

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

      times-frac [=>]22.4

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

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

    if -2.9999999999999999e-121 < d < 3.8000000000000001e-271

    1. Initial program 38.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. Simplified39.1

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

      [Start]38.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) \]

      metadata-eval [=>]38.1

      \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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) \]

      unpow1/2 [=>]38.1

      \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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) \]

      metadata-eval [=>]38.1

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

      unpow1/2 [=>]38.1

      \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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) \]

      associate-*l* [=>]38.1

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

      metadata-eval [=>]38.1

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

      times-frac [=>]39.1

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \]
    4. Taylor expanded in d around -inf 42.6

      \[\leadsto \color{blue}{0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) + -1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    5. Simplified39.8

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

      [Start]42.6

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

      mul-1-neg [=>]42.6

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

      unsub-neg [=>]42.6

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

      *-commutative [=>]42.6

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

      associate-*l* [=>]42.6

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

      associate-/l* [=>]44.6

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

      unpow2 [=>]44.6

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

      associate-/l* [=>]43.6

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

      unpow2 [=>]43.6

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

      associate-/r* [=>]42.4

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

      associate-/l/ [=>]39.8

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

      associate-/r* [=>]39.8

      \[ \frac{D}{\frac{\frac{d}{M}}{D \cdot M}} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot 0.125\right) - d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    6. Applied egg-rr34.4

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

      \[\leadsto \frac{D}{\frac{\frac{d}{M}}{D \cdot M}} \cdot \left(\color{blue}{\left(\left|\frac{\sqrt[3]{h}}{\ell}\right| \cdot \sqrt{\frac{\sqrt[3]{h}}{\ell}}\right)} \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}} \]
      Proof

      [Start]34.4

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

      unpow2 [=>]34.4

      \[ \frac{D}{\frac{\frac{d}{M}}{D \cdot M}} \cdot \left(\left(\sqrt{\color{blue}{\frac{\sqrt[3]{h}}{\ell} \cdot \frac{\sqrt[3]{h}}{\ell}}} \cdot \sqrt{\frac{\sqrt[3]{h}}{\ell}}\right) \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}} \]

      rem-sqrt-square [=>]31.5

      \[ \frac{D}{\frac{\frac{d}{M}}{D \cdot M}} \cdot \left(\left(\color{blue}{\left|\frac{\sqrt[3]{h}}{\ell}\right|} \cdot \sqrt{\frac{\sqrt[3]{h}}{\ell}}\right) \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}} \]

    if 3.8000000000000001e-271 < d < 5.20000000000000042e43

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

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

      [Start]27.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) \]

      metadata-eval [=>]27.1

      \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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) \]

      unpow1/2 [=>]27.1

      \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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) \]

      metadata-eval [=>]27.1

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

      unpow1/2 [=>]27.1

      \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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) \]

      associate-*l* [=>]27.1

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

      metadata-eval [=>]27.1

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

      times-frac [=>]28.1

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

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

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

      [Start]21.9

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

      *-lft-identity [<=]21.9

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

      *-commutative [<=]21.9

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

      distribute-rgt-in [<=]21.9

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

      associate-/r* [=>]22.0

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

      +-commutative [=>]22.0

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

      *-commutative [=>]22.0

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

      fma-def [=>]22.0

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

      *-commutative [=>]22.0

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

      associate-*r* [=>]22.0

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

      *-commutative [=>]22.0

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

    if 5.20000000000000042e43 < d

    1. Initial program 25.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. Simplified25.1

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

      [Start]25.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) \]

      metadata-eval [=>]25.4

      \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \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) \]

      unpow1/2 [=>]25.4

      \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \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) \]

      metadata-eval [=>]25.4

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

      unpow1/2 [=>]25.4

      \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\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) \]

      associate-*l* [=>]25.4

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

      metadata-eval [=>]25.4

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

      times-frac [=>]25.1

      \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right) \]
    3. Taylor expanded in d around inf 17.9

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    4. Simplified17.3

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      Proof

      [Start]17.9

      \[ \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]

      *-commutative [=>]17.9

      \[ \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

      associate-/r* [=>]17.3

      \[ d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    5. Applied egg-rr10.1

      \[\leadsto \color{blue}{\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}} \]
    6. Simplified7.9

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}} \]
      Proof

      [Start]10.1

      \[ \frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}} \]

      associate-/l/ [=>]7.9

      \[ \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification17.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3 \cdot 10^{-121}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \left(\left(\left|\frac{\sqrt[3]{h}}{\ell}\right| \cdot \sqrt{\frac{\sqrt[3]{h}}{\ell}}\right) \cdot 0.125\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternatives

Alternative 1
Error21.0
Cost104464
\[\begin{array}{l} t_0 := d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := 1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right)\\ t_3 := \left(t_1 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_2\\ t_4 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_4 \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\ell}{D} \cdot \frac{d}{\frac{M \cdot \left(h \cdot M\right)}{d}}} \cdot -0.25\right)\right)\\ \mathbf{elif}\;t_3 \leq -500000000000:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\frac{M \cdot D}{\frac{d}{M \cdot D}} \cdot \left(0.125 \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - t_0\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+298}:\\ \;\;\;\;\left(1 + \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right) \cdot -0.5\right) \cdot t_4\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error17.0
Cost33796
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ t_1 := M \cdot \left(0.5 \cdot \frac{D}{d}\right)\\ \mathbf{if}\;\ell \leq -4.1 \cdot 10^{+111}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot {\left(t_1 \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\\ \mathbf{elif}\;\ell \leq -2.8 \cdot 10^{-44}:\\ \;\;\;\;\frac{M \cdot D}{\frac{d}{M \cdot D}} \cdot \left(0.125 \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;\ell \leq -6.1 \cdot 10^{-127}:\\ \;\;\;\;t_0 \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{M \cdot \left(0.5 \cdot D\right)}{d}\right)}^{2}\right)\right)\\ \mathbf{elif}\;\ell \leq -2.7 \cdot 10^{-307}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\ell \cdot \frac{\frac{d}{M} \cdot \frac{d}{M}}{h}}{D}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + \left(\frac{h}{\ell} \cdot -0.5\right) \cdot {t_1}^{2}\right)\\ \end{array} \]
Alternative 3
Error20.8
Cost21316
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -300000000000:\\ \;\;\;\;\left(t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\ell \cdot \frac{\frac{d}{M} \cdot \frac{d}{M}}{h}}{D}}\right)\right)\\ \mathbf{elif}\;d \leq -1.45 \cdot 10^{-128}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_1\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{M \cdot \left(h \cdot \frac{M}{\ell}\right)}}{D}}\right)\right)\\ \mathbf{elif}\;d \leq -1.9 \cdot 10^{-204}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{M \cdot D}{\frac{d}{M \cdot D}} \cdot \left(0.125 \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{+42}:\\ \;\;\;\;t_0 \cdot \left(1 + \left(\frac{h}{\ell} \cdot -0.5\right) \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error21.4
Cost21136
\[\begin{array}{l} t_0 := 0.5 \cdot \frac{D}{d}\\ t_1 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{if}\;d \leq -3.9 \cdot 10^{+202}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -2.35 \cdot 10^{-121}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \left(1 + -0.5 \cdot \left(\frac{M}{\frac{\ell}{h}} \cdot \frac{\left(M \cdot \frac{D}{d}\right) \cdot t_0}{2}\right)\right)}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{+44}:\\ \;\;\;\;t_1 \cdot \left(1 + \left(\frac{h}{\ell} \cdot -0.5\right) \cdot {\left(M \cdot t_0\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error21.1
Cost21136
\[\begin{array}{l} t_0 := 0.5 \cdot \frac{D}{d}\\ t_1 := \sqrt{\frac{\frac{1}{\ell}}{h}}\\ t_2 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{if}\;d \leq -3.8 \cdot 10^{+202}:\\ \;\;\;\;\left(-d\right) \cdot t_1\\ \mathbf{elif}\;d \leq -2.85 \cdot 10^{-123}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \left(1 + -0.5 \cdot \left(\frac{M}{\frac{\ell}{h}} \cdot \frac{\left(M \cdot \frac{D}{d}\right) \cdot t_0}{2}\right)\right)}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \left(0.125 \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - d \cdot t_1\\ \mathbf{elif}\;d \leq 5.5 \cdot 10^{+41}:\\ \;\;\;\;t_2 \cdot \left(1 + \left(\frac{h}{\ell} \cdot -0.5\right) \cdot {\left(M \cdot t_0\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error20.9
Cost21136
\[\begin{array}{l} t_0 := 0.5 \cdot \frac{D}{d}\\ t_1 := \sqrt{\frac{\frac{1}{\ell}}{h}}\\ t_2 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{if}\;d \leq -1.85 \cdot 10^{+214}:\\ \;\;\;\;\left(-d\right) \cdot t_1\\ \mathbf{elif}\;d \leq -6.6 \cdot 10^{-122}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \left(1 + -0.5 \cdot \left(\frac{M}{\frac{\ell}{h}} \cdot \frac{\left(M \cdot \frac{D}{d}\right) \cdot t_0}{2}\right)\right)}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-271}:\\ \;\;\;\;\frac{M \cdot D}{\frac{d}{M \cdot D}} \cdot \left(0.125 \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - d \cdot t_1\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+44}:\\ \;\;\;\;t_2 \cdot \left(1 + \left(\frac{h}{\ell} \cdot -0.5\right) \cdot {\left(M \cdot t_0\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error22.0
Cost15317
\[\begin{array}{l} t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\ell}{D} \cdot \frac{d}{\frac{M \cdot \left(h \cdot M\right)}{d}}} \cdot -0.25\right)\right)\\ \mathbf{if}\;d \leq -3.3 \cdot 10^{+92}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -1.2 \cdot 10^{-128}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-306}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 1.25 \cdot 10^{-49} \lor \neg \left(d \leq 4.4 \cdot 10^{+21}\right):\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error21.8
Cost15317
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -5.2 \cdot 10^{+92}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -2.3 \cdot 10^{-130}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{M \cdot \left(h \cdot \frac{M}{\ell}\right)}}{D}}\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-306}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-49} \lor \neg \left(d \leq 6.2 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\ell}{D} \cdot \frac{d}{\frac{M \cdot \left(h \cdot M\right)}{d}}} \cdot -0.25\right)\right)\\ \end{array} \]
Alternative 9
Error22.5
Cost15317
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -5.8 \cdot 10^{+206}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -1.02 \cdot 10^{-122}:\\ \;\;\;\;\frac{t_0 \cdot \left(1 + -0.5 \cdot \left(\frac{M}{\frac{\ell}{h}} \cdot \frac{\left(M \cdot \frac{D}{d}\right) \cdot \left(0.5 \cdot \frac{D}{d}\right)}{2}\right)\right)}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-306}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-50} \lor \neg \left(d \leq 1.6 \cdot 10^{+20}\right):\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_0\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\ell}{D} \cdot \frac{d}{\frac{M \cdot \left(h \cdot M\right)}{d}}} \cdot -0.25\right)\right)\\ \end{array} \]
Alternative 10
Error23.4
Cost15316
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := 0.5 \cdot \frac{D}{d}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \sqrt{\frac{\ell}{d}}\\ \mathbf{if}\;d \leq -3.5 \cdot 10^{+202}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -5.8 \cdot 10^{-124}:\\ \;\;\;\;\frac{t_2 \cdot \left(1 + -0.5 \cdot \left(\frac{M}{\frac{\ell}{h}} \cdot \frac{t_0 \cdot t_1}{2}\right)\right)}{t_3}\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{-271}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 4.3 \cdot 10^{-105}:\\ \;\;\;\;\frac{t_2 \cdot \left(1 + -0.5 \cdot \frac{0.5}{\frac{\frac{\ell}{h}}{t_0 \cdot \left(M \cdot t_1\right)}}\right)}{t_3}\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{+22}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_2\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\ell}{D} \cdot \frac{d}{\frac{M \cdot \left(h \cdot M\right)}{d}}} \cdot -0.25\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 11
Error22.9
Cost14920
\[\begin{array}{l} \mathbf{if}\;d \leq -2.35 \cdot 10^{+58}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq -3.15 \cdot 10^{-121}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{\ell} \cdot \frac{\frac{h}{d}}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-306}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 12
Error24.3
Cost13384
\[\begin{array}{l} \mathbf{if}\;h \leq -1.85 \cdot 10^{-153}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq -9.5 \cdot 10^{-308}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 13
Error23.9
Cost13252
\[\begin{array}{l} \mathbf{if}\;d \leq 9.5 \cdot 10^{-306}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 14
Error28.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.9 \cdot 10^{-260}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 15
Error28.0
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.9 \cdot 10^{-260}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 16
Error33.7
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 2.45 \cdot 10^{-206}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 17
Error44.5
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

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