?

Average Error: 41.62% → 26.45%
Time: 40.8s
Precision: binary64
Cost: 21844

?

\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
\[\begin{array}{l} t_0 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ t_3 := 1 - 0.5 \cdot \left(h \cdot \left(t_0 \cdot \frac{t_0}{\ell}\right)\right)\\ t_4 := t_2 \cdot t_3\\ \mathbf{if}\;d \leq -2.8 \cdot 10^{+176}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-94}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-136}:\\ \;\;\;\;t_2 \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell}{h} \cdot \left(d \cdot \left(d \cdot 2\right)\right)}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+74}:\\ \;\;\;\;t_3 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* D (* M (/ 0.5 d))))
        (t_1 (sqrt (/ d h)))
        (t_2 (* t_1 (/ (sqrt (- d)) (sqrt (- l)))))
        (t_3 (- 1.0 (* 0.5 (* h (* t_0 (/ t_0 l))))))
        (t_4 (* t_2 t_3)))
   (if (<= d -2.8e+176)
     (/ (- d) (sqrt (* l h)))
     (if (<= d -9e-94)
       t_4
       (if (<= d -3.1e-136)
         (*
          t_2
          (-
           1.0
           (*
            0.5
            (/ (* (* D M) (* M (/ D 2.0))) (* (/ l h) (* d (* d 2.0)))))))
         (if (<= d -5e-309)
           t_4
           (if (<= d 2.4e+74)
             (* t_3 (* t_1 (/ (sqrt d) (sqrt l))))
             (/ d (* (sqrt h) (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 = D * (M * (0.5 / d));
	double t_1 = sqrt((d / h));
	double t_2 = t_1 * (sqrt(-d) / sqrt(-l));
	double t_3 = 1.0 - (0.5 * (h * (t_0 * (t_0 / l))));
	double t_4 = t_2 * t_3;
	double tmp;
	if (d <= -2.8e+176) {
		tmp = -d / sqrt((l * h));
	} else if (d <= -9e-94) {
		tmp = t_4;
	} else if (d <= -3.1e-136) {
		tmp = t_2 * (1.0 - (0.5 * (((D * M) * (M * (D / 2.0))) / ((l / h) * (d * (d * 2.0))))));
	} else if (d <= -5e-309) {
		tmp = t_4;
	} else if (d <= 2.4e+74) {
		tmp = t_3 * (t_1 * (sqrt(d) / sqrt(l)));
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	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) :: tmp
    t_0 = d_1 * (m * (0.5d0 / d))
    t_1 = sqrt((d / h))
    t_2 = t_1 * (sqrt(-d) / sqrt(-l))
    t_3 = 1.0d0 - (0.5d0 * (h * (t_0 * (t_0 / l))))
    t_4 = t_2 * t_3
    if (d <= (-2.8d+176)) then
        tmp = -d / sqrt((l * h))
    else if (d <= (-9d-94)) then
        tmp = t_4
    else if (d <= (-3.1d-136)) then
        tmp = t_2 * (1.0d0 - (0.5d0 * (((d_1 * m) * (m * (d_1 / 2.0d0))) / ((l / h) * (d * (d * 2.0d0))))))
    else if (d <= (-5d-309)) then
        tmp = t_4
    else if (d <= 2.4d+74) then
        tmp = t_3 * (t_1 * (sqrt(d) / sqrt(l)))
    else
        tmp = d / (sqrt(h) * sqrt(l))
    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 = D * (M * (0.5 / d));
	double t_1 = Math.sqrt((d / h));
	double t_2 = t_1 * (Math.sqrt(-d) / Math.sqrt(-l));
	double t_3 = 1.0 - (0.5 * (h * (t_0 * (t_0 / l))));
	double t_4 = t_2 * t_3;
	double tmp;
	if (d <= -2.8e+176) {
		tmp = -d / Math.sqrt((l * h));
	} else if (d <= -9e-94) {
		tmp = t_4;
	} else if (d <= -3.1e-136) {
		tmp = t_2 * (1.0 - (0.5 * (((D * M) * (M * (D / 2.0))) / ((l / h) * (d * (d * 2.0))))));
	} else if (d <= -5e-309) {
		tmp = t_4;
	} else if (d <= 2.4e+74) {
		tmp = t_3 * (t_1 * (Math.sqrt(d) / Math.sqrt(l)));
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	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 = D * (M * (0.5 / d))
	t_1 = math.sqrt((d / h))
	t_2 = t_1 * (math.sqrt(-d) / math.sqrt(-l))
	t_3 = 1.0 - (0.5 * (h * (t_0 * (t_0 / l))))
	t_4 = t_2 * t_3
	tmp = 0
	if d <= -2.8e+176:
		tmp = -d / math.sqrt((l * h))
	elif d <= -9e-94:
		tmp = t_4
	elif d <= -3.1e-136:
		tmp = t_2 * (1.0 - (0.5 * (((D * M) * (M * (D / 2.0))) / ((l / h) * (d * (d * 2.0))))))
	elif d <= -5e-309:
		tmp = t_4
	elif d <= 2.4e+74:
		tmp = t_3 * (t_1 * (math.sqrt(d) / math.sqrt(l)))
	else:
		tmp = d / (math.sqrt(h) * 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(D * Float64(M * Float64(0.5 / d)))
	t_1 = sqrt(Float64(d / h))
	t_2 = Float64(t_1 * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))))
	t_3 = Float64(1.0 - Float64(0.5 * Float64(h * Float64(t_0 * Float64(t_0 / l)))))
	t_4 = Float64(t_2 * t_3)
	tmp = 0.0
	if (d <= -2.8e+176)
		tmp = Float64(Float64(-d) / sqrt(Float64(l * h)));
	elseif (d <= -9e-94)
		tmp = t_4;
	elseif (d <= -3.1e-136)
		tmp = Float64(t_2 * Float64(1.0 - Float64(0.5 * Float64(Float64(Float64(D * M) * Float64(M * Float64(D / 2.0))) / Float64(Float64(l / h) * Float64(d * Float64(d * 2.0)))))));
	elseif (d <= -5e-309)
		tmp = t_4;
	elseif (d <= 2.4e+74)
		tmp = Float64(t_3 * Float64(t_1 * Float64(sqrt(d) / sqrt(l))));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	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 = D * (M * (0.5 / d));
	t_1 = sqrt((d / h));
	t_2 = t_1 * (sqrt(-d) / sqrt(-l));
	t_3 = 1.0 - (0.5 * (h * (t_0 * (t_0 / l))));
	t_4 = t_2 * t_3;
	tmp = 0.0;
	if (d <= -2.8e+176)
		tmp = -d / sqrt((l * h));
	elseif (d <= -9e-94)
		tmp = t_4;
	elseif (d <= -3.1e-136)
		tmp = t_2 * (1.0 - (0.5 * (((D * M) * (M * (D / 2.0))) / ((l / h) * (d * (d * 2.0))))));
	elseif (d <= -5e-309)
		tmp = t_4;
	elseif (d <= 2.4e+74)
		tmp = t_3 * (t_1 * (sqrt(d) / sqrt(l)));
	else
		tmp = d / (sqrt(h) * sqrt(l));
	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[(D * N[(M * N[(0.5 / d), $MachinePrecision]), $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]}, Block[{t$95$3 = N[(1.0 - N[(0.5 * N[(h * N[(t$95$0 * N[(t$95$0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, If[LessEqual[d, -2.8e+176], N[((-d) / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -9e-94], t$95$4, If[LessEqual[d, -3.1e-136], N[(t$95$2 * N[(1.0 - N[(0.5 * N[(N[(N[(D * M), $MachinePrecision] * N[(M * N[(D / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l / h), $MachinePrecision] * N[(d * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-309], t$95$4, If[LessEqual[d, 2.4e+74], N[(t$95$3 * N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\begin{array}{l}
t_0 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\
t_3 := 1 - 0.5 \cdot \left(h \cdot \left(t_0 \cdot \frac{t_0}{\ell}\right)\right)\\
t_4 := t_2 \cdot t_3\\
\mathbf{if}\;d \leq -2.8 \cdot 10^{+176}:\\
\;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\

\mathbf{elif}\;d \leq -9 \cdot 10^{-94}:\\
\;\;\;\;t_4\\

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

\mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;d \leq 2.4 \cdot 10^{+74}:\\
\;\;\;\;t_3 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\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 < -2.8000000000000002e176

    1. Initial program 43.96

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

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

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

      [Start]98.72

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

      *-commutative [=>]98.72

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

      associate-/l/ [<=]98.72

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

      \[\leadsto \color{blue}{\frac{d \cdot \sqrt{\frac{-1}{h}}}{\sqrt{-\ell}}} \]
    5. Simplified98.93

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

      [Start]98.97

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

      associate-/l* [=>]98.93

      \[ \color{blue}{\frac{d}{\frac{\sqrt{-\ell}}{\sqrt{\frac{-1}{h}}}}} \]
    6. Applied egg-rr24.5

      \[\leadsto \color{blue}{d \cdot \frac{-1}{\sqrt{\ell \cdot h}}} \]
    7. Simplified24.39

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

      [Start]24.5

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

      *-commutative [=>]24.5

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

      associate-*l/ [=>]24.39

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

      neg-mul-1 [<=]24.39

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

    if -2.8000000000000002e176 < d < -9.0000000000000004e-94 or -3.1e-136 < d < -4.9999999999999995e-309

    1. Initial program 39.74

      \[\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. Simplified40.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]39.74

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

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

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

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

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

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

      \[ \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 [=>]40.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-rr41.32

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

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

      [Start]41.32

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

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

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

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

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

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

      *-commutative [=>]38.26

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

      associate-*r* [<=]38.26

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

      metadata-eval [<=]38.26

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

      associate-/r/ [<=]38.27

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

      associate-*r/ [=>]37.52

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

      associate-/l* [<=]37.52

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

      associate-/r/ [=>]37.52

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

      *-commutative [=>]37.52

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

      *-commutative [<=]37.52

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

      associate-/r* [=>]37.52

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

      metadata-eval [=>]37.52

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

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

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

    if -9.0000000000000004e-94 < d < -3.1e-136

    1. Initial program 40.84

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999995e-309 < d < 2.40000000000000008e74

    1. Initial program 43.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. Simplified44.45

      \[\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]43.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 [=>]43.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 [=>]43.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 [=>]43.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 [=>]43.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* [=>]43.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 [=>]43.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 [=>]44.45

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

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

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

      [Start]45.33

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

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

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

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

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

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

      *-commutative [=>]42.61

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

      associate-*r* [<=]42.61

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

      metadata-eval [<=]42.61

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

      associate-/r/ [<=]42.62

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

      associate-*r/ [=>]41.65

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

      associate-/l* [<=]41.66

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

      associate-/r/ [=>]41.65

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

      *-commutative [=>]41.65

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

      *-commutative [<=]41.65

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

      associate-/r* [=>]41.65

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

      metadata-eval [=>]41.65

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

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

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

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

      [Start]32.34

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

      associate-*r/ [=>]32.31

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

      *-rgt-identity [=>]32.31

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

    if 2.40000000000000008e74 < d

    1. Initial program 41.89

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

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

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

      [Start]27.29

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

      *-commutative [=>]27.29

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

      associate-/l/ [<=]26.55

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

      \[\leadsto \color{blue}{\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}} \]
    5. Simplified12.52

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

      [Start]21.76

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

      associate-/l/ [=>]12.52

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.8 \cdot 10^{+176}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-94}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \left(\left(D \cdot \left(M \cdot \frac{0.5}{d}\right)\right) \cdot \frac{D \cdot \left(M \cdot \frac{0.5}{d}\right)}{\ell}\right)\right)\right)\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-136}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \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)}{\frac{\ell}{h} \cdot \left(d \cdot \left(d \cdot 2\right)\right)}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \left(\left(D \cdot \left(M \cdot \frac{0.5}{d}\right)\right) \cdot \frac{D \cdot \left(M \cdot \frac{0.5}{d}\right)}{\ell}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+74}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(h \cdot \left(\left(D \cdot \left(M \cdot \frac{0.5}{d}\right)\right) \cdot \frac{D \cdot \left(M \cdot \frac{0.5}{d}\right)}{\ell}\right)\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternatives

Alternative 1
Error25.28%
Cost27528
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ t_1 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ \mathbf{if}\;d \leq -2.85 \cdot 10^{+177}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-91}:\\ \;\;\;\;t_0 \cdot \left(1 + \left(h \cdot \frac{{\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;d \leq -1.55 \cdot 10^{-137}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell}{h} \cdot \left(d \cdot \left(d \cdot 2\right)\right)}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(h \cdot \left(t_1 \cdot \frac{t_1}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}, -0.5, 1\right) \cdot \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 2
Error24.71%
Cost27408
\[\begin{array}{l} t_0 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ t_1 := \sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ t_2 := t_1 \cdot \left(1 - 0.5 \cdot \left(h \cdot \left(t_0 \cdot \frac{t_0}{\ell}\right)\right)\right)\\ \mathbf{if}\;d \leq -9 \cdot 10^{+175}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -1.8 \cdot 10^{-93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-136}:\\ \;\;\;\;t_1 \cdot \left(1 - 0.5 \cdot \frac{\left(D \cdot M\right) \cdot \left(M \cdot \frac{D}{2}\right)}{\frac{\ell}{h} \cdot \left(d \cdot \left(d \cdot 2\right)\right)}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(h \cdot \frac{{\left(D \cdot \frac{M}{\frac{d}{0.5}}\right)}^{2}}{\ell}, -0.5, 1\right) \cdot \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 3
Error29.84%
Cost21712
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ t_2 := 1 - 0.5 \cdot \left(h \cdot \left(t_1 \cdot \frac{t_1}{\ell}\right)\right)\\ \mathbf{if}\;d \leq -1.15 \cdot 10^{+176}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -1.35 \cdot 10^{-94}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\frac{d}{M} \cdot \frac{d}{M}}{h} \cdot \frac{\ell}{D}} \cdot -0.25\right)\right)\\ \mathbf{elif}\;d \leq 1.38 \cdot 10^{+72}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 4
Error33.16%
Cost21580
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ \mathbf{if}\;d \leq -3 \cdot 10^{+177}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -8.8 \cdot 10^{-95}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(h \cdot \left(t_1 \cdot \frac{t_1}{\ell}\right)\right)\right) \cdot \left(t_0 \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\frac{d}{M} \cdot \frac{d}{M}}{h} \cdot \frac{\ell}{D}} \cdot -0.25\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 5
Error30.76%
Cost20872
\[\begin{array}{l} t_0 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ \mathbf{if}\;d \leq -2.8 \cdot 10^{+176}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-296}:\\ \;\;\;\;\left(1 - 0.5 \cdot \left(h \cdot \left(t_0 \cdot \frac{t_0}{\ell}\right)\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {t_0}^{2}\right)\right)\\ \end{array} \]
Alternative 6
Error32.97%
Cost15448
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -9.5 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -4.7 \cdot 10^{-150}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \frac{D \cdot \left(h \cdot \left(D \cdot \frac{M}{d \cdot 2}\right)\right)}{\ell \cdot \frac{d \cdot 2}{M}}\right)\\ \mathbf{elif}\;d \leq -1.2 \cdot 10^{-288}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_0 \cdot \left(1 + 0.5 \cdot \left(\frac{D}{\frac{\frac{d}{M} \cdot \frac{d}{M}}{h} \cdot \frac{\ell}{D}} \cdot -0.25\right)\right)\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\ \mathbf{elif}\;d \leq 7.8 \cdot 10^{+71}:\\ \;\;\;\;t_0 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot M}{d \cdot \left(d \cdot \ell\right)} \cdot \left(h \cdot \left(D \cdot M\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 7
Error32.86%
Cost15316
\[\begin{array}{l} t_0 := \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot M}{d \cdot \left(d \cdot \ell\right)} \cdot \left(h \cdot \left(D \cdot M\right)\right)\right)\right)\right)\\ t_1 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -7.5 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -1.3 \cdot 10^{-127}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\ \mathbf{elif}\;d \leq 1.38 \cdot 10^{+72}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 8
Error31.43%
Cost15312
\[\begin{array}{l} t_0 := D \cdot \left(M \cdot \frac{0.5}{d}\right)\\ t_1 := \left(1 - 0.5 \cdot \left(h \cdot \left(t_0 \cdot \frac{t_0}{\ell}\right)\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{if}\;d \leq -7.5 \cdot 10^{+175}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-309}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\ \mathbf{elif}\;d \leq 5.4 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 9
Error35.29%
Cost14920
\[\begin{array}{l} t_0 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -7.5 \cdot 10^{+175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-156}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\left(h \cdot \frac{D \cdot \left(D \cdot M\right)}{\ell}\right) \cdot \frac{M}{d \cdot d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.5 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 10
Error36.64%
Cost14600
\[\begin{array}{l} t_0 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -4.9 \cdot 10^{+101}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -4.5 \cdot 10^{-94}:\\ \;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 11
Error37.45%
Cost13644
\[\begin{array}{l} t_0 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -2.7 \cdot 10^{+76}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-95}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.6 \cdot 10^{-290}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 12
Error35.59%
Cost13644
\[\begin{array}{l} t_0 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -1.15 \cdot 10^{+78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{-291}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 13
Error37.48%
Cost13516
\[\begin{array}{l} t_0 := \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;d \leq -2.1 \cdot 10^{+78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-96}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 14
Error43.15%
Cost7180
\[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ t_1 := \frac{-d}{t_0}\\ \mathbf{if}\;d \leq -7.8 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -2.7 \cdot 10^{-96}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq -2.05 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t_0}\\ \end{array} \]
Alternative 15
Error42.4%
Cost6916
\[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;d \leq -2.05 \cdot 10^{-282}:\\ \;\;\;\;\frac{-d}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t_0}\\ \end{array} \]
Alternative 16
Error68.93%
Cost6720
\[\frac{d}{\sqrt{\ell \cdot h}} \]

Error

Reproduce?

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