Average Error: 26.5 → 18.6
Time: 37.4s
Precision: binary64
Cost: 27396
\[ \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}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_3 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_2\\ \mathbf{if}\;d \leq -8.6 \cdot 10^{+109}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(t_1 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{0.5 \cdot \left(h \cdot {\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 1.3 \cdot 10^{-66}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq 53000000:\\ \;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_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 l)))
        (t_1 (pow (/ d h) 0.5))
        (t_2 (/ d (* (sqrt l) (sqrt h))))
        (t_3
         (* (+ 1.0 (* (pow (* M (* 0.5 (/ D d))) 2.0) (* (/ h l) -0.5))) t_2)))
   (if (<= d -8.6e+109)
     (*
      (* (/ (sqrt (- d)) (sqrt (- h))) t_0)
      (+ 1.0 (* -0.5 (* (/ h l) (pow (* (/ D d) (/ M 2.0)) 2.0)))))
     (if (<= d -5e-298)
       (*
        (* t_1 (pow (/ d l) 0.5))
        (- 1.0 (/ (* 0.5 (* h (pow (* 0.5 (/ (* D M) d)) 2.0))) l)))
       (if (<= d 1.3e-66)
         t_3
         (if (<= d 53000000.0)
           (*
            (* t_0 t_1)
            (- 1.0 (* 0.125 (* M (/ (* D (* h D)) (/ (* d d) (/ M l)))))))
           (if (<= d 2.4e+145) t_3 t_2)))))))
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 / l));
	double t_1 = pow((d / h), 0.5);
	double t_2 = d / (sqrt(l) * sqrt(h));
	double t_3 = (1.0 + (pow((M * (0.5 * (D / d))), 2.0) * ((h / l) * -0.5))) * t_2;
	double tmp;
	if (d <= -8.6e+109) {
		tmp = ((sqrt(-d) / sqrt(-h)) * t_0) * (1.0 + (-0.5 * ((h / l) * pow(((D / d) * (M / 2.0)), 2.0))));
	} else if (d <= -5e-298) {
		tmp = (t_1 * pow((d / l), 0.5)) * (1.0 - ((0.5 * (h * pow((0.5 * ((D * M) / d)), 2.0))) / l));
	} else if (d <= 1.3e-66) {
		tmp = t_3;
	} else if (d <= 53000000.0) {
		tmp = (t_0 * t_1) * (1.0 - (0.125 * (M * ((D * (h * D)) / ((d * d) / (M / l))))));
	} else if (d <= 2.4e+145) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	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) :: tmp
    t_0 = sqrt((d / l))
    t_1 = (d / h) ** 0.5d0
    t_2 = d / (sqrt(l) * sqrt(h))
    t_3 = (1.0d0 + (((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * ((h / l) * (-0.5d0)))) * t_2
    if (d <= (-8.6d+109)) then
        tmp = ((sqrt(-d) / sqrt(-h)) * t_0) * (1.0d0 + ((-0.5d0) * ((h / l) * (((d_1 / d) * (m / 2.0d0)) ** 2.0d0))))
    else if (d <= (-5d-298)) then
        tmp = (t_1 * ((d / l) ** 0.5d0)) * (1.0d0 - ((0.5d0 * (h * ((0.5d0 * ((d_1 * m) / d)) ** 2.0d0))) / l))
    else if (d <= 1.3d-66) then
        tmp = t_3
    else if (d <= 53000000.0d0) then
        tmp = (t_0 * t_1) * (1.0d0 - (0.125d0 * (m * ((d_1 * (h * d_1)) / ((d * d) / (m / l))))))
    else if (d <= 2.4d+145) then
        tmp = t_3
    else
        tmp = t_2
    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 / l));
	double t_1 = Math.pow((d / h), 0.5);
	double t_2 = d / (Math.sqrt(l) * Math.sqrt(h));
	double t_3 = (1.0 + (Math.pow((M * (0.5 * (D / d))), 2.0) * ((h / l) * -0.5))) * t_2;
	double tmp;
	if (d <= -8.6e+109) {
		tmp = ((Math.sqrt(-d) / Math.sqrt(-h)) * t_0) * (1.0 + (-0.5 * ((h / l) * Math.pow(((D / d) * (M / 2.0)), 2.0))));
	} else if (d <= -5e-298) {
		tmp = (t_1 * Math.pow((d / l), 0.5)) * (1.0 - ((0.5 * (h * Math.pow((0.5 * ((D * M) / d)), 2.0))) / l));
	} else if (d <= 1.3e-66) {
		tmp = t_3;
	} else if (d <= 53000000.0) {
		tmp = (t_0 * t_1) * (1.0 - (0.125 * (M * ((D * (h * D)) / ((d * d) / (M / l))))));
	} else if (d <= 2.4e+145) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	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 / l))
	t_1 = math.pow((d / h), 0.5)
	t_2 = d / (math.sqrt(l) * math.sqrt(h))
	t_3 = (1.0 + (math.pow((M * (0.5 * (D / d))), 2.0) * ((h / l) * -0.5))) * t_2
	tmp = 0
	if d <= -8.6e+109:
		tmp = ((math.sqrt(-d) / math.sqrt(-h)) * t_0) * (1.0 + (-0.5 * ((h / l) * math.pow(((D / d) * (M / 2.0)), 2.0))))
	elif d <= -5e-298:
		tmp = (t_1 * math.pow((d / l), 0.5)) * (1.0 - ((0.5 * (h * math.pow((0.5 * ((D * M) / d)), 2.0))) / l))
	elif d <= 1.3e-66:
		tmp = t_3
	elif d <= 53000000.0:
		tmp = (t_0 * t_1) * (1.0 - (0.125 * (M * ((D * (h * D)) / ((d * d) / (M / l))))))
	elif d <= 2.4e+145:
		tmp = t_3
	else:
		tmp = t_2
	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 / l))
	t_1 = Float64(d / h) ^ 0.5
	t_2 = Float64(d / Float64(sqrt(l) * sqrt(h)))
	t_3 = Float64(Float64(1.0 + Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(Float64(h / l) * -0.5))) * t_2)
	tmp = 0.0
	if (d <= -8.6e+109)
		tmp = Float64(Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))) * t_0) * Float64(1.0 + Float64(-0.5 * Float64(Float64(h / l) * (Float64(Float64(D / d) * Float64(M / 2.0)) ^ 2.0)))));
	elseif (d <= -5e-298)
		tmp = Float64(Float64(t_1 * (Float64(d / l) ^ 0.5)) * Float64(1.0 - Float64(Float64(0.5 * Float64(h * (Float64(0.5 * Float64(Float64(D * M) / d)) ^ 2.0))) / l)));
	elseif (d <= 1.3e-66)
		tmp = t_3;
	elseif (d <= 53000000.0)
		tmp = Float64(Float64(t_0 * t_1) * Float64(1.0 - Float64(0.125 * Float64(M * Float64(Float64(D * Float64(h * D)) / Float64(Float64(d * d) / Float64(M / l)))))));
	elseif (d <= 2.4e+145)
		tmp = t_3;
	else
		tmp = t_2;
	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 / l));
	t_1 = (d / h) ^ 0.5;
	t_2 = d / (sqrt(l) * sqrt(h));
	t_3 = (1.0 + (((M * (0.5 * (D / d))) ^ 2.0) * ((h / l) * -0.5))) * t_2;
	tmp = 0.0;
	if (d <= -8.6e+109)
		tmp = ((sqrt(-d) / sqrt(-h)) * t_0) * (1.0 + (-0.5 * ((h / l) * (((D / d) * (M / 2.0)) ^ 2.0))));
	elseif (d <= -5e-298)
		tmp = (t_1 * ((d / l) ^ 0.5)) * (1.0 - ((0.5 * (h * ((0.5 * ((D * M) / d)) ^ 2.0))) / l));
	elseif (d <= 1.3e-66)
		tmp = t_3;
	elseif (d <= 53000000.0)
		tmp = (t_0 * t_1) * (1.0 - (0.125 * (M * ((D * (h * D)) / ((d * d) / (M / l))))));
	elseif (d <= 2.4e+145)
		tmp = t_3;
	else
		tmp = t_2;
	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 / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$2 = N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 + N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[d, -8.6e+109], N[(N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(1.0 + N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-298], N[(N[(t$95$1 * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.5 * N[(h * N[Power[N[(0.5 * N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.3e-66], t$95$3, If[LessEqual[d, 53000000.0], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(M * N[(N[(D * N[(h * D), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] / N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.4e+145], t$95$3, t$95$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)
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\
t_2 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
t_3 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_2\\
\mathbf{if}\;d \leq -8.6 \cdot 10^{+109}:\\
\;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\

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

\mathbf{elif}\;d \leq 1.3 \cdot 10^{-66}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;d \leq 53000000:\\
\;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\

\mathbf{elif}\;d \leq 2.4 \cdot 10^{+145}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\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 d < -8.6000000000000001e109

    1. Initial program 28.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. Simplified27.5

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

      metadata-eval [=>]28.0

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-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) \]

    if -8.6000000000000001e109 < d < -5.0000000000000002e-298

    1. Initial program 25.6

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

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

    if -5.0000000000000002e-298 < d < 1.2999999999999999e-66 or 5.3e7 < d < 2.39999999999999992e145

    1. Initial program 28.2

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Simplified29.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]28.2

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

      metadata-eval [=>]28.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 [=>]28.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 [=>]28.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 [=>]28.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* [=>]28.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 [=>]28.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 [=>]29.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-rr20.8

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

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

      [Start]20.8

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

      *-lft-identity [<=]20.8

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

      *-commutative [<=]20.8

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

      distribute-rgt-in [<=]20.8

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

      *-commutative [=>]20.8

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

      *-commutative [=>]20.8

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

      *-commutative [=>]20.8

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

    if 1.2999999999999999e-66 < d < 5.3e7

    1. Initial program 16.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. Taylor expanded in M around 0 25.6

      \[\leadsto \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 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    3. Simplified24.6

      \[\leadsto \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 - \color{blue}{0.125 \cdot \frac{D \cdot \left(D \cdot h\right)}{\frac{d \cdot \left(d \cdot \ell\right)}{M \cdot M}}}\right) \]
      Proof

      [Start]25.6

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

      associate-*r/ [=>]25.6

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

      *-commutative [=>]25.6

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

      associate-*r* [=>]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 - \frac{0.125 \cdot \color{blue}{\left(\left({D}^{2} \cdot h\right) \cdot {M}^{2}\right)}}{\ell \cdot {d}^{2}}\right) \]

      associate-*r* [=>]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 - \frac{\color{blue}{\left(0.125 \cdot \left({D}^{2} \cdot h\right)\right) \cdot {M}^{2}}}{\ell \cdot {d}^{2}}\right) \]

      associate-/l* [=>]26.9

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

      associate-*r/ [<=]26.9

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

      unpow2 [=>]26.9

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

      associate-*l* [=>]24.6

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

      *-commutative [=>]24.6

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

      unpow2 [=>]24.6

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

      associate-*l* [=>]24.6

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

      unpow2 [=>]24.6

      \[ \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 - 0.125 \cdot \frac{D \cdot \left(D \cdot h\right)}{\frac{d \cdot \left(d \cdot \ell\right)}{\color{blue}{M \cdot M}}}\right) \]
    4. Applied egg-rr48.9

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

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

      [Start]48.9

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

      expm1-def [=>]25.5

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

      expm1-log1p [=>]24.6

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

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

    if 2.39999999999999992e145 < d

    1. Initial program 28.2

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

      \[\leadsto \color{blue}{\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]28.2

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

      metadata-eval [=>]28.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 [=>]28.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 [=>]28.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 [=>]28.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* [=>]28.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 [=>]28.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. Taylor expanded in d around inf 15.7

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

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

      [Start]15.7

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

      *-commutative [=>]15.7

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

      associate-/r* [=>]14.9

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

      \[\leadsto \color{blue}{\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}} \]
    6. Simplified5.5

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

      [Start]10.4

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

      associate-/l/ [=>]5.5

      \[ \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification18.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.6 \cdot 10^{+109}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{0.5 \cdot \left(h \cdot {\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 1.3 \cdot 10^{-66}:\\ \;\;\;\;\left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;d \leq 53000000:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+145}:\\ \;\;\;\;\left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]

Alternatives

Alternative 1
Error17.4
Cost27396
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_2 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_1\\ \mathbf{if}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 - h \cdot \left(\frac{0.5}{\ell} \cdot {\left(\frac{0.5}{d} \cdot \left(D \cdot M\right)\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq 1500000:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error20.9
Cost21400
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_0\\ t_3 := \sqrt{\frac{d}{\ell}} \cdot t_1\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+86}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -1.5 \cdot 10^{-71}:\\ \;\;\;\;\left(t_1 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + \frac{D \cdot \left(M \cdot \left(h \cdot M\right)\right)}{\ell \cdot \frac{d}{\frac{D}{d}}} \cdot -0.125\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;t_3 \cdot \left(1 + \left(\frac{D \cdot D}{\frac{d}{M}} \cdot \frac{h}{\frac{d}{\frac{M}{\ell}}}\right) \cdot -0.125\right)\\ \mathbf{elif}\;d \leq 2.6 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq 600000:\\ \;\;\;\;t_3 \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error19.3
Cost21268
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ t_2 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_3 := \left(1 + t_1 \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_2\\ \mathbf{if}\;d \leq -5.2 \cdot 10^{+109}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(t_0 \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + -0.5 \cdot \frac{h \cdot t_1}{\ell}\right)\\ \mathbf{elif}\;d \leq 6 \cdot 10^{-65}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq 2.8:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error19.0
Cost21268
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_2 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_1\\ \mathbf{if}\;d \leq -2.45 \cdot 10^{+109}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(1 - h \cdot \left(\frac{0.5}{\ell} \cdot {\left(\frac{0.5}{d} \cdot \left(D \cdot M\right)\right)}^{2}\right)\right) \cdot \left(t_0 \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{elif}\;d \leq 2.65 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq 190:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error19.0
Cost21268
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_0\\ \mathbf{if}\;d \leq -1.82 \cdot 10^{+109}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(t_1 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{0.5 \cdot \left(h \cdot {\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 2.5 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq 1500:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_1\right) \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error23.4
Cost14988
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2.1 \cdot 10^{+109}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -1.15 \cdot 10^{-58}:\\ \;\;\;\;\left(t_0 \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - h \cdot \left(0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \left(\frac{M}{d} \cdot \frac{M}{d}\right)\right)\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 + \left(\frac{D \cdot D}{\frac{d}{M}} \cdot \frac{h}{\frac{d}{\frac{M}{\ell}}}\right) \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 7
Error22.4
Cost14988
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{0.5}\\ \mathbf{if}\;d \leq -1.72 \cdot 10^{+109}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -2.3 \cdot 10^{-71}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.125 \cdot \left(M \cdot \frac{D \cdot \left(h \cdot D\right)}{\frac{d \cdot d}{\frac{M}{\ell}}}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;t_0 \cdot \left(1 + \left(\frac{D \cdot D}{\frac{d}{M}} \cdot \frac{h}{\frac{d}{\frac{M}{\ell}}}\right) \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 8
Error22.6
Cost14988
\[\begin{array}{l} t_0 := {\left(\frac{d}{h}\right)}^{0.5}\\ \mathbf{if}\;d \leq -5.5 \cdot 10^{+90}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -7.2 \cdot 10^{-71}:\\ \;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + \frac{D \cdot \left(M \cdot \left(h \cdot M\right)\right)}{\ell \cdot \frac{d}{\frac{D}{d}}} \cdot -0.125\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_0\right) \cdot \left(1 + \left(\frac{D \cdot D}{\frac{d}{M}} \cdot \frac{h}{\frac{d}{\frac{M}{\ell}}}\right) \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 9
Error22.3
Cost14660
\[\begin{array}{l} \mathbf{if}\;h \leq -7.5 \cdot 10^{+172}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - h \cdot \left(0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \left(\frac{M}{d} \cdot \frac{M}{d}\right)\right)\right)\right)\\ \mathbf{elif}\;h \leq -4 \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 10
Error22.1
Cost14468
\[\begin{array}{l} \mathbf{if}\;h \leq -2.1 \cdot 10^{+163}:\\ \;\;\;\;\left(1 + h \cdot \left(-0.5 \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;h \leq -4 \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 11
Error23.8
Cost13252
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.9 \cdot 10^{-227}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 12
Error27.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-298}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 13
Error33.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;h \leq 1.35 \cdot 10^{-284}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 14
Error43.7
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce

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