?

Average Error: 26.7 → 16.8
Time: 43.4s
Precision: binary64
Cost: 27664

?

\[ \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 := 1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{if}\;h \leq -4.7 \cdot 10^{-65}:\\ \;\;\;\;t_2 \cdot t_0\\ \mathbf{elif}\;h \leq -5.4 \cdot 10^{-194}:\\ \;\;\;\;{\left(\sqrt[3]{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 - -0.5 \cdot \left({\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}\right)}^{3}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_2 \cdot \left(1 + -0.5 \cdot \frac{\frac{\left(0.5 \cdot D\right) \cdot \left(\frac{\frac{h}{\ell}}{d} \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d}}{2}\right)\\ \mathbf{elif}\;h \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\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 (+ 1.0 (* (* h (/ (pow (* D (/ M (/ d 0.5))) 2.0) l)) -0.5)))
        (t_1 (sqrt (/ d h)))
        (t_2 (* t_1 (/ (sqrt (- d)) (sqrt (- l))))))
   (if (<= h -4.7e-65)
     (* t_2 t_0)
     (if (<= h -5.4e-194)
       (pow
        (cbrt
         (*
          (* d (sqrt (/ 1.0 (* h l))))
          (- -1.0 (* -0.5 (* (pow (* 0.5 (/ (* D M) d)) 2.0) (/ h l))))))
        3.0)
       (if (<= h -5e-310)
         (*
          t_2
          (+
           1.0
           (*
            -0.5
            (/ (/ (* (* 0.5 D) (* (/ (/ h l) d) (* D (* M M)))) d) 2.0))))
         (if (<= h 1.25e-51)
           (* d (* (pow l -0.5) (pow h -0.5)))
           (* t_0 (* t_1 (/ (sqrt d) (sqrt l))))))))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
double code(double d, double h, double l, double M, double D) {
	double t_0 = 1.0 + ((h * (pow((D * (M / (d / 0.5))), 2.0) / l)) * -0.5);
	double t_1 = sqrt((d / h));
	double t_2 = t_1 * (sqrt(-d) / sqrt(-l));
	double tmp;
	if (h <= -4.7e-65) {
		tmp = t_2 * t_0;
	} else if (h <= -5.4e-194) {
		tmp = pow(cbrt(((d * sqrt((1.0 / (h * l)))) * (-1.0 - (-0.5 * (pow((0.5 * ((D * M) / d)), 2.0) * (h / l)))))), 3.0);
	} else if (h <= -5e-310) {
		tmp = t_2 * (1.0 + (-0.5 * ((((0.5 * D) * (((h / l) / d) * (D * (M * M)))) / d) / 2.0)));
	} else if (h <= 1.25e-51) {
		tmp = d * (pow(l, -0.5) * pow(h, -0.5));
	} else {
		tmp = t_0 * (t_1 * (sqrt(d) / sqrt(l)));
	}
	return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
	return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = 1.0 + ((h * (Math.pow((D * (M / (d / 0.5))), 2.0) / l)) * -0.5);
	double t_1 = Math.sqrt((d / h));
	double t_2 = t_1 * (Math.sqrt(-d) / Math.sqrt(-l));
	double tmp;
	if (h <= -4.7e-65) {
		tmp = t_2 * t_0;
	} else if (h <= -5.4e-194) {
		tmp = Math.pow(Math.cbrt(((d * Math.sqrt((1.0 / (h * l)))) * (-1.0 - (-0.5 * (Math.pow((0.5 * ((D * M) / d)), 2.0) * (h / l)))))), 3.0);
	} else if (h <= -5e-310) {
		tmp = t_2 * (1.0 + (-0.5 * ((((0.5 * D) * (((h / l) / d) * (D * (M * M)))) / d) / 2.0)));
	} else if (h <= 1.25e-51) {
		tmp = d * (Math.pow(l, -0.5) * Math.pow(h, -0.5));
	} else {
		tmp = t_0 * (t_1 * (Math.sqrt(d) / Math.sqrt(l)));
	}
	return tmp;
}
function code(d, h, l, M, D)
	return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
function code(d, h, l, M, D)
	t_0 = Float64(1.0 + Float64(Float64(h * Float64((Float64(D * Float64(M / Float64(d / 0.5))) ^ 2.0) / l)) * -0.5))
	t_1 = sqrt(Float64(d / h))
	t_2 = Float64(t_1 * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))))
	tmp = 0.0
	if (h <= -4.7e-65)
		tmp = Float64(t_2 * t_0);
	elseif (h <= -5.4e-194)
		tmp = cbrt(Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 - Float64(-0.5 * Float64((Float64(0.5 * Float64(Float64(D * M) / d)) ^ 2.0) * Float64(h / l)))))) ^ 3.0;
	elseif (h <= -5e-310)
		tmp = Float64(t_2 * Float64(1.0 + Float64(-0.5 * Float64(Float64(Float64(Float64(0.5 * D) * Float64(Float64(Float64(h / l) / d) * Float64(D * Float64(M * M)))) / d) / 2.0))));
	elseif (h <= 1.25e-51)
		tmp = Float64(d * Float64((l ^ -0.5) * (h ^ -0.5)));
	else
		tmp = Float64(t_0 * Float64(t_1 * Float64(sqrt(d) / sqrt(l))));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 + N[(N[(h * N[(N[Power[N[(D * N[(M / N[(d / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -4.7e-65], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[h, -5.4e-194], N[Power[N[Power[N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(-0.5 * N[(N[Power[N[(0.5 * N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[h, -5e-310], N[(t$95$2 * N[(1.0 + N[(-0.5 * N[(N[(N[(N[(0.5 * D), $MachinePrecision] * N[(N[(N[(h / l), $MachinePrecision] / d), $MachinePrecision] * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.25e-51], N[(d * N[(N[Power[l, -0.5], $MachinePrecision] * N[Power[h, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $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 := 1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\
\mathbf{if}\;h \leq -4.7 \cdot 10^{-65}:\\
\;\;\;\;t_2 \cdot t_0\\

\mathbf{elif}\;h \leq -5.4 \cdot 10^{-194}:\\
\;\;\;\;{\left(\sqrt[3]{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 - -0.5 \cdot \left({\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}\right)}^{3}\\

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

\mathbf{elif}\;h \leq 1.25 \cdot 10^{-51}:\\
\;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if h < -4.7000000000000001e-65

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

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

      metadata-eval [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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* [=>]24.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 [=>]24.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 [=>]24.3

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

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

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

      [Start]24.9

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

      expm1-def [=>]24.9

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

      expm1-log1p [=>]24.3

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

      associate-*r/ [=>]22.9

      \[ \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)}^{2} \cdot h}{\ell}}\right) \]

      associate-*l/ [<=]21.3

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

      *-commutative [=>]21.3

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

      associate-*r/ [=>]21.1

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

      associate-*l/ [<=]21.5

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

      *-commutative [=>]21.5

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

      associate-/l* [=>]21.5

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

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

    if -4.7000000000000001e-65 < h < -5.4e-194

    1. Initial program 25.8

      \[\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. Applied egg-rr36.0

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

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

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

      [Start]18.2

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

      associate-*r* [=>]18.2

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

      neg-mul-1 [<=]18.2

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

      *-commutative [=>]18.2

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

    if -5.4e-194 < h < -4.999999999999985e-310

    1. Initial program 35.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. Simplified36.8

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

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

      metadata-eval [=>]35.4

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

      unpow1/2 [=>]35.4

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

      metadata-eval [=>]35.4

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

      unpow1/2 [=>]35.4

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

      associate-*l* [=>]35.4

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

      metadata-eval [=>]35.4

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

      times-frac [=>]36.8

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

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

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

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

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

    if -4.999999999999985e-310 < h < 1.25000000000000001e-51

    1. Initial program 30.8

      \[\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 22.2

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

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\ell \cdot h\right)}^{-0.5}\right)} - 1\right)} \cdot d \]
    4. Simplified21.7

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5}} \cdot d \]
      Proof

      [Start]35.5

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

      expm1-def [=>]23.5

      \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\ell \cdot h\right)}^{-0.5}\right)\right)} \cdot d \]

      expm1-log1p [=>]21.7

      \[ \color{blue}{{\left(\ell \cdot h\right)}^{-0.5}} \cdot d \]
    5. Applied egg-rr14.5

      \[\leadsto \color{blue}{\left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)} \cdot d \]

    if 1.25000000000000001e-51 < h

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

      \[\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]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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* [=>]24.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 [=>]24.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 [=>]24.0

      \[ \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-rr24.6

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

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

      [Start]24.6

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

      expm1-def [=>]24.6

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

      expm1-log1p [=>]24.0

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

      associate-*r/ [=>]22.6

      \[ \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)}^{2} \cdot h}{\ell}}\right) \]

      associate-*l/ [<=]21.2

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

      *-commutative [=>]21.2

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

      associate-*r/ [=>]21.3

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

      associate-*l/ [<=]21.4

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

      *-commutative [=>]21.4

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

      associate-/l* [=>]21.4

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

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

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

      [Start]15.3

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

      associate-*r/ [=>]15.3

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

      *-rgt-identity [=>]15.3

      \[ \left(\sqrt{\frac{d}{h}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right)\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification16.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -4.7 \cdot 10^{-65}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;h \leq -5.4 \cdot 10^{-194}:\\ \;\;\;\;{\left(\sqrt[3]{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 - -0.5 \cdot \left({\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}\right)}^{3}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + -0.5 \cdot \frac{\frac{\left(0.5 \cdot D\right) \cdot \left(\frac{\frac{h}{\ell}}{d} \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d}}{2}\right)\\ \mathbf{elif}\;h \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error18.9
Cost27664
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;h \leq -1150000000:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-181}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + -0.5 \cdot \frac{\frac{\left(0.5 \cdot D\right) \cdot \left(\frac{\frac{h}{\ell}}{d} \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d}}{2}\right)\\ \mathbf{elif}\;h \leq 1.12 \cdot 10^{-51}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\right) \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \end{array} \]
Alternative 2
Error17.6
Cost27664
\[\begin{array}{l} t_0 := 1 + \left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}\right) \cdot -0.5\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{if}\;h \leq -3.2 \cdot 10^{+16}:\\ \;\;\;\;t_2 \cdot t_0\\ \mathbf{elif}\;h \leq -3.4 \cdot 10^{-193}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_2 \cdot \left(1 + -0.5 \cdot \frac{\frac{\left(0.5 \cdot D\right) \cdot \left(\frac{\frac{h}{\ell}}{d} \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d}}{2}\right)\\ \mathbf{elif}\;h \leq 5.8 \cdot 10^{-53}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \end{array} \]
Alternative 3
Error19.6
Cost21973
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -7.4 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-215}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{elif}\;d \leq 5.8 \cdot 10^{-291}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{-135} \lor \neg \left(d \leq 1.05 \cdot 10^{+33}\right):\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{d}}}\right) \cdot \left(1 + -0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\left(d \cdot \left(d \cdot 2\right)\right) \cdot \frac{\ell}{h}}\right)\\ \end{array} \]
Alternative 4
Error19.9
Cost21973
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -2.3 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -2.5 \cdot 10^{-215}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{elif}\;d \leq 2.75 \cdot 10^{-297}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-134} \lor \neg \left(d \leq 1.12 \cdot 10^{+33}\right):\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{d}}}\right) \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell \cdot \left(d \cdot \left(d \cdot 2\right)\right)}{h}}\right)\\ \end{array} \]
Alternative 5
Error19.7
Cost21973
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -6 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -1.25 \cdot 10^{-117}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{-294}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D \cdot \left(M \cdot M\right)}{d \cdot 2} \cdot \frac{D \cdot -0.5}{d \cdot \frac{\ell}{h}}\right)\right)\\ \mathbf{elif}\;d \leq 2.6 \cdot 10^{-134} \lor \neg \left(d \leq 1.6 \cdot 10^{+33}\right):\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{d}}}\right) \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell \cdot \left(d \cdot \left(d \cdot 2\right)\right)}{h}}\right)\\ \end{array} \]
Alternative 6
Error19.7
Cost21973
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -9.8 \cdot 10^{+141}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -1.8 \cdot 10^{-117}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{-294}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + -0.5 \cdot \frac{\frac{\left(0.5 \cdot D\right) \cdot \left(\frac{\frac{h}{\ell}}{d} \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d}}{2}\right)\\ \mathbf{elif}\;d \leq 6 \cdot 10^{-135} \lor \neg \left(d \leq 1.2 \cdot 10^{+33}\right):\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{d}}}\right) \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell \cdot \left(d \cdot \left(d \cdot 2\right)\right)}{h}}\right)\\ \end{array} \]
Alternative 7
Error19.6
Cost21845
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -4.2 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -4.2 \cdot 10^{-215}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{elif}\;d \leq 2.75 \cdot 10^{-297}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 8 \cdot 10^{-160} \lor \neg \left(d \leq 1.12 \cdot 10^{+33}\right):\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 + -0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\left(d \cdot \left(d \cdot 2\right)\right) \cdot \frac{\ell}{h}}\right)\\ \end{array} \]
Alternative 8
Error19.5
Cost15572
\[\begin{array}{l} t_0 := \left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{h \cdot \left(D \cdot \left(M \cdot \frac{-0.5}{d}\right)\right)}{\frac{\ell}{D \cdot M} \cdot \left(d \cdot 2\right)}\right)\\ \mathbf{if}\;d \leq -1.7 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -3.4 \cdot 10^{-215}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 2.75 \cdot 10^{-297}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 9.4 \cdot 10^{-66}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{\sqrt{\frac{1}{\ell}}}}\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{+95}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 9
Error20.6
Cost15444
\[\begin{array}{l} t_0 := \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(h \cdot \left(\frac{D}{\ell \cdot \left(2 \cdot \frac{d}{M}\right)} \cdot \left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)\right)\right)\right)\\ \mathbf{if}\;d \leq -1.7 \cdot 10^{+140}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -1.95 \cdot 10^{-78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 2.9 \cdot 10^{-297}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{elif}\;d \leq 3.6 \cdot 10^{-50}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{\sqrt{\frac{1}{\ell}}}}\\ \mathbf{elif}\;d \leq 3.5 \cdot 10^{+63}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 10
Error23.0
Cost13644
\[\begin{array}{l} \mathbf{if}\;d \leq -1.5 \cdot 10^{+141}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq -2.2 \cdot 10^{-78}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.02 \cdot 10^{-295}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{\sqrt{\frac{1}{\ell}}}}\\ \end{array} \]
Alternative 11
Error23.5
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-296}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 12
Error23.5
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-296}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\frac{\sqrt{h}}{\sqrt{\frac{1}{\ell}}}}\\ \end{array} \]
Alternative 13
Error23.5
Cost13252
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-296}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 14
Error27.7
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-296}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 15
Error27.6
Cost7044
\[\begin{array}{l} t_0 := \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-296}:\\ \;\;\;\;\left(-d\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot t_0\\ \end{array} \]
Alternative 16
Error34.6
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -2.8 \cdot 10^{-269}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 17
Error33.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 1.46 \cdot 10^{-298}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 18
Error33.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 1.3 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 19
Error43.6
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

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