?

Average Error: 26.5 → 13.8
Time: 39.3s
Precision: binary64
Cost: 34956

?

\[ \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 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{-d}\\ t_2 := \frac{D}{d} \cdot M\\ t_3 := 0.5 \cdot t_2\\ t_4 := 1 + 0.5 \cdot \left(\frac{t_3}{\ell} \cdot \frac{t_2 \cdot -0.5}{\frac{1}{h}}\right)\\ t_5 := 0.5 \cdot \left(h \cdot \frac{{t_3}^{2}}{\ell}\right)\\ \mathbf{if}\;d \leq -5.8 \cdot 10^{+61}:\\ \;\;\;\;\left(\frac{t_1}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_4\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\ \;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{t_1}{\sqrt{-\ell}}\right)\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{+50}:\\ \;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}}{\frac{1 + t_5}{1 - {t_5}^{2}}}\\ \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)))
        (t_1 (sqrt (- d)))
        (t_2 (* (/ D d) M))
        (t_3 (* 0.5 t_2))
        (t_4 (+ 1.0 (* 0.5 (* (/ t_3 l) (/ (* t_2 -0.5) (/ 1.0 h))))))
        (t_5 (* 0.5 (* h (/ (pow t_3 2.0) l)))))
   (if (<= d -5.8e+61)
     (* (* (/ t_1 (sqrt (- h))) (sqrt (/ d l))) t_4)
     (if (<= d -5e-311)
       (* t_4 (* t_0 (/ t_1 (sqrt (- l)))))
       (if (<= d 4.2e+50)
         (* t_4 (* t_0 (/ (sqrt d) (sqrt l))))
         (/
          (/ d (* (sqrt l) (sqrt h)))
          (/ (+ 1.0 t_5) (- 1.0 (pow t_5 2.0)))))))))
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 t_1 = sqrt(-d);
	double t_2 = (D / d) * M;
	double t_3 = 0.5 * t_2;
	double t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))));
	double t_5 = 0.5 * (h * (pow(t_3, 2.0) / l));
	double tmp;
	if (d <= -5.8e+61) {
		tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4;
	} else if (d <= -5e-311) {
		tmp = t_4 * (t_0 * (t_1 / sqrt(-l)));
	} else if (d <= 4.2e+50) {
		tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l)));
	} else {
		tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0 + t_5) / (1.0 - pow(t_5, 2.0)));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_0 = sqrt((d / h))
    t_1 = sqrt(-d)
    t_2 = (d_1 / d) * m
    t_3 = 0.5d0 * t_2
    t_4 = 1.0d0 + (0.5d0 * ((t_3 / l) * ((t_2 * (-0.5d0)) / (1.0d0 / h))))
    t_5 = 0.5d0 * (h * ((t_3 ** 2.0d0) / l))
    if (d <= (-5.8d+61)) then
        tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4
    else if (d <= (-5d-311)) then
        tmp = t_4 * (t_0 * (t_1 / sqrt(-l)))
    else if (d <= 4.2d+50) then
        tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l)))
    else
        tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0d0 + t_5) / (1.0d0 - (t_5 ** 2.0d0)))
    end if
    code = tmp
