Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.2% → 76.2%
Time: 33.9s
Alternatives: 31
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \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) \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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 31 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 66.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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) \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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Alternative 1: 76.2% accurate, 0.6× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot {\left(\frac{-1}{d}\right)}^{-0.25}\right)}^{2}\right) \cdot \left(1 - t_0 \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (pow (* (/ M 2.0) (/ D d)) 2.0)))
   (if (<= d -1.35e-64)
     (*
      (*
       (sqrt (/ d h))
       (pow (* (pow (/ -1.0 l) 0.25) (pow (/ -1.0 d) -0.25)) 2.0))
      (- 1.0 (* t_0 (* 0.5 (/ h l)))))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125))))
       (*
        (/ (sqrt d) (sqrt h))
        (* (/ (sqrt d) (sqrt l)) (- 1.0 (* 0.5 (* t_0 (/ h l))))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = pow(((M / 2.0) * (D / d)), 2.0);
	double tmp;
	if (d <= -1.35e-64) {
		tmp = (sqrt((d / h)) * pow((pow((-1.0 / l), 0.25) * pow((-1.0 / d), -0.25)), 2.0)) * (1.0 - (t_0 * (0.5 * (h / l))));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else {
		tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = ((m / 2.0d0) * (d_1 / d)) ** 2.0d0
    if (d <= (-1.35d-64)) then
        tmp = (sqrt((d / h)) * (((((-1.0d0) / l) ** 0.25d0) * (((-1.0d0) / d) ** (-0.25d0))) ** 2.0d0)) * (1.0d0 - (t_0 * (0.5d0 * (h / l))))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)))
    else
        tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0d0 - (0.5d0 * (t_0 * (h / l)))))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.pow(((M / 2.0) * (D / d)), 2.0);
	double tmp;
	if (d <= -1.35e-64) {
		tmp = (Math.sqrt((d / h)) * Math.pow((Math.pow((-1.0 / l), 0.25) * Math.pow((-1.0 / d), -0.25)), 2.0)) * (1.0 - (t_0 * (0.5 * (h / l))));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else {
		tmp = (Math.sqrt(d) / Math.sqrt(h)) * ((Math.sqrt(d) / Math.sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.pow(((M / 2.0) * (D / d)), 2.0)
	tmp = 0
	if d <= -1.35e-64:
		tmp = (math.sqrt((d / h)) * math.pow((math.pow((-1.0 / l), 0.25) * math.pow((-1.0 / d), -0.25)), 2.0)) * (1.0 - (t_0 * (0.5 * (h / l))))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)))
	else:
		tmp = (math.sqrt(d) / math.sqrt(h)) * ((math.sqrt(d) / math.sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0
	tmp = 0.0
	if (d <= -1.35e-64)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * (Float64((Float64(-1.0 / l) ^ 0.25) * (Float64(-1.0 / d) ^ -0.25)) ^ 2.0)) * Float64(1.0 - Float64(t_0 * Float64(0.5 * Float64(h / l)))));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))));
	else
		tmp = Float64(Float64(sqrt(d) / sqrt(h)) * Float64(Float64(sqrt(d) / sqrt(l)) * Float64(1.0 - Float64(0.5 * Float64(t_0 * Float64(h / l))))));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = ((M / 2.0) * (D / d)) ^ 2.0;
	tmp = 0.0;
	if (d <= -1.35e-64)
		tmp = (sqrt((d / h)) * ((((-1.0 / l) ^ 0.25) * ((-1.0 / d) ^ -0.25)) ^ 2.0)) * (1.0 - (t_0 * (0.5 * (h / l))));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	else
		tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[d, -1.35e-64], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Power[N[(N[Power[N[(-1.0 / l), $MachinePrecision], 0.25], $MachinePrecision] * N[Power[N[(-1.0 / d), $MachinePrecision], -0.25], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(t$95$0 * N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}\\
\mathbf{if}\;d \leq -1.35 \cdot 10^{-64}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot {\left(\frac{-1}{d}\right)}^{-0.25}\right)}^{2}\right) \cdot \left(1 - t_0 \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -1.34999999999999993e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. pow1/280.9%

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(\frac{-1}{\ell}\right) + -1 \cdot \log \left(\frac{-1}{d}\right)\right)}\right)}}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    7. Step-by-step derivation
      1. distribute-lft-in81.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left(e^{\color{blue}{0.25 \cdot \log \left(\frac{-1}{\ell}\right) + 0.25 \cdot \left(-1 \cdot \log \left(\frac{-1}{d}\right)\right)}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. exp-sum82.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\color{blue}{\left(e^{0.25 \cdot \log \left(\frac{-1}{\ell}\right)} \cdot e^{0.25 \cdot \left(-1 \cdot \log \left(\frac{-1}{d}\right)\right)}\right)}}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. *-commutative82.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left(e^{\color{blue}{\log \left(\frac{-1}{\ell}\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(-1 \cdot \log \left(\frac{-1}{d}\right)\right)}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. exp-to-pow83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left(\color{blue}{{\left(\frac{-1}{\ell}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(-1 \cdot \log \left(\frac{-1}{d}\right)\right)}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      5. *-commutative83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\color{blue}{\left(-1 \cdot \log \left(\frac{-1}{d}\right)\right) \cdot 0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      6. *-commutative83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(\frac{-1}{d}\right) \cdot -1\right)} \cdot 0.25}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      7. associate-*l*83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\color{blue}{\log \left(\frac{-1}{d}\right) \cdot \left(-1 \cdot 0.25\right)}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{d}\right) \cdot \color{blue}{-0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      9. metadata-eval83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{d}\right) \cdot \color{blue}{\frac{-0.5}{2}}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      10. metadata-eval83.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{d}\right) \cdot \frac{\color{blue}{\frac{-1}{2}}}{2}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      11. exp-to-pow85.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot \color{blue}{{\left(\frac{-1}{d}\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      12. metadata-eval85.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot {\left(\frac{-1}{d}\right)}^{\left(\frac{\color{blue}{-0.5}}{2}\right)}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      13. metadata-eval85.3%

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

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

    if -1.34999999999999993e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d

    1. Initial program 64.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. Step-by-step derivation
      1. associate-*l*64.0%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval64.0%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/264.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval64.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*64.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval64.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac63.4%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified63.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div71.2%

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

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right) \]
    6. Step-by-step derivation
      1. sqrt-div78.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.35 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{-1}{\ell}\right)}^{0.25} \cdot {\left(\frac{-1}{d}\right)}^{-0.25}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\ \end{array} \]

Alternative 2: 76.3% accurate, 0.6× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -3.2 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= d -3.2e-64)
   (*
    (* (sqrt (/ d h)) (sqrt (/ d l)))
    (- 1.0 (/ (* h (* 0.5 (pow (* M (/ D (* d 2.0))) 2.0))) l)))
   (if (<= d -5e-310)
     (*
      (* d (sqrt (/ 1.0 (* h l))))
      (+ -1.0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125))))
     (*
      (/ (sqrt d) (sqrt h))
      (*
       (/ (sqrt d) (sqrt l))
       (- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= -3.2e-64) {
		tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - ((h * (0.5 * pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else {
		tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    if (d <= (-3.2d-64)) then
        tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0d0 - ((h * (0.5d0 * ((m * (d_1 / (d * 2.0d0))) ** 2.0d0))) / l))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)))
    else
        tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= -3.2e-64) {
		tmp = (Math.sqrt((d / h)) * Math.sqrt((d / l))) * (1.0 - ((h * (0.5 * Math.pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else {
		tmp = (Math.sqrt(d) / Math.sqrt(h)) * ((Math.sqrt(d) / Math.sqrt(l)) * (1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	tmp = 0
	if d <= -3.2e-64:
		tmp = (math.sqrt((d / h)) * math.sqrt((d / l))) * (1.0 - ((h * (0.5 * math.pow((M * (D / (d * 2.0))), 2.0))) / l))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)))
	else:
		tmp = (math.sqrt(d) / math.sqrt(h)) * ((math.sqrt(d) / math.sqrt(l)) * (1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (d <= -3.2e-64)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))) / l)));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))));
	else
		tmp = Float64(Float64(sqrt(d) / sqrt(h)) * Float64(Float64(sqrt(d) / sqrt(l)) * Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l))))));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (d <= -3.2e-64)
		tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - ((h * (0.5 * ((M * (D / (d * 2.0))) ^ 2.0))) / l));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	else
		tmp = (sqrt(d) / sqrt(h)) * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -3.2e-64], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -3.2 \cdot 10^{-64}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -3.19999999999999975e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

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

    if -3.19999999999999975e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d

    1. Initial program 64.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. Step-by-step derivation
      1. associate-*l*64.0%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval64.0%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/264.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval64.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*64.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval64.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac63.4%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified63.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div71.2%

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

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right) \]
    6. Step-by-step derivation
      1. sqrt-div78.7%

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

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

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

Alternative 3: 70.5% accurate, 0.8× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}\\ t_1 := \frac{\sqrt{d}}{\sqrt{h}}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \frac{M}{\frac{d}{M}}\\ t_4 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(t_2 \cdot t_4\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_3 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 6.4 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_3\right)\right)\right)\\ \mathbf{elif}\;d \leq 3.4 \cdot 10^{-121}:\\ \;\;\;\;\left(1 - t_0 \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \left(t_1 \cdot t_4\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\ \;\;\;\;t_1 \cdot \left(t_4 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+148}:\\ \;\;\;\;t_2 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (pow (* (/ M 2.0) (/ D d)) 2.0))
        (t_1 (/ (sqrt d) (sqrt h)))
        (t_2 (sqrt (/ d h)))
        (t_3 (/ M (/ d M)))
        (t_4 (sqrt (/ d l))))
   (if (<= d -1.26e-64)
     (*
      (* t_2 t_4)
      (- 1.0 (/ (* h (* 0.5 (pow (* M (/ D (* d 2.0))) 2.0))) l)))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_3 (/ h d)) 0.125))))
       (if (<= d 6.4e-226)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_3))))
         (if (<= d 3.4e-121)
           (* (- 1.0 (* t_0 (* 0.5 (/ h l)))) (* t_1 t_4))
           (if (<= d 2.2e-94)
             (*
              t_1
              (*
               t_4
               (-
                1.0
                (* 0.5 (* 0.25 (* (/ (* D D) (/ d (* M M))) (/ h (* d l))))))))
             (if (<= d 2.3e+148)
               (*
                t_2
                (* (/ (sqrt d) (sqrt l)) (- 1.0 (* 0.5 (* t_0 (/ h l))))))
               (/ d (* (sqrt h) (sqrt l)))))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = pow(((M / 2.0) * (D / d)), 2.0);
	double t_1 = sqrt(d) / sqrt(h);
	double t_2 = sqrt((d / h));
	double t_3 = M / (d / M);
	double t_4 = sqrt((d / l));
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (t_2 * t_4) * (1.0 - ((h * (0.5 * pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	} else if (d <= 6.4e-226) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_3)));
	} else if (d <= 3.4e-121) {
		tmp = (1.0 - (t_0 * (0.5 * (h / l)))) * (t_1 * t_4);
	} else if (d <= 2.2e-94) {
		tmp = t_1 * (t_4 * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	} else if (d <= 2.3e+148) {
		tmp = t_2 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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 = ((m / 2.0d0) * (d_1 / d)) ** 2.0d0
    t_1 = sqrt(d) / sqrt(h)
    t_2 = sqrt((d / h))
    t_3 = m / (d / m)
    t_4 = sqrt((d / l))
    if (d <= (-1.26d-64)) then
        tmp = (t_2 * t_4) * (1.0d0 - ((h * (0.5d0 * ((m * (d_1 / (d * 2.0d0))) ** 2.0d0))) / l))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_3 * (h / d)) * 0.125d0)))
    else if (d <= 6.4d-226) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_3)))
    else if (d <= 3.4d-121) then
        tmp = (1.0d0 - (t_0 * (0.5d0 * (h / l)))) * (t_1 * t_4)
    else if (d <= 2.2d-94) then
        tmp = t_1 * (t_4 * (1.0d0 - (0.5d0 * (0.25d0 * (((d_1 * d_1) / (d / (m * m))) * (h / (d * l)))))))
    else if (d <= 2.3d+148) then
        tmp = t_2 * ((sqrt(d) / sqrt(l)) * (1.0d0 - (0.5d0 * (t_0 * (h / l)))))
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.pow(((M / 2.0) * (D / d)), 2.0);
	double t_1 = Math.sqrt(d) / Math.sqrt(h);
	double t_2 = Math.sqrt((d / h));
	double t_3 = M / (d / M);
	double t_4 = Math.sqrt((d / l));
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (t_2 * t_4) * (1.0 - ((h * (0.5 * Math.pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	} else if (d <= 6.4e-226) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_3)));
	} else if (d <= 3.4e-121) {
		tmp = (1.0 - (t_0 * (0.5 * (h / l)))) * (t_1 * t_4);
	} else if (d <= 2.2e-94) {
		tmp = t_1 * (t_4 * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	} else if (d <= 2.3e+148) {
		tmp = t_2 * ((Math.sqrt(d) / Math.sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.pow(((M / 2.0) * (D / d)), 2.0)
	t_1 = math.sqrt(d) / math.sqrt(h)
	t_2 = math.sqrt((d / h))
	t_3 = M / (d / M)
	t_4 = math.sqrt((d / l))
	tmp = 0
	if d <= -1.26e-64:
		tmp = (t_2 * t_4) * (1.0 - ((h * (0.5 * math.pow((M * (D / (d * 2.0))), 2.0))) / l))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)))
	elif d <= 6.4e-226:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_3)))
	elif d <= 3.4e-121:
		tmp = (1.0 - (t_0 * (0.5 * (h / l)))) * (t_1 * t_4)
	elif d <= 2.2e-94:
		tmp = t_1 * (t_4 * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))))
	elif d <= 2.3e+148:
		tmp = t_2 * ((math.sqrt(d) / math.sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))))
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0
	t_1 = Float64(sqrt(d) / sqrt(h))
	t_2 = sqrt(Float64(d / h))
	t_3 = Float64(M / Float64(d / M))
	t_4 = sqrt(Float64(d / l))
	tmp = 0.0
	if (d <= -1.26e-64)
		tmp = Float64(Float64(t_2 * t_4) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))) / l)));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_3 * Float64(h / d)) * 0.125))));
	elseif (d <= 6.4e-226)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_3))));
	elseif (d <= 3.4e-121)
		tmp = Float64(Float64(1.0 - Float64(t_0 * Float64(0.5 * Float64(h / l)))) * Float64(t_1 * t_4));
	elseif (d <= 2.2e-94)
		tmp = Float64(t_1 * Float64(t_4 * Float64(1.0 - Float64(0.5 * Float64(0.25 * Float64(Float64(Float64(D * D) / Float64(d / Float64(M * M))) * Float64(h / Float64(d * l))))))));
	elseif (d <= 2.3e+148)
		tmp = Float64(t_2 * Float64(Float64(sqrt(d) / sqrt(l)) * Float64(1.0 - Float64(0.5 * Float64(t_0 * Float64(h / l))))));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = ((M / 2.0) * (D / d)) ^ 2.0;
	t_1 = sqrt(d) / sqrt(h);
	t_2 = sqrt((d / h));
	t_3 = M / (d / M);
	t_4 = sqrt((d / l));
	tmp = 0.0;
	if (d <= -1.26e-64)
		tmp = (t_2 * t_4) * (1.0 - ((h * (0.5 * ((M * (D / (d * 2.0))) ^ 2.0))) / l));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	elseif (d <= 6.4e-226)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_3)));
	elseif (d <= 3.4e-121)
		tmp = (1.0 - (t_0 * (0.5 * (h / l)))) * (t_1 * t_4);
	elseif (d <= 2.2e-94)
		tmp = t_1 * (t_4 * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	elseif (d <= 2.3e+148)
		tmp = t_2 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (t_0 * (h / l)))));
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.26e-64], N[(N[(t$95$2 * t$95$4), $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.4e-226], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.4e-121], N[(N[(1.0 - N[(t$95$0 * N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.2e-94], N[(t$95$1 * N[(t$95$4 * N[(1.0 - N[(0.5 * N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e+148], N[(t$95$2 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}\\
t_1 := \frac{\sqrt{d}}{\sqrt{h}}\\
t_2 := \sqrt{\frac{d}{h}}\\
t_3 := \frac{M}{\frac{d}{M}}\\
t_4 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\
\;\;\;\;\left(t_2 \cdot t_4\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_3 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 6.4 \cdot 10^{-226}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_3\right)\right)\right)\\

\mathbf{elif}\;d \leq 3.4 \cdot 10^{-121}:\\
\;\;\;\;\left(1 - t_0 \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \left(t_1 \cdot t_4\right)\\

\mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\
\;\;\;\;t_1 \cdot \left(t_4 \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\

\mathbf{elif}\;d \leq 2.3 \cdot 10^{+148}:\\
\;\;\;\;t_2 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(t_0 \cdot \frac{h}{\ell}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if d < -1.2599999999999999e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

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

    if -1.2599999999999999e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 6.39999999999999965e-226

    1. Initial program 39.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. Step-by-step derivation
      1. metadata-eval39.3%

        \[\leadsto \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) \]
      2. unpow1/239.3%

        \[\leadsto \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) \]
      3. metadata-eval39.3%

        \[\leadsto \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) \]
      4. unpow1/239.3%

        \[\leadsto \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) \]
      5. *-commutative39.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*39.3%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*36.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/39.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval39.4%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/36.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 46.8%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*46.8%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative46.8%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/46.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*50.5%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*57.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified57.8%

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

    if 6.39999999999999965e-226 < d < 3.40000000000000001e-121

    1. Initial program 58.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. Step-by-step derivation
      1. metadata-eval58.5%

        \[\leadsto \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) \]
      2. unpow1/258.5%

        \[\leadsto \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) \]
      3. metadata-eval58.5%

        \[\leadsto \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) \]
      4. unpow1/258.5%

        \[\leadsto \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) \]
      5. *-commutative58.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*58.5%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div66.2%

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

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

    if 3.40000000000000001e-121 < d < 2.20000000000000001e-94

    1. Initial program 39.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. Step-by-step derivation
      1. associate-*l*39.0%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval39.0%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/239.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval39.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*39.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval39.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac39.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified39.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div64.0%

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

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right) \]
    6. Taylor expanded in M around 0 75.8%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\left(0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}\right)}\right)\right) \]
    7. Step-by-step derivation
      1. associate-*r/75.8%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{0.25 \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right) \]
      3. associate-*r/75.8%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\left(0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. associate-*r*88.2%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}{\color{blue}{\left(d \cdot d\right)} \cdot \ell}\right)\right)\right) \]
      6. associate-*l*88.2%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}{\color{blue}{d \cdot \left(d \cdot \ell\right)}}\right)\right)\right) \]
      7. times-frac88.0%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \frac{h}{d \cdot \ell}\right)}\right)\right)\right) \]
      8. associate-/l*88.2%

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

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

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

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

    if 2.20000000000000001e-94 < d < 2.3000000000000001e148

    1. Initial program 80.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. Step-by-step derivation
      1. associate-*l*80.7%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval80.7%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/280.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval80.7%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*80.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval80.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac80.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified80.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div88.7%

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

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

    if 2.3000000000000001e148 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification77.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 6.4 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 3.4 \cdot 10^{-121}:\\ \;\;\;\;\left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 4: 73.1% accurate, 0.8× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \frac{\sqrt{d}}{\sqrt{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot t_1\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\ \;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_1\right)\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (sqrt d) (sqrt h))) (t_1 (sqrt (/ d l))))
   (if (<= d -1.26e-64)
     (*
      (* (sqrt (/ d h)) t_1)
      (- 1.0 (/ (* h (* 0.5 (pow (* M (/ D (* d 2.0))) 2.0))) l)))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125))))
       (if (<= d 7e-226)
         (*
          t_0
          (*
           (/ (sqrt d) (sqrt l))
           (-
            1.0
            (* 0.5 (* 0.25 (* (/ (* D D) (/ d (* M M))) (/ h (* d l))))))))
         (*
          t_0
          (*
           (- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l))))
           t_1)))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(d) / sqrt(h);
	double t_1 = sqrt((d / l));
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (sqrt((d / h)) * t_1) * (1.0 - ((h * (0.5 * pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else if (d <= 7e-226) {
		tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	} else {
		tmp = t_0 * ((1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_1);
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = sqrt(d) / sqrt(h)
    t_1 = sqrt((d / l))
    if (d <= (-1.26d-64)) then
        tmp = (sqrt((d / h)) * t_1) * (1.0d0 - ((h * (0.5d0 * ((m * (d_1 / (d * 2.0d0))) ** 2.0d0))) / l))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)))
    else if (d <= 7d-226) then
        tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0d0 - (0.5d0 * (0.25d0 * (((d_1 * d_1) / (d / (m * m))) * (h / (d * l)))))))
    else
        tmp = t_0 * ((1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))) * t_1)
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(d) / Math.sqrt(h);
	double t_1 = Math.sqrt((d / l));
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (Math.sqrt((d / h)) * t_1) * (1.0 - ((h * (0.5 * Math.pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	} else if (d <= 7e-226) {
		tmp = t_0 * ((Math.sqrt(d) / Math.sqrt(l)) * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	} else {
		tmp = t_0 * ((1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_1);
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt(d) / math.sqrt(h)
	t_1 = math.sqrt((d / l))
	tmp = 0
	if d <= -1.26e-64:
		tmp = (math.sqrt((d / h)) * t_1) * (1.0 - ((h * (0.5 * math.pow((M * (D / (d * 2.0))), 2.0))) / l))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)))
	elif d <= 7e-226:
		tmp = t_0 * ((math.sqrt(d) / math.sqrt(l)) * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))))
	else:
		tmp = t_0 * ((1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_1)
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(sqrt(d) / sqrt(h))
	t_1 = sqrt(Float64(d / l))
	tmp = 0.0
	if (d <= -1.26e-64)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * t_1) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))) / l)));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))));
	elseif (d <= 7e-226)
		tmp = Float64(t_0 * Float64(Float64(sqrt(d) / sqrt(l)) * Float64(1.0 - Float64(0.5 * Float64(0.25 * Float64(Float64(Float64(D * D) / Float64(d / Float64(M * M))) * Float64(h / Float64(d * l))))))));
	else
		tmp = Float64(t_0 * Float64(Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)))) * t_1));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(d) / sqrt(h);
	t_1 = sqrt((d / l));
	tmp = 0.0;
	if (d <= -1.26e-64)
		tmp = (sqrt((d / h)) * t_1) * (1.0 - ((h * (0.5 * ((M * (D / (d * 2.0))) ^ 2.0))) / l));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)));
	elseif (d <= 7e-226)
		tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (0.25 * (((D * D) / (d / (M * M))) * (h / (d * l)))))));
	else
		tmp = t_0 * ((1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))) * t_1);
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.26e-64], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7e-226], N[(t$95$0 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \frac{\sqrt{d}}{\sqrt{h}}\\
t_1 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot t_1\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\

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

\mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\
\;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.2599999999999999e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

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

    if -1.2599999999999999e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 7e-226

    1. Initial program 39.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. Step-by-step derivation
      1. associate-*l*39.3%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval39.3%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/239.3%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*39.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval39.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac36.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified36.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div43.8%

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

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right) \]
    6. Taylor expanded in M around 0 21.6%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\left(0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}\right)}\right)\right) \]
    7. Step-by-step derivation
      1. associate-*r/21.6%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{0.25 \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right) \]
      3. associate-*r/21.6%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\left(0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. associate-*r*21.4%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}{\color{blue}{\left(d \cdot d\right)} \cdot \ell}\right)\right)\right) \]
      6. associate-*l*25.4%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \frac{h}{d \cdot \ell}\right)}\right)\right)\right) \]
      8. associate-/l*39.5%

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

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

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

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)}\right)\right) \]
    9. Step-by-step derivation
      1. sqrt-div58.1%

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

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

    if 7e-226 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. associate-*l*69.7%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval69.7%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/269.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval69.7%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*69.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval69.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac69.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified69.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div77.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left(0.25 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \frac{h}{d \cdot \ell}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right)\\ \end{array} \]

