?

Average Error: 26.8 → 17.0
Time: 1.1min
Precision: binary64
Cost: 40328

?

\[\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 := \mathsf{fma}\left(-0.5, {\left(\left(D \cdot \frac{M \cdot 0.5}{d}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}, 1\right)\\ t_1 := \sqrt{-d}\\ \mathbf{if}\;d \leq -4.2 \cdot 10^{+117}:\\ \;\;\;\;\frac{t_1}{\sqrt{-h}} \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot t_0\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \frac{1}{\frac{\sqrt{-\ell}}{t_1}}\right)\\ \mathbf{elif}\;d \leq 8 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \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 (fma -0.5 (pow (* (* D (/ (* M 0.5) d)) (sqrt (/ h l))) 2.0) 1.0))
        (t_1 (sqrt (- d))))
   (if (<= d -4.2e+117)
     (* (/ t_1 (sqrt (- h))) (* (/ 1.0 (sqrt (/ l d))) t_0))
     (if (<= d -4e-310)
       (* (sqrt (/ d h)) (* t_0 (/ 1.0 (/ (sqrt (- l)) t_1))))
       (if (<= d 8e+66)
         (*
          (/ d (* (sqrt l) (sqrt h)))
          (+ 1.0 (* (pow (* M (* 0.5 (/ D d))) 2.0) (* -0.5 (/ h l)))))
         (/ d (/ (sqrt h) (pow l -0.5))))))))
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 = fma(-0.5, pow(((D * ((M * 0.5) / d)) * sqrt((h / l))), 2.0), 1.0);
	double t_1 = sqrt(-d);
	double tmp;
	if (d <= -4.2e+117) {
		tmp = (t_1 / sqrt(-h)) * ((1.0 / sqrt((l / d))) * t_0);
	} else if (d <= -4e-310) {
		tmp = sqrt((d / h)) * (t_0 * (1.0 / (sqrt(-l) / t_1)));
	} else if (d <= 8e+66) {
		tmp = (d / (sqrt(l) * sqrt(h))) * (1.0 + (pow((M * (0.5 * (D / d))), 2.0) * (-0.5 * (h / l))));
	} else {
		tmp = d / (sqrt(h) / pow(l, -0.5));
	}
	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 = fma(-0.5, (Float64(Float64(D * Float64(Float64(M * 0.5) / d)) * sqrt(Float64(h / l))) ^ 2.0), 1.0)
	t_1 = sqrt(Float64(-d))
	tmp = 0.0
	if (d <= -4.2e+117)
		tmp = Float64(Float64(t_1 / sqrt(Float64(-h))) * Float64(Float64(1.0 / sqrt(Float64(l / d))) * t_0));
	elseif (d <= -4e-310)
		tmp = Float64(sqrt(Float64(d / h)) * Float64(t_0 * Float64(1.0 / Float64(sqrt(Float64(-l)) / t_1))));
	elseif (d <= 8e+66)
		tmp = Float64(Float64(d / Float64(sqrt(l) * sqrt(h))) * Float64(1.0 + Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(-0.5 * Float64(h / l)))));
	else
		tmp = Float64(d / Float64(sqrt(h) / (l ^ -0.5)));
	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[(-0.5 * N[Power[N[(N[(D * N[(N[(M * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-d)], $MachinePrecision]}, If[LessEqual[d, -4.2e+117], N[(N[(t$95$1 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4e-310], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[(1.0 / N[(N[Sqrt[(-l)], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e+66], N[(N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, -0.5], $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 := \mathsf{fma}\left(-0.5, {\left(\left(D \cdot \frac{M \cdot 0.5}{d}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}, 1\right)\\
t_1 := \sqrt{-d}\\
\mathbf{if}\;d \leq -4.2 \cdot 10^{+117}:\\
\;\;\;\;\frac{t_1}{\sqrt{-h}} \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot t_0\right)\\

\mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \frac{1}{\frac{\sqrt{-\ell}}{t_1}}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if d < -4.2000000000000002e117

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

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

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

      associate-*l* [=>]28.3

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

      metadata-eval [=>]28.3

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

      unpow1/2 [=>]28.3

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

      metadata-eval [=>]28.3

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

      unpow1/2 [=>]28.3

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

      sub-neg [=>]28.3

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

      +-commutative [=>]28.3

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

      associate-*l* [=>]28.3

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

      distribute-lft-neg-in [=>]28.3

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

      fma-def [=>]28.3

      \[ \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\mathsf{fma}\left(-\frac{1}{2}, {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}, 1\right)}\right) \]
    3. Applied egg-rr27.6

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

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

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

    if -4.2000000000000002e117 < d < -3.999999999999988e-310

    1. Initial program 25.9

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

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

      [Start]25.9

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

      associate-*l* [=>]26.2

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

      metadata-eval [=>]26.2

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

      unpow1/2 [=>]26.2

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

      metadata-eval [=>]26.2

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

      unpow1/2 [=>]26.2

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

      sub-neg [=>]26.2

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

      +-commutative [=>]26.2

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

      associate-*l* [=>]26.2

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

      distribute-lft-neg-in [=>]26.2

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

      fma-def [=>]26.2

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

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

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

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

    if -3.999999999999988e-310 < d < 7.99999999999999956e66

    1. Initial program 27.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.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]27.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) \]

      metadata-eval [=>]27.3

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

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

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

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

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

      \[ \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.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-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. Simplified21.9

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

      *-commutative [=>]21.9

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

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

      *-commutative [=>]21.9

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

    if 7.99999999999999956e66 < d

    1. Initial program 26.7

      \[\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. Taylor expanded in d around inf 16.5

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

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

      [Start]16.5

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

      *-commutative [=>]16.5

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

      associate-/l/ [<=]16.1

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

      \[\leadsto d \cdot \color{blue}{{\left({\left(\frac{1}{h \cdot \ell}\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    5. Simplified26.7

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

      [Start]29.1

      \[ d \cdot {\left({\left(\frac{1}{h \cdot \ell}\right)}^{1.5}\right)}^{0.3333333333333333} \]

      unpow1/3 [=>]26.7

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

      associate-/l/ [<=]26.7

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

      \[\leadsto \color{blue}{\frac{d \cdot {\ell}^{-0.5}}{\sqrt{h}}} \]
    7. Simplified7.1

      \[\leadsto \color{blue}{\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}} \]
      Proof

      [Start]10.4

      \[ \frac{d \cdot {\ell}^{-0.5}}{\sqrt{h}} \]

      associate-/l* [=>]7.1

      \[ \color{blue}{\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification17.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -4.2 \cdot 10^{+117}:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.5, {\left(\left(D \cdot \frac{M \cdot 0.5}{d}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}, 1\right)\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\mathsf{fma}\left(-0.5, {\left(\left(D \cdot \frac{M \cdot 0.5}{d}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}, 1\right) \cdot \frac{1}{\frac{\sqrt{-\ell}}{\sqrt{-d}}}\right)\\ \mathbf{elif}\;d \leq 8 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]

Alternatives

Alternative 1
Error17.8
Cost40328
\[\begin{array}{l} t_0 := \sqrt{-d}\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{+205}:\\ \;\;\;\;\left(\frac{t_0}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\mathsf{fma}\left(-0.5, {\left(\left(D \cdot \frac{M \cdot 0.5}{d}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}, 1\right) \cdot \frac{1}{\frac{\sqrt{-\ell}}{t_0}}\right)\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 2
Error19.6
Cost28116
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := 1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \sqrt{-d}\\ t_4 := \frac{t_3}{\sqrt{-\ell}}\\ t_5 := \left(\frac{t_3}{\sqrt{-h}} \cdot t_0\right) \cdot t_1\\ \mathbf{if}\;d \leq -1.62 \cdot 10^{+205}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;d \leq -5.6 \cdot 10^{+166}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot t_4\right)\\ \mathbf{elif}\;d \leq -1.1 \cdot 10^{-68}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;d \leq -1.5 \cdot 10^{-117}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}, 1\right)\right)\\ \mathbf{elif}\;d \leq -1.96 \cdot 10^{-249}:\\ \;\;\;\;t_2 \cdot \left(t_4 \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \left(\left(h \cdot \frac{\frac{D}{d}}{\ell}\right) \cdot \left(\frac{D}{d} \cdot \left(M \cdot M\right)\right)\right), 1\right)\right)\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{-245}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{d \cdot \left(d \cdot \frac{\frac{\ell}{M \cdot M}}{h}\right)}{D}}\right)\right)\\ \mathbf{elif}\;d \leq 10^{+62}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 3
Error17.8
Cost27984
\[\begin{array}{l} t_0 := 1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{-d}\\ t_3 := \frac{t_2}{\sqrt{-\ell}}\\ t_4 := \left(\frac{t_2}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_0\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{+205}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq -5.6 \cdot 10^{+166}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot t_3\right)\\ \mathbf{elif}\;d \leq -3 \cdot 10^{-76}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot \left(t_3 \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \frac{D \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\frac{D}{\ell}}{d}\right)\right)}{d}, 1\right)\right)\\ \mathbf{elif}\;d \leq 6.8 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 4
Error19.2
Cost27796
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := 1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := M \cdot \left(0.5 \cdot \frac{D}{d}\right)\\ t_4 := \sqrt{-d}\\ t_5 := \left(\frac{t_4}{\sqrt{-h}} \cdot t_0\right) \cdot t_1\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{+205}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;d \leq -5.6 \cdot 10^{+166}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{t_4}{\sqrt{-\ell}}\right)\\ \mathbf{elif}\;d \leq -1.2 \cdot 10^{-68}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;d \leq -5.1 \cdot 10^{-112}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}, 1\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-242}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \left(1 - 0.5 \cdot {\left(\sqrt{\frac{h}{\ell}} \cdot t_3\right)}^{2}\right)\\ \mathbf{elif}\;d \leq 8.2 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {t_3}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 5
Error19.4
Cost27528
\[\begin{array}{l} t_0 := \sqrt{-d}\\ \mathbf{if}\;d \leq -7 \cdot 10^{+205}:\\ \;\;\;\;\left(\frac{t_0}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot M}{\frac{\ell}{h}}}}{D}}\right)\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{t_0}{\sqrt{-\ell}}\right)\\ \mathbf{elif}\;d \leq 1.95 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 6
Error20.5
Cost21580
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot M}{\frac{\ell}{h}}}}{D}}\right)\right)\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{+205}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -2.55 \cdot 10^{+160}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot t_2\right)\\ \mathbf{elif}\;d \leq -1.2 \cdot 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -5 \cdot 10^{+73}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \left(1 - 0.5 \cdot \frac{h \cdot t_1}{\ell}\right)\\ \mathbf{elif}\;d \leq 7.8 \cdot 10^{-301}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{0.5 \cdot {\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right)}^{2}}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq 6.6 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + t_1 \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 7
Error20.6
Cost21580
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot M}{\frac{\ell}{h}}}}{D}}\right)\right)\\ \mathbf{if}\;d \leq -1.48 \cdot 10^{+205}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -2.7 \cdot 10^{+156}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot t_2\right)\\ \mathbf{elif}\;d \leq -2.3 \cdot 10^{+114}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -4 \cdot 10^{+71}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \left(1 - 0.5 \cdot \frac{h \cdot t_1}{\ell}\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + t_1 \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 8
Error23.1
Cost21192
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -1.1 \cdot 10^{-68}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot t_1\right)\\ \mathbf{elif}\;d \leq -4.9 \cdot 10^{-117}:\\ \;\;\;\;t_1 \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}, 1\right)\right)\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{-245}:\\ \;\;\;\;\left(t_1 \cdot t_0\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{d \cdot \left(d \cdot \frac{\frac{\ell}{M \cdot M}}{h}\right)}{D}}\right)\right)\\ \mathbf{elif}\;d \leq 1.42 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 9
Error21.3
Cost20996
\[\begin{array}{l} \mathbf{if}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{elif}\;d \leq 5.6 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 10
Error21.1
Cost20996
\[\begin{array}{l} \mathbf{if}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \frac{1}{\sqrt{\frac{h}{d}}}\right)\\ \mathbf{elif}\;d \leq 5.6 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 11
Error23.5
Cost20872
\[\begin{array}{l} \mathbf{if}\;d \leq 6.2 \cdot 10^{-245}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d}{h} \cdot \left(\frac{d}{M} \cdot \frac{\ell}{M}\right)}{D}}\right)\right)\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+66}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 12
Error21.4
Cost20872
\[\begin{array}{l} t_0 := -0.5 \cdot \frac{h}{\ell}\\ \mathbf{if}\;d \leq -4 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2} \cdot t_0\right)\right)\\ \mathbf{elif}\;d \leq 2.25 \cdot 10^{+64}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 13
Error21.3
Cost20872
\[\begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{-306}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq 1.1 \cdot 10^{+62}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 14
Error25.4
Cost15052
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;h \leq -1.05 \cdot 10^{-176}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-262}:\\ \;\;\;\;t_0 \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}\;h \leq 1.28 \cdot 10^{-298}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{d \cdot \left(d \cdot \frac{\frac{\ell}{M \cdot M}}{h}\right)}{D}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 15
Error26.1
Cost15052
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ t_1 := t_0 \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \frac{D}{\frac{\frac{d}{h} \cdot \left(\frac{d}{M} \cdot \frac{\ell}{M}\right)}{D}}\right)\right)\\ \mathbf{if}\;\ell \leq -2.7 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 2.45 \cdot 10^{-255}:\\ \;\;\;\;t_0 \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}\;\ell \leq 5.2 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 16
Error25.6
Cost14920
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -2.85 \cdot 10^{+60}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \leq -1.85 \cdot 10^{-253}:\\ \;\;\;\;t_0 \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{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 17
Error25.1
Cost13380
\[\begin{array}{l} \mathbf{if}\;h \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 18
Error28.6
Cost13316
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.55 \cdot 10^{-271}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{{\ell}^{-0.5}}}\\ \end{array} \]
Alternative 19
Error28.8
Cost13252
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.15 \cdot 10^{-272}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 20
Error32.2
Cost7113
\[\begin{array}{l} \mathbf{if}\;h \leq -2 \cdot 10^{-310} \lor \neg \left(h \leq 4.8 \cdot 10^{+184}\right):\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 21
Error34.2
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-215}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 22
Error43.0
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

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