end function
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 = Math.sqrt((d / h));
	double t_1 = Math.sqrt(-d);
	double t_2 = (D / d) * M;
	double t_3 = 0.5 * t_2;
	double t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))));
	double t_5 = 0.5 * (h * (Math.pow(t_3, 2.0) / l));
	double tmp;
	if (d <= -5.8e+61) {
		tmp = ((t_1 / Math.sqrt(-h)) * Math.sqrt((d / l))) * t_4;
	} else if (d <= -5e-311) {
		tmp = t_4 * (t_0 * (t_1 / Math.sqrt(-l)));
	} else if (d <= 4.2e+50) {
		tmp = t_4 * (t_0 * (Math.sqrt(d) / Math.sqrt(l)));
	} else {
		tmp = (d / (Math.sqrt(l) * Math.sqrt(h))) / ((1.0 + t_5) / (1.0 - Math.pow(t_5, 2.0)));
	}
	return tmp;
}
def code(d, h, l, M, 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)))
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / h))
	t_1 = math.sqrt(-d)
	t_2 = (D / d) * M
	t_3 = 0.5 * t_2
	t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))))
	t_5 = 0.5 * (h * (math.pow(t_3, 2.0) / l))
	tmp = 0
	if d <= -5.8e+61:
		tmp = ((t_1 / math.sqrt(-h)) * math.sqrt((d / l))) * t_4
	elif d <= -5e-311:
		tmp = t_4 * (t_0 * (t_1 / math.sqrt(-l)))
	elif d <= 4.2e+50:
		tmp = t_4 * (t_0 * (math.sqrt(d) / math.sqrt(l)))
	else:
		tmp = (d / (math.sqrt(l) * math.sqrt(h))) / ((1.0 + t_5) / (1.0 - math.pow(t_5, 2.0)))
	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))
	t_1 = sqrt(Float64(-d))
	t_2 = Float64(Float64(D / d) * M)
	t_3 = Float64(0.5 * t_2)
	t_4 = Float64(1.0 + Float64(0.5 * Float64(Float64(t_3 / l) * Float64(Float64(t_2 * -0.5) / Float64(1.0 / h)))))
	t_5 = Float64(0.5 * Float64(h * Float64((t_3 ^ 2.0) / l)))
	tmp = 0.0
	if (d <= -5.8e+61)
		tmp = Float64(Float64(Float64(t_1 / sqrt(Float64(-h))) * sqrt(Float64(d / l))) * t_4);
	elseif (d <= -5e-311)
		tmp = Float64(t_4 * Float64(t_0 * Float64(t_1 / sqrt(Float64(-l)))));
	elseif (d <= 4.2e+50)
		tmp = Float64(t_4 * Float64(t_0 * Float64(sqrt(d) / sqrt(l))));
	else
		tmp = Float64(Float64(d / Float64(sqrt(l) * sqrt(h))) / Float64(Float64(1.0 + t_5) / Float64(1.0 - (t_5 ^ 2.0))));
	end
	return tmp