Alternative 5: 71.0% accurate, 0.8× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(t_0 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 9.2 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 5.7 \cdot 10^{+150} \lor \neg \left(d \leq 7.5 \cdot 10^{+206}\right):\\ \;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ d h))) (t_1 (/ M (/ d M))))
   (if (<= d -1.26e-64)
     (*
      (* t_0 (sqrt (/ d l)))
      (- 1.0 (/ (* h (* 0.5 (pow (* M (/ D (* d 2.0))) 2.0))) l)))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 9.2e-226)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (or (<= d 5.7e+150) (not (<= d 7.5e+206)))
           (*
            t_0
            (*
             (/ (sqrt d) (sqrt l))
             (- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l))))))
           (* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (t_0 * sqrt((d / l))) * (1.0 - ((h * (0.5 * pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 9.2e-226) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if ((d <= 5.7e+150) || !(d <= 7.5e+206)) {
		tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
	} else {
		tmp = d * (sqrt((1.0 / l)) / sqrt(h));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = sqrt((d / h))
    t_1 = m / (d / m)
    if (d <= (-1.26d-64)) then
        tmp = (t_0 * sqrt((d / l))) * (1.0d0 - ((h * (0.5d0 * ((m * (d_1 / (d * 2.0d0))) ** 2.0d0))) / l))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 9.2d-226) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if ((d <= 5.7d+150) .or. (.not. (d <= 7.5d+206))) then
        tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))))
    else
        tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((d / h));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.26e-64) {
		tmp = (t_0 * Math.sqrt((d / l))) * (1.0 - ((h * (0.5 * Math.pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 9.2e-226) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if ((d <= 5.7e+150) || !(d <= 7.5e+206)) {
		tmp = t_0 * ((Math.sqrt(d) / Math.sqrt(l)) * (1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
	} else {
		tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / h))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -1.26e-64:
		tmp = (t_0 * math.sqrt((d / l))) * (1.0 - ((h * (0.5 * math.pow((M * (D / (d * 2.0))), 2.0))) / l))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 9.2e-226:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif (d <= 5.7e+150) or not (d <= 7.5e+206):
		tmp = t_0 * ((math.sqrt(d) / math.sqrt(l)) * (1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))))
	else:
		tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(d / h))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -1.26e-64)
		tmp = Float64(Float64(t_0 * sqrt(Float64(d / l))) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))) / l)));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 9.2e-226)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif ((d <= 5.7e+150) || !(d <= 7.5e+206))
		tmp = Float64(t_0 * Float64(Float64(sqrt(d) / sqrt(l)) * Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l))))));
	else
		tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / h));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -1.26e-64)
		tmp = (t_0 * sqrt((d / l))) * (1.0 - ((h * (0.5 * ((M * (D / (d * 2.0))) ^ 2.0))) / l));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 9.2e-226)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif ((d <= 5.7e+150) || ~((d <= 7.5e+206)))
		tmp = t_0 * ((sqrt(d) / sqrt(l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))));
	else
		tmp = d * (sqrt((1.0 / l)) / sqrt(h));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.26e-64], N[(N[(t$95$0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.2e-226], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[d, 5.7e+150], N[Not[LessEqual[d, 7.5e+206]], $MachinePrecision]], N[(t$95$0 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\
\;\;\;\;\left(t_0 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 9.2 \cdot 10^{-226}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 5.7 \cdot 10^{+150} \lor \neg \left(d \leq 7.5 \cdot 10^{+206}\right):\\
\;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -1.2599999999999999e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

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

    if -1.2599999999999999e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 9.2000000000000001e-226

    1. Initial program 39.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. Step-by-step derivation
      1. metadata-eval39.3%

        \[\leadsto \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) \]
      2. unpow1/239.3%

        \[\leadsto \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) \]
      3. metadata-eval39.3%

        \[\leadsto \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) \]
      4. unpow1/239.3%

        \[\leadsto \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) \]
      5. *-commutative39.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*39.3%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*36.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/39.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval39.4%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/36.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 46.8%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*46.8%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative46.8%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/46.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*50.5%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*57.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified57.8%

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

    if 9.2000000000000001e-226 < d < 5.7000000000000002e150 or 7.49999999999999958e206 < d

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l*72.3%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval72.3%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/272.3%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*72.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval72.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac72.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified72.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div85.2%

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

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

    if 5.7000000000000002e150 < d < 7.49999999999999958e206

    1. Initial program 47.3%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf 62.2%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    3. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. associate-/r*62.2%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    4. Simplified62.2%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
    5. Step-by-step derivation
      1. sqrt-div84.1%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}} \]
    6. Applied egg-rr84.1%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification76.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.26 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 9.2 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 5.7 \cdot 10^{+150} \lor \neg \left(d \leq 7.5 \cdot 10^{+206}\right):\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]

