?

Average Error: 26.7 → 15.5
Time: 1.5min
Precision: binary64
Cost: 27976

?

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

\mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{-h}}{t_3}} \cdot t_2\\

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left(\sqrt{d} \cdot \sqrt{\frac{1}{h}}\right)\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if h < -2.59999999999999982e-111

    1. Initial program 24.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. Simplified24.2

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

      associate-*l* [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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* [=>]24.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 [=>]24.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 [=>]24.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-rr21.4

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

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

    if -2.59999999999999982e-111 < h < -4.999999999999985e-310

    1. Initial program 31.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. Simplified32.7

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

      associate-*l* [=>]31.4

      \[ \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 [=>]31.4

      \[ {\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 [=>]31.4

      \[ \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 [=>]31.4

      \[ \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 [=>]31.4

      \[ \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 [=>]31.4

      \[ \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 [=>]31.4

      \[ \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* [=>]31.4

      \[ \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 [=>]31.4

      \[ \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 [=>]31.4

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

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

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

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

    if -4.999999999999985e-310 < h

    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. Simplified27.6

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

      associate-*l* [=>]27.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 [=>]27.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 [=>]27.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 [=>]27.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 [=>]27.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 [=>]27.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 [=>]27.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* [=>]27.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 [=>]27.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 [=>]27.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-rr24.3

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

      \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h}}\right)} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(-0.5, \frac{D \cdot \left(\frac{M}{d} \cdot 0.5\right)}{\frac{\ell}{\left(D \cdot \left(\frac{M}{d} \cdot 0.5\right)\right) \cdot h}}, 1\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification15.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -2.6 \cdot 10^{-111}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot \mathsf{fma}\left(-0.5, \frac{D \cdot \left(\frac{M}{d} \cdot 0.5\right)}{\frac{\ell}{h \cdot \left(D \cdot \left(\frac{M}{d} \cdot 0.5\right)\right)}}, 1\right)\right)\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{-h}}{\sqrt{-d}}} \cdot \left(\mathsf{fma}\left(-0.5, \frac{D \cdot \left(\frac{M}{d} \cdot 0.5\right)}{\frac{\ell}{h \cdot \left(D \cdot \left(\frac{M}{d} \cdot 0.5\right)\right)}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \frac{D \cdot \left(\frac{M}{d} \cdot 0.5\right)}{\frac{\ell}{h \cdot \left(D \cdot \left(\frac{M}{d} \cdot 0.5\right)\right)}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(\sqrt{d} \cdot \sqrt{\frac{1}{h}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error13.2
Cost77325
\[\begin{array}{l} t_0 := D \cdot \left(\frac{M}{d} \cdot 0.5\right)\\ t_1 := \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)\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := M \cdot \frac{D}{d}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-120}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \frac{t_0}{\frac{\ell}{h \cdot t_0}}, 1\right) \cdot t_2\right) \cdot \frac{1}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+279}\right):\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_2 \cdot \left(1 + \left(t_3 \cdot t_3\right) \cdot \frac{-0.125}{\frac{\ell}{h}}\right)\right)\\ \end{array} \]
Alternative 2
Error16.2
Cost27848
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := D \cdot \left(\frac{M}{d} \cdot 0.5\right)\\ t_2 := \mathsf{fma}\left(-0.5, \frac{t_1}{\frac{\ell}{h \cdot t_1}}, 1\right)\\ t_3 := \sqrt{-d}\\ \mathbf{if}\;h \leq -1.45 \cdot 10^{-115}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{t_3}{\sqrt{-\ell}} \cdot t_2\right)\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(t_0 \cdot \frac{t_3}{\sqrt{-h}}\right) \cdot \left(1 + -0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \left(\sqrt{d} \cdot \sqrt{\frac{1}{h}}\right)\\ \end{array} \]
Alternative 3
Error16.2
Cost27720
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := D \cdot \left(\frac{M}{d} \cdot 0.5\right)\\ t_2 := \mathsf{fma}\left(-0.5, \frac{t_1}{\frac{\ell}{h \cdot t_1}}, 1\right)\\ t_3 := \sqrt{-d}\\ \mathbf{if}\;h \leq -4.6 \cdot 10^{-116}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{t_3}{\sqrt{-\ell}} \cdot t_2\right)\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(t_0 \cdot \frac{t_3}{\sqrt{-h}}\right) \cdot \left(1 + -0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_2 \cdot t_0\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\\ \end{array} \]
Alternative 4
Error22.5
Cost21848
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := D \cdot \left(\frac{M}{d} \cdot 0.5\right)\\ t_3 := \sqrt{\frac{d}{\ell}}\\ t_4 := t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{t_2}{\frac{\ell}{h \cdot t_2}}, 1\right) \cdot t_3\right)\\ \mathbf{if}\;h \leq -6.6 \cdot 10^{+145}:\\ \;\;\;\;\left(t_1 \cdot t_3\right) \cdot \left(1 + -0.5 \cdot \frac{h \cdot {\left(\frac{M \cdot \left(D \cdot 0.5\right)}{d}\right)}^{2}}{\ell}\right)\\ \mathbf{elif}\;h \leq -5.7 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -9.4 \cdot 10^{+51}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;h \leq -4 \cdot 10^{+14}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -1.25 \cdot 10^{-114}:\\ \;\;\;\;t_1 \cdot \left(t_3 \cdot \mathsf{fma}\left(-0.5, \frac{t_2}{\frac{\ell}{0.5 \cdot \frac{D \cdot \left(h \cdot M\right)}{d}}}, 1\right)\right)\\ \mathbf{elif}\;h \leq 1.45 \cdot 10^{-180}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 5
Error22.2
Cost21848
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := D \cdot \left(\frac{M}{d} \cdot 0.5\right)\\ t_4 := t_2 \cdot \left(\mathsf{fma}\left(-0.5, \frac{t_3}{\frac{\ell}{h \cdot t_3}}, 1\right) \cdot t_1\right)\\ \mathbf{if}\;h \leq -1.1 \cdot 10^{+146}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + h \cdot \left({\left(\frac{0.5}{d} \cdot \left(D \cdot M\right)\right)}^{2} \cdot \frac{-0.5}{\ell}\right)\right)\\ \mathbf{elif}\;h \leq -6.4 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -4.5 \cdot 10^{+51}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;h \leq -5.1 \cdot 10^{+14}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -1.06 \cdot 10^{-114}:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \mathsf{fma}\left(-0.5, \frac{t_3}{\frac{\ell}{0.5 \cdot \frac{D \cdot \left(h \cdot M\right)}{d}}}, 1\right)\right)\\ \mathbf{elif}\;h \leq 1.35 \cdot 10^{-189}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 6
Error24.6
Cost21716
\[\begin{array}{l} t_0 := \frac{M}{d} \cdot 0.5\\ t_1 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \sqrt{\frac{d}{\ell}}\\ t_4 := t_2 \cdot t_3\\ t_5 := t_4 \cdot \left(1 + -0.5 \cdot \frac{h \cdot {\left(\frac{M \cdot \left(D \cdot 0.5\right)}{d}\right)}^{2}}{\ell}\right)\\ \mathbf{if}\;h \leq -8.4 \cdot 10^{+145}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;h \leq -1.18 \cdot 10^{+138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -5.9 \cdot 10^{+60}:\\ \;\;\;\;t_4 \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}^{2}\right)\right)\\ \mathbf{elif}\;h \leq -5 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -1.15 \cdot 10^{-47}:\\ \;\;\;\;t_2 \cdot \left(t_3 \cdot \mathsf{fma}\left(-0.5, \frac{D}{\frac{\frac{\ell}{h}}{t_0 \cdot \left(D \cdot t_0\right)}}, 1\right)\right)\\ \mathbf{elif}\;h \leq 3.4 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 7
Error24.5
Cost21716
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := t_1 \cdot t_2\\ t_4 := t_3 \cdot \left(1 + -0.5 \cdot \frac{h \cdot {\left(\frac{M \cdot \left(D \cdot 0.5\right)}{d}\right)}^{2}}{\ell}\right)\\ \mathbf{if}\;h \leq -6.5 \cdot 10^{+145}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;h \leq -4.5 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -8 \cdot 10^{+60}:\\ \;\;\;\;t_3 \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}^{2}\right)\right)\\ \mathbf{elif}\;h \leq -4.3 \cdot 10^{+14}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -1.9 \cdot 10^{-113}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \mathsf{fma}\left(-0.5, \frac{D \cdot \left(\frac{M}{d} \cdot 0.5\right)}{\frac{\ell}{0.5 \cdot \frac{D \cdot \left(h \cdot M\right)}{d}}}, 1\right)\right)\\ \mathbf{elif}\;h \leq 3.5 \cdot 10^{-306}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 8
Error26.0
Cost21592
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := M \cdot \left(D \cdot 0.5\right)\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \frac{t_1}{d}\\ t_4 := \sqrt{\frac{d}{\ell}}\\ t_5 := t_2 \cdot t_4\\ \mathbf{if}\;M \leq -2 \cdot 10^{+114}:\\ \;\;\;\;t_5 \cdot \left(1 + -0.5 \cdot \frac{t_1 \cdot t_3}{d \cdot \frac{\ell}{h}}\right)\\ \mathbf{elif}\;M \leq -1.76 \cdot 10^{+81}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;M \leq -6.4 \cdot 10^{-153}:\\ \;\;\;\;t_2 \cdot \left(t_4 \cdot \left(1 + {\left(\frac{\frac{D}{\frac{d}{M}}}{2}\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{elif}\;M \leq 2.5 \cdot 10^{-286}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;M \leq 6.2 \cdot 10^{-148}:\\ \;\;\;\;t_5 \cdot \left(1 + -0.5 \cdot \frac{h \cdot {t_3}^{2}}{\ell}\right)\\ \mathbf{elif}\;M \leq 2 \cdot 10^{-114}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \left(t_4 \cdot \mathsf{fma}\left(-0.125, \left(M \cdot \left(h \cdot M\right)\right) \cdot \left(\frac{D}{d \cdot d} \cdot \frac{D}{\ell}\right), 1\right)\right)\\ \end{array} \]
Alternative 9
Error23.0
Cost21264
\[\begin{array}{l} t_0 := \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \frac{h \cdot {\left(\frac{M \cdot \left(D \cdot 0.5\right)}{d}\right)}^{2}}{\ell}\right)\\ t_1 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{if}\;\ell \leq -3.25 \cdot 10^{+159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq -6 \cdot 10^{-82}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \leq 9.8 \cdot 10^{-275}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 5.5 \cdot 10^{+63}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 10
Error24.0
Cost20868
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := M \cdot \frac{D}{d}\\ t_4 := 1 + -0.5 \cdot \frac{t_3 \cdot t_3}{\frac{\ell}{h} \cdot 4}\\ \mathbf{if}\;h \leq -6 \cdot 10^{+145}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 + {\left(\frac{\frac{D}{\frac{d}{M}}}{2}\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{elif}\;h \leq -2.1 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -7.8 \cdot 10^{+59}:\\ \;\;\;\;\left(t_1 \cdot t_2\right) \cdot t_4\\ \mathbf{elif}\;h \leq 1.9 \cdot 10^{-131}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot \left(t_1 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \end{array} \]
Alternative 11
Error23.8
Cost15312
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := 1 + -0.5 \cdot \frac{t_0 \cdot t_0}{\frac{\ell}{h} \cdot 4}\\ t_3 := \left(t_1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_2\\ t_4 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{if}\;h \leq -6 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;h \leq -4.5 \cdot 10^{+138}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;h \leq -7 \cdot 10^{+59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;h \leq 2.2 \cdot 10^{-131}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \end{array} \]
Alternative 12
Error24.2
Cost15058
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;h \leq -6 \cdot 10^{+145} \lor \neg \left(h \leq -6.4 \cdot 10^{+138}\right) \land \left(h \leq -2.65 \cdot 10^{+60} \lor \neg \left(h \leq 1.6 \cdot 10^{-131}\right)\right):\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + \left(t_0 \cdot t_0\right) \cdot \frac{-0.125}{\frac{\ell}{h}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \end{array} \]
Alternative 13
Error24.8
Cost15056
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := t_1 \cdot \left(t_2 \cdot \left(1 + \left(t_0 \cdot t_0\right) \cdot \frac{-0.125}{\frac{\ell}{h}}\right)\right)\\ t_4 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{if}\;h \leq -6 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;h \leq -4.9 \cdot 10^{+138}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;h \leq -4.1 \cdot 10^{+55}:\\ \;\;\;\;\left(t_1 \cdot t_2\right) \cdot \left(1 + -0.5 \cdot \left(0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\right)\\ \mathbf{elif}\;h \leq 1.6 \cdot 10^{-131}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 14
Error24.0
Cost15056
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ t_1 := M \cdot \frac{D}{d}\\ t_2 := t_1 \cdot t_1\\ t_3 := \sqrt{\frac{d}{h}}\\ t_4 := \sqrt{\frac{d}{\ell}}\\ t_5 := \left(t_3 \cdot t_4\right) \cdot \left(1 + -0.5 \cdot \frac{t_2}{\frac{\ell}{h} \cdot 4}\right)\\ \mathbf{if}\;h \leq -6 \cdot 10^{+145}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;h \leq -1.35 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq -6.5 \cdot 10^{+59}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;h \leq 2.9 \cdot 10^{-132}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \left(t_4 \cdot \left(1 + t_2 \cdot \frac{-0.125}{\frac{\ell}{h}}\right)\right)\\ \end{array} \]
Alternative 15
Error22.7
Cost14928
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{if}\;d \leq -1.3 \cdot 10^{+20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -3.6 \cdot 10^{-118}:\\ \;\;\;\;t_0 \cdot t_1\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-306}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq 2.9 \cdot 10^{-290}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(\left(\frac{M}{d} \cdot \frac{\left(D \cdot M\right) \cdot \left(h \cdot D\right)}{d}\right) \cdot \frac{-0.125}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 16
Error22.8
Cost14352
\[\begin{array}{l} t_0 := \left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{if}\;d \leq -1.3 \cdot 10^{+20}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3 \cdot 10^{-115}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-306}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 1.82 \cdot 10^{-262}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{D \cdot -0.125}{\frac{\frac{d}{M}}{D \cdot M}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 17
Error24.1
Cost13512
\[\begin{array}{l} \mathbf{if}\;d \leq -1.16 \cdot 10^{+20}:\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{elif}\;d \leq 1.35 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 18
Error23.3
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.4 \cdot 10^{-275}:\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 19
Error23.3
Cost13380
\[\begin{array}{l} \mathbf{if}\;h \leq 4.8 \cdot 10^{-291}:\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 20
Error23.3
Cost13316
\[\begin{array}{l} \mathbf{if}\;\ell \leq 2.3 \cdot 10^{-269}:\\ \;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 21
Error29.8
Cost13252
\[\begin{array}{l} \mathbf{if}\;d \leq 2.15 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 22
Error35.0
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 1.8 \cdot 10^{-251}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 23
Error33.6
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 2.1 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 24
Error33.5
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 2.1 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 25
Error33.5
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 2.1 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 26
Error43.6
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

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