?

Average Error: 26.6 → 17.6
Time: 30.9s
Precision: binary64
Cost: 27592

?

\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\right)\\ \mathbf{elif}\;\ell \leq 4.6 \cdot 10^{-166}:\\ \;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \left(\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\ell} \cdot \frac{h}{d \cdot d}\right), 1\right)\right)\\ \mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+77}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(\frac{0.5 \cdot M}{\frac{d}{D}}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\frac{\sqrt{\ell}}{{h}^{-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 (sqrt (/ d h))))
   (if (<= l -3.1e-302)
     (*
      (* t_0 (/ (sqrt (- d)) (sqrt (- l))))
      (+
       1.0
       (* 0.5 (* (* h (* (/ D d) (/ M l))) (/ (* M (/ -0.5 (/ d D))) 2.0)))))
     (if (<= l 4.6e-166)
       (*
        t_0
        (*
         (/ (sqrt d) (sqrt l))
         (fma -0.5 (* 0.25 (* (/ (* (* D M) (* D M)) l) (/ h (* d d)))) 1.0)))
       (if (<= l 6.6e+77)
         (*
          (* (/ (sqrt d) (sqrt h)) (sqrt (/ d l)))
          (- 1.0 (* 0.5 (* h (/ (pow (/ (* 0.5 M) (/ d D)) 2.0) l)))))
         (* d (/ 1.0 (/ (sqrt l) (pow h -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 = sqrt((d / h));
	double tmp;
	if (l <= -3.1e-302) {
		tmp = (t_0 * (sqrt(-d) / sqrt(-l))) * (1.0 + (0.5 * ((h * ((D / d) * (M / l))) * ((M * (-0.5 / (d / D))) / 2.0))));
	} else if (l <= 4.6e-166) {
		tmp = t_0 * ((sqrt(d) / sqrt(l)) * fma(-0.5, (0.25 * ((((D * M) * (D * M)) / l) * (h / (d * d)))), 1.0));
	} else if (l <= 6.6e+77) {
		tmp = ((sqrt(d) / sqrt(h)) * sqrt((d / l))) * (1.0 - (0.5 * (h * (pow(((0.5 * M) / (d / D)), 2.0) / l))));
	} else {
		tmp = d * (1.0 / (sqrt(l) / pow(h, -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 = sqrt(Float64(d / h))
	tmp = 0.0
	if (l <= -3.1e-302)
		tmp = Float64(Float64(t_0 * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l)))) * Float64(1.0 + Float64(0.5 * Float64(Float64(h * Float64(Float64(D / d) * Float64(M / l))) * Float64(Float64(M * Float64(-0.5 / Float64(d / D))) / 2.0)))));
	elseif (l <= 4.6e-166)
		tmp = Float64(t_0 * Float64(Float64(sqrt(d) / sqrt(l)) * fma(-0.5, Float64(0.25 * Float64(Float64(Float64(Float64(D * M) * Float64(D * M)) / l) * Float64(h / Float64(d * d)))), 1.0)));
	elseif (l <= 6.6e+77)
		tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(0.5 * Float64(h * Float64((Float64(Float64(0.5 * M) / Float64(d / D)) ^ 2.0) / l)))));
	else
		tmp = Float64(d * Float64(1.0 / Float64(sqrt(l) / (h ^ -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[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -3.1e-302], N[(N[(t$95$0 * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(N[(h * N[(N[(D / d), $MachinePrecision] * N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(-0.5 / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.6e-166], N[(t$95$0 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(0.25 * N[(N[(N[(N[(D * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(h / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 6.6e+77], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(h * N[(N[Power[N[(N[(0.5 * M), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(1.0 / N[(N[Sqrt[l], $MachinePrecision] / N[Power[h, -0.5], $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 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\
\;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\right)\\

\mathbf{elif}\;\ell \leq 4.6 \cdot 10^{-166}:\\
\;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \left(\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\ell} \cdot \frac{h}{d \cdot d}\right), 1\right)\right)\\

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

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


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if l < -3.09999999999999983e-302

    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.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.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 [=>]27.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-rr27.1

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

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

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

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

    if -3.09999999999999983e-302 < l < 4.59999999999999997e-166

    1. Initial program 35.0

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

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

      \[ \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* [=>]35.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 [=>]35.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 [=>]35.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 [=>]35.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 [=>]35.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 [=>]35.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 [=>]35.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* [=>]35.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 [=>]35.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 [=>]35.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. Taylor expanded in D around 0 51.4

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

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

      [Start]51.4

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

      associate-*r* [=>]51.4

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

      times-frac [=>]43.6

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

      unpow2 [=>]43.6

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

      unpow2 [=>]43.6

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

      unswap-sqr [=>]39.7

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

      unpow2 [=>]39.7

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

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

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

      [Start]23.7

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

      associate-*r/ [=>]23.6

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

      *-rgt-identity [=>]23.6

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

    if 4.59999999999999997e-166 < l < 6.5999999999999996e77

    1. Initial program 21.5

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

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

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

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

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

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

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

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

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

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

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

      [Start]15.6

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

      associate-*r/ [=>]15.5

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

      *-rgt-identity [=>]15.5

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

      \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(M \cdot \frac{0.5}{\frac{d}{D}}\right)}^{2}}{\frac{\ell}{h}}\right)} - 1\right)}\right) \]
    7. Simplified13.4

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

      [Start]16.2

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

      expm1-def [=>]16.2

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

      expm1-log1p [=>]15.6

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

      sqr-pow [=>]15.6

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

    if 6.5999999999999996e77 < l

    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. Taylor expanded in d around inf 26.8

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

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

      [Start]26.8

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

      *-commutative [=>]26.8

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

      associate-/l/ [<=]26.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\right)\\ \mathbf{elif}\;\ell \leq 4.6 \cdot 10^{-166}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(-0.5, 0.25 \cdot \left(\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\ell} \cdot \frac{h}{d \cdot d}\right), 1\right)\right)\\ \mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+77}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(\frac{0.5 \cdot M}{\frac{d}{D}}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\frac{\sqrt{\ell}}{{h}^{-0.5}}}\\ \end{array} \]

Alternatives

Alternative 1
Error20.6
Cost21580
\[\begin{array}{l} t_0 := \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\\ t_1 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot t_0\right)\right) \cdot \left(t_1 \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;h \leq 7.5 \cdot 10^{-69}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 6.8 \cdot 10^{+236}:\\ \;\;\;\;\left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{\frac{D}{d} \cdot M}{\frac{\ell}{h}} \cdot t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]
Alternative 2
Error20.7
Cost21580
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := 1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\\ \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{\frac{d}{h}} \cdot t_0\right)\\ \mathbf{elif}\;\ell \leq 3.6 \cdot 10^{-90}:\\ \;\;\;\;d \cdot \frac{\frac{1}{\sqrt{\ell}}}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+91}:\\ \;\;\;\;t_1 \cdot \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\frac{\sqrt{\ell}}{{h}^{-0.5}}}\\ \end{array} \]
Alternative 3
Error17.6
Cost21580
\[\begin{array}{l} t_0 := 1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\\ \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t_0\\ \mathbf{elif}\;\ell \leq 7.3 \cdot 10^{-90}:\\ \;\;\;\;d \cdot \frac{\frac{1}{\sqrt{\ell}}}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+91}:\\ \;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\frac{\sqrt{\ell}}{{h}^{-0.5}}}\\ \end{array} \]
Alternative 4
Error23.2
Cost15444
\[\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(\left(M \cdot \left(\frac{D}{d} \cdot \frac{h}{\ell}\right)\right) \cdot \frac{0.5 \cdot \frac{D \cdot M}{d}}{2}\right)\right)\\ \mathbf{if}\;d \leq -3.9 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -1.7 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{-\frac{h}{d}}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{-279}:\\ \;\;\;\;t_0 \cdot \left(1 + -0.5 \cdot \left(\frac{\frac{D}{d}}{\frac{\frac{\ell}{h}}{M}} \cdot \frac{\frac{D}{d}}{\frac{4}{M}}\right)\right)\\ \mathbf{elif}\;d \leq 1.45 \cdot 10^{-114}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 1.45 \cdot 10^{+29}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 5
Error22.0
Cost15180
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq 1.5 \cdot 10^{-274}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(\left(h \cdot \left(\frac{D}{d} \cdot \frac{M}{\ell}\right)\right) \cdot \frac{M \cdot \frac{-0.5}{\frac{d}{D}}}{2}\right)\right) \cdot t_0\\ \mathbf{elif}\;d \leq 1.45 \cdot 10^{-118}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+29}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(\left(M \cdot \left(\frac{D}{d} \cdot \frac{h}{\ell}\right)\right) \cdot \frac{0.5 \cdot \frac{D \cdot M}{d}}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 6
Error24.8
Cost14788
\[\begin{array}{l} \mathbf{if}\;d \leq 1.16 \cdot 10^{-274}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(\frac{D}{d} \cdot \left(\frac{D}{d} \cdot \frac{M \cdot 0.25}{\frac{\frac{\ell}{h}}{M}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 7
Error23.1
Cost14788
\[\begin{array}{l} \mathbf{if}\;d \leq 2.85 \cdot 10^{-279}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(\frac{\frac{D}{d}}{\frac{\frac{\ell}{h}}{M}} \cdot \frac{\frac{D}{d}}{\frac{4}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 8
Error27.1
Cost14468
\[\begin{array}{l} \mathbf{if}\;h \leq -3.1 \cdot 10^{-58}:\\ \;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{-\frac{h}{d}}}}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 9
Error28.1
Cost13640
\[\begin{array}{l} \mathbf{if}\;h \leq -5.6 \cdot 10^{-58}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{-\frac{h}{d}}}}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 10
Error29.1
Cost13252
\[\begin{array}{l} \mathbf{if}\;d \leq 2.1 \cdot 10^{-269}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 11
Error34.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -4.6 \cdot 10^{-291}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
Alternative 12
Error32.7
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
Alternative 13
Error32.8
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -6.8 \cdot 10^{-302}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 14
Error32.8
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -3.1 \cdot 10^{-302}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 15
Error43.6
Cost6720
\[\frac{d}{\sqrt{\ell \cdot h}} \]

Error

Reproduce?

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