Alternative 6: 68.0% accurate, 1.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{h}{{\ell}^{3}}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := t_1 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_2\right)\\ t_4 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -1.05 \cdot 10^{-63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_4 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 10^{-225}:\\ \;\;\;\;t_0 \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_4\right)\right)\right)\\ \mathbf{elif}\;d \leq 3.9 \cdot 10^{-141}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;t_0 \cdot \left(-0.125 \cdot \frac{{\left(M \cdot D\right)}^{2}}{d}\right)\\ \mathbf{elif}\;d \leq 1.22 \cdot 10^{+149}:\\ \;\;\;\;\left(t_1 \cdot t_2\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ h (pow l 3.0))))
        (t_1 (sqrt (/ d h)))
        (t_2 (sqrt (/ d l)))
        (t_3
         (*
          t_1
          (* (- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))) t_2)))
        (t_4 (/ M (/ d M))))
   (if (<= d -1.05e-63)
     t_3
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_4 (/ h d)) 0.125))))
       (if (<= d 1e-225)
         (* t_0 (* -0.125 (* D (* D t_4))))
         (if (<= d 3.9e-141)
           t_3
           (if (<= d 1.55e-107)
             (* t_0 (* -0.125 (/ (pow (* M D) 2.0) d)))
             (if (<= d 1.22e+149)
               (*
                (* t_1 t_2)
                (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))))
               (/ d (* (sqrt h) (sqrt l)))))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((h / pow(l, 3.0)));
	double t_1 = sqrt((d / h));
	double t_2 = sqrt((d / l));
	double t_3 = t_1 * ((1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_2);
	double t_4 = M / (d / M);
	double tmp;
	if (d <= -1.05e-63) {
		tmp = t_3;
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_4 * (h / d)) * 0.125)));
	} else if (d <= 1e-225) {
		tmp = t_0 * (-0.125 * (D * (D * t_4)));
	} else if (d <= 3.9e-141) {
		tmp = t_3;
	} else if (d <= 1.55e-107) {
		tmp = t_0 * (-0.125 * (pow((M * D), 2.0) / d));
	} else if (d <= 1.22e+149) {
		tmp = (t_1 * t_2) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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 = sqrt((h / (l ** 3.0d0)))
    t_1 = sqrt((d / h))
    t_2 = sqrt((d / l))
    t_3 = t_1 * ((1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))) * t_2)
    t_4 = m / (d / m)
    if (d <= (-1.05d-63)) then
        tmp = t_3
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_4 * (h / d)) * 0.125d0)))
    else if (d <= 1d-225) then
        tmp = t_0 * ((-0.125d0) * (d_1 * (d_1 * t_4)))
    else if (d <= 3.9d-141) then
        tmp = t_3
    else if (d <= 1.55d-107) then
        tmp = t_0 * ((-0.125d0) * (((m * d_1) ** 2.0d0) / d))
    else if (d <= 1.22d+149) then
        tmp = (t_1 * t_2) * (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1))))
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((h / Math.pow(l, 3.0)));
	double t_1 = Math.sqrt((d / h));
	double t_2 = Math.sqrt((d / l));
	double t_3 = t_1 * ((1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_2);
	double t_4 = M / (d / M);
	double tmp;
	if (d <= -1.05e-63) {
		tmp = t_3;
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_4 * (h / d)) * 0.125)));
	} else if (d <= 1e-225) {
		tmp = t_0 * (-0.125 * (D * (D * t_4)));
	} else if (d <= 3.9e-141) {
		tmp = t_3;
	} else if (d <= 1.55e-107) {
		tmp = t_0 * (-0.125 * (Math.pow((M * D), 2.0) / d));
	} else if (d <= 1.22e+149) {
		tmp = (t_1 * t_2) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt((h / math.pow(l, 3.0)))
	t_1 = math.sqrt((d / h))
	t_2 = math.sqrt((d / l))
	t_3 = t_1 * ((1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_2)
	t_4 = M / (d / M)
	tmp = 0
	if d <= -1.05e-63:
		tmp = t_3
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_4 * (h / d)) * 0.125)))
	elif d <= 1e-225:
		tmp = t_0 * (-0.125 * (D * (D * t_4)))
	elif d <= 3.9e-141:
		tmp = t_3
	elif d <= 1.55e-107:
		tmp = t_0 * (-0.125 * (math.pow((M * D), 2.0) / d))
	elif d <= 1.22e+149:
		tmp = (t_1 * t_2) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))))
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(h / (l ^ 3.0)))
	t_1 = sqrt(Float64(d / h))
	t_2 = sqrt(Float64(d / l))
	t_3 = Float64(t_1 * Float64(Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)))) * t_2))
	t_4 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -1.05e-63)
		tmp = t_3;
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_4 * Float64(h / d)) * 0.125))));
	elseif (d <= 1e-225)
		tmp = Float64(t_0 * Float64(-0.125 * Float64(D * Float64(D * t_4))));
	elseif (d <= 3.9e-141)
		tmp = t_3;
	elseif (d <= 1.55e-107)
		tmp = Float64(t_0 * Float64(-0.125 * Float64((Float64(M * D) ^ 2.0) / d)));
	elseif (d <= 1.22e+149)
		tmp = Float64(Float64(t_1 * t_2) * Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((h / (l ^ 3.0)));
	t_1 = sqrt((d / h));
	t_2 = sqrt((d / l));
	t_3 = t_1 * ((1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))) * t_2);
	t_4 = M / (d / M);
	tmp = 0.0;
	if (d <= -1.05e-63)
		tmp = t_3;
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_4 * (h / d)) * 0.125)));
	elseif (d <= 1e-225)
		tmp = t_0 * (-0.125 * (D * (D * t_4)));
	elseif (d <= 3.9e-141)
		tmp = t_3;
	elseif (d <= 1.55e-107)
		tmp = t_0 * (-0.125 * (((M * D) ^ 2.0) / d));
	elseif (d <= 1.22e+149)
		tmp = (t_1 * t_2) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.05e-63], t$95$3, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$4 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1e-225], N[(t$95$0 * N[(-0.125 * N[(D * N[(D * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.9e-141], t$95$3, If[LessEqual[d, 1.55e-107], N[(t$95$0 * N[(-0.125 * N[(N[Power[N[(M * D), $MachinePrecision], 2.0], $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.22e+149], N[(N[(t$95$1 * t$95$2), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{{\ell}^{3}}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
t_3 := t_1 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_2\right)\\
t_4 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -1.05 \cdot 10^{-63}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_4 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 10^{-225}:\\
\;\;\;\;t_0 \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_4\right)\right)\right)\\

\mathbf{elif}\;d \leq 3.9 \cdot 10^{-141}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;t_0 \cdot \left(-0.125 \cdot \frac{{\left(M \cdot D\right)}^{2}}{d}\right)\\

\mathbf{elif}\;d \leq 1.22 \cdot 10^{+149}:\\
\;\;\;\;\left(t_1 \cdot t_2\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if d < -1.05e-63 or 9.9999999999999996e-226 < d < 3.8999999999999997e-141

    1. Initial program 78.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. Step-by-step derivation
      1. associate-*l*77.2%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval77.2%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/277.2%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*77.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval77.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac77.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified77.2%

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

    if -1.05e-63 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 9.9999999999999996e-226

    1. Initial program 39.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. Step-by-step derivation
      1. metadata-eval39.3%

        \[\leadsto \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) \]
      2. unpow1/239.3%

        \[\leadsto \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) \]
      3. metadata-eval39.3%

        \[\leadsto \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) \]
      4. unpow1/239.3%

        \[\leadsto \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) \]
      5. *-commutative39.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*39.3%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*36.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/39.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval39.4%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/36.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 46.8%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*46.8%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative46.8%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/46.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*50.5%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*57.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified57.8%

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

    if 3.8999999999999997e-141 < d < 1.55000000000000011e-107

    1. Initial program 24.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval24.1%

        \[\leadsto \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) \]
      2. unpow1/224.1%

        \[\leadsto \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) \]
      3. metadata-eval24.1%

        \[\leadsto \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) \]
      4. unpow1/224.1%

        \[\leadsto \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) \]
      5. *-commutative24.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*24.1%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval23.7%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*23.7%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/24.1%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/23.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/23.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/23.7%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in M around 0 12.0%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}}{\ell}\right) \]
    7. Step-by-step derivation
      1. associate-*r*23.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\color{blue}{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}}{{d}^{2}}}{\ell}\right) \]
      2. associate-/l*22.2%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{\color{blue}{d \cdot d}}{h}}}{\ell}\right) \]
      7. associate-/l*33.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\color{blue}{\frac{d}{\frac{h}{d}}}}}{\ell}\right) \]
    8. Simplified33.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.125 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{d}{\frac{h}{d}}}}}{\ell}\right) \]
    9. Taylor expanded in d around 0 34.2%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r*34.2%

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

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

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

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{\left(D \cdot D\right) \cdot \color{blue}{\left(M \cdot M\right)}}{d}\right) \]
      5. swap-sqr56.6%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{\color{blue}{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}}{d}\right) \]
      6. unpow256.6%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{\color{blue}{{\left(D \cdot M\right)}^{2}}}{d}\right) \]
    11. Simplified56.6%

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

    if 1.55000000000000011e-107 < d < 1.22e149

    1. Initial program 77.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval77.4%

        \[\leadsto \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) \]
      2. unpow1/277.4%

        \[\leadsto \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) \]
      3. metadata-eval77.4%

        \[\leadsto \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) \]
      4. unpow1/277.4%

        \[\leadsto \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) \]
      5. *-commutative77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval77.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Taylor expanded in M around 0 70.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. associate-*r/70.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      2. *-commutative70.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      3. associate-*r/70.8%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
    6. Simplified75.7%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{d \cdot d}\right) \cdot 0.125}\right) \]
    7. Taylor expanded in D around 0 70.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}} \cdot 0.125\right) \]
    8. Step-by-step derivation
      1. associate-/l*72.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}} \cdot 0.125\right) \]
      5. associate-/l*72.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}} \cdot 0.125\right) \]
      7. associate-/l*75.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}} \cdot 0.125\right) \]
      10. associate-*r*77.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}} \cdot 0.125\right) \]
      11. associate-/l*82.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}} \cdot 0.125\right) \]
      12. *-commutative82.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}} \cdot 0.125\right) \]
    9. Simplified82.3%

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

    if 1.22e149 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.05 \cdot 10^{-63}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 10^{-225}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 3.9 \cdot 10^{-141}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{\left(M \cdot D\right)}^{2}}{d}\right)\\ \mathbf{elif}\;d \leq 1.22 \cdot 10^{+149}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 7: 69.9% accurate, 1.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\\ t_1 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ t_2 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -3.2 \cdot 10^{-64}:\\ \;\;\;\;t_1 \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot t_0\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_2 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_2\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h \cdot \frac{\ell}{d}}} \cdot \left(1 + \frac{t_0 \cdot \left(h \cdot -0.5\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 1.3 \cdot 10^{+150}:\\ \;\;\;\;t_1 \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (pow (* M (/ D (* d 2.0))) 2.0))
        (t_1 (* (sqrt (/ d h)) (sqrt (/ d l))))
        (t_2 (/ M (/ d M))))
   (if (<= d -3.2e-64)
     (* t_1 (- 1.0 (/ (* h (* 0.5 t_0)) l)))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_2 (/ h d)) 0.125))))
       (if (<= d 7e-226)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_2))))
         (if (<= d 2.2e-94)
           (*
            (/ (sqrt d) (sqrt (* h (/ l d))))
            (+ 1.0 (/ (* t_0 (* h -0.5)) l)))
           (if (<= d 1.3e+150)
             (*
              t_1
              (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))))
             (/ d (* (sqrt h) (sqrt l))))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = pow((M * (D / (d * 2.0))), 2.0);
	double t_1 = sqrt((d / h)) * sqrt((d / l));
	double t_2 = M / (d / M);
	double tmp;
	if (d <= -3.2e-64) {
		tmp = t_1 * (1.0 - ((h * (0.5 * t_0)) / l));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_2 * (h / d)) * 0.125)));
	} else if (d <= 7e-226) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_2)));
	} else if (d <= 2.2e-94) {
		tmp = (sqrt(d) / sqrt((h * (l / d)))) * (1.0 + ((t_0 * (h * -0.5)) / l));
	} else if (d <= 1.3e+150) {
		tmp = t_1 * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (m * (d_1 / (d * 2.0d0))) ** 2.0d0
    t_1 = sqrt((d / h)) * sqrt((d / l))
    t_2 = m / (d / m)
    if (d <= (-3.2d-64)) then
        tmp = t_1 * (1.0d0 - ((h * (0.5d0 * t_0)) / l))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_2 * (h / d)) * 0.125d0)))
    else if (d <= 7d-226) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_2)))
    else if (d <= 2.2d-94) then
        tmp = (sqrt(d) / sqrt((h * (l / d)))) * (1.0d0 + ((t_0 * (h * (-0.5d0))) / l))
    else if (d <= 1.3d+150) then
        tmp = t_1 * (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1))))
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.pow((M * (D / (d * 2.0))), 2.0);
	double t_1 = Math.sqrt((d / h)) * Math.sqrt((d / l));
	double t_2 = M / (d / M);
	double tmp;
	if (d <= -3.2e-64) {
		tmp = t_1 * (1.0 - ((h * (0.5 * t_0)) / l));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_2 * (h / d)) * 0.125)));
	} else if (d <= 7e-226) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_2)));
	} else if (d <= 2.2e-94) {
		tmp = (Math.sqrt(d) / Math.sqrt((h * (l / d)))) * (1.0 + ((t_0 * (h * -0.5)) / l));
	} else if (d <= 1.3e+150) {
		tmp = t_1 * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.pow((M * (D / (d * 2.0))), 2.0)
	t_1 = math.sqrt((d / h)) * math.sqrt((d / l))
	t_2 = M / (d / M)
	tmp = 0
	if d <= -3.2e-64:
		tmp = t_1 * (1.0 - ((h * (0.5 * t_0)) / l))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_2 * (h / d)) * 0.125)))
	elif d <= 7e-226:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_2)))
	elif d <= 2.2e-94:
		tmp = (math.sqrt(d) / math.sqrt((h * (l / d)))) * (1.0 + ((t_0 * (h * -0.5)) / l))
	elif d <= 1.3e+150:
		tmp = t_1 * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))))
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0
	t_1 = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))
	t_2 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -3.2e-64)
		tmp = Float64(t_1 * Float64(1.0 - Float64(Float64(h * Float64(0.5 * t_0)) / l)));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_2 * Float64(h / d)) * 0.125))));
	elseif (d <= 7e-226)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_2))));
	elseif (d <= 2.2e-94)
		tmp = Float64(Float64(sqrt(d) / sqrt(Float64(h * Float64(l / d)))) * Float64(1.0 + Float64(Float64(t_0 * Float64(h * -0.5)) / l)));
	elseif (d <= 1.3e+150)
		tmp = Float64(t_1 * Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (M * (D / (d * 2.0))) ^ 2.0;
	t_1 = sqrt((d / h)) * sqrt((d / l));
	t_2 = M / (d / M);
	tmp = 0.0;
	if (d <= -3.2e-64)
		tmp = t_1 * (1.0 - ((h * (0.5 * t_0)) / l));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_2 * (h / d)) * 0.125)));
	elseif (d <= 7e-226)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_2)));
	elseif (d <= 2.2e-94)
		tmp = (sqrt(d) / sqrt((h * (l / d)))) * (1.0 + ((t_0 * (h * -0.5)) / l));
	elseif (d <= 1.3e+150)
		tmp = t_1 * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.2e-64], N[(t$95$1 * N[(1.0 - N[(N[(h * N[(0.5 * t$95$0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7e-226], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.2e-94], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[N[(h * N[(l / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(t$95$0 * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.3e+150], N[(t$95$1 * N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\\
t_1 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
t_2 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -3.2 \cdot 10^{-64}:\\
\;\;\;\;t_1 \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot t_0\right)}{\ell}\right)\\

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

\mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_2\right)\right)\right)\\

\mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{\sqrt{d}}{\sqrt{h \cdot \frac{\ell}{d}}} \cdot \left(1 + \frac{t_0 \cdot \left(h \cdot -0.5\right)}{\ell}\right)\\

\mathbf{elif}\;d \leq 1.3 \cdot 10^{+150}:\\
\;\;\;\;t_1 \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if d < -3.19999999999999975e-64

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

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

    if -3.19999999999999975e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 7e-226

    1. Initial program 39.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. Step-by-step derivation
      1. metadata-eval39.3%

        \[\leadsto \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) \]
      2. unpow1/239.3%

        \[\leadsto \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) \]
      3. metadata-eval39.3%

        \[\leadsto \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) \]
      4. unpow1/239.3%

        \[\leadsto \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) \]
      5. *-commutative39.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*39.3%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*36.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/39.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval39.4%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/36.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/36.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 46.8%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*46.8%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative46.8%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/46.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow246.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*50.5%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*57.8%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified57.8%

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

    if 7e-226 < d < 2.20000000000000001e-94

    1. Initial program 53.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval53.9%

        \[\leadsto \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) \]
      2. unpow1/253.9%

        \[\leadsto \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) \]
      3. metadata-eval53.9%

        \[\leadsto \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) \]
      4. unpow1/253.9%

        \[\leadsto \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) \]
      5. *-commutative53.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*53.9%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval53.7%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.7%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/59.6%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/59.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/59.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/59.4%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Step-by-step derivation
      1. *-commutative59.4%

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

        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      3. associate-/l*42.5%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
      4. associate-*r/42.6%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      6. associate-*r/42.5%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      7. associate-*r/42.5%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{\frac{d}{\ell} \cdot d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow142.7%

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

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot \frac{d}{\ell}}}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. associate-/l*42.6%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\frac{h}{\frac{d}{\ell}}}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. cancel-sign-sub-inv42.6%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \color{blue}{\left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
      5. associate-*r/42.6%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\frac{0.5 \cdot h}{\ell}}\right) \]
      6. associate-*r/48.4%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \color{blue}{\frac{\left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot h\right)}{\ell}}\right) \]
      7. distribute-lft-neg-in48.4%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(-\color{blue}{h \cdot 0.5}\right)}{\ell}\right) \]
      11. distribute-rgt-neg-in48.4%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right)} \]
    10. Step-by-step derivation
      1. sqrt-div65.6%

        \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{\frac{h}{\frac{d}{\ell}}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \]
      2. associate-/r/56.7%

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

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{\frac{h}{d} \cdot \ell}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \]
    12. Step-by-step derivation
      1. associate-/r/65.6%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\color{blue}{\frac{h}{\frac{d}{\ell}}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \]
      2. *-rgt-identity65.6%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\frac{\color{blue}{h \cdot 1}}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \]
      3. associate-*r/65.6%

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

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h \cdot \color{blue}{\left(\frac{1}{d} \cdot \ell\right)}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \]
      5. associate-*l/65.5%

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

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

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

    if 2.20000000000000001e-94 < d < 1.30000000000000003e150

    1. Initial program 80.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. Step-by-step derivation
      1. metadata-eval80.7%

        \[\leadsto \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) \]
      2. unpow1/280.7%

        \[\leadsto \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) \]
      3. metadata-eval80.7%

        \[\leadsto \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) \]
      4. unpow1/280.7%

        \[\leadsto \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) \]
      5. *-commutative80.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.7%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.7%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Taylor expanded in M around 0 71.7%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. associate-*r/71.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      2. *-commutative71.7%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      3. associate-*r/71.7%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
    6. Simplified75.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{d \cdot d}\right) \cdot 0.125}\right) \]
    7. Taylor expanded in D around 0 71.7%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}} \cdot 0.125\right) \]
    8. Step-by-step derivation
      1. associate-/l*73.5%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}} \cdot 0.125\right) \]
      5. associate-/l*73.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}} \cdot 0.125\right) \]
      7. associate-/l*77.2%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}} \cdot 0.125\right) \]
      10. associate-*r*78.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}} \cdot 0.125\right) \]
      11. associate-/l*84.2%

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

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

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

    if 1.30000000000000003e150 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.2 \cdot 10^{-64}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h \cdot \frac{\ell}{d}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 1.3 \cdot 10^{+150}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 8: 70.1% accurate, 1.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -2.1 \cdot 10^{+120}:\\ \;\;\;\;t_0 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_1\right)\\ \mathbf{elif}\;\ell \leq -2.15 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+152}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \frac{h \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ d h))) (t_1 (sqrt (/ d l))))
   (if (<= l -2.1e+120)
     (*
      t_0
      (* (- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))) t_1))
     (if (<= l -2.15e-302)
       (*
        (fma (pow (* (/ M d) (/ D 2.0)) 2.0) (* (/ h l) -0.5) 1.0)
        (/ (- d) (sqrt (* h l))))
       (if (<= l 9.5e+152)
         (*
          t_0
          (* t_1 (- 1.0 (* 0.5 (/ (* h (pow (* M (/ D (* d 2.0))) 2.0)) l)))))
         (* d (/ (pow h -0.5) (sqrt l))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h));
	double t_1 = sqrt((d / l));
	double tmp;
	if (l <= -2.1e+120) {
		tmp = t_0 * ((1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * t_1);
	} else if (l <= -2.15e-302) {
		tmp = fma(pow(((M / d) * (D / 2.0)), 2.0), ((h / l) * -0.5), 1.0) * (-d / sqrt((h * l)));
	} else if (l <= 9.5e+152) {
		tmp = t_0 * (t_1 * (1.0 - (0.5 * ((h * pow((M * (D / (d * 2.0))), 2.0)) / l))));
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(d / h))
	t_1 = sqrt(Float64(d / l))
	tmp = 0.0
	if (l <= -2.1e+120)
		tmp = Float64(t_0 * Float64(Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)))) * t_1));
	elseif (l <= -2.15e-302)
		tmp = Float64(fma((Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0) * Float64(Float64(-d) / sqrt(Float64(h * l))));
	elseif (l <= 9.5e+152)
		tmp = Float64(t_0 * Float64(t_1 * Float64(1.0 - Float64(0.5 * Float64(Float64(h * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0)) / l)))));
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2.1e+120], N[(t$95$0 * N[(N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2.15e-302], N[(N[(N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 9.5e+152], N[(t$95$0 * N[(t$95$1 * N[(1.0 - N[(0.5 * N[(N[(h * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
t_1 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{+120}:\\
\;\;\;\;t_0 \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot t_1\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -2.1e120

    1. Initial program 68.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. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval68.4%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/268.4%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*68.4%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval68.4%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac68.5%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified68.5%

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

    if -2.1e120 < l < -2.1500000000000001e-302

    1. Initial program 69.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. Applied egg-rr20.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def26.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*64.2%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg84.4%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*84.4%

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

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/84.4%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Step-by-step derivation
      1. pow184.4%

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

      \[\leadsto \color{blue}{{\left(d \cdot \left(\left(-\frac{1}{\sqrt{\ell \cdot h}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow184.4%

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

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

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

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

    if -2.1500000000000001e-302 < l < 9.49999999999999916e152

    1. Initial program 67.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. associate-*l*67.1%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval67.1%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/267.1%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*67.1%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval67.1%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac66.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified66.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot h}{\ell}}\right)\right) \]
      2. associate-*l/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{{\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot h}{\ell}\right)\right) \]
      3. associate-*r/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{{\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot h}{\ell}\right)\right) \]
      4. associate-/l/70.9%

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

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

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

    if 9.49999999999999916e152 < l

    1. Initial program 55.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval55.4%

        \[\leadsto \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) \]
      2. unpow1/255.4%

        \[\leadsto \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) \]
      3. metadata-eval55.4%

        \[\leadsto \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) \]
      4. unpow1/255.4%

        \[\leadsto \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) \]
      5. *-commutative55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval55.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*55.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/50.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/50.3%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative49.9%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*49.9%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified49.9%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr62.6%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv62.5%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow62.5%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr62.5%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square62.7%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval62.7%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity62.7%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.1 \cdot 10^{+120}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;\ell \leq -2.15 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{h \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 9: 70.0% accurate, 1.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -3.7 \cdot 10^{+113}:\\ \;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\ \mathbf{elif}\;\ell \leq -1.2 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 5.6 \cdot 10^{+153}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \frac{h \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ d h))) (t_1 (sqrt (/ d l))))
   (if (<= l -3.7e+113)
     (*
      (* t_0 t_1)
      (- 1.0 (* (* 0.5 (/ h l)) (pow (/ (/ (* M D) 2.0) d) 2.0))))
     (if (<= l -1.2e-303)
       (*
        (fma (pow (* (/ M d) (/ D 2.0)) 2.0) (* (/ h l) -0.5) 1.0)
        (/ (- d) (sqrt (* h l))))
       (if (<= l 5.6e+153)
         (*
          t_0
          (* t_1 (- 1.0 (* 0.5 (/ (* h (pow (* M (/ D (* d 2.0))) 2.0)) l)))))
         (* d (/ (pow h -0.5) (sqrt l))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h));
	double t_1 = sqrt((d / l));
	double tmp;
	if (l <= -3.7e+113) {
		tmp = (t_0 * t_1) * (1.0 - ((0.5 * (h / l)) * pow((((M * D) / 2.0) / d), 2.0)));
	} else if (l <= -1.2e-303) {
		tmp = fma(pow(((M / d) * (D / 2.0)), 2.0), ((h / l) * -0.5), 1.0) * (-d / sqrt((h * l)));
	} else if (l <= 5.6e+153) {
		tmp = t_0 * (t_1 * (1.0 - (0.5 * ((h * pow((M * (D / (d * 2.0))), 2.0)) / l))));
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(d / h))
	t_1 = sqrt(Float64(d / l))
	tmp = 0.0
	if (l <= -3.7e+113)
		tmp = Float64(Float64(t_0 * t_1) * Float64(1.0 - Float64(Float64(0.5 * Float64(h / l)) * (Float64(Float64(Float64(M * D) / 2.0) / d) ^ 2.0))));
	elseif (l <= -1.2e-303)
		tmp = Float64(fma((Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0) * Float64(Float64(-d) / sqrt(Float64(h * l))));
	elseif (l <= 5.6e+153)
		tmp = Float64(t_0 * Float64(t_1 * Float64(1.0 - Float64(0.5 * Float64(Float64(h * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0)) / l)))));
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -3.7e+113], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[(1.0 - N[(N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.2e-303], N[(N[(N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.6e+153], N[(t$95$0 * N[(t$95$1 * N[(1.0 - N[(0.5 * N[(N[(h * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
t_1 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;\ell \leq -3.7 \cdot 10^{+113}:\\
\;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -3.6999999999999998e113

    1. Initial program 68.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. Step-by-step derivation
      1. metadata-eval68.3%

        \[\leadsto \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) \]
      2. unpow1/268.3%

        \[\leadsto \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) \]
      3. metadata-eval68.3%

        \[\leadsto \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) \]
      4. unpow1/268.3%

        \[\leadsto \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) \]
      5. *-commutative68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac68.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval68.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. frac-times68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. associate-/r*68.3%

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

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

    if -3.6999999999999998e113 < l < -1.2e-303

    1. Initial program 69.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. Applied egg-rr20.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def26.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*64.2%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg84.4%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*84.4%

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

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/84.4%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Step-by-step derivation
      1. pow184.4%

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

      \[\leadsto \color{blue}{{\left(d \cdot \left(\left(-\frac{1}{\sqrt{\ell \cdot h}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow184.4%

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

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

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

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

    if -1.2e-303 < l < 5.5999999999999997e153

    1. Initial program 67.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. associate-*l*67.1%

        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      2. metadata-eval67.1%

        \[\leadsto {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. unpow1/267.1%

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. associate-*l*67.1%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      7. metadata-eval67.1%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
      8. times-frac66.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Simplified66.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \color{blue}{\frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot h}{\ell}}\right)\right) \]
      2. associate-*l/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{{\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot h}{\ell}\right)\right) \]
      3. associate-*r/70.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{{\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot h}{\ell}\right)\right) \]
      4. associate-/l/70.9%

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

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

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

    if 5.5999999999999997e153 < l

    1. Initial program 55.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval55.4%

        \[\leadsto \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) \]
      2. unpow1/255.4%

        \[\leadsto \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) \]
      3. metadata-eval55.4%

        \[\leadsto \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) \]
      4. unpow1/255.4%

        \[\leadsto \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) \]
      5. *-commutative55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval55.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*55.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/50.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/50.3%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative49.9%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*49.9%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified49.9%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr62.6%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv62.5%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow62.5%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr62.5%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square62.7%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval62.7%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity62.7%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.7 \cdot 10^{+113}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\ \mathbf{elif}\;\ell \leq -1.2 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 5.6 \cdot 10^{+153}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \frac{h \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 10: 70.2% accurate, 1.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -2.65 \cdot 10^{+116}:\\ \;\;\;\;t_0 \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\ \mathbf{elif}\;\ell \leq -4.2 \cdot 10^{-304}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 6.3 \cdot 10^{+153}:\\ \;\;\;\;t_0 \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (sqrt (/ d h)) (sqrt (/ d l)))))
   (if (<= l -2.65e+116)
     (* t_0 (- 1.0 (* (* 0.5 (/ h l)) (pow (/ (/ (* M D) 2.0) d) 2.0))))
     (if (<= l -4.2e-304)
       (*
        (fma (pow (* (/ M d) (/ D 2.0)) 2.0) (* (/ h l) -0.5) 1.0)
        (/ (- d) (sqrt (* h l))))
       (if (<= l 6.3e+153)
         (* t_0 (- 1.0 (/ (* h (* 0.5 (pow (* M (/ D (* d 2.0))) 2.0))) l)))
         (* d (/ (pow h -0.5) (sqrt l))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h)) * sqrt((d / l));
	double tmp;
	if (l <= -2.65e+116) {
		tmp = t_0 * (1.0 - ((0.5 * (h / l)) * pow((((M * D) / 2.0) / d), 2.0)));
	} else if (l <= -4.2e-304) {
		tmp = fma(pow(((M / d) * (D / 2.0)), 2.0), ((h / l) * -0.5), 1.0) * (-d / sqrt((h * l)));
	} else if (l <= 6.3e+153) {
		tmp = t_0 * (1.0 - ((h * (0.5 * pow((M * (D / (d * 2.0))), 2.0))) / l));
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))
	tmp = 0.0
	if (l <= -2.65e+116)
		tmp = Float64(t_0 * Float64(1.0 - Float64(Float64(0.5 * Float64(h / l)) * (Float64(Float64(Float64(M * D) / 2.0) / d) ^ 2.0))));
	elseif (l <= -4.2e-304)
		tmp = Float64(fma((Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0) * Float64(Float64(-d) / sqrt(Float64(h * l))));
	elseif (l <= 6.3e+153)
		tmp = Float64(t_0 * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))) / l)));
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.65e+116], N[(t$95$0 * N[(1.0 - N[(N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -4.2e-304], N[(N[(N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 6.3e+153], N[(t$95$0 * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;\ell \leq -2.65 \cdot 10^{+116}:\\
\;\;\;\;t_0 \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -2.6500000000000001e116

    1. Initial program 68.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. Step-by-step derivation
      1. metadata-eval68.3%

        \[\leadsto \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) \]
      2. unpow1/268.3%

        \[\leadsto \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) \]
      3. metadata-eval68.3%

        \[\leadsto \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) \]
      4. unpow1/268.3%

        \[\leadsto \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) \]
      5. *-commutative68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac68.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval68.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. frac-times68.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. associate-/r*68.3%

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

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

    if -2.6500000000000001e116 < l < -4.20000000000000016e-304

    1. Initial program 69.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. Applied egg-rr20.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def26.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*64.2%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg84.4%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*84.4%

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

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/84.4%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Step-by-step derivation
      1. pow184.4%

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

      \[\leadsto \color{blue}{{\left(d \cdot \left(\left(-\frac{1}{\sqrt{\ell \cdot h}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow184.4%

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

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

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

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

    if -4.20000000000000016e-304 < l < 6.3000000000000001e153

    1. Initial program 67.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval67.9%

        \[\leadsto \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) \]
      2. unpow1/267.9%

        \[\leadsto \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) \]
      3. metadata-eval67.9%

        \[\leadsto \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) \]
      4. unpow1/267.9%

        \[\leadsto \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) \]
      5. *-commutative67.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*67.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*67.1%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/73.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/72.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/72.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/72.5%

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

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

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

    if 6.3000000000000001e153 < l

    1. Initial program 55.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval55.4%

        \[\leadsto \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) \]
      2. unpow1/255.4%

        \[\leadsto \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) \]
      3. metadata-eval55.4%

        \[\leadsto \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) \]
      4. unpow1/255.4%

        \[\leadsto \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) \]
      5. *-commutative55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac55.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval55.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*55.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/50.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/50.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/50.3%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative49.9%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*49.9%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified49.9%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr62.6%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv62.5%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow62.5%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr62.5%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*62.6%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square62.7%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval62.7%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow62.7%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity62.7%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.65 \cdot 10^{+116}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{\frac{M \cdot D}{2}}{d}\right)}^{2}\right)\\ \mathbf{elif}\;\ell \leq -4.2 \cdot 10^{-304}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 6.3 \cdot 10^{+153}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 11: 65.7% accurate, 1.4× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_2 := 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\\ t_3 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -6.5 \cdot 10^{+80}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot \frac{0.5}{\ell}\right)\right)\\ \mathbf{elif}\;d \leq -2.8 \cdot 10^{-66}:\\ \;\;\;\;t_0 \cdot \left(1 - \frac{0.125 \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\frac{d}{\frac{h}{d}}}}{\ell}\right)\\ \mathbf{elif}\;d \leq -4.5 \cdot 10^{-113}:\\ \;\;\;\;t_1 \cdot \left(-1 + t_2\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_3 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_3\right)\right)\right)\\ \mathbf{elif}\;d \leq 1.38 \cdot 10^{+147}:\\ \;\;\;\;t_0 \cdot \left(1 - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (sqrt (/ d h)) (sqrt (/ d l))))
        (t_1 (* d (sqrt (/ 1.0 (* h l)))))
        (t_2 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
        (t_3 (/ M (/ d M))))
   (if (<= d -6.5e+80)
     (*
      (sqrt (/ (/ d h) (/ l d)))
      (- 1.0 (* (pow (* D (/ M (* d 2.0))) 2.0) (* h (/ 0.5 l)))))
     (if (<= d -2.8e-66)
       (* t_0 (- 1.0 (/ (* 0.125 (/ (* (* M D) (* M D)) (/ d (/ h d)))) l)))
       (if (<= d -4.5e-113)
         (* t_1 (+ -1.0 t_2))
         (if (<= d -5e-310)
           (* t_1 (+ -1.0 (* (* D (/ D l)) (* (* t_3 (/ h d)) 0.125))))
           (if (<= d 1.55e-107)
             (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_3))))
             (if (<= d 1.38e+147)
               (* t_0 (- 1.0 t_2))
               (/ d (* (sqrt h) (sqrt l)))))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h)) * sqrt((d / l));
	double t_1 = d * sqrt((1.0 / (h * l)));
	double t_2 = 0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D));
	double t_3 = M / (d / M);
	double tmp;
	if (d <= -6.5e+80) {
		tmp = sqrt(((d / h) / (l / d))) * (1.0 - (pow((D * (M / (d * 2.0))), 2.0) * (h * (0.5 / l))));
	} else if (d <= -2.8e-66) {
		tmp = t_0 * (1.0 - ((0.125 * (((M * D) * (M * D)) / (d / (h / d)))) / l));
	} else if (d <= -4.5e-113) {
		tmp = t_1 * (-1.0 + t_2);
	} else if (d <= -5e-310) {
		tmp = t_1 * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_3)));
	} else if (d <= 1.38e+147) {
		tmp = t_0 * (1.0 - t_2);
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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 / h)) * sqrt((d / l))
    t_1 = d * sqrt((1.0d0 / (h * l)))
    t_2 = 0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1))
    t_3 = m / (d / m)
    if (d <= (-6.5d+80)) then
        tmp = sqrt(((d / h) / (l / d))) * (1.0d0 - (((d_1 * (m / (d * 2.0d0))) ** 2.0d0) * (h * (0.5d0 / l))))
    else if (d <= (-2.8d-66)) then
        tmp = t_0 * (1.0d0 - ((0.125d0 * (((m * d_1) * (m * d_1)) / (d / (h / d)))) / l))
    else if (d <= (-4.5d-113)) then
        tmp = t_1 * ((-1.0d0) + t_2)
    else if (d <= (-5d-310)) then
        tmp = t_1 * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_3 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_3)))
    else if (d <= 1.38d+147) then
        tmp = t_0 * (1.0d0 - t_2)
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((d / h)) * Math.sqrt((d / l));
	double t_1 = d * Math.sqrt((1.0 / (h * l)));
	double t_2 = 0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D));
	double t_3 = M / (d / M);
	double tmp;
	if (d <= -6.5e+80) {
		tmp = Math.sqrt(((d / h) / (l / d))) * (1.0 - (Math.pow((D * (M / (d * 2.0))), 2.0) * (h * (0.5 / l))));
	} else if (d <= -2.8e-66) {
		tmp = t_0 * (1.0 - ((0.125 * (((M * D) * (M * D)) / (d / (h / d)))) / l));
	} else if (d <= -4.5e-113) {
		tmp = t_1 * (-1.0 + t_2);
	} else if (d <= -5e-310) {
		tmp = t_1 * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_3)));
	} else if (d <= 1.38e+147) {
		tmp = t_0 * (1.0 - t_2);
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / h)) * math.sqrt((d / l))
	t_1 = d * math.sqrt((1.0 / (h * l)))
	t_2 = 0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))
	t_3 = M / (d / M)
	tmp = 0
	if d <= -6.5e+80:
		tmp = math.sqrt(((d / h) / (l / d))) * (1.0 - (math.pow((D * (M / (d * 2.0))), 2.0) * (h * (0.5 / l))))
	elif d <= -2.8e-66:
		tmp = t_0 * (1.0 - ((0.125 * (((M * D) * (M * D)) / (d / (h / d)))) / l))
	elif d <= -4.5e-113:
		tmp = t_1 * (-1.0 + t_2)
	elif d <= -5e-310:
		tmp = t_1 * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_3)))
	elif d <= 1.38e+147:
		tmp = t_0 * (1.0 - t_2)
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))
	t_1 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_2 = Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))
	t_3 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -6.5e+80)
		tmp = Float64(sqrt(Float64(Float64(d / h) / Float64(l / d))) * Float64(1.0 - Float64((Float64(D * Float64(M / Float64(d * 2.0))) ^ 2.0) * Float64(h * Float64(0.5 / l)))));
	elseif (d <= -2.8e-66)
		tmp = Float64(t_0 * Float64(1.0 - Float64(Float64(0.125 * Float64(Float64(Float64(M * D) * Float64(M * D)) / Float64(d / Float64(h / d)))) / l)));
	elseif (d <= -4.5e-113)
		tmp = Float64(t_1 * Float64(-1.0 + t_2));
	elseif (d <= -5e-310)
		tmp = Float64(t_1 * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_3 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_3))));
	elseif (d <= 1.38e+147)
		tmp = Float64(t_0 * Float64(1.0 - t_2));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / h)) * sqrt((d / l));
	t_1 = d * sqrt((1.0 / (h * l)));
	t_2 = 0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D));
	t_3 = M / (d / M);
	tmp = 0.0;
	if (d <= -6.5e+80)
		tmp = sqrt(((d / h) / (l / d))) * (1.0 - (((D * (M / (d * 2.0))) ^ 2.0) * (h * (0.5 / l))));
	elseif (d <= -2.8e-66)
		tmp = t_0 * (1.0 - ((0.125 * (((M * D) * (M * D)) / (d / (h / d)))) / l));
	elseif (d <= -4.5e-113)
		tmp = t_1 * (-1.0 + t_2);
	elseif (d <= -5e-310)
		tmp = t_1 * (-1.0 + ((D * (D / l)) * ((t_3 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_3)));
	elseif (d <= 1.38e+147)
		tmp = t_0 * (1.0 - t_2);
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -6.5e+80], N[(N[Sqrt[N[(N[(d / h), $MachinePrecision] / N[(l / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[Power[N[(D * N[(M / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * N[(0.5 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.8e-66], N[(t$95$0 * N[(1.0 - N[(N[(0.125 * N[(N[(N[(M * D), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d / N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.5e-113], N[(t$95$1 * N[(-1.0 + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(t$95$1 * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.38e+147], N[(t$95$0 * N[(1.0 - t$95$2), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_2 := 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\\
t_3 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -6.5 \cdot 10^{+80}:\\
\;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot \frac{0.5}{\ell}\right)\right)\\

\mathbf{elif}\;d \leq -2.8 \cdot 10^{-66}:\\
\;\;\;\;t_0 \cdot \left(1 - \frac{0.125 \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\frac{d}{\frac{h}{d}}}}{\ell}\right)\\

\mathbf{elif}\;d \leq -4.5 \cdot 10^{-113}:\\
\;\;\;\;t_1 \cdot \left(-1 + t_2\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_3 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_3\right)\right)\right)\\

\mathbf{elif}\;d \leq 1.38 \cdot 10^{+147}:\\
\;\;\;\;t_0 \cdot \left(1 - t_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if d < -6.4999999999999998e80

    1. Initial program 82.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-rr46.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def54.2%

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

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. associate-*r/75.5%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{d}{h} \cdot d}{\ell}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. associate-/l*79.1%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-*r/79.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\color{blue}{\left(\frac{M \cdot D}{d \cdot 2}\right)}}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      6. associate-*l/79.1%

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

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\left(D \cdot \frac{M}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      9. associate-/l*79.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\left(D \cdot \frac{M}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
      10. associate-/r/79.1%

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

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

    if -6.4999999999999998e80 < d < -2.8e-66

    1. Initial program 80.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. Step-by-step derivation
      1. metadata-eval80.3%

        \[\leadsto \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) \]
      2. unpow1/280.3%

        \[\leadsto \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) \]
      3. metadata-eval80.3%

        \[\leadsto \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) \]
      4. unpow1/280.3%

        \[\leadsto \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) \]
      5. *-commutative80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.3%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/85.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval85.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/85.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/85.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/85.1%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in M around 0 63.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}}{\ell}\right) \]
    7. Step-by-step derivation
      1. associate-*r*68.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\color{blue}{\left({D}^{2} \cdot {M}^{2}\right) \cdot h}}{{d}^{2}}}{\ell}\right) \]
      2. associate-/l*64.4%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{\color{blue}{d \cdot d}}{h}}}{\ell}\right) \]
      7. associate-/l*80.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\color{blue}{\frac{d}{\frac{h}{d}}}}}{\ell}\right) \]
    8. Simplified80.6%

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

    if -2.8e-66 < d < -4.5000000000000001e-113

    1. Initial program 78.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. Applied egg-rr11.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def22.1%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*67.1%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.2%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.2%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.2%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.2%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 56.2%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. associate-/l*45.2%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*55.7%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*66.8%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*66.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*66.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative66.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    10. Simplified77.9%

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

    if -4.5000000000000001e-113 < d < -4.999999999999985e-310

    1. Initial program 45.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr6.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def11.8%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*43.2%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.4%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.4%

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

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.4%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.8%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.8%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*60.2%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/63.2%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*66.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified66.1%

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

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

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

    if 1.55000000000000011e-107 < d < 1.37999999999999991e147

    1. Initial program 77.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval77.4%

        \[\leadsto \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) \]
      2. unpow1/277.4%

        \[\leadsto \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) \]
      3. metadata-eval77.4%

        \[\leadsto \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) \]
      4. unpow1/277.4%

        \[\leadsto \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) \]
      5. *-commutative77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac77.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval77.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Taylor expanded in M around 0 70.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. associate-*r/70.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      2. *-commutative70.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      3. associate-*r/70.8%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
    6. Simplified75.7%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{d \cdot d}\right) \cdot 0.125}\right) \]
    7. Taylor expanded in D around 0 70.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}} \cdot 0.125\right) \]
    8. Step-by-step derivation
      1. associate-/l*72.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}} \cdot 0.125\right) \]
      5. associate-/l*72.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}} \cdot 0.125\right) \]
      7. associate-/l*75.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}} \cdot 0.125\right) \]
      10. associate-*r*77.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}} \cdot 0.125\right) \]
      11. associate-/l*82.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}} \cdot 0.125\right) \]
      12. *-commutative82.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}} \cdot 0.125\right) \]
    9. Simplified82.3%

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

    if 1.37999999999999991e147 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -6.5 \cdot 10^{+80}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 - {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot \frac{0.5}{\ell}\right)\right)\\ \mathbf{elif}\;d \leq -2.8 \cdot 10^{-66}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{0.125 \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\frac{d}{\frac{h}{d}}}}{\ell}\right)\\ \mathbf{elif}\;d \leq -4.5 \cdot 10^{-113}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 1.38 \cdot 10^{+147}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 12: 61.5% accurate, 1.4× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -2.4 \cdot 10^{-63}:\\ \;\;\;\;\left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_0 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 2.6 \cdot 10^{-94}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_0\right)\right)\right)\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+149}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ M (/ d M))))
   (if (<= d -2.4e-63)
     (*
      (+ 1.0 (/ (* (pow (* M (/ D (* d 2.0))) 2.0) (* h -0.5)) l))
      (sqrt (/ d (/ h (/ d l)))))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_0 (/ h d)) 0.125))))
       (if (<= d 2.6e-94)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_0))))
         (if (<= d 7.5e+149)
           (*
            (* (sqrt (/ d h)) (sqrt (/ d l)))
            (- 1.0 (* 0.125 (* (/ (* D D) l) (/ (* h (* M M)) (* d d))))))
           (/ d (* (sqrt h) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = M / (d / M);
	double tmp;
	if (d <= -2.4e-63) {
		tmp = (1.0 + ((pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * sqrt((d / (h / (d / l))));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_0 * (h / d)) * 0.125)));
	} else if (d <= 2.6e-94) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_0)));
	} else if (d <= 7.5e+149) {
		tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))));
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = m / (d / m)
    if (d <= (-2.4d-63)) then
        tmp = (1.0d0 + ((((m * (d_1 / (d * 2.0d0))) ** 2.0d0) * (h * (-0.5d0))) / l)) * sqrt((d / (h / (d / l))))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_0 * (h / d)) * 0.125d0)))
    else if (d <= 2.6d-94) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_0)))
    else if (d <= 7.5d+149) then
        tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0d0 - (0.125d0 * (((d_1 * d_1) / l) * ((h * (m * m)) / (d * d)))))
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = M / (d / M);
	double tmp;
	if (d <= -2.4e-63) {
		tmp = (1.0 + ((Math.pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * Math.sqrt((d / (h / (d / l))));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_0 * (h / d)) * 0.125)));
	} else if (d <= 2.6e-94) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_0)));
	} else if (d <= 7.5e+149) {
		tmp = (Math.sqrt((d / h)) * Math.sqrt((d / l))) * (1.0 - (0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))));
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = M / (d / M)
	tmp = 0
	if d <= -2.4e-63:
		tmp = (1.0 + ((math.pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * math.sqrt((d / (h / (d / l))))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_0 * (h / d)) * 0.125)))
	elif d <= 2.6e-94:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_0)))
	elif d <= 7.5e+149:
		tmp = (math.sqrt((d / h)) * math.sqrt((d / l))) * (1.0 - (0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))))
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -2.4e-63)
		tmp = Float64(Float64(1.0 + Float64(Float64((Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0) * Float64(h * -0.5)) / l)) * sqrt(Float64(d / Float64(h / Float64(d / l)))));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_0 * Float64(h / d)) * 0.125))));
	elseif (d <= 2.6e-94)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_0))));
	elseif (d <= 7.5e+149)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(0.125 * Float64(Float64(Float64(D * D) / l) * Float64(Float64(h * Float64(M * M)) / Float64(d * d))))));
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = M / (d / M);
	tmp = 0.0;
	if (d <= -2.4e-63)
		tmp = (1.0 + ((((M * (D / (d * 2.0))) ^ 2.0) * (h * -0.5)) / l)) * sqrt((d / (h / (d / l))));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_0 * (h / d)) * 0.125)));
	elseif (d <= 2.6e-94)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_0)));
	elseif (d <= 7.5e+149)
		tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))));
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -2.4e-63], N[(N[(1.0 + N[(N[(N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / N[(h / N[(d / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.6e-94], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.5e+149], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -2.4 \cdot 10^{-63}:\\
\;\;\;\;\left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_0 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 2.6 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_0\right)\right)\right)\\

\mathbf{elif}\;d \leq 7.5 \cdot 10^{+149}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -2.4000000000000001e-63

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval80.9%

        \[\leadsto \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) \]
      2. unpow1/280.9%

        \[\leadsto \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) \]
      3. metadata-eval80.9%

        \[\leadsto \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) \]
      4. unpow1/280.9%

        \[\leadsto \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) \]
      5. *-commutative80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.9%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.2%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Step-by-step derivation
      1. *-commutative82.2%

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

        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      3. associate-/l*68.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
      4. associate-*r/68.7%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      6. associate-*r/68.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      7. associate-*r/68.7%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{\frac{d}{\ell} \cdot d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow168.5%

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

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot \frac{d}{\ell}}}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. associate-/l*67.3%

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

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \color{blue}{\left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
      5. associate-*r/67.3%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\frac{0.5 \cdot h}{\ell}}\right) \]
      6. associate-*r/70.3%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \color{blue}{\frac{\left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot h\right)}{\ell}}\right) \]
      7. distribute-lft-neg-in70.3%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{\color{blue}{-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot h\right)}}{\ell}\right) \]
      8. distribute-rgt-neg-in70.3%

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

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

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(-\color{blue}{h \cdot 0.5}\right)}{\ell}\right) \]
      11. distribute-rgt-neg-in70.3%

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

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

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

    if -2.4000000000000001e-63 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 2.59999999999999994e-94

    1. Initial program 48.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. Step-by-step derivation
      1. metadata-eval48.1%

        \[\leadsto \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) \]
      2. unpow1/248.1%

        \[\leadsto \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) \]
      3. metadata-eval48.1%

        \[\leadsto \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) \]
      4. unpow1/248.1%

        \[\leadsto \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) \]
      5. *-commutative48.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*48.1%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval46.7%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.7%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/51.3%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/49.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/49.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/49.8%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 40.6%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*40.6%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative40.6%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/39.1%

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

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

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*42.7%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*50.7%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified50.7%

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

    if 2.59999999999999994e-94 < d < 7.50000000000000031e149

    1. Initial program 80.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. Step-by-step derivation
      1. metadata-eval80.3%

        \[\leadsto \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) \]
      2. unpow1/280.3%

        \[\leadsto \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) \]
      3. metadata-eval80.3%

        \[\leadsto \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) \]
      4. unpow1/280.3%

        \[\leadsto \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) \]
      5. *-commutative80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac80.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval80.3%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Taylor expanded in M around 0 73.0%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. associate-*r/73.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      2. *-commutative73.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      3. associate-*r/73.0%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
    6. Simplified76.7%

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

    if 7.50000000000000031e149 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.4 \cdot 10^{-63}:\\ \;\;\;\;\left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 2.6 \cdot 10^{-94}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+149}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 13: 64.6% accurate, 1.4× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -1.55 \cdot 10^{-109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 6.5 \cdot 10^{+149}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (sqrt (/ d h)) (sqrt (/ d l)))
          (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))))
        (t_1 (/ M (/ d M))))
   (if (<= d -1.55e-109)
     t_0
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 1.55e-107)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (<= d 6.5e+149) t_0 (/ d (* (sqrt h) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.55e-109) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 6.5e+149) {
		tmp = t_0;
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (sqrt((d / h)) * sqrt((d / l))) * (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1))))
    t_1 = m / (d / m)
    if (d <= (-1.55d-109)) then
        tmp = t_0
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if (d <= 6.5d+149) then
        tmp = t_0
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.sqrt((d / h)) * Math.sqrt((d / l))) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.55e-109) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 6.5e+149) {
		tmp = t_0;
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (math.sqrt((d / h)) * math.sqrt((d / l))) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -1.55e-109:
		tmp = t_0
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif d <= 6.5e+149:
		tmp = t_0
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -1.55e-109)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif (d <= 6.5e+149)
		tmp = t_0;
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -1.55e-109)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif (d <= 6.5e+149)
		tmp = t_0;
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.55e-109], t$95$0, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.5e+149], t$95$0, N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -1.55 \cdot 10^{-109}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 6.5 \cdot 10^{+149}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.55e-109 or 1.55000000000000011e-107 < d < 6.50000000000000015e149

    1. Initial program 79.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. Step-by-step derivation
      1. metadata-eval79.3%

        \[\leadsto \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) \]
      2. unpow1/279.3%

        \[\leadsto \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) \]
      3. metadata-eval79.3%

        \[\leadsto \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) \]
      4. unpow1/279.3%

        \[\leadsto \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) \]
      5. *-commutative79.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*79.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac79.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval79.3%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Taylor expanded in M around 0 66.1%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. associate-*r/66.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      2. *-commutative66.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\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) \]
      3. associate-*r/66.1%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
    6. Simplified68.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D \cdot D}{\ell} \cdot \frac{\left(M \cdot M\right) \cdot h}{d \cdot d}\right) \cdot 0.125}\right) \]
    7. Taylor expanded in D around 0 66.1%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}} \cdot 0.125\right) \]
    8. Step-by-step derivation
      1. associate-/l*66.8%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}} \cdot 0.125\right) \]
      5. associate-/l*67.7%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}} \cdot 0.125\right) \]
      7. associate-/l*70.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}} \cdot 0.125\right) \]
      10. associate-*r*72.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}} \cdot 0.125\right) \]
      11. associate-/l*76.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}} \cdot 0.125\right) \]
      12. *-commutative76.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}} \cdot 0.125\right) \]
    9. Simplified76.0%

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

    if -1.55e-109 < d < -4.999999999999985e-310

    1. Initial program 45.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr6.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def11.8%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*43.2%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.4%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.4%

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

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.4%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.8%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.8%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*60.2%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/63.2%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*66.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified66.1%

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

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

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

    if 6.50000000000000015e149 < d

    1. Initial program 70.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval70.4%

        \[\leadsto \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) \]
      2. unpow1/270.4%

        \[\leadsto \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) \]
      3. metadata-eval70.4%

        \[\leadsto \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) \]
      4. unpow1/270.4%

        \[\leadsto \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) \]
      5. *-commutative70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac70.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval70.4%

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval74.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/74.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/74.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative70.0%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/70.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube62.1%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt62.0%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow162.0%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt62.1%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube70.0%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/70.0%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div69.9%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval69.9%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative69.9%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow169.9%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity70.0%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified70.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod84.4%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr84.4%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification69.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.55 \cdot 10^{-109}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 6.5 \cdot 10^{+149}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 14: 62.5% accurate, 1.4× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -1.8 \cdot 10^{-64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 8.5 \cdot 10^{+106}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (+ 1.0 (/ (* (pow (* M (/ D (* d 2.0))) 2.0) (* h -0.5)) l))
          (sqrt (/ d (/ h (/ d l))))))
        (t_1 (/ M (/ d M))))
   (if (<= d -1.8e-64)
     t_0
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 1.55e-107)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (<= d 8.5e+106) t_0 (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (1.0 + ((pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * sqrt((d / (h / (d / l))));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.8e-64) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 8.5e+106) {
		tmp = t_0;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (1.0d0 + ((((m * (d_1 / (d * 2.0d0))) ** 2.0d0) * (h * (-0.5d0))) / l)) * sqrt((d / (h / (d / l))))
    t_1 = m / (d / m)
    if (d <= (-1.8d-64)) then
        tmp = t_0
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if (d <= 8.5d+106) then
        tmp = t_0
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (1.0 + ((Math.pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * Math.sqrt((d / (h / (d / l))));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.8e-64) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 8.5e+106) {
		tmp = t_0;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (1.0 + ((math.pow((M * (D / (d * 2.0))), 2.0) * (h * -0.5)) / l)) * math.sqrt((d / (h / (d / l))))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -1.8e-64:
		tmp = t_0
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif d <= 8.5e+106:
		tmp = t_0
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(1.0 + Float64(Float64((Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0) * Float64(h * -0.5)) / l)) * sqrt(Float64(d / Float64(h / Float64(d / l)))))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -1.8e-64)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif (d <= 8.5e+106)
		tmp = t_0;
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (1.0 + ((((M * (D / (d * 2.0))) ^ 2.0) * (h * -0.5)) / l)) * sqrt((d / (h / (d / l))));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -1.8e-64)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif (d <= 8.5e+106)
		tmp = t_0;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 + N[(N[(N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / N[(h / N[(d / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.8e-64], t$95$0, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8.5e+106], t$95$0, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -1.8 \cdot 10^{-64}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 8.5 \cdot 10^{+106}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.7999999999999999e-64 or 1.55000000000000011e-107 < d < 8.4999999999999992e106

    1. Initial program 79.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. Step-by-step derivation
      1. metadata-eval79.1%

        \[\leadsto \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) \]
      2. unpow1/279.1%

        \[\leadsto \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) \]
      3. metadata-eval79.1%

        \[\leadsto \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) \]
      4. unpow1/279.1%

        \[\leadsto \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) \]
      5. *-commutative79.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*79.1%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*79.1%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/82.6%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/82.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/82.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/82.6%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Step-by-step derivation
      1. *-commutative82.6%

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

        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      3. associate-/l*66.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
      4. associate-*r/66.0%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      6. associate-*r/66.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \frac{{\color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      7. associate-*r/65.8%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{\frac{d}{\ell} \cdot d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow164.8%

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

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot \frac{d}{\ell}}}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. associate-/l*65.8%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\frac{h}{\frac{d}{\ell}}}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. cancel-sign-sub-inv65.8%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \color{blue}{\left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
      5. associate-*r/65.8%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\frac{0.5 \cdot h}{\ell}}\right) \]
      6. associate-*r/72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \color{blue}{\frac{\left(-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(0.5 \cdot h\right)}{\ell}}\right) \]
      7. distribute-lft-neg-in72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{\color{blue}{-{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot h\right)}}{\ell}\right) \]
      8. distribute-rgt-neg-in72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{\color{blue}{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(-0.5 \cdot h\right)}}{\ell}\right) \]
      9. *-commutative72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \left(-0.5 \cdot h\right)}{\ell}\right) \]
      10. *-commutative72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \left(-\color{blue}{h \cdot 0.5}\right)}{\ell}\right) \]
      11. distribute-rgt-neg-in72.0%

        \[\leadsto \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 + \frac{{\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(h \cdot \left(-0.5\right)\right)}}{\ell}\right) \]
      12. metadata-eval72.0%

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

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

    if -1.7999999999999999e-64 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

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

    if 8.4999999999999992e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

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

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.8 \cdot 10^{-64}:\\ \;\;\;\;\left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 8.5 \cdot 10^{+106}:\\ \;\;\;\;\left(1 + \frac{{\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 15: 61.4% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -1.95 \cdot 10^{-63}:\\ \;\;\;\;t_0 \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 8 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* (/ d h) (/ d l)))) (t_1 (/ M (/ d M))))
   (if (<= d -1.95e-63)
     (* t_0 (- 1.0 (* (pow (* M (/ D (* d 2.0))) 2.0) (/ 0.5 (/ l h)))))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 1.55e-107)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (<= d 8e+104)
           (*
            (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
            t_0)
           (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.95e-63) {
		tmp = t_0 * (1.0 - (pow((M * (D / (d * 2.0))), 2.0) * (0.5 / (l / h))));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 8e+104) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = sqrt(((d / h) * (d / l)))
    t_1 = m / (d / m)
    if (d <= (-1.95d-63)) then
        tmp = t_0 * (1.0d0 - (((m * (d_1 / (d * 2.0d0))) ** 2.0d0) * (0.5d0 / (l / h))))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if (d <= 8d+104) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_0
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -1.95e-63) {
		tmp = t_0 * (1.0 - (Math.pow((M * (D / (d * 2.0))), 2.0) * (0.5 / (l / h))));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 8e+104) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt(((d / h) * (d / l)))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -1.95e-63:
		tmp = t_0 * (1.0 - (math.pow((M * (D / (d * 2.0))), 2.0) * (0.5 / (l / h))))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif d <= 8e+104:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -1.95e-63)
		tmp = Float64(t_0 * Float64(1.0 - Float64((Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0) * Float64(0.5 / Float64(l / h)))));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif (d <= 8e+104)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_0);
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(((d / h) * (d / l)));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -1.95e-63)
		tmp = t_0 * (1.0 - (((M * (D / (d * 2.0))) ^ 2.0) * (0.5 / (l / h))));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif (d <= 8e+104)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.95e-63], N[(t$95$0 * N[(1.0 - N[(N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e+104], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -1.95 \cdot 10^{-63}:\\
\;\;\;\;t_0 \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -1.95000000000000011e-63

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr28.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def39.3%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*68.7%

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

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

    if -1.95000000000000011e-63 < d < -4.999999999999985e-310

    1. Initial program 53.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-rr7.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.3%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*78.1%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in78.1%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/78.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 53.7%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative53.7%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*62.5%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative66.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*69.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified69.1%

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

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

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

    if 1.55000000000000011e-107 < d < 8e104

    1. Initial program 76.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-rr7.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def22.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*62.0%

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 61.9%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*62.9%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*62.9%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*62.9%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*65.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified71.3%

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

    if 8e104 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

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

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.95 \cdot 10^{-63}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 8 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 16: 61.3% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -3.3 \cdot 10^{-92}:\\ \;\;\;\;t_0 \cdot \left(1 - {\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* (/ d h) (/ d l)))) (t_1 (/ M (/ d M))))
   (if (<= d -3.3e-92)
     (* t_0 (- 1.0 (* (pow (/ (* D (* M 0.5)) d) 2.0) (/ 0.5 (/ l h)))))
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 1.55e-107)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (<= d 2.8e+106)
           (*
            (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
            t_0)
           (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -3.3e-92) {
		tmp = t_0 * (1.0 - (pow(((D * (M * 0.5)) / d), 2.0) * (0.5 / (l / h))));
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 2.8e+106) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = sqrt(((d / h) * (d / l)))
    t_1 = m / (d / m)
    if (d <= (-3.3d-92)) then
        tmp = t_0 * (1.0d0 - ((((d_1 * (m * 0.5d0)) / d) ** 2.0d0) * (0.5d0 / (l / h))))
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if (d <= 2.8d+106) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_0
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -3.3e-92) {
		tmp = t_0 * (1.0 - (Math.pow(((D * (M * 0.5)) / d), 2.0) * (0.5 / (l / h))));
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 2.8e+106) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt(((d / h) * (d / l)))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -3.3e-92:
		tmp = t_0 * (1.0 - (math.pow(((D * (M * 0.5)) / d), 2.0) * (0.5 / (l / h))))
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif d <= 2.8e+106:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -3.3e-92)
		tmp = Float64(t_0 * Float64(1.0 - Float64((Float64(Float64(D * Float64(M * 0.5)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h)))));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif (d <= 2.8e+106)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_0);
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(((d / h) * (d / l)));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -3.3e-92)
		tmp = t_0 * (1.0 - ((((D * (M * 0.5)) / d) ^ 2.0) * (0.5 / (l / h))));
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif (d <= 2.8e+106)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.3e-92], N[(t$95$0 * N[(1.0 - N[(N[Power[N[(N[(D * N[(M * 0.5), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e+106], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -3.3 \cdot 10^{-92}:\\
\;\;\;\;t_0 \cdot \left(1 - {\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 2.8 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -3.29999999999999998e-92

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/70.0%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. associate-*r/70.0%

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

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

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

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

    if -3.29999999999999998e-92 < d < -4.999999999999985e-310

    1. Initial program 49.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. Applied egg-rr8.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*44.0%

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.3%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in77.3%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.3%

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

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.6%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.6%

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*61.7%

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*67.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified67.0%

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

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

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

    if 1.55000000000000011e-107 < d < 2.79999999999999993e106

    1. Initial program 76.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-rr7.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def22.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*62.0%

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 61.9%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*62.9%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*62.9%

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*62.9%

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

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

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*65.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified71.3%

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

    if 2.79999999999999993e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification66.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.3 \cdot 10^{-92}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 17: 64.9% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(-1 + \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= d -5e-310)
   (*
    (/ d (sqrt (* h l)))
    (+ -1.0 (* (* 0.5 (/ h l)) (pow (* M (/ D (* d 2.0))) 2.0))))
   (if (<= d 1.55e-107)
     (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D (/ M (/ d M))))))
     (if (<= d 9e+104)
       (*
        (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
        (sqrt (* (/ d h) (/ d l))))
       (* d (/ (pow h -0.5) (sqrt l)))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= -5e-310) {
		tmp = (d / sqrt((h * l))) * (-1.0 + ((0.5 * (h / l)) * pow((M * (D / (d * 2.0))), 2.0)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * (M / (d / M)))));
	} else if (d <= 9e+104) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    if (d <= (-5d-310)) then
        tmp = (d / sqrt((h * l))) * ((-1.0d0) + ((0.5d0 * (h / l)) * ((m * (d_1 / (d * 2.0d0))) ** 2.0d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * (m / (d / m)))))
    else if (d <= 9d+104) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * sqrt(((d / h) * (d / l)))
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= -5e-310) {
		tmp = (d / Math.sqrt((h * l))) * (-1.0 + ((0.5 * (h / l)) * Math.pow((M * (D / (d * 2.0))), 2.0)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * (M / (d / M)))));
	} else if (d <= 9e+104) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	tmp = 0
	if d <= -5e-310:
		tmp = (d / math.sqrt((h * l))) * (-1.0 + ((0.5 * (h / l)) * math.pow((M * (D / (d * 2.0))), 2.0)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * (M / (d / M)))))
	elif d <= 9e+104:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * math.sqrt(((d / h) * (d / l)))
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (d <= -5e-310)
		tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(-1.0 + Float64(Float64(0.5 * Float64(h / l)) * (Float64(M * Float64(D / Float64(d * 2.0))) ^ 2.0))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * Float64(M / Float64(d / M))))));
	elseif (d <= 9e+104)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * sqrt(Float64(Float64(d / h) * Float64(d / l))));
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (d <= -5e-310)
		tmp = (d / sqrt((h * l))) * (-1.0 + ((0.5 * (h / l)) * ((M * (D / (d * 2.0))) ^ 2.0)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * (M / (d / M)))));
	elseif (d <= 9e+104)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -5e-310], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(M * N[(D / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9e+104], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(-1 + \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\

\mathbf{elif}\;d \leq 9 \cdot 10^{+104}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -4.999999999999985e-310

    1. Initial program 69.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. Applied egg-rr19.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def28.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p60.4%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative60.4%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative60.4%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*60.4%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified60.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 71.6%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg71.6%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*71.5%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in71.5%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/71.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified71.6%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Step-by-step derivation
      1. pow171.6%

        \[\leadsto \color{blue}{{\left(\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\right)}^{1}} \]
    9. Applied egg-rr71.6%

      \[\leadsto \color{blue}{{\left(d \cdot \left(\left(-\frac{1}{\sqrt{\ell \cdot h}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow171.6%

        \[\leadsto \color{blue}{d \cdot \left(\left(-\frac{1}{\sqrt{\ell \cdot h}}\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\right)} \]
      2. associate-*r*71.5%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\frac{1}{\sqrt{\ell \cdot h}}\right)\right) \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)} \]
      3. *-commutative71.5%

        \[\leadsto \color{blue}{\left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(d \cdot \left(-\frac{1}{\sqrt{\ell \cdot h}}\right)\right)} \]
      4. distribute-neg-frac71.5%

        \[\leadsto \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(d \cdot \color{blue}{\frac{-1}{\sqrt{\ell \cdot h}}}\right) \]
      5. metadata-eval71.5%

        \[\leadsto \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \left(d \cdot \frac{\color{blue}{-1}}{\sqrt{\ell \cdot h}}\right) \]
      6. associate-*r/71.5%

        \[\leadsto \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \color{blue}{\frac{d \cdot -1}{\sqrt{\ell \cdot h}}} \]
      7. *-commutative71.5%

        \[\leadsto \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{\color{blue}{-1 \cdot d}}{\sqrt{\ell \cdot h}} \]
      8. mul-1-neg71.5%

        \[\leadsto \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{\color{blue}{-d}}{\sqrt{\ell \cdot h}} \]
    11. Simplified71.5%

      \[\leadsto \color{blue}{\left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}} \]

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified46.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr46.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)} \]

    if 1.55000000000000011e-107 < d < 8.9999999999999997e104

    1. Initial program 76.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-rr7.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def22.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p62.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative62.1%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative62.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified62.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 61.9%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*62.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative62.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow262.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*62.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative62.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*62.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow262.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow262.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*65.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative71.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified71.3%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if 8.9999999999999997e104 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification67.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(-1 + \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2}\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 9 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 18: 56.3% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\ t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-224}:\\ \;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - t_0\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
        (t_1 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -2e-92)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_1)
     (if (<= d -1e-309)
       (* (* d (sqrt (/ 1.0 (* h l)))) (+ -1.0 t_0))
       (if (<= d 2.8e-224)
         (* -0.125 (* (/ (* D D) (/ d (* M M))) (sqrt (/ h (pow l 3.0)))))
         (if (<= d 2.3e+106)
           (* (- 1.0 t_0) t_1)
           (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -2e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= -1e-309) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.8e-224) {
		tmp = -0.125 * (((D * D) / (d / (M * M))) * sqrt((h / pow(l, 3.0))));
	} else if (d <= 2.3e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)
    t_1 = sqrt(((d / h) * (d / l)))
    if (d <= (-2d-92)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_1
    else if (d <= (-1d-309)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + t_0)
    else if (d <= 2.8d-224) then
        tmp = (-0.125d0) * (((d_1 * d_1) / (d / (m * m))) * sqrt((h / (l ** 3.0d0))))
    else if (d <= 2.3d+106) then
        tmp = (1.0d0 - t_0) * t_1
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -2e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= -1e-309) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.8e-224) {
		tmp = -0.125 * (((D * D) / (d / (M * M))) * Math.sqrt((h / Math.pow(l, 3.0))));
	} else if (d <= 2.3e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)
	t_1 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -2e-92:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1
	elif d <= -1e-309:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0)
	elif d <= 2.8e-224:
		tmp = -0.125 * (((D * D) / (d / (M * M))) * math.sqrt((h / math.pow(l, 3.0))))
	elif d <= 2.3e+106:
		tmp = (1.0 - t_0) * t_1
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))
	t_1 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -2e-92)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_1);
	elseif (d <= -1e-309)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + t_0));
	elseif (d <= 2.8e-224)
		tmp = Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(d / Float64(M * M))) * sqrt(Float64(h / (l ^ 3.0)))));
	elseif (d <= 2.3e+106)
		tmp = Float64(Float64(1.0 - t_0) * t_1);
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	t_1 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -2e-92)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	elseif (d <= -1e-309)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	elseif (d <= 2.8e-224)
		tmp = -0.125 * (((D * D) / (d / (M * M))) * sqrt((h / (l ^ 3.0))));
	elseif (d <= 2.3e+106)
		tmp = (1.0 - t_0) * t_1;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2e-92], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, -1e-309], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-224], N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e+106], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\