end
function tmp = code(d, h, l, M, D)
	tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / h));
	t_1 = sqrt(-d);
	t_2 = (D / d) * M;
	t_3 = 0.5 * t_2;
	t_4 = 1.0 + (0.5 * ((t_3 / l) * ((t_2 * -0.5) / (1.0 / h))));
	t_5 = 0.5 * (h * ((t_3 ^ 2.0) / l));
	tmp = 0.0;
	if (d <= -5.8e+61)
		tmp = ((t_1 / sqrt(-h)) * sqrt((d / l))) * t_4;
	elseif (d <= -5e-311)
		tmp = t_4 * (t_0 * (t_1 / sqrt(-l)));
	elseif (d <= 4.2e+50)
		tmp = t_4 * (t_0 * (sqrt(d) / sqrt(l)));
	else
		tmp = (d / (sqrt(l) * sqrt(h))) / ((1.0 + t_5) / (1.0 - (t_5 ^ 2.0)));
	end
	tmp_2 = 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]}, Block[{t$95$1 = N[Sqrt[(-d)], $MachinePrecision]}, Block[{t$95$2 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(0.5 * N[(N[(t$95$3 / l), $MachinePrecision] * N[(N[(t$95$2 * -0.5), $MachinePrecision] / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(0.5 * N[(h * N[(N[Power[t$95$3, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5.8e+61], N[(N[(N[(t$95$1 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[d, -5e-311], N[(t$95$4 * N[(t$95$0 * N[(t$95$1 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e+50], N[(t$95$4 * N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + t$95$5), $MachinePrecision] / N[(1.0 - N[Power[t$95$5, 2.0], $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}}\\
t_1 := \sqrt{-d}\\
t_2 := \frac{D}{d} \cdot M\\
t_3 := 0.5 \cdot t_2\\
t_4 := 1 + 0.5 \cdot \left(\frac{t_3}{\ell} \cdot \frac{t_2 \cdot -0.5}{\frac{1}{h}}\right)\\
t_5 := 0.5 \cdot \left(h \cdot \frac{{t_3}^{2}}{\ell}\right)\\
\mathbf{if}\;d \leq -5.8 \cdot 10^{+61}:\\
\;\;\;\;\left(\frac{t_1}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_4\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\
\;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{t_1}{\sqrt{-\ell}}\right)\\

\mathbf{elif}\;d \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;t_4 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if d < -5.8000000000000001e61

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

      \[\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]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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* [=>]26.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 [=>]26.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 [=>]25.6

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

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

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

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

    if -5.8000000000000001e61 < d < -5.00000000000023e-311

    1. Initial program 27.3

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

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

      [Start]27.3

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

      metadata-eval [=>]27.3

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

      unpow1/2 [=>]27.3

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

      metadata-eval [=>]27.3

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

      unpow1/2 [=>]27.3

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

      associate-*l* [=>]27.3

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

      metadata-eval [=>]27.3

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

      times-frac [=>]28.1

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

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

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

    if -5.00000000000023e-311 < d < 4.1999999999999999e50

    1. Initial program 27.2

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

      \[\leadsto \color{blue}{\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.2

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

      metadata-eval [=>]27.2

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

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

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

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

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

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

      times-frac [=>]28.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-rr27.7

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

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

      \[\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(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\frac{1}{h}}\right)\right) \]
    6. Simplified17.9

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

      [Start]17.9

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

      associate-*r/ [=>]17.9

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

      *-rgt-identity [=>]17.9

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

    if 4.1999999999999999e50 < d

    1. Initial program 24.7

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

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

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

      metadata-eval [=>]24.7

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

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

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

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

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

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

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

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

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

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

      [Start]10.9

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

      associate-/l* [=>]9.9

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

      *-commutative [=>]9.9

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.8 \cdot 10^{+61}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\frac{1}{h}}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right)\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{+50}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}}{\frac{1 + 0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2}}{\ell}\right)}{1 - {\left(0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(\frac{D}{d} \cdot M\right)\right)}^{2}}{\ell}\right)\right)}^{2}}}\\ \end{array} \]

Alternatives

Alternative 1
Error18.4
Cost138776
\[\begin{array}{l} t_0 := 1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_3 := \left(t_2 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_0\\ t_4 := \sqrt{\frac{d}{h}}\\ t_5 := t_0 \cdot \left(t_1 \cdot t_2\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\left(t_1 \cdot t_4\right) \cdot \left(1 + -0.5 \cdot \left(\frac{0.5 \cdot \left(\frac{D}{d} \cdot M\right)}{\ell} \cdot \frac{0.5 \cdot \frac{M}{\frac{d}{D}}}{\frac{1}{h}}\right)\right)\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{-168}:\\ \;\;\;\;\left(t_4 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - 0.5 \cdot \frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\frac{d}{\sqrt[3]{{\left(h \cdot \ell\right)}^{1.5}}}\\ \mathbf{elif}\;t_3 \leq 10^{+286}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]
Alternative 2
Error14.9
Cost22100
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{D}{d} \cdot M\\ t_2 := 1 + 0.5 \cdot \left(\frac{0.5 \cdot t_1}{\ell} \cdot \frac{t_1 \cdot -0.5}{\frac{1}{h}}\right)\\ t_3 := t_2 \cdot \left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right)\\ t_4 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{if}\;h \leq -1.1 \cdot 10^{-166}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;h \leq -2.5 \cdot 10^{-222}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq -2.9 \cdot 10^{-304}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;h \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;t_4 \cdot \left(1 + h \cdot \frac{-0.125}{\frac{\ell}{{\left(D \cdot \frac{M}{d}\right)}^{2}}}\right)\\ \mathbf{elif}\;h \leq 5.5 \cdot 10^{+181}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{d}}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot \left(1 + \frac{{\left(\frac{D \cdot M}{d}\right)}^{2}}{\frac{\ell}{0.25}} \cdot \left(h \cdot -0.5\right)\right)\\ \end{array} \]
Alternative 3
Error13.5
Cost21708
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{D}{d} \cdot M\\ t_2 := 1 + 0.5 \cdot \left(\frac{0.5 \cdot t_1}{\ell} \cdot \frac{t_1 \cdot -0.5}{\frac{1}{h}}\right)\\ t_3 := \sqrt{-d}\\ \mathbf{if}\;d \leq -9.2 \cdot 10^{+60}:\\ \;\;\;\;\left(\frac{t_3}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_2\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \frac{t_3}{\sqrt{-\ell}}\right)\\ \mathbf{elif}\;d \leq 4.7 \cdot 10^{+80}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + h \cdot \frac{-0.125}{\frac{\ell}{{\left(D \cdot \frac{M}{d}\right)}^{2}}}\right)\\ \end{array} \]
Alternative 4
Error16.6
Cost21008
\[\begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \frac{0.5 \cdot t_0}{\ell}\\ t_3 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{if}\;d \leq -6.1 \cdot 10^{+150}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;d \leq 8.5 \cdot 10^{-240}:\\ \;\;\;\;\left(t_1 \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + -0.5 \cdot \left(t_2 \cdot \frac{0.5 \cdot \frac{M}{\frac{d}{D}}}{\frac{1}{h}}\right)\right)\\ \mathbf{elif}\;d \leq 5.4 \cdot 10^{-39}:\\ \;\;\;\;t_3 \cdot \left(1 + \frac{{\left(\frac{D \cdot M}{d}\right)}^{2}}{\frac{\ell}{0.25}} \cdot \left(h \cdot -0.5\right)\right)\\ \mathbf{elif}\;d \leq 5.8 \cdot 10^{+34}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(t_2 \cdot \frac{t_0 \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot \left(t_1 \cdot \frac{1}{\sqrt{\frac{h}{d}}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{-0.125}{\frac{\ell}{{\left(D \cdot \frac{M}{d}\right)}^{2}}}\right)\\ \end{array} \]
Alternative 5
Error17.4
Cost20744
\[\begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ \mathbf{if}\;h \leq -2.5 \cdot 10^{-38}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(\frac{0.5 \cdot t_0}{\ell} \cdot \frac{t_0 \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + h \cdot \frac{-0.125}{\frac{\ell}{{\left(D \cdot \frac{M}{d}\right)}^{2}}}\right)\\ \end{array} \]
Alternative 6
Error21.9
Cost15312
\[\begin{array}{l} t_0 := 0.5 \cdot \left(\frac{D}{d} \cdot M\right)\\ t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + -0.5 \cdot \left(t_0 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{if}\;h \leq -5.3 \cdot 10^{+141}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(\frac{D \cdot M}{d}\right)}^{2} \cdot 0.25}{\ell}\right)\right)\\ \mathbf{elif}\;h \leq -3.1 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 8 \cdot 10^{-6}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error20.3
Cost15308
\[\begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := \left(1 + 0.5 \cdot \left(\frac{0.5 \cdot t_0}{\ell} \cdot \frac{t_0 \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{if}\;h \leq -3 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error20.3
Cost15308
\[\begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := \frac{0.5 \cdot t_0}{\ell}\\ t_2 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;h \leq -2.8 \cdot 10^{-38}:\\ \;\;\;\;t_2 \cdot \left(1 + -0.5 \cdot \left(t_1 \cdot \frac{0.5 \cdot \frac{M}{\frac{d}{D}}}{\frac{1}{h}}\right)\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(t_1 \cdot \frac{t_0 \cdot -0.5}{\frac{1}{h}}\right)\right) \cdot t_2\\ \end{array} \]
Alternative 9
Error20.3
Cost15308
\[\begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := 1 + 0.5 \cdot \left(\frac{0.5 \cdot t_0}{\ell} \cdot \frac{t_0 \cdot -0.5}{\frac{1}{h}}\right)\\ t_2 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;h \leq -4.1 \cdot 10^{-38}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 8 \cdot 10^{-6}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{\frac{d}{\ell}} \cdot t_2\right)\\ \end{array} \]
Alternative 10
Error21.5
Cost15180
\[\begin{array}{l} t_0 := 0.5 \cdot \left(\frac{D}{d} \cdot M\right)\\ t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - 0.5 \cdot \left(t_0 \cdot \frac{t_0}{\frac{\ell}{h}}\right)\right)\\ \mathbf{if}\;h \leq -2.32 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 8.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error23.3
Cost14600
\[\begin{array}{l} \mathbf{if}\;d \leq -2.4 \cdot 10^{+149}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;d \leq -2.15 \cdot 10^{-156}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(\frac{D \cdot M}{d}\right)}^{2} \cdot 0.25}{\ell}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 12
Error22.5
Cost14340
\[\begin{array}{l} \mathbf{if}\;h \leq -5.6 \cdot 10^{+100}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + h \cdot \frac{-0.125 \cdot {\left(\frac{D}{\frac{d}{M}}\right)}^{2}}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 13
Error23.5
Cost13252
\[\begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 14
Error27.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq 2.32 \cdot 10^{-296}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 15
Error34.4
Cost6980
\[\begin{array}{l} \mathbf{if}\;d \leq -3.8 \cdot 10^{-275}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 16
Error33.9
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.45 \cdot 10^{-167}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 17
Error33.0
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{-303}:\\ \;\;\;\;\sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 18
Error32.9
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.1 \cdot 10^{-303}:\\ \;\;\;\;\sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 19
Error43.8
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

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