t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -2 \cdot 10^{-92}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\

\mathbf{elif}\;d \leq 2.8 \cdot 10^{-224}:\\
\;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\\

\mathbf{elif}\;d \leq 2.3 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - t_0\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -1.99999999999999998e-92

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p70.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative70.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 54.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow254.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified62.0%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -1.99999999999999998e-92 < d < -1.000000000000002e-309

    1. Initial program 49.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. Applied egg-rr8.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p44.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative44.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified44.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 77.3%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.3%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in77.3%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified77.3%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.6%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac59.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow259.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*67.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified67.0%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if -1.000000000000002e-309 < d < 2.7999999999999998e-224

    1. Initial program 43.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around 0 47.0%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. associate-/l*47.0%

        \[\leadsto -0.125 \cdot \left(\color{blue}{\frac{{D}^{2}}{\frac{d}{{M}^{2}}}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \]
      2. unpow247.0%

        \[\leadsto -0.125 \cdot \left(\frac{\color{blue}{D \cdot D}}{\frac{d}{{M}^{2}}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \]
      3. unpow247.0%

        \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\frac{d}{\color{blue}{M \cdot M}}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \]
    4. Simplified47.0%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]

    if 2.7999999999999998e-224 < d < 2.3000000000000002e106

    1. Initial program 67.8%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr6.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def18.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p54.8%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative54.8%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative54.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*54.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified54.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 41.9%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac1.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow21.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*1.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow21.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified60.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 2.3000000000000002e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification63.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-224}:\\ \;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{\frac{d}{M \cdot M}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 19: 56.3% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\ t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -4.8 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\ \mathbf{elif}\;d \leq 2.05 \cdot 10^{-224}:\\ \;\;\;\;-0.125 \cdot \frac{\left(D \cdot D\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{M \cdot M}}\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - t_0\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
        (t_1 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -4.8e-92)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_1)
     (if (<= d -5e-310)
       (* (* d (sqrt (/ 1.0 (* h l)))) (+ -1.0 t_0))
       (if (<= d 2.05e-224)
         (* -0.125 (/ (* (* D D) (sqrt (/ h (pow l 3.0)))) (/ d (* M M))))
         (if (<= d 1.7e+106)
           (* (- 1.0 t_0) t_1)
           (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -4.8e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.05e-224) {
		tmp = -0.125 * (((D * D) * sqrt((h / pow(l, 3.0)))) / (d / (M * M)));
	} else if (d <= 1.7e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)
    t_1 = sqrt(((d / h) * (d / l)))
    if (d <= (-4.8d-92)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_1
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + t_0)
    else if (d <= 2.05d-224) then
        tmp = (-0.125d0) * (((d_1 * d_1) * sqrt((h / (l ** 3.0d0)))) / (d / (m * m)))
    else if (d <= 1.7d+106) then
        tmp = (1.0d0 - t_0) * t_1
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -4.8e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.05e-224) {
		tmp = -0.125 * (((D * D) * Math.sqrt((h / Math.pow(l, 3.0)))) / (d / (M * M)));
	} else if (d <= 1.7e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)
	t_1 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -4.8e-92:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0)
	elif d <= 2.05e-224:
		tmp = -0.125 * (((D * D) * math.sqrt((h / math.pow(l, 3.0)))) / (d / (M * M)))
	elif d <= 1.7e+106:
		tmp = (1.0 - t_0) * t_1
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))
	t_1 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -4.8e-92)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_1);
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + t_0));
	elseif (d <= 2.05e-224)
		tmp = Float64(-0.125 * Float64(Float64(Float64(D * D) * sqrt(Float64(h / (l ^ 3.0)))) / Float64(d / Float64(M * M))));
	elseif (d <= 1.7e+106)
		tmp = Float64(Float64(1.0 - t_0) * t_1);
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	t_1 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -4.8e-92)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	elseif (d <= 2.05e-224)
		tmp = -0.125 * (((D * D) * sqrt((h / (l ^ 3.0)))) / (d / (M * M)));
	elseif (d <= 1.7e+106)
		tmp = (1.0 - t_0) * t_1;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -4.8e-92], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.05e-224], N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] * N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.7e+106], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\
t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -4.8 \cdot 10^{-92}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\

\mathbf{elif}\;d \leq 2.05 \cdot 10^{-224}:\\
\;\;\;\;-0.125 \cdot \frac{\left(D \cdot D\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{M \cdot M}}\\

\mathbf{elif}\;d \leq 1.7 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - t_0\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -4.8000000000000002e-92

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p70.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative70.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 54.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow254.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified62.0%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -4.8000000000000002e-92 < d < -4.999999999999985e-310

    1. Initial program 49.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. Applied egg-rr8.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p44.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative44.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified44.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 77.3%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.3%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in77.3%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified77.3%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.6%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac59.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow259.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*67.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified67.0%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if -4.999999999999985e-310 < d < 2.04999999999999993e-224

    1. Initial program 43.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around 0 47.0%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. associate-/l*47.0%

        \[\leadsto -0.125 \cdot \left(\color{blue}{\frac{{D}^{2}}{\frac{d}{{M}^{2}}}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \]
      2. associate-*l/43.7%

        \[\leadsto -0.125 \cdot \color{blue}{\frac{{D}^{2} \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{{M}^{2}}}} \]
      3. unpow243.7%

        \[\leadsto -0.125 \cdot \frac{\color{blue}{\left(D \cdot D\right)} \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{{M}^{2}}} \]
      4. unpow243.7%

        \[\leadsto -0.125 \cdot \frac{\left(D \cdot D\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{\color{blue}{M \cdot M}}} \]
    4. Simplified43.7%

      \[\leadsto \color{blue}{-0.125 \cdot \frac{\left(D \cdot D\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{M \cdot M}}} \]

    if 2.04999999999999993e-224 < d < 1.69999999999999997e106

    1. Initial program 67.8%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr6.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def18.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p54.8%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative54.8%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative54.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*54.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified54.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 41.9%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac1.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow21.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*1.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow21.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*1.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified60.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 1.69999999999999997e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -4.8 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 2.05 \cdot 10^{-224}:\\ \;\;\;\;-0.125 \cdot \frac{\left(D \cdot D\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\frac{d}{M \cdot M}}\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 20: 59.0% accurate, 1.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ t_1 := \frac{M}{\frac{d}{M}}\\ \mathbf{if}\;d \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{+105}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
          (sqrt (* (/ d h) (/ d l)))))
        (t_1 (/ M (/ d M))))
   (if (<= d -3.4e-91)
     t_0
     (if (<= d -5e-310)
       (*
        (* d (sqrt (/ 1.0 (* h l))))
        (+ -1.0 (* (* D (/ D l)) (* (* t_1 (/ h d)) 0.125))))
       (if (<= d 1.55e-107)
         (* (sqrt (/ h (pow l 3.0))) (* -0.125 (* D (* D t_1))))
         (if (<= d 9.5e+105) t_0 (* d (/ (pow h -0.5) (sqrt l)))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -3.4e-91) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 9.5e+105) {
		tmp = t_0;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * sqrt(((d / h) * (d / l)))
    t_1 = m / (d / m)
    if (d <= (-3.4d-91)) then
        tmp = t_0
    else if (d <= (-5d-310)) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + ((d_1 * (d_1 / l)) * ((t_1 * (h / d)) * 0.125d0)))
    else if (d <= 1.55d-107) then
        tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 * (d_1 * t_1)))
    else if (d <= 9.5d+105) then
        tmp = t_0
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * Math.sqrt(((d / h) * (d / l)));
	double t_1 = M / (d / M);
	double tmp;
	if (d <= -3.4e-91) {
		tmp = t_0;
	} else if (d <= -5e-310) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	} else if (d <= 1.55e-107) {
		tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)));
	} else if (d <= 9.5e+105) {
		tmp = t_0;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * math.sqrt(((d / h) * (d / l)))
	t_1 = M / (d / M)
	tmp = 0
	if d <= -3.4e-91:
		tmp = t_0
	elif d <= -5e-310:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)))
	elif d <= 1.55e-107:
		tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D * (D * t_1)))
	elif d <= 9.5e+105:
		tmp = t_0
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * sqrt(Float64(Float64(d / h) * Float64(d / l))))
	t_1 = Float64(M / Float64(d / M))
	tmp = 0.0
	if (d <= -3.4e-91)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(D * Float64(D / l)) * Float64(Float64(t_1 * Float64(h / d)) * 0.125))));
	elseif (d <= 1.55e-107)
		tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D * Float64(D * t_1))));
	elseif (d <= 9.5e+105)
		tmp = t_0;
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	t_1 = M / (d / M);
	tmp = 0.0;
	if (d <= -3.4e-91)
		tmp = t_0;
	elseif (d <= -5e-310)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((D * (D / l)) * ((t_1 * (h / d)) * 0.125)));
	elseif (d <= 1.55e-107)
		tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D * (D * t_1)));
	elseif (d <= 9.5e+105)
		tmp = t_0;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.4e-91], t$95$0, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-107], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D * N[(D * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.5e+105], t$95$0, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
t_1 := \frac{M}{\frac{d}{M}}\\
\mathbf{if}\;d \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(t_1 \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot t_1\right)\right)\right)\\

\mathbf{elif}\;d \leq 9.5 \cdot 10^{+105}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -3.40000000000000027e-91 or 1.55000000000000011e-107 < d < 9.4999999999999995e105

    1. Initial program 79.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. Applied egg-rr18.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def31.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p66.8%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative66.8%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative66.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*66.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified66.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 57.5%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*57.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative57.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow257.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*58.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative58.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*59.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow259.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow259.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*61.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*65.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative65.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified65.8%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -3.40000000000000027e-91 < d < -4.999999999999985e-310

    1. Initial program 49.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. Applied egg-rr8.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def13.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p44.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative44.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*44.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified44.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 77.3%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*77.3%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in77.3%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/77.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified77.3%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 51.6%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative51.6%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac59.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow259.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*61.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow261.7%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative64.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*67.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified67.0%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if -4.999999999999985e-310 < d < 1.55000000000000011e-107

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval47.9%

        \[\leadsto \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) \]
      2. unpow1/247.9%

        \[\leadsto \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) \]
      3. metadata-eval47.9%

        \[\leadsto \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) \]
      4. unpow1/247.9%

        \[\leadsto \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) \]
      5. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified46.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*46.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative47.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative46.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr46.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around 0 39.5%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    7. Step-by-step derivation
      1. associate-*r*39.5%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutative39.5%

        \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. associate-*r/37.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)}\right) \]
      4. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left({D}^{2} \cdot \frac{\color{blue}{M \cdot M}}{d}\right)\right) \]
      5. unpow237.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(\color{blue}{\left(D \cdot D\right)} \cdot \frac{M \cdot M}{d}\right)\right) \]
      6. associate-*l*41.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \color{blue}{\left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)}\right) \]
      7. associate-/l*48.9%

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \color{blue}{\frac{M}{\frac{d}{M}}}\right)\right)\right) \]
    8. Simplified48.9%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)} \]

    if 9.4999999999999995e105 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \left(D \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{+105}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 21: 54.7% accurate, 1.6× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\ t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -4.3 \cdot 10^{-90}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - t_0\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
        (t_1 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -4.3e-90)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_1)
     (if (<= d 3.1e-301)
       (* (* d (sqrt (/ 1.0 (* h l)))) (+ -1.0 t_0))
       (if (<= d 3.8e+106)
         (* (- 1.0 t_0) t_1)
         (* d (/ (pow h -0.5) (sqrt l))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -4.3e-90) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.1e-301) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 3.8e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)
    t_1 = sqrt(((d / h) * (d / l)))
    if (d <= (-4.3d-90)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_1
    else if (d <= 3.1d-301) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + t_0)
    else if (d <= 3.8d+106) then
        tmp = (1.0d0 - t_0) * t_1
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -4.3e-90) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.1e-301) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 3.8e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)
	t_1 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -4.3e-90:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1
	elif d <= 3.1e-301:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0)
	elif d <= 3.8e+106:
		tmp = (1.0 - t_0) * t_1
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))
	t_1 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -4.3e-90)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_1);
	elseif (d <= 3.1e-301)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + t_0));
	elseif (d <= 3.8e+106)
		tmp = Float64(Float64(1.0 - t_0) * t_1);
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	t_1 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -4.3e-90)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	elseif (d <= 3.1e-301)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	elseif (d <= 3.8e+106)
		tmp = (1.0 - t_0) * t_1;
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -4.3e-90], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 3.1e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e+106], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\
t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -4.3 \cdot 10^{-90}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - t_0\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -4.3000000000000002e-90

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p70.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative70.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 54.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow254.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified62.0%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -4.3000000000000002e-90 < d < 3.10000000000000014e-301

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr7.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def12.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p40.9%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative40.9%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified40.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 71.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg71.8%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*71.8%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in71.8%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/71.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified71.8%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 47.9%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative47.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac54.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow254.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*62.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified62.2%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 3.10000000000000014e-301 < d < 3.7999999999999998e106

    1. Initial program 61.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. Applied egg-rr8.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def16.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p50.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative50.1%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified50.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 34.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*2.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified53.2%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 3.7999999999999998e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. sqrt-div78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    10. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\frac{\sqrt{\frac{1}{h}}}{\sqrt{\ell}}} \]
    11. Step-by-step derivation
      1. div-inv78.3%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{\frac{1}{h}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
      2. inv-pow78.3%

        \[\leadsto d \cdot \left(\sqrt{\color{blue}{{h}^{-1}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
    12. Applied egg-rr78.3%

      \[\leadsto d \cdot \color{blue}{\left(\sqrt{{h}^{-1}} \cdot \frac{1}{\sqrt{\ell}}\right)} \]
    13. Step-by-step derivation
      1. associate-*r/78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}} \cdot 1}{\sqrt{\ell}}} \]
      2. associate-/l*78.3%

        \[\leadsto d \cdot \color{blue}{\frac{\sqrt{{h}^{-1}}}{\frac{\sqrt{\ell}}{1}}} \]
      3. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\sqrt{\color{blue}{{h}^{\left(\frac{-1}{2}\right)} \cdot {h}^{\left(\frac{-1}{2}\right)}}}}{\frac{\sqrt{\ell}}{1}} \]
      4. rem-sqrt-square78.4%

        \[\leadsto d \cdot \frac{\color{blue}{\left|{h}^{\left(\frac{-1}{2}\right)}\right|}}{\frac{\sqrt{\ell}}{1}} \]
      5. metadata-eval78.4%

        \[\leadsto d \cdot \frac{\left|{h}^{\color{blue}{-0.5}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      6. sqr-pow78.2%

        \[\leadsto d \cdot \frac{\left|\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}\right|}{\frac{\sqrt{\ell}}{1}} \]
      7. fabs-sqr78.2%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{\left(\frac{-0.5}{2}\right)} \cdot {h}^{\left(\frac{-0.5}{2}\right)}}}{\frac{\sqrt{\ell}}{1}} \]
      8. sqr-pow78.4%

        \[\leadsto d \cdot \frac{\color{blue}{{h}^{-0.5}}}{\frac{\sqrt{\ell}}{1}} \]
      9. /-rgt-identity78.4%

        \[\leadsto d \cdot \frac{{h}^{-0.5}}{\color{blue}{\sqrt{\ell}}} \]
    14. Simplified78.4%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -4.3 \cdot 10^{-90}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 22: 54.7% accurate, 1.6× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\ t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -3.75 \cdot 10^{-90}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq 3.3 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\ \mathbf{elif}\;d \leq 5.5 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - t_0\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
        (t_1 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -3.75e-90)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_1)
     (if (<= d 3.3e-301)
       (* (* d (sqrt (/ 1.0 (* h l)))) (+ -1.0 t_0))
       (if (<= d 5.5e+106) (* (- 1.0 t_0) t_1) (/ d (* (sqrt h) (sqrt l))))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -3.75e-90) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.3e-301) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 5.5e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)
    t_1 = sqrt(((d / h) * (d / l)))
    if (d <= (-3.75d-90)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_1
    else if (d <= 3.3d-301) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + t_0)
    else if (d <= 5.5d+106) then
        tmp = (1.0d0 - t_0) * t_1
    else
        tmp = d / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -3.75e-90) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.3e-301) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 5.5e+106) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)
	t_1 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -3.75e-90:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1
	elif d <= 3.3e-301:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0)
	elif d <= 5.5e+106:
		tmp = (1.0 - t_0) * t_1
	else:
		tmp = d / (math.sqrt(h) * math.sqrt(l))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))
	t_1 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -3.75e-90)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_1);
	elseif (d <= 3.3e-301)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + t_0));
	elseif (d <= 5.5e+106)
		tmp = Float64(Float64(1.0 - t_0) * t_1);
	else
		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	t_1 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -3.75e-90)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	elseif (d <= 3.3e-301)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	elseif (d <= 5.5e+106)
		tmp = (1.0 - t_0) * t_1;
	else
		tmp = d / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3.75e-90], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 3.3e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.5e+106], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\
t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -3.75 \cdot 10^{-90}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq 3.3 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\

\mathbf{elif}\;d \leq 5.5 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - t_0\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -3.7499999999999999e-90

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p70.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative70.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 54.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow254.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified62.0%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -3.7499999999999999e-90 < d < 3.3e-301

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr7.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def12.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p40.9%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative40.9%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified40.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 71.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg71.8%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*71.8%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in71.8%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/71.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified71.8%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 47.9%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative47.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac54.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow254.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*62.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified62.2%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 3.3e-301 < d < 5.5e106

    1. Initial program 61.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. Applied egg-rr8.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def16.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p50.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative50.1%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified50.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 34.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*2.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified53.2%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 5.5e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
      2. frac-times73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
      3. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      4. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      6. metadata-eval75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
      7. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
      8. frac-times75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      9. associate-*l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. associate-*r/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. associate-/l/75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      12. *-commutative75.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied egg-rr75.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative66.4%

        \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
      3. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. associate-/l/66.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
      3. add-cbrt-cube57.6%

        \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
      4. add-sqr-sqrt57.6%

        \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      5. pow157.6%

        \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
      6. add-sqr-sqrt57.6%

        \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      7. add-cbrt-cube66.4%

        \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
      8. associate-/l/66.4%

        \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
      9. sqrt-div66.3%

        \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
      10. metadata-eval66.3%

        \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
      11. *-commutative66.3%

        \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
    10. Applied egg-rr66.3%

      \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow166.3%

        \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
      2. associate-*r/66.4%

        \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
      3. *-rgt-identity66.4%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
    12. Simplified66.4%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    13. Step-by-step derivation
      1. sqrt-prod78.3%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    14. Applied egg-rr78.3%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.75 \cdot 10^{-90}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 3.3 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 5.5 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]

Alternative 23: 53.1% accurate, 2.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\ t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -5.2 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\ \mathbf{elif}\;d \leq 2.1 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - t_0\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
        (t_1 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -5.2e-92)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_1)
     (if (<= d 3.1e-301)
       (* (* d (sqrt (/ 1.0 (* h l)))) (+ -1.0 t_0))
       (if (<= d 2.1e+104) (* (- 1.0 t_0) t_1) (* d (pow (* h l) -0.5)))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -5.2e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.1e-301) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.1e+104) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * pow((h * l), -0.5);
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = (d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0)
    t_1 = sqrt(((d / h) * (d / l)))
    if (d <= (-5.2d-92)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_1
    else if (d <= 3.1d-301) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + t_0)
    else if (d <= 2.1d+104) then
        tmp = (1.0d0 - t_0) * t_1
    else
        tmp = d * ((h * l) ** (-0.5d0))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	double t_1 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -5.2e-92) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	} else if (d <= 3.1e-301) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	} else if (d <= 2.1e+104) {
		tmp = (1.0 - t_0) * t_1;
	} else {
		tmp = d * Math.pow((h * l), -0.5);
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125)
	t_1 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -5.2e-92:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1
	elif d <= 3.1e-301:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + t_0)
	elif d <= 2.1e+104:
		tmp = (1.0 - t_0) * t_1
	else:
		tmp = d * math.pow((h * l), -0.5)
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))
	t_1 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -5.2e-92)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_1);
	elseif (d <= 3.1e-301)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + t_0));
	elseif (d <= 2.1e+104)
		tmp = Float64(Float64(1.0 - t_0) * t_1);
	else
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125);
	t_1 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -5.2e-92)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_1;
	elseif (d <= 3.1e-301)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + t_0);
	elseif (d <= 2.1e+104)
		tmp = (1.0 - t_0) * t_1;
	else
		tmp = d * ((h * l) ^ -0.5);
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -5.2e-92], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 3.1e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.1e+104], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\\
t_1 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -5.2 \cdot 10^{-92}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + t_0\right)\\

\mathbf{elif}\;d \leq 2.1 \cdot 10^{+104}:\\
\;\;\;\;\left(1 - t_0\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -5.2e-92

    1. Initial program 81.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. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p70.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative70.0%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*70.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 54.4%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow254.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative56.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative62.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified62.0%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -5.2e-92 < d < 3.10000000000000014e-301

    1. Initial program 47.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr7.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def12.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p40.9%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative40.9%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*40.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified40.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 71.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg71.8%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*71.8%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in71.8%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/71.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified71.8%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 47.9%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. *-commutative47.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac54.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow254.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*57.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow257.3%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative59.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*62.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    10. Simplified62.2%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 3.10000000000000014e-301 < d < 2.0999999999999998e104

    1. Initial program 61.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. Applied egg-rr8.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def16.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p50.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative50.1%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*50.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified50.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 34.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*3.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow23.0%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*2.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified53.2%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 2.0999999999999998e104 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. pow1/273.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{0.5}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. sqr-pow73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. pow273.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied egg-rr73.1%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. unpow-166.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \]
      3. sqr-pow66.5%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \]
      4. rem-sqrt-square66.5%

        \[\leadsto d \cdot \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \]
      5. sqr-pow66.1%

        \[\leadsto d \cdot \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \]
      6. fabs-sqr66.1%

        \[\leadsto d \cdot \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \]
      7. sqr-pow66.5%

        \[\leadsto d \cdot \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval66.5%

        \[\leadsto d \cdot {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \]
    8. Simplified66.5%

      \[\leadsto \color{blue}{d \cdot {\left(\ell \cdot h\right)}^{-0.5}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.2 \cdot 10^{-92}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;d \leq 2.1 \cdot 10^{+104}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]

Alternative 24: 48.7% accurate, 2.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -9.8 \cdot 10^{-110}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{+105}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* (/ d h) (/ d l)))))
   (if (<= d -9.8e-110)
     (* (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))) t_0)
     (if (<= d 4.8e+105)
       (* (- 1.0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125))) t_0)
       (* d (pow (* h l) -0.5))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -9.8e-110) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else if (d <= 4.8e+105) {
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * t_0;
	} else {
		tmp = d * pow((h * l), -0.5);
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = sqrt(((d / h) * (d / l)))
    if (d <= (-9.8d-110)) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * t_0
    else if (d <= 4.8d+105) then
        tmp = (1.0d0 - ((d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0))) * t_0
    else
        tmp = d * ((h * l) ** (-0.5d0))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (d <= -9.8e-110) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	} else if (d <= 4.8e+105) {
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * t_0;
	} else {
		tmp = d * Math.pow((h * l), -0.5);
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if d <= -9.8e-110:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0
	elif d <= 4.8e+105:
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * t_0
	else:
		tmp = d * math.pow((h * l), -0.5)
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (d <= -9.8e-110)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * t_0);
	elseif (d <= 4.8e+105)
		tmp = Float64(Float64(1.0 - Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))) * t_0);
	else
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (d <= -9.8e-110)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * t_0;
	elseif (d <= 4.8e+105)
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * t_0;
	else
		tmp = d * ((h * l) ^ -0.5);
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -9.8e-110], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[d, 4.8e+105], N[(N[(1.0 - N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;d \leq -9.8 \cdot 10^{-110}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot t_0\\

\mathbf{elif}\;d \leq 4.8 \cdot 10^{+105}:\\
\;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot t_0\\

\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -9.7999999999999995e-110

    1. Initial program 80.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr26.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def36.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p68.9%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative68.9%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative68.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*68.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified68.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 52.7%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*52.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative52.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow252.7%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative54.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*57.2%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow257.2%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow257.2%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*58.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*61.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative61.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified61.3%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if -9.7999999999999995e-110 < d < 4.7999999999999995e105

    1. Initial program 57.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. Applied egg-rr7.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def15.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p47.3%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative47.3%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative47.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*47.2%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified47.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 31.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative13.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac14.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow214.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac17.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow217.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*17.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow217.4%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/18.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative18.1%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*18.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified47.3%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 4.7999999999999995e105 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. pow1/273.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{0.5}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. sqr-pow73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. pow273.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied egg-rr73.1%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. unpow-166.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \]
      3. sqr-pow66.5%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \]
      4. rem-sqrt-square66.5%

        \[\leadsto d \cdot \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \]
      5. sqr-pow66.1%

        \[\leadsto d \cdot \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \]
      6. fabs-sqr66.1%

        \[\leadsto d \cdot \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \]
      7. sqr-pow66.5%

        \[\leadsto d \cdot \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval66.5%

        \[\leadsto d \cdot {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \]
    8. Simplified66.5%

      \[\leadsto \color{blue}{d \cdot {\left(\ell \cdot h\right)}^{-0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -9.8 \cdot 10^{-110}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{+105}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]

Alternative 25: 55.2% accurate, 2.5× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq 2.45 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= d 2.45e-301)
   (*
    (* d (sqrt (/ 1.0 (* h l))))
    (+ -1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D)))))
   (if (<= d 4.5e+106)
     (*
      (- 1.0 (* (* D (/ D l)) (* (* (/ M (/ d M)) (/ h d)) 0.125)))
      (sqrt (* (/ d h) (/ d l))))
     (* d (pow (* h l) -0.5)))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= 2.45e-301) {
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else if (d <= 4.5e+106) {
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * pow((h * l), -0.5);
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    if (d <= 2.45d-301) then
        tmp = (d * sqrt((1.0d0 / (h * l)))) * ((-1.0d0) + (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1))))
    else if (d <= 4.5d+106) then
        tmp = (1.0d0 - ((d_1 * (d_1 / l)) * (((m / (d / m)) * (h / d)) * 0.125d0))) * sqrt(((d / h) * (d / l)))
    else
        tmp = d * ((h * l) ** (-0.5d0))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= 2.45e-301) {
		tmp = (d * Math.sqrt((1.0 / (h * l)))) * (-1.0 + (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	} else if (d <= 4.5e+106) {
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * Math.pow((h * l), -0.5);
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	tmp = 0
	if d <= 2.45e-301:
		tmp = (d * math.sqrt((1.0 / (h * l)))) * (-1.0 + (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))))
	elif d <= 4.5e+106:
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * math.sqrt(((d / h) * (d / l)))
	else:
		tmp = d * math.pow((h * l), -0.5)
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (d <= 2.45e-301)
		tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))));
	elseif (d <= 4.5e+106)
		tmp = Float64(Float64(1.0 - Float64(Float64(D * Float64(D / l)) * Float64(Float64(Float64(M / Float64(d / M)) * Float64(h / d)) * 0.125))) * sqrt(Float64(Float64(d / h) * Float64(d / l))));
	else
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (d <= 2.45e-301)
		tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D))));
	elseif (d <= 4.5e+106)
		tmp = (1.0 - ((D * (D / l)) * (((M / (d / M)) * (h / d)) * 0.125))) * sqrt(((d / h) * (d / l)));
	else
		tmp = d * ((h * l) ^ -0.5);
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 2.45e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.5e+106], N[(N[(1.0 - N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq 2.45 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\

\mathbf{elif}\;d \leq 4.5 \cdot 10^{+106}:\\
\;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 2.45e-301

    1. Initial program 69.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. Applied egg-rr19.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def27.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p59.3%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative59.3%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*59.3%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified59.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 70.2%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg70.2%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*70.2%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in70.2%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/70.2%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified70.2%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in M around 0 52.4%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\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) \]
    9. Step-by-step derivation
      1. associate-/l*43.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative43.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow243.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*45.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative45.0%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*47.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow247.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow247.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*48.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*50.5%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative50.5%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    10. Simplified61.1%

      \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if 2.45e-301 < d < 4.4999999999999997e106

    1. Initial program 60.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr7.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def16.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p49.6%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative49.6%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative49.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*49.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified49.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 34.2%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}} \cdot 0.125}\right) \]
      2. times-frac0.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} \cdot 0.125\right) \]
      3. unpow20.5%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \frac{{M}^{2} \cdot h}{\color{blue}{d \cdot d}}\right) \cdot 0.125\right) \]
      4. times-frac2.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \frac{h}{d}\right)}\right) \cdot 0.125\right) \]
      5. unpow22.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(\frac{{D}^{2}}{\ell} \cdot \left(\frac{\color{blue}{M \cdot M}}{d} \cdot \frac{h}{d}\right)\right) \cdot 0.125\right) \]
      6. associate-*l*2.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\frac{{D}^{2}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]
      7. unpow22.9%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\color{blue}{D \cdot D}}{\ell} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      8. associate-*l/2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{\ell} \cdot D\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      9. *-commutative2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right)} \cdot \left(\left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
      10. associate-/l*2.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\color{blue}{\frac{M}{\frac{d}{M}}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \]
    7. Simplified52.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)}\right) \]

    if 4.4999999999999997e106 < d

    1. Initial program 73.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. Step-by-step derivation
      1. metadata-eval73.2%

        \[\leadsto \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) \]
      2. unpow1/273.2%

        \[\leadsto \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) \]
      3. metadata-eval73.2%

        \[\leadsto \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) \]
      4. unpow1/273.2%

        \[\leadsto \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) \]
      5. *-commutative73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval73.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified73.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. pow1/273.2%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{0.5}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. sqr-pow73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. pow273.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval73.1%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied egg-rr73.1%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Taylor expanded in d around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. unpow-166.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \]
      3. sqr-pow66.5%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \]
      4. rem-sqrt-square66.5%

        \[\leadsto d \cdot \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \]
      5. sqr-pow66.1%

        \[\leadsto d \cdot \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \]
      6. fabs-sqr66.1%

        \[\leadsto d \cdot \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \]
      7. sqr-pow66.5%

        \[\leadsto d \cdot \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval66.5%

        \[\leadsto d \cdot {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \]
    8. Simplified66.5%

      \[\leadsto \color{blue}{d \cdot {\left(\ell \cdot h\right)}^{-0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 2.45 \cdot 10^{-301}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right)\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+106}:\\ \;\;\;\;\left(1 - \left(D \cdot \frac{D}{\ell}\right) \cdot \left(\left(\frac{M}{\frac{d}{M}} \cdot \frac{h}{d}\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]

Alternative 26: 47.1% accurate, 2.6× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{+29}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= l 9.5e+29)
   (*
    (- 1.0 (* 0.125 (/ D (/ (/ (* d d) (/ (* h M) (/ l M))) D))))
    (sqrt (* (/ d h) (/ d l))))
   (* d (pow (* h l) -0.5))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= 9.5e+29) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * pow((h * l), -0.5);
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    if (l <= 9.5d+29) then
        tmp = (1.0d0 - (0.125d0 * (d_1 / (((d * d) / ((h * m) / (l / m))) / d_1)))) * sqrt(((d / h) * (d / l)))
    else
        tmp = d * ((h * l) ** (-0.5d0))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= 9.5e+29) {
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = d * Math.pow((h * l), -0.5);
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	tmp = 0
	if l <= 9.5e+29:
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * math.sqrt(((d / h) * (d / l)))
	else:
		tmp = d * math.pow((h * l), -0.5)
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= 9.5e+29)
		tmp = Float64(Float64(1.0 - Float64(0.125 * Float64(D / Float64(Float64(Float64(d * d) / Float64(Float64(h * M) / Float64(l / M))) / D)))) * sqrt(Float64(Float64(d / h) * Float64(d / l))));
	else
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= 9.5e+29)
		tmp = (1.0 - (0.125 * (D / (((d * d) / ((h * M) / (l / M))) / D)))) * sqrt(((d / h) * (d / l)));
	else
		tmp = d * ((h * l) ^ -0.5);
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 9.5e+29], N[(N[(1.0 - N[(0.125 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / N[(N[(h * M), $MachinePrecision] / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.5 \cdot 10^{+29}:\\
\;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 9.5000000000000003e29

    1. Initial program 69.8%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr16.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def22.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p59.6%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative59.6%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative59.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*59.5%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified59.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in M around 0 41.8%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*42.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{{M}^{2} \cdot h}}}\right) \]
      2. *-commutative42.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{{D}^{2}}{\frac{\ell \cdot {d}^{2}}{\color{blue}{h \cdot {M}^{2}}}}\right) \]
      3. unpow242.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{\color{blue}{D \cdot D}}{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}\right) \]
      4. associate-/l*44.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \color{blue}{\frac{D}{\frac{\frac{\ell \cdot {d}^{2}}{h \cdot {M}^{2}}}{D}}}\right) \]
      5. *-commutative44.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{{d}^{2} \cdot \ell}}{h \cdot {M}^{2}}}{D}}\right) \]
      6. associate-/l*46.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\color{blue}{\frac{{d}^{2}}{\frac{h \cdot {M}^{2}}{\ell}}}}{D}}\right) \]
      7. unpow246.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{\color{blue}{d \cdot d}}{\frac{h \cdot {M}^{2}}{\ell}}}{D}}\right) \]
      8. unpow246.1%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}}}{D}}\right) \]
      9. associate-*r*48.8%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}}}{D}}\right) \]
      10. associate-/l*51.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}}}{D}}\right) \]
      11. *-commutative51.6%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{\color{blue}{M \cdot h}}{\frac{\ell}{M}}}}{D}}\right) \]
    7. Simplified51.6%

      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \color{blue}{0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{M \cdot h}{\frac{\ell}{M}}}}{D}}}\right) \]

    if 9.5000000000000003e29 < l

    1. Initial program 56.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval56.4%

        \[\leadsto \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) \]
      2. unpow1/256.4%

        \[\leadsto \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) \]
      3. metadata-eval56.4%

        \[\leadsto \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) \]
      4. unpow1/256.4%

        \[\leadsto \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) \]
      5. *-commutative56.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*56.4%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
      7. times-frac54.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
      8. metadata-eval54.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
    3. Simplified54.9%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. pow1/254.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{0.5}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. sqr-pow54.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. pow254.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      4. metadata-eval54.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied egg-rr54.8%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Taylor expanded in d around inf 48.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    7. Step-by-step derivation
      1. *-commutative48.5%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. unpow-148.5%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \]
      3. sqr-pow48.5%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \]
      4. rem-sqrt-square48.5%

        \[\leadsto d \cdot \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \]
      5. sqr-pow48.3%

        \[\leadsto d \cdot \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \]
      6. fabs-sqr48.3%

        \[\leadsto d \cdot \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \]
      7. sqr-pow48.5%

        \[\leadsto d \cdot \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval48.5%

        \[\leadsto d \cdot {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \]
    8. Simplified48.5%

      \[\leadsto \color{blue}{d \cdot {\left(\ell \cdot h\right)}^{-0.5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{+29}:\\ \;\;\;\;\left(1 - 0.125 \cdot \frac{D}{\frac{\frac{d \cdot d}{\frac{h \cdot M}{\frac{\ell}{M}}}}{D}}\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]

Alternative 27: 38.0% accurate, 3.0× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} \mathbf{if}\;h \leq -7 \cdot 10^{-179}:\\ \;\;\;\;\left(-d\right) \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= h -7e-179) (* (- d) (pow (* h l) -0.5)) (* d (sqrt (/ 1.0 (* h l))))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= -7e-179) {
		tmp = -d * pow((h * l), -0.5);
	} else {
		tmp = d * sqrt((1.0 / (h * l)));
	}
	return tmp;
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    if (h <= (-7d-179)) then
        tmp = -d * ((h * l) ** (-0.5d0))
    else
        tmp = d * sqrt((1.0d0 / (h * l)))
    end if
    code = tmp
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= -7e-179) {
		tmp = -d * Math.pow((h * l), -0.5);
	} else {
		tmp = d * Math.sqrt((1.0 / (h * l)));
	}
	return tmp;
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	tmp = 0
	if h <= -7e-179:
		tmp = -d * math.pow((h * l), -0.5)
	else:
		tmp = d * math.sqrt((1.0 / (h * l)))
	return tmp
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (h <= -7e-179)
		tmp = Float64(Float64(-d) * (Float64(h * l) ^ -0.5));
	else
		tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l))));
	end
	return tmp
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (h <= -7e-179)
		tmp = -d * ((h * l) ^ -0.5);
	else
		tmp = d * sqrt((1.0 / (h * l)));
	end
	tmp_2 = tmp;
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[h, -7e-179], N[((-d) * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;h \leq -7 \cdot 10^{-179}:\\
\;\;\;\;\left(-d\right) \cdot {\left(h \cdot \ell\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < -7.00000000000000049e-179

    1. Initial program 68.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. Applied egg-rr19.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)} - 1} \]
    3. Step-by-step derivation
      1. expm1-def31.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)\right)\right)} \]
      2. expm1-log1p56.9%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right)} \]
      3. *-commutative56.9%

        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \left(1 - {\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      4. *-commutative56.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{0.5 \cdot h}{\ell}\right) \]
      5. associate-/l*56.9%

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\frac{0.5}{\frac{\ell}{h}}}\right) \]
    4. Simplified56.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)} \]
    5. Taylor expanded in d around -inf 69.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg69.8%

        \[\leadsto \color{blue}{\left(-d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      2. associate-/r*69.8%

        \[\leadsto \left(-d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      3. distribute-rgt-neg-in69.8%

        \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
      4. associate-/l/69.8%

        \[\leadsto \left(d \cdot \left(-\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    7. Simplified69.8%

      \[\leadsto \color{blue}{\left(d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - {\left(M \cdot \frac{D}{2 \cdot d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right) \]
    8. Taylor expanded in d around inf 33.6%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg33.6%

        \[\leadsto \color{blue}{-d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative33.6%

        \[\leadsto -\color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      3. distribute-rgt-neg-in33.6%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)} \]
      4. unpow-133.6%

        \[\leadsto \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \cdot \left(-d\right) \]
      5. sqr-pow33.6%

        \[\leadsto \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \cdot \left(-d\right) \]
      6. rem-sqrt-square33.6%

        \[\leadsto \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \cdot \left(-d\right) \]
      7. sqr-pow33.5%

        \[\leadsto \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \cdot \left(-d\right) \]
      8. fabs-sqr33.5%

        \[\leadsto \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \cdot \left(-d\right) \]
      9. sqr-pow33.6%

        \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \cdot \left(-d\right) \]
      10. metadata-eval33.6%

        \[\leadsto {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \cdot \left(-d\right) \]
    10. Simplified33.6%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot \left(-d\right)} \]

    if -7.00000000000000049e-179 < h

    1. Initial program 65.8%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf 38.2%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -7 \cdot 10^{-179}:\\ \;\;\;\;\left(-d\right) \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 28: 25.3% accurate, 3.1× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ (/ 1.0 h) l))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	return d * sqrt(((1.0 / h) / l));
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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
    code = d * sqrt(((1.0d0 / h) / l))
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	return d * Math.sqrt(((1.0 / h) / l));
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	return d * math.sqrt(((1.0 / h) / l))
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	return Float64(d * sqrt(Float64(Float64(1.0 / h) / l)))
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp = code(d, h, l, M, D)
	tmp = d * sqrt(((1.0 / h) / l));
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}
\end{array}
Derivation
  1. Initial program 66.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. Step-by-step derivation
    1. metadata-eval66.6%

      \[\leadsto \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) \]
    2. unpow1/266.6%

      \[\leadsto \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) \]
    3. metadata-eval66.6%

      \[\leadsto \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) \]
    4. unpow1/266.6%

      \[\leadsto \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) \]
    5. *-commutative66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
    6. associate-*l*66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    7. times-frac66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
    8. metadata-eval66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
  3. Simplified66.2%

    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
  4. Step-by-step derivation
    1. associate-*r*66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
    2. frac-times66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
    3. *-commutative66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
    4. metadata-eval66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    5. associate-*r/68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    6. metadata-eval68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
    7. *-commutative68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
    8. frac-times68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    9. associate-*l/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    10. associate-*r/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    11. associate-/l/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    12. *-commutative68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
  5. Applied egg-rr68.2%

    \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
  6. Taylor expanded in d around inf 28.4%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  7. Step-by-step derivation
    1. *-commutative28.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
    2. *-commutative28.4%

      \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
    3. associate-/r*28.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
  8. Simplified28.4%

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
  9. Final simplification28.4%

    \[\leadsto d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}} \]

Alternative 29: 25.2% accurate, 3.1× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ d \cdot \sqrt{\frac{1}{h \cdot \ell}} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ 1.0 (* h l)))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	return d * sqrt((1.0 / (h * l)));
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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
    code = d * sqrt((1.0d0 / (h * l)))
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	return d * Math.sqrt((1.0 / (h * l)));
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	return d * math.sqrt((1.0 / (h * l)))
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	return Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp = code(d, h, l, M, D)
	tmp = d * sqrt((1.0 / (h * l)));
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
d \cdot \sqrt{\frac{1}{h \cdot \ell}}
\end{array}
Derivation
  1. Initial program 66.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. Taylor expanded in d around inf 28.4%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Final simplification28.4%

    \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]

Alternative 30: 25.2% accurate, 3.1× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ d \cdot {\left(h \cdot \ell\right)}^{-0.5} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D) :precision binary64 (* d (pow (* h l) -0.5)))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	return d * pow((h * l), -0.5);
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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
    code = d * ((h * l) ** (-0.5d0))
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	return d * Math.pow((h * l), -0.5);
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	return d * math.pow((h * l), -0.5)
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	return Float64(d * (Float64(h * l) ^ -0.5))
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp = code(d, h, l, M, D)
	tmp = d * ((h * l) ^ -0.5);
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
d \cdot {\left(h \cdot \ell\right)}^{-0.5}
\end{array}
Derivation
  1. Initial program 66.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. Step-by-step derivation
    1. metadata-eval66.6%

      \[\leadsto \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) \]
    2. unpow1/266.6%

      \[\leadsto \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) \]
    3. metadata-eval66.6%

      \[\leadsto \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) \]
    4. unpow1/266.6%

      \[\leadsto \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) \]
    5. *-commutative66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
    6. associate-*l*66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    7. times-frac66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
    8. metadata-eval66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
  3. Simplified66.2%

    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
  4. Step-by-step derivation
    1. pow1/266.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{0.5}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    2. sqr-pow66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    3. pow266.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    4. metadata-eval66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot {\left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.25}}\right)}^{2}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
  5. Applied egg-rr66.2%

    \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
  6. Taylor expanded in d around inf 28.4%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  7. Step-by-step derivation
    1. *-commutative28.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
    2. unpow-128.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-1}}} \]
    3. sqr-pow28.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}}} \]
    4. rem-sqrt-square28.1%

      \[\leadsto d \cdot \color{blue}{\left|{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}\right|} \]
    5. sqr-pow28.0%

      \[\leadsto d \cdot \left|\color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}}\right| \]
    6. fabs-sqr28.0%

      \[\leadsto d \cdot \color{blue}{\left({\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot {\left(\ell \cdot h\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)} \]
    7. sqr-pow28.1%

      \[\leadsto d \cdot \color{blue}{{\left(\ell \cdot h\right)}^{\left(\frac{-1}{2}\right)}} \]
    8. metadata-eval28.1%

      \[\leadsto d \cdot {\left(\ell \cdot h\right)}^{\color{blue}{-0.5}} \]
  8. Simplified28.1%

    \[\leadsto \color{blue}{d \cdot {\left(\ell \cdot h\right)}^{-0.5}} \]
  9. Final simplification28.1%

    \[\leadsto d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]

Alternative 31: 25.2% accurate, 3.2× speedup?

\[\begin{array}{l} M = |M|\\ [M, D] = \mathsf{sort}([M, D])\\ \\ \frac{d}{\sqrt{h \cdot \ell}} \end{array} \]
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
M = abs(M);
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	return d / sqrt((h * l));
}
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this 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
    code = d / sqrt((h * l))
end function
M = Math.abs(M);
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	return d / Math.sqrt((h * l));
}
M = abs(M)
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	return d / math.sqrt((h * l))
M = abs(M)
M, D = sort([M, D])
function code(d, h, l, M, D)
	return Float64(d / sqrt(Float64(h * l)))
end
M = abs(M)
M, D = num2cell(sort([M, D])){:}
function tmp = code(d, h, l, M, D)
	tmp = d / sqrt((h * l));
end
NOTE: M should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M = |M|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Derivation
  1. Initial program 66.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. Step-by-step derivation
    1. metadata-eval66.6%

      \[\leadsto \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) \]
    2. unpow1/266.6%

      \[\leadsto \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) \]
    3. metadata-eval66.6%

      \[\leadsto \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) \]
    4. unpow1/266.6%

      \[\leadsto \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) \]
    5. *-commutative66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
    6. associate-*l*66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    7. times-frac66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)\right) \]
    8. metadata-eval66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\color{blue}{0.5} \cdot \frac{h}{\ell}\right)\right) \]
  3. Simplified66.2%

    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
  4. Step-by-step derivation
    1. associate-*r*66.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}}\right) \]
    2. frac-times66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \]
    3. *-commutative66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(0.5 \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
    4. metadata-eval66.6%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    5. associate-*r/68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    6. metadata-eval68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left(\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}\right) \]
    7. *-commutative68.5%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot 0.5\right)} \cdot h}{\ell}\right) \]
    8. frac-times68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    9. associate-*l/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{M \cdot \frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    10. associate-*r/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    11. associate-/l/68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \color{blue}{\frac{D}{2 \cdot d}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
    12. *-commutative68.2%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(M \cdot \frac{D}{\color{blue}{d \cdot 2}}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
  5. Applied egg-rr68.2%

    \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{\left({\left(M \cdot \frac{D}{d \cdot 2}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}}\right) \]
  6. Taylor expanded in d around inf 28.4%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  7. Step-by-step derivation
    1. *-commutative28.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
    2. *-commutative28.4%

      \[\leadsto d \cdot \sqrt{\frac{1}{\color{blue}{h \cdot \ell}}} \]
    3. associate-/r*28.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
  8. Simplified28.4%

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]
  9. Step-by-step derivation
    1. associate-/r*28.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
    2. associate-/l/28.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    3. add-cbrt-cube26.3%

      \[\leadsto d \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}} \]
    4. add-sqr-sqrt26.3%

      \[\leadsto d \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
    5. pow126.3%

      \[\leadsto \color{blue}{{\left(d \cdot \sqrt[3]{\frac{\frac{1}{\ell}}{h} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1}} \]
    6. add-sqr-sqrt26.3%

      \[\leadsto {\left(d \cdot \sqrt[3]{\color{blue}{\left(\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right)} \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
    7. add-cbrt-cube28.4%

      \[\leadsto {\left(d \cdot \color{blue}{\sqrt{\frac{\frac{1}{\ell}}{h}}}\right)}^{1} \]
    8. associate-/l/28.4%

      \[\leadsto {\left(d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)}^{1} \]
    9. sqrt-div28.1%

      \[\leadsto {\left(d \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{h \cdot \ell}}}\right)}^{1} \]
    10. metadata-eval28.1%

      \[\leadsto {\left(d \cdot \frac{\color{blue}{1}}{\sqrt{h \cdot \ell}}\right)}^{1} \]
    11. *-commutative28.1%

      \[\leadsto {\left(d \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot h}}}\right)}^{1} \]
  10. Applied egg-rr28.1%

    \[\leadsto \color{blue}{{\left(d \cdot \frac{1}{\sqrt{\ell \cdot h}}\right)}^{1}} \]
  11. Step-by-step derivation
    1. unpow128.1%

      \[\leadsto \color{blue}{d \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
    2. associate-*r/28.1%

      \[\leadsto \color{blue}{\frac{d \cdot 1}{\sqrt{\ell \cdot h}}} \]
    3. *-rgt-identity28.1%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \]
  12. Simplified28.1%

    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
  13. Final simplification28.1%

    \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]

Reproduce

?
herbie shell --seed 2023207 
(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)))))