Henrywood and Agarwal, Equation (12)

Percentage Accurate: 67.3% → 74.5%
Time: 54.8s
Alternatives: 20
Speedup: 1.4×

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 20 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: 67.3% 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: 74.5% accurate, 1.0× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\\ \mathbf{if}\;h \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(t\_0 \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot t\_1\right)\right)\right)\\ \mathbf{elif}\;h \leq 2 \cdot 10^{+269}:\\ \;\;\;\;\frac{\left(t\_0 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot t\_1}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{d} \cdot \frac{\frac{D\_m \cdot -0.125}{\frac{\ell}{M\_m \cdot \left(h \cdot M\_m\right)}}}{\frac{d}{D\_m}}}{d \cdot \sqrt{h}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (sqrt (/ d h))) (t_1 (/ (* (* M_m D_m) (* h -0.5)) (* d l))))
   (if (<= h -4e-310)
     (*
      (/ (pow (- 0.0 d) 0.5) (pow (- 0.0 l) 0.5))
      (* t_0 (+ 1.0 (* (/ M_m d) (* (/ D_m 4.0) t_1)))))
     (if (<= h 2e+269)
       (/
        (* (* t_0 (+ 1.0 (/ (* (* M_m D_m) t_1) (* d 4.0)))) (sqrt d))
        (sqrt l))
       (*
        (sqrt (/ d l))
        (/
         (* (sqrt d) (/ (/ (* D_m -0.125) (/ l (* M_m (* h M_m)))) (/ d D_m)))
         (* d (sqrt h))))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = sqrt((d / h));
	double t_1 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	double tmp;
	if (h <= -4e-310) {
		tmp = (pow((0.0 - d), 0.5) / pow((0.0 - l), 0.5)) * (t_0 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_1))));
	} else if (h <= 2e+269) {
		tmp = ((t_0 * (1.0 + (((M_m * D_m) * t_1) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	} else {
		tmp = sqrt((d / l)) * ((sqrt(d) * (((D_m * -0.125) / (l / (M_m * (h * M_m)))) / (d / D_m))) / (d * sqrt(h)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sqrt((d / h))
    t_1 = ((m_m * d_m) * (h * (-0.5d0))) / (d * l)
    if (h <= (-4d-310)) then
        tmp = (((0.0d0 - d) ** 0.5d0) / ((0.0d0 - l) ** 0.5d0)) * (t_0 * (1.0d0 + ((m_m / d) * ((d_m / 4.0d0) * t_1))))
    else if (h <= 2d+269) then
        tmp = ((t_0 * (1.0d0 + (((m_m * d_m) * t_1) / (d * 4.0d0)))) * sqrt(d)) / sqrt(l)
    else
        tmp = sqrt((d / l)) * ((sqrt(d) * (((d_m * (-0.125d0)) / (l / (m_m * (h * m_m)))) / (d / d_m))) / (d * sqrt(h)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = Math.sqrt((d / h));
	double t_1 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	double tmp;
	if (h <= -4e-310) {
		tmp = (Math.pow((0.0 - d), 0.5) / Math.pow((0.0 - l), 0.5)) * (t_0 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_1))));
	} else if (h <= 2e+269) {
		tmp = ((t_0 * (1.0 + (((M_m * D_m) * t_1) / (d * 4.0)))) * Math.sqrt(d)) / Math.sqrt(l);
	} else {
		tmp = Math.sqrt((d / l)) * ((Math.sqrt(d) * (((D_m * -0.125) / (l / (M_m * (h * M_m)))) / (d / D_m))) / (d * Math.sqrt(h)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = math.sqrt((d / h))
	t_1 = ((M_m * D_m) * (h * -0.5)) / (d * l)
	tmp = 0
	if h <= -4e-310:
		tmp = (math.pow((0.0 - d), 0.5) / math.pow((0.0 - l), 0.5)) * (t_0 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_1))))
	elif h <= 2e+269:
		tmp = ((t_0 * (1.0 + (((M_m * D_m) * t_1) / (d * 4.0)))) * math.sqrt(d)) / math.sqrt(l)
	else:
		tmp = math.sqrt((d / l)) * ((math.sqrt(d) * (((D_m * -0.125) / (l / (M_m * (h * M_m)))) / (d / D_m))) / (d * math.sqrt(h)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = sqrt(Float64(d / h))
	t_1 = Float64(Float64(Float64(M_m * D_m) * Float64(h * -0.5)) / Float64(d * l))
	tmp = 0.0
	if (h <= -4e-310)
		tmp = Float64(Float64((Float64(0.0 - d) ^ 0.5) / (Float64(0.0 - l) ^ 0.5)) * Float64(t_0 * Float64(1.0 + Float64(Float64(M_m / d) * Float64(Float64(D_m / 4.0) * t_1)))));
	elseif (h <= 2e+269)
		tmp = Float64(Float64(Float64(t_0 * Float64(1.0 + Float64(Float64(Float64(M_m * D_m) * t_1) / Float64(d * 4.0)))) * sqrt(d)) / sqrt(l));
	else
		tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(sqrt(d) * Float64(Float64(Float64(D_m * -0.125) / Float64(l / Float64(M_m * Float64(h * M_m)))) / Float64(d / D_m))) / Float64(d * sqrt(h))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = sqrt((d / h));
	t_1 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	tmp = 0.0;
	if (h <= -4e-310)
		tmp = (((0.0 - d) ^ 0.5) / ((0.0 - l) ^ 0.5)) * (t_0 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_1))));
	elseif (h <= 2e+269)
		tmp = ((t_0 * (1.0 + (((M_m * D_m) * t_1) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	else
		tmp = sqrt((d / l)) * ((sqrt(d) * (((D_m * -0.125) / (l / (M_m * (h * M_m)))) / (d / D_m))) / (d * sqrt(h)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -4e-310], N[(N[(N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision] / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(1.0 + N[(N[(M$95$m / d), $MachinePrecision] * N[(N[(D$95$m / 4.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 2e+269], N[(N[(N[(t$95$0 * N[(1.0 + N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sqrt[d], $MachinePrecision] * N[(N[(N[(D$95$m * -0.125), $MachinePrecision] / N[(l / N[(M$95$m * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
t_1 := \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\\
\mathbf{if}\;h \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(t\_0 \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot t\_1\right)\right)\right)\\

\mathbf{elif}\;h \leq 2 \cdot 10^{+269}:\\
\;\;\;\;\frac{\left(t\_0 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot t\_1}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{d} \cdot \frac{\frac{D\_m \cdot -0.125}{\frac{\ell}{M\_m \cdot \left(h \cdot M\_m\right)}}}{\frac{d}{D\_m}}}{d \cdot \sqrt{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if h < -3.999999999999988e-310

    1. Initial program 66.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified57.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6466.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr66.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6468.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr68.5%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(\ell\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(\ell\right)\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
      11. --lowering--.f6474.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr74.4%

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

    if -3.999999999999988e-310 < h < 2.0000000000000001e269

    1. Initial program 74.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified60.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. sqrt-divN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      3. associate-*r/N/A

        \[\leadsto \frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}\right), \color{blue}{\left(\sqrt{\ell}\right)}\right) \]
    6. Applied egg-rr61.0%

      \[\leadsto \color{blue}{\frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{h}{\ell} \cdot -0.5}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}} \]
    7. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(D \cdot M\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(d \cdot 4\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      7. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      10. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}{d \cdot 4}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right), \left(d \cdot 4\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
    8. Applied egg-rr85.9%

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

    if 2.0000000000000001e269 < h

    1. Initial program 44.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified44.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in M around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(\frac{\frac{-1}{8}}{{d}^{2}} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(\frac{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{\color{blue}{{d}^{2}}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}\right), \color{blue}{\left({d}^{2}\right)}\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell} \cdot \frac{-1}{8}\right), \left({\color{blue}{d}}^{2}\right)\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{\ell}\right) \cdot \frac{-1}{8}\right), \left({d}^{2}\right)\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left({D}^{2} \cdot \left(\frac{{M}^{2} \cdot h}{\ell} \cdot \frac{-1}{8}\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left({D}^{2} \cdot \frac{\left({M}^{2} \cdot h\right) \cdot \frac{-1}{8}}{\ell}\right), \left({d}^{2}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\left({D}^{2} \cdot \frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\ell}\right), \left({d}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\ell}\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\ell}\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\ell}\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \ell\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2} \cdot h\right)\right), \ell\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right), \ell\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right), \ell\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right), \ell\right)\right), \left({d}^{2}\right)\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right), \ell\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right)\right) \]
      19. *-lowering-*.f6433.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right), \ell\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right)\right) \]
    7. Simplified33.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(\frac{D \cdot \left(D \cdot \frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\ell}\right)}{\color{blue}{d} \cdot d}\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(\frac{D}{d} \cdot \color{blue}{\frac{D \cdot \frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\ell}}{d}}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\frac{D \cdot \frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\ell}}{d}\right)}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\frac{\color{blue}{D \cdot \frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\ell}}}{d}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\left(D \cdot \frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\ell}\right), \color{blue}{d}\right)\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\left(D \cdot \left(\frac{-1}{8} \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}\right)\right), d\right)\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\left(\left(D \cdot \frac{-1}{8}\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}\right), d\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \frac{-1}{8}\right), \left(\frac{\left(M \cdot M\right) \cdot h}{\ell}\right)\right), d\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \left(\frac{\left(M \cdot M\right) \cdot h}{\ell}\right)\right), d\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \mathsf{/.f64}\left(\left(\left(M \cdot M\right) \cdot h\right), \ell\right)\right), d\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \ell\right)\right), d\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), \ell\right)\right), d\right)\right)\right)\right) \]
      13. *-lowering-*.f6434.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \ell\right)\right), d\right)\right)\right)\right) \]
    9. Applied egg-rr34.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{\left(D \cdot -0.125\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}}{d}\right)}\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(\frac{D}{d} \cdot \frac{\left(D \cdot \frac{-1}{8}\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}}{d}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{\frac{D}{d} \cdot \left(\left(D \cdot \frac{-1}{8}\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}\right)}{d} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{\frac{D}{d} \cdot \left(\left(D \cdot \frac{-1}{8}\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}\right)}{d} \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{\left(\frac{D}{d} \cdot \left(\left(D \cdot \frac{-1}{8}\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}\right)\right) \cdot \sqrt{d}}{\color{blue}{d \cdot \sqrt{h}}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(\left(\frac{D}{d} \cdot \left(\left(D \cdot \frac{-1}{8}\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}\right)\right) \cdot \sqrt{d}\right), \color{blue}{\left(d \cdot \sqrt{h}\right)}\right)\right) \]
    11. Applied egg-rr78.1%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{\frac{\frac{D \cdot -0.125}{\frac{\ell}{M \cdot \left(h \cdot M\right)}}}{\frac{d}{D}} \cdot \sqrt{d}}{d \cdot \sqrt{h}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

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

Alternative 2: 73.6% accurate, 1.0× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := -0.5 \cdot \frac{h}{\ell}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := 1 + \left(\frac{M\_m \cdot D\_m}{d \cdot 4} \cdot \frac{M\_m \cdot D\_m}{d}\right) \cdot t\_0\\ t_3 := \sqrt{\frac{d}{\ell}}\\ t_4 := {\left(0 - d\right)}^{0.5}\\ \mathbf{if}\;\ell \leq -1.95 \cdot 10^{+25}:\\ \;\;\;\;\frac{t\_4}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(t\_1 \cdot t\_2\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\_3 \cdot \left(\frac{t\_4}{{\left(0 - h\right)}^{0.5}} \cdot \left(1 + t\_0 \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(M\_m \cdot D\_m\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\\ \mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+86}:\\ \;\;\;\;t\_3 \cdot \left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t\_1 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (* -0.5 (/ h l)))
        (t_1 (sqrt (/ d h)))
        (t_2 (+ 1.0 (* (* (/ (* M_m D_m) (* d 4.0)) (/ (* M_m D_m) d)) t_0)))
        (t_3 (sqrt (/ d l)))
        (t_4 (pow (- 0.0 d) 0.5)))
   (if (<= l -1.95e+25)
     (* (/ t_4 (pow (- 0.0 l) 0.5)) (* t_1 t_2))
     (if (<= l -5e-310)
       (*
        t_3
        (*
         (/ t_4 (pow (- 0.0 h) 0.5))
         (+ 1.0 (* t_0 (/ (* (* M_m D_m) (* M_m D_m)) (* 4.0 (* d d)))))))
       (if (<= l 1.4e+86)
         (* t_3 (* t_2 (/ (sqrt d) (sqrt h))))
         (/
          (*
           (*
            t_1
            (+
             1.0
             (/
              (* (* M_m D_m) (/ (* (* M_m D_m) (* h -0.5)) (* d l)))
              (* d 4.0))))
           (sqrt d))
          (sqrt l)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = -0.5 * (h / l);
	double t_1 = sqrt((d / h));
	double t_2 = 1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * t_0);
	double t_3 = sqrt((d / l));
	double t_4 = pow((0.0 - d), 0.5);
	double tmp;
	if (l <= -1.95e+25) {
		tmp = (t_4 / pow((0.0 - l), 0.5)) * (t_1 * t_2);
	} else if (l <= -5e-310) {
		tmp = t_3 * ((t_4 / pow((0.0 - h), 0.5)) * (1.0 + (t_0 * (((M_m * D_m) * (M_m * D_m)) / (4.0 * (d * d))))));
	} else if (l <= 1.4e+86) {
		tmp = t_3 * (t_2 * (sqrt(d) / sqrt(h)));
	} else {
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * (((M_m * D_m) * (h * -0.5)) / (d * l))) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    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 = (-0.5d0) * (h / l)
    t_1 = sqrt((d / h))
    t_2 = 1.0d0 + ((((m_m * d_m) / (d * 4.0d0)) * ((m_m * d_m) / d)) * t_0)
    t_3 = sqrt((d / l))
    t_4 = (0.0d0 - d) ** 0.5d0
    if (l <= (-1.95d+25)) then
        tmp = (t_4 / ((0.0d0 - l) ** 0.5d0)) * (t_1 * t_2)
    else if (l <= (-5d-310)) then
        tmp = t_3 * ((t_4 / ((0.0d0 - h) ** 0.5d0)) * (1.0d0 + (t_0 * (((m_m * d_m) * (m_m * d_m)) / (4.0d0 * (d * d))))))
    else if (l <= 1.4d+86) then
        tmp = t_3 * (t_2 * (sqrt(d) / sqrt(h)))
    else
        tmp = ((t_1 * (1.0d0 + (((m_m * d_m) * (((m_m * d_m) * (h * (-0.5d0))) / (d * l))) / (d * 4.0d0)))) * sqrt(d)) / sqrt(l)
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = -0.5 * (h / l);
	double t_1 = Math.sqrt((d / h));
	double t_2 = 1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * t_0);
	double t_3 = Math.sqrt((d / l));
	double t_4 = Math.pow((0.0 - d), 0.5);
	double tmp;
	if (l <= -1.95e+25) {
		tmp = (t_4 / Math.pow((0.0 - l), 0.5)) * (t_1 * t_2);
	} else if (l <= -5e-310) {
		tmp = t_3 * ((t_4 / Math.pow((0.0 - h), 0.5)) * (1.0 + (t_0 * (((M_m * D_m) * (M_m * D_m)) / (4.0 * (d * d))))));
	} else if (l <= 1.4e+86) {
		tmp = t_3 * (t_2 * (Math.sqrt(d) / Math.sqrt(h)));
	} else {
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * (((M_m * D_m) * (h * -0.5)) / (d * l))) / (d * 4.0)))) * Math.sqrt(d)) / Math.sqrt(l);
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = -0.5 * (h / l)
	t_1 = math.sqrt((d / h))
	t_2 = 1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * t_0)
	t_3 = math.sqrt((d / l))
	t_4 = math.pow((0.0 - d), 0.5)
	tmp = 0
	if l <= -1.95e+25:
		tmp = (t_4 / math.pow((0.0 - l), 0.5)) * (t_1 * t_2)
	elif l <= -5e-310:
		tmp = t_3 * ((t_4 / math.pow((0.0 - h), 0.5)) * (1.0 + (t_0 * (((M_m * D_m) * (M_m * D_m)) / (4.0 * (d * d))))))
	elif l <= 1.4e+86:
		tmp = t_3 * (t_2 * (math.sqrt(d) / math.sqrt(h)))
	else:
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * (((M_m * D_m) * (h * -0.5)) / (d * l))) / (d * 4.0)))) * math.sqrt(d)) / math.sqrt(l)
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = Float64(-0.5 * Float64(h / l))
	t_1 = sqrt(Float64(d / h))
	t_2 = Float64(1.0 + Float64(Float64(Float64(Float64(M_m * D_m) / Float64(d * 4.0)) * Float64(Float64(M_m * D_m) / d)) * t_0))
	t_3 = sqrt(Float64(d / l))
	t_4 = Float64(0.0 - d) ^ 0.5
	tmp = 0.0
	if (l <= -1.95e+25)
		tmp = Float64(Float64(t_4 / (Float64(0.0 - l) ^ 0.5)) * Float64(t_1 * t_2));
	elseif (l <= -5e-310)
		tmp = Float64(t_3 * Float64(Float64(t_4 / (Float64(0.0 - h) ^ 0.5)) * Float64(1.0 + Float64(t_0 * Float64(Float64(Float64(M_m * D_m) * Float64(M_m * D_m)) / Float64(4.0 * Float64(d * d)))))));
	elseif (l <= 1.4e+86)
		tmp = Float64(t_3 * Float64(t_2 * Float64(sqrt(d) / sqrt(h))));
	else
		tmp = Float64(Float64(Float64(t_1 * Float64(1.0 + Float64(Float64(Float64(M_m * D_m) * Float64(Float64(Float64(M_m * D_m) * Float64(h * -0.5)) / Float64(d * l))) / Float64(d * 4.0)))) * sqrt(d)) / sqrt(l));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = -0.5 * (h / l);
	t_1 = sqrt((d / h));
	t_2 = 1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * t_0);
	t_3 = sqrt((d / l));
	t_4 = (0.0 - d) ^ 0.5;
	tmp = 0.0;
	if (l <= -1.95e+25)
		tmp = (t_4 / ((0.0 - l) ^ 0.5)) * (t_1 * t_2);
	elseif (l <= -5e-310)
		tmp = t_3 * ((t_4 / ((0.0 - h) ^ 0.5)) * (1.0 + (t_0 * (((M_m * D_m) * (M_m * D_m)) / (4.0 * (d * d))))));
	elseif (l <= 1.4e+86)
		tmp = t_3 * (t_2 * (sqrt(d) / sqrt(h)));
	else
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * (((M_m * D_m) * (h * -0.5)) / (d * l))) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision] * N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l, -1.95e+25], N[(N[(t$95$4 / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5e-310], N[(t$95$3 * N[(N[(t$95$4 / N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$0 * N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision] / N[(4.0 * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+86], N[(t$95$3 * N[(t$95$2 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 * N[(1.0 + N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := -0.5 \cdot \frac{h}{\ell}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := 1 + \left(\frac{M\_m \cdot D\_m}{d \cdot 4} \cdot \frac{M\_m \cdot D\_m}{d}\right) \cdot t\_0\\
t_3 := \sqrt{\frac{d}{\ell}}\\
t_4 := {\left(0 - d\right)}^{0.5}\\
\mathbf{if}\;\ell \leq -1.95 \cdot 10^{+25}:\\
\;\;\;\;\frac{t\_4}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(t\_1 \cdot t\_2\right)\\

\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_3 \cdot \left(\frac{t\_4}{{\left(0 - h\right)}^{0.5}} \cdot \left(1 + t\_0 \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(M\_m \cdot D\_m\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\\

\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+86}:\\
\;\;\;\;t\_3 \cdot \left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(t\_1 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -1.9500000000000001e25

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified47.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr62.5%

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

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(\ell\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(\ell\right)\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      11. --lowering--.f6472.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    8. Applied egg-rr72.9%

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

    if -1.9500000000000001e25 < l < -4.999999999999985e-310

    1. Initial program 69.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified64.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\mathsf{neg}\left(d\right)}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\left(\frac{1}{2}\right)}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      10. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(h\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(h\right)\right)}^{\left(\frac{1}{2}\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(h\right)\right), \left(\frac{1}{2}\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      13. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - h\right), \left(\frac{1}{2}\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \left(\frac{1}{2}\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      15. metadata-eval76.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(M, D\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr76.5%

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

    if -4.999999999999985e-310 < l < 1.40000000000000002e86

    1. Initial program 77.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified63.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6477.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr77.7%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{d}}{\sqrt{h}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d}\right), \left(\sqrt{h}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(d\right), \left(\sqrt{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f6483.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(d\right), \mathsf{sqrt.f64}\left(h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    8. Applied egg-rr83.7%

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

    if 1.40000000000000002e86 < l

    1. Initial program 63.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified52.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. sqrt-divN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      3. associate-*r/N/A

        \[\leadsto \frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}\right), \color{blue}{\left(\sqrt{\ell}\right)}\right) \]
    6. Applied egg-rr56.4%

      \[\leadsto \color{blue}{\frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{h}{\ell} \cdot -0.5}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}} \]
    7. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(D \cdot M\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(d \cdot 4\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      7. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      10. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}{d \cdot 4}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right), \left(d \cdot 4\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
    8. Applied egg-rr88.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.95 \cdot 10^{+25}:\\ \;\;\;\;\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - h\right)}^{0.5}} \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\\ \mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+86}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\left(1 + \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.0% accurate, 1.0× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\\ t_1 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -3 \cdot 10^{-97}:\\ \;\;\;\;\left(t\_1 \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot t\_0\right)\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t\_1 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot t\_0}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (/ (* (* M_m D_m) (* h -0.5)) (* d l))) (t_1 (sqrt (/ d h))))
   (if (<= d -3e-97)
     (* (* t_1 (+ 1.0 (* (/ M_m d) (* (/ D_m 4.0) t_0)))) (sqrt (/ d l)))
     (if (<= d 2.85e-305)
       (*
        M_m
        (* M_m (/ (/ -0.125 (/ d (* D_m D_m))) (/ l (pow (/ l h) -0.5)))))
       (/
        (* (* t_1 (+ 1.0 (/ (* (* M_m D_m) t_0) (* d 4.0)))) (sqrt d))
        (sqrt l))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	double t_1 = sqrt((d / h));
	double tmp;
	if (d <= -3e-97) {
		tmp = (t_1 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_0)))) * sqrt((d / l));
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / pow((l / h), -0.5))));
	} else {
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * t_0) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((m_m * d_m) * (h * (-0.5d0))) / (d * l)
    t_1 = sqrt((d / h))
    if (d <= (-3d-97)) then
        tmp = (t_1 * (1.0d0 + ((m_m / d) * ((d_m / 4.0d0) * t_0)))) * sqrt((d / l))
    else if (d <= 2.85d-305) then
        tmp = m_m * (m_m * (((-0.125d0) / (d / (d_m * d_m))) / (l / ((l / h) ** (-0.5d0)))))
    else
        tmp = ((t_1 * (1.0d0 + (((m_m * d_m) * t_0) / (d * 4.0d0)))) * sqrt(d)) / sqrt(l)
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	double t_1 = Math.sqrt((d / h));
	double tmp;
	if (d <= -3e-97) {
		tmp = (t_1 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_0)))) * Math.sqrt((d / l));
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / Math.pow((l / h), -0.5))));
	} else {
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * t_0) / (d * 4.0)))) * Math.sqrt(d)) / Math.sqrt(l);
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = ((M_m * D_m) * (h * -0.5)) / (d * l)
	t_1 = math.sqrt((d / h))
	tmp = 0
	if d <= -3e-97:
		tmp = (t_1 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_0)))) * math.sqrt((d / l))
	elif d <= 2.85e-305:
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / math.pow((l / h), -0.5))))
	else:
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * t_0) / (d * 4.0)))) * math.sqrt(d)) / math.sqrt(l)
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = Float64(Float64(Float64(M_m * D_m) * Float64(h * -0.5)) / Float64(d * l))
	t_1 = sqrt(Float64(d / h))
	tmp = 0.0
	if (d <= -3e-97)
		tmp = Float64(Float64(t_1 * Float64(1.0 + Float64(Float64(M_m / d) * Float64(Float64(D_m / 4.0) * t_0)))) * sqrt(Float64(d / l)));
	elseif (d <= 2.85e-305)
		tmp = Float64(M_m * Float64(M_m * Float64(Float64(-0.125 / Float64(d / Float64(D_m * D_m))) / Float64(l / (Float64(l / h) ^ -0.5)))));
	else
		tmp = Float64(Float64(Float64(t_1 * Float64(1.0 + Float64(Float64(Float64(M_m * D_m) * t_0) / Float64(d * 4.0)))) * sqrt(d)) / sqrt(l));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = ((M_m * D_m) * (h * -0.5)) / (d * l);
	t_1 = sqrt((d / h));
	tmp = 0.0;
	if (d <= -3e-97)
		tmp = (t_1 * (1.0 + ((M_m / d) * ((D_m / 4.0) * t_0)))) * sqrt((d / l));
	elseif (d <= 2.85e-305)
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / ((l / h) ^ -0.5))));
	else
		tmp = ((t_1 * (1.0 + (((M_m * D_m) * t_0) / (d * 4.0)))) * sqrt(d)) / sqrt(l);
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3e-97], N[(N[(t$95$1 * N[(1.0 + N[(N[(M$95$m / d), $MachinePrecision] * N[(N[(D$95$m / 4.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.85e-305], N[(M$95$m * N[(M$95$m * N[(N[(-0.125 / N[(d / N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[Power[N[(l / h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 * N[(1.0 + N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\\
t_1 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;d \leq -3 \cdot 10^{-97}:\\
\;\;\;\;\left(t\_1 \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot t\_0\right)\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\
\;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(t\_1 \cdot \left(1 + \frac{\left(M\_m \cdot D\_m\right) \cdot t\_0}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\


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

    1. Initial program 78.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified68.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6478.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr78.7%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6481.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr81.3%

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

    if -3.00000000000000024e-97 < d < 2.85000000000000001e-305

    1. Initial program 43.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified35.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr43.8%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified4.4%

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6453.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr53.2%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    13. Applied egg-rr56.6%

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

    if 2.85000000000000001e-305 < d

    1. Initial program 72.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. sqrt-divN/A

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      3. associate-*r/N/A

        \[\leadsto \frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}}{\color{blue}{\sqrt{\ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right) \cdot \sqrt{d}\right), \color{blue}{\left(\sqrt{\ell}\right)}\right) \]
    6. Applied egg-rr59.9%

      \[\leadsto \color{blue}{\frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{h}{\ell} \cdot -0.5}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}} \]
    7. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(D \cdot M\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{\frac{4 \cdot \left(d \cdot d\right)}{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(d \cdot 4\right) \cdot d}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      7. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      10. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}{d \cdot 4}\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right), \left(d \cdot 4\right)\right)\right)\right), \mathsf{sqrt.f64}\left(d\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
    8. Applied egg-rr82.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3 \cdot 10^{-97}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M \cdot \left(M \cdot \frac{\frac{-0.125}{\frac{d}{D \cdot D}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}}{d \cdot 4}\right)\right) \cdot \sqrt{d}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.4% accurate, 1.0× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2.9 \cdot 10^{-95}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)\right)\right) \cdot t\_0\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(\left(1 + \left(\frac{M\_m \cdot D\_m}{d \cdot 4} \cdot \frac{M\_m \cdot D\_m}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (sqrt (/ d l))))
   (if (<= d -2.9e-95)
     (*
      (*
       (sqrt (/ d h))
       (+
        1.0
        (* (/ M_m d) (* (/ D_m 4.0) (/ (* (* M_m D_m) (* h -0.5)) (* d l))))))
      t_0)
     (if (<= d 1.65e-306)
       (*
        M_m
        (* M_m (/ (/ -0.125 (/ d (* D_m D_m))) (/ l (pow (/ l h) -0.5)))))
       (*
        t_0
        (*
         (+
          1.0
          (* (* (/ (* M_m D_m) (* d 4.0)) (/ (* M_m D_m) d)) (* -0.5 (/ h l))))
         (/ (sqrt d) (sqrt h))))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = sqrt((d / l));
	double tmp;
	if (d <= -2.9e-95) {
		tmp = (sqrt((d / h)) * (1.0 + ((M_m / d) * ((D_m / 4.0) * (((M_m * D_m) * (h * -0.5)) / (d * l)))))) * t_0;
	} else if (d <= 1.65e-306) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / pow((l / h), -0.5))));
	} else {
		tmp = t_0 * ((1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))) * (sqrt(d) / sqrt(h)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt((d / l))
    if (d <= (-2.9d-95)) then
        tmp = (sqrt((d / h)) * (1.0d0 + ((m_m / d) * ((d_m / 4.0d0) * (((m_m * d_m) * (h * (-0.5d0))) / (d * l)))))) * t_0
    else if (d <= 1.65d-306) then
        tmp = m_m * (m_m * (((-0.125d0) / (d / (d_m * d_m))) / (l / ((l / h) ** (-0.5d0)))))
    else
        tmp = t_0 * ((1.0d0 + ((((m_m * d_m) / (d * 4.0d0)) * ((m_m * d_m) / d)) * ((-0.5d0) * (h / l)))) * (sqrt(d) / sqrt(h)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = Math.sqrt((d / l));
	double tmp;
	if (d <= -2.9e-95) {
		tmp = (Math.sqrt((d / h)) * (1.0 + ((M_m / d) * ((D_m / 4.0) * (((M_m * D_m) * (h * -0.5)) / (d * l)))))) * t_0;
	} else if (d <= 1.65e-306) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / Math.pow((l / h), -0.5))));
	} else {
		tmp = t_0 * ((1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))) * (Math.sqrt(d) / Math.sqrt(h)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = math.sqrt((d / l))
	tmp = 0
	if d <= -2.9e-95:
		tmp = (math.sqrt((d / h)) * (1.0 + ((M_m / d) * ((D_m / 4.0) * (((M_m * D_m) * (h * -0.5)) / (d * l)))))) * t_0
	elif d <= 1.65e-306:
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / math.pow((l / h), -0.5))))
	else:
		tmp = t_0 * ((1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))) * (math.sqrt(d) / math.sqrt(h)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = sqrt(Float64(d / l))
	tmp = 0.0
	if (d <= -2.9e-95)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(M_m / d) * Float64(Float64(D_m / 4.0) * Float64(Float64(Float64(M_m * D_m) * Float64(h * -0.5)) / Float64(d * l)))))) * t_0);
	elseif (d <= 1.65e-306)
		tmp = Float64(M_m * Float64(M_m * Float64(Float64(-0.125 / Float64(d / Float64(D_m * D_m))) / Float64(l / (Float64(l / h) ^ -0.5)))));
	else
		tmp = Float64(t_0 * Float64(Float64(1.0 + Float64(Float64(Float64(Float64(M_m * D_m) / Float64(d * 4.0)) * Float64(Float64(M_m * D_m) / d)) * Float64(-0.5 * Float64(h / l)))) * Float64(sqrt(d) / sqrt(h))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = sqrt((d / l));
	tmp = 0.0;
	if (d <= -2.9e-95)
		tmp = (sqrt((d / h)) * (1.0 + ((M_m / d) * ((D_m / 4.0) * (((M_m * D_m) * (h * -0.5)) / (d * l)))))) * t_0;
	elseif (d <= 1.65e-306)
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / ((l / h) ^ -0.5))));
	else
		tmp = t_0 * ((1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))) * (sqrt(d) / sqrt(h)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.9e-95], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(M$95$m / d), $MachinePrecision] * N[(N[(D$95$m / 4.0), $MachinePrecision] * N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * -0.5), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[d, 1.65e-306], N[(M$95$m * N[(M$95$m * N[(N[(-0.125 / N[(d / N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[Power[N[(l / h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(1.0 + N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision] * N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;d \leq -2.9 \cdot 10^{-95}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M\_m}{d} \cdot \left(\frac{D\_m}{4} \cdot \frac{\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)\right)\right) \cdot t\_0\\

\mathbf{elif}\;d \leq 1.65 \cdot 10^{-306}:\\
\;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left(1 + \left(\frac{M\_m \cdot D\_m}{d \cdot 4} \cdot \frac{M\_m \cdot D\_m}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\


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

    1. Initial program 78.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified68.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6478.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr78.7%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6481.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr81.3%

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

    if -2.90000000000000002e-95 < d < 1.65e-306

    1. Initial program 43.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified35.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr43.8%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified4.4%

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6453.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr53.2%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    13. Applied egg-rr56.6%

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

    if 1.65e-306 < d

    1. Initial program 72.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6472.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr72.6%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{d}}{\sqrt{h}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d}\right), \left(\sqrt{h}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(d\right), \left(\sqrt{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(d\right), \mathsf{sqrt.f64}\left(h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    8. Applied egg-rr77.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.9 \cdot 10^{-95}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;M \cdot \left(M \cdot \frac{\frac{-0.125}{\frac{d}{D \cdot D}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\left(1 + \left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.8% accurate, 1.3× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M\_m \cdot D\_m}}}{\frac{4}{D\_m}}}{\frac{d}{M\_m}}\right)\\ \mathbf{if}\;d \leq -3.9 \cdot 10^{+129}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-97}:\\ \;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M\_m}{d \cdot 4} \cdot \frac{D\_m \cdot \left(M\_m \cdot D\_m\right)}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-44}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;d \leq 7 \cdot 10^{+141}:\\ \;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(1 + \left(D\_m \cdot \left(M\_m \cdot \left(M\_m \cdot D\_m\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (sqrt (/ d l)))
        (t_1 (sqrt (/ d h)))
        (t_2
         (*
          (/ d (pow (* h l) 0.5))
          (+
           1.0
           (/
            (/ (/ (* h -0.5) (/ (* d l) (* M_m D_m))) (/ 4.0 D_m))
            (/ d M_m))))))
   (if (<= d -3.9e+129)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -3.1e-97)
       (*
        t_0
        (*
         t_1
         (+
          1.0
          (*
           (* -0.5 (/ h l))
           (* (/ M_m (* d 4.0)) (/ (* D_m (* M_m D_m)) d))))))
       (if (<= d 2.85e-305)
         (*
          M_m
          (* M_m (/ (/ -0.125 (/ d (* D_m D_m))) (/ l (pow (/ l h) -0.5)))))
         (if (<= d 2.2e-44)
           t_2
           (if (<= d 7e+141)
             (*
              t_0
              (*
               t_1
               (+
                1.0
                (*
                 (* D_m (* M_m (* M_m D_m)))
                 (* -0.125 (/ (/ h l) (* d d)))))))
             t_2)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = sqrt((d / l));
	double t_1 = sqrt((d / h));
	double t_2 = (d / pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	double tmp;
	if (d <= -3.9e+129) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -3.1e-97) {
		tmp = t_0 * (t_1 * (1.0 + ((-0.5 * (h / l)) * ((M_m / (d * 4.0)) * ((D_m * (M_m * D_m)) / d)))));
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / pow((l / h), -0.5))));
	} else if (d <= 2.2e-44) {
		tmp = t_2;
	} else if (d <= 7e+141) {
		tmp = t_0 * (t_1 * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = sqrt((d / l))
    t_1 = sqrt((d / h))
    t_2 = (d / ((h * l) ** 0.5d0)) * (1.0d0 + ((((h * (-0.5d0)) / ((d * l) / (m_m * d_m))) / (4.0d0 / d_m)) / (d / m_m)))
    if (d <= (-3.9d+129)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-3.1d-97)) then
        tmp = t_0 * (t_1 * (1.0d0 + (((-0.5d0) * (h / l)) * ((m_m / (d * 4.0d0)) * ((d_m * (m_m * d_m)) / d)))))
    else if (d <= 2.85d-305) then
        tmp = m_m * (m_m * (((-0.125d0) / (d / (d_m * d_m))) / (l / ((l / h) ** (-0.5d0)))))
    else if (d <= 2.2d-44) then
        tmp = t_2
    else if (d <= 7d+141) then
        tmp = t_0 * (t_1 * (1.0d0 + ((d_m * (m_m * (m_m * d_m))) * ((-0.125d0) * ((h / l) / (d * d))))))
    else
        tmp = t_2
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = Math.sqrt((d / l));
	double t_1 = Math.sqrt((d / h));
	double t_2 = (d / Math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	double tmp;
	if (d <= -3.9e+129) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -3.1e-97) {
		tmp = t_0 * (t_1 * (1.0 + ((-0.5 * (h / l)) * ((M_m / (d * 4.0)) * ((D_m * (M_m * D_m)) / d)))));
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / Math.pow((l / h), -0.5))));
	} else if (d <= 2.2e-44) {
		tmp = t_2;
	} else if (d <= 7e+141) {
		tmp = t_0 * (t_1 * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = math.sqrt((d / l))
	t_1 = math.sqrt((d / h))
	t_2 = (d / math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)))
	tmp = 0
	if d <= -3.9e+129:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -3.1e-97:
		tmp = t_0 * (t_1 * (1.0 + ((-0.5 * (h / l)) * ((M_m / (d * 4.0)) * ((D_m * (M_m * D_m)) / d)))))
	elif d <= 2.85e-305:
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / math.pow((l / h), -0.5))))
	elif d <= 2.2e-44:
		tmp = t_2
	elif d <= 7e+141:
		tmp = t_0 * (t_1 * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))))
	else:
		tmp = t_2
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = sqrt(Float64(d / l))
	t_1 = sqrt(Float64(d / h))
	t_2 = Float64(Float64(d / (Float64(h * l) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(Float64(h * -0.5) / Float64(Float64(d * l) / Float64(M_m * D_m))) / Float64(4.0 / D_m)) / Float64(d / M_m))))
	tmp = 0.0
	if (d <= -3.9e+129)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -3.1e-97)
		tmp = Float64(t_0 * Float64(t_1 * Float64(1.0 + Float64(Float64(-0.5 * Float64(h / l)) * Float64(Float64(M_m / Float64(d * 4.0)) * Float64(Float64(D_m * Float64(M_m * D_m)) / d))))));
	elseif (d <= 2.85e-305)
		tmp = Float64(M_m * Float64(M_m * Float64(Float64(-0.125 / Float64(d / Float64(D_m * D_m))) / Float64(l / (Float64(l / h) ^ -0.5)))));
	elseif (d <= 2.2e-44)
		tmp = t_2;
	elseif (d <= 7e+141)
		tmp = Float64(t_0 * Float64(t_1 * Float64(1.0 + Float64(Float64(D_m * Float64(M_m * Float64(M_m * D_m))) * Float64(-0.125 * Float64(Float64(h / l) / Float64(d * d)))))));
	else
		tmp = t_2;
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = sqrt((d / l));
	t_1 = sqrt((d / h));
	t_2 = (d / ((h * l) ^ 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	tmp = 0.0;
	if (d <= -3.9e+129)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -3.1e-97)
		tmp = t_0 * (t_1 * (1.0 + ((-0.5 * (h / l)) * ((M_m / (d * 4.0)) * ((D_m * (M_m * D_m)) / d)))));
	elseif (d <= 2.85e-305)
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / ((l / h) ^ -0.5))));
	elseif (d <= 2.2e-44)
		tmp = t_2;
	elseif (d <= 7e+141)
		tmp = t_0 * (t_1 * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(d / N[Power[N[(h * l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(N[(h * -0.5), $MachinePrecision] / N[(N[(d * l), $MachinePrecision] / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.0 / D$95$m), $MachinePrecision]), $MachinePrecision] / N[(d / M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.9e+129], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.1e-97], N[(t$95$0 * N[(t$95$1 * N[(1.0 + N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[(M$95$m / N[(d * 4.0), $MachinePrecision]), $MachinePrecision] * N[(N[(D$95$m * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.85e-305], N[(M$95$m * N[(M$95$m * N[(N[(-0.125 / N[(d / N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[Power[N[(l / h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.2e-44], t$95$2, If[LessEqual[d, 7e+141], N[(t$95$0 * N[(t$95$1 * N[(1.0 + N[(N[(D$95$m * N[(M$95$m * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(N[(h / l), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M\_m \cdot D\_m}}}{\frac{4}{D\_m}}}{\frac{d}{M\_m}}\right)\\
\mathbf{if}\;d \leq -3.9 \cdot 10^{+129}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -3.1 \cdot 10^{-97}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M\_m}{d \cdot 4} \cdot \frac{D\_m \cdot \left(M\_m \cdot D\_m\right)}{d}\right)\right)\right)\\

\mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\
\;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\

\mathbf{elif}\;d \leq 2.2 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;d \leq 7 \cdot 10^{+141}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(1 + \left(D\_m \cdot \left(M\_m \cdot \left(M\_m \cdot D\_m\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -3.8999999999999997e129

    1. Initial program 53.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified26.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f645.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified5.5%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f645.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr5.5%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
    10. Taylor expanded in l around -inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}, d\right) \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      3. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      4. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), d\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right), d\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right), d\right) \]
      10. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right), d\right) \]
    12. Simplified67.0%

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

    if -3.8999999999999997e129 < d < -3.10000000000000002e-97

    1. Initial program 91.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot \left(D \cdot \left(M \cdot D\right)\right)}{4 \cdot \left(d \cdot d\right)}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot \left(D \cdot \left(M \cdot D\right)\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{4 \cdot d} \cdot \frac{D \cdot \left(M \cdot D\right)}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{4 \cdot d}\right), \left(\frac{D \cdot \left(M \cdot D\right)}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \left(4 \cdot d\right)\right), \left(\frac{D \cdot \left(M \cdot D\right)}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \left(d \cdot 4\right)\right), \left(\frac{D \cdot \left(M \cdot D\right)}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{D \cdot \left(M \cdot D\right)}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(D \cdot \left(M \cdot D\right)\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot D\right)\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6489.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, D\right)\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr89.1%

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

    if -3.10000000000000002e-97 < d < 2.85000000000000001e-305

    1. Initial program 43.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified35.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr43.8%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified4.4%

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6453.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr53.2%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    13. Applied egg-rr56.6%

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

    if 2.85000000000000001e-305 < d < 2.20000000000000012e-44 or 6.9999999999999999e141 < d

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6462.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr62.3%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr60.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(h \cdot \frac{-1}{2}\right) \cdot \left(M \cdot D\right)}{\color{blue}{d} \cdot \ell}\right)\right)\right)\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\left(h \cdot \frac{-1}{2}\right) \cdot \color{blue}{\frac{M \cdot D}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\left(h \cdot \frac{-1}{2}\right), \color{blue}{\left(\frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \left(\frac{\color{blue}{M \cdot D}}{d \cdot \ell}\right)\right)\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\left(M \cdot D\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr60.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \color{blue}{\left(\left(h \cdot -0.5\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right), \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)}\right) \]
    12. Applied egg-rr67.4%

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

    if 2.20000000000000012e-44 < d < 6.9999999999999999e141

    1. Initial program 94.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr95.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(d \cdot 4\right) \cdot d} \cdot \left(\color{blue}{\frac{h}{\ell}} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\color{blue}{\ell}} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)}{\color{blue}{4 \cdot \left(d \cdot d\right)}}\right)\right)\right)\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \color{blue}{\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right), \color{blue}{\left(\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)}\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot \left(M \cdot D\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell}} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell} \cdot \frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot \left(M \cdot D\right)\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell} \cdot \frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \left(M \cdot D\right)\right)\right), \left(\frac{\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{-1}{2} \cdot \frac{h}{\ell}}{\color{blue}{4} \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{-1}{2}}{4} \cdot \color{blue}{\frac{\frac{h}{\ell}}{d \cdot d}}\right)\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{\color{blue}{\frac{h}{\ell}}}{d \cdot d}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \color{blue}{\left(\frac{\frac{h}{\ell}}{d \cdot d}\right)}\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \color{blue}{\left(d \cdot d\right)}\right)\right)\right)\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\color{blue}{d} \cdot d\right)\right)\right)\right)\right)\right)\right) \]
      18. *-lowering-*.f6487.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr87.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.9 \cdot 10^{+129}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -3.1 \cdot 10^{-97}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d \cdot 4} \cdot \frac{D \cdot \left(M \cdot D\right)}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M \cdot \left(M \cdot \frac{\frac{-0.125}{\frac{d}{D \cdot D}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-44}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M \cdot D}}}{\frac{4}{D}}}{\frac{d}{M}}\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{+141}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M \cdot D}}}{\frac{4}{D}}}{\frac{d}{M}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.8% accurate, 1.3× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(D\_m \cdot \left(M\_m \cdot \left(M\_m \cdot D\_m\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\ t_1 := \frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M\_m \cdot D\_m}}}{\frac{4}{D\_m}}}{\frac{d}{M\_m}}\right)\\ \mathbf{if}\;d \leq -1.02 \cdot 10^{+129}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -3 \cdot 10^{-76}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+141}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0
         (*
          (sqrt (/ d l))
          (*
           (sqrt (/ d h))
           (+
            1.0
            (* (* D_m (* M_m (* M_m D_m))) (* -0.125 (/ (/ h l) (* d d))))))))
        (t_1
         (*
          (/ d (pow (* h l) 0.5))
          (+
           1.0
           (/
            (/ (/ (* h -0.5) (/ (* d l) (* M_m D_m))) (/ 4.0 D_m))
            (/ d M_m))))))
   (if (<= d -1.02e+129)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -3e-76)
       t_0
       (if (<= d 2.85e-305)
         (*
          M_m
          (* M_m (/ (/ -0.125 (/ d (* D_m D_m))) (/ l (pow (/ l h) -0.5)))))
         (if (<= d 3.8e-47) t_1 (if (<= d 3.8e+141) t_0 t_1)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	double t_1 = (d / pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	double tmp;
	if (d <= -1.02e+129) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -3e-76) {
		tmp = t_0;
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / pow((l / h), -0.5))));
	} else if (d <= 3.8e-47) {
		tmp = t_1;
	} else if (d <= 3.8e+141) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + ((d_m * (m_m * (m_m * d_m))) * ((-0.125d0) * ((h / l) / (d * d))))))
    t_1 = (d / ((h * l) ** 0.5d0)) * (1.0d0 + ((((h * (-0.5d0)) / ((d * l) / (m_m * d_m))) / (4.0d0 / d_m)) / (d / m_m)))
    if (d <= (-1.02d+129)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-3d-76)) then
        tmp = t_0
    else if (d <= 2.85d-305) then
        tmp = m_m * (m_m * (((-0.125d0) / (d / (d_m * d_m))) / (l / ((l / h) ** (-0.5d0)))))
    else if (d <= 3.8d-47) then
        tmp = t_1
    else if (d <= 3.8d+141) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	double t_1 = (d / Math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	double tmp;
	if (d <= -1.02e+129) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -3e-76) {
		tmp = t_0;
	} else if (d <= 2.85e-305) {
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / Math.pow((l / h), -0.5))));
	} else if (d <= 3.8e-47) {
		tmp = t_1;
	} else if (d <= 3.8e+141) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))))
	t_1 = (d / math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)))
	tmp = 0
	if d <= -1.02e+129:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -3e-76:
		tmp = t_0
	elif d <= 2.85e-305:
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / math.pow((l / h), -0.5))))
	elif d <= 3.8e-47:
		tmp = t_1
	elif d <= 3.8e+141:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(D_m * Float64(M_m * Float64(M_m * D_m))) * Float64(-0.125 * Float64(Float64(h / l) / Float64(d * d)))))))
	t_1 = Float64(Float64(d / (Float64(h * l) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(Float64(h * -0.5) / Float64(Float64(d * l) / Float64(M_m * D_m))) / Float64(4.0 / D_m)) / Float64(d / M_m))))
	tmp = 0.0
	if (d <= -1.02e+129)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -3e-76)
		tmp = t_0;
	elseif (d <= 2.85e-305)
		tmp = Float64(M_m * Float64(M_m * Float64(Float64(-0.125 / Float64(d / Float64(D_m * D_m))) / Float64(l / (Float64(l / h) ^ -0.5)))));
	elseif (d <= 3.8e-47)
		tmp = t_1;
	elseif (d <= 3.8e+141)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((D_m * (M_m * (M_m * D_m))) * (-0.125 * ((h / l) / (d * d))))));
	t_1 = (d / ((h * l) ^ 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	tmp = 0.0;
	if (d <= -1.02e+129)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -3e-76)
		tmp = t_0;
	elseif (d <= 2.85e-305)
		tmp = M_m * (M_m * ((-0.125 / (d / (D_m * D_m))) / (l / ((l / h) ^ -0.5))));
	elseif (d <= 3.8e-47)
		tmp = t_1;
	elseif (d <= 3.8e+141)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(D$95$m * N[(M$95$m * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(N[(h / l), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(d / N[Power[N[(h * l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(N[(h * -0.5), $MachinePrecision] / N[(N[(d * l), $MachinePrecision] / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.0 / D$95$m), $MachinePrecision]), $MachinePrecision] / N[(d / M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.02e+129], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3e-76], t$95$0, If[LessEqual[d, 2.85e-305], N[(M$95$m * N[(M$95$m * N[(N[(-0.125 / N[(d / N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[Power[N[(l / h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e-47], t$95$1, If[LessEqual[d, 3.8e+141], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(D\_m \cdot \left(M\_m \cdot \left(M\_m \cdot D\_m\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\
t_1 := \frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M\_m \cdot D\_m}}}{\frac{4}{D\_m}}}{\frac{d}{M\_m}}\right)\\
\mathbf{if}\;d \leq -1.02 \cdot 10^{+129}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -3 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\
\;\;\;\;M\_m \cdot \left(M\_m \cdot \frac{\frac{-0.125}{\frac{d}{D\_m \cdot D\_m}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+141}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.01999999999999996e129

    1. Initial program 53.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified26.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f645.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified5.5%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f645.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr5.5%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
    10. Taylor expanded in l around -inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}, d\right) \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      3. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      4. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), d\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right), d\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right), d\right) \]
      10. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right), d\right) \]
    12. Simplified67.0%

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

    if -1.01999999999999996e129 < d < -3.00000000000000024e-76 or 3.80000000000000015e-47 < d < 3.79999999999999976e141

    1. Initial program 92.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified91.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6492.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr92.4%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(d \cdot 4\right) \cdot d} \cdot \left(\color{blue}{\frac{h}{\ell}} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\color{blue}{\ell}} \cdot \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)}{\color{blue}{4 \cdot \left(d \cdot d\right)}}\right)\right)\right)\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \color{blue}{\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right), \color{blue}{\left(\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)}\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot \left(M \cdot D\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell}} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell} \cdot \frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot \left(M \cdot D\right)\right)\right), \left(\frac{\color{blue}{\frac{h}{\ell} \cdot \frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \left(M \cdot D\right)\right)\right), \left(\frac{\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{2}}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{h}{\ell} \cdot \frac{-1}{2}}{4 \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{-1}{2} \cdot \frac{h}{\ell}}{\color{blue}{4} \cdot \left(d \cdot d\right)}\right)\right)\right)\right)\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{\frac{-1}{2}}{4} \cdot \color{blue}{\frac{\frac{h}{\ell}}{d \cdot d}}\right)\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{\color{blue}{\frac{h}{\ell}}}{d \cdot d}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \color{blue}{\left(\frac{\frac{h}{\ell}}{d \cdot d}\right)}\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \color{blue}{\left(d \cdot d\right)}\right)\right)\right)\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\color{blue}{d} \cdot d\right)\right)\right)\right)\right)\right)\right) \]
      18. *-lowering-*.f6485.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr85.2%

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

    if -3.00000000000000024e-76 < d < 2.85000000000000001e-305

    1. Initial program 47.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified39.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6447.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr47.4%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

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

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6452.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr52.0%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    13. Applied egg-rr55.3%

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

    if 2.85000000000000001e-305 < d < 3.80000000000000015e-47 or 3.79999999999999976e141 < d

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6462.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr62.3%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr60.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(h \cdot \frac{-1}{2}\right) \cdot \left(M \cdot D\right)}{\color{blue}{d} \cdot \ell}\right)\right)\right)\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\left(h \cdot \frac{-1}{2}\right) \cdot \color{blue}{\frac{M \cdot D}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\left(h \cdot \frac{-1}{2}\right), \color{blue}{\left(\frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \left(\frac{\color{blue}{M \cdot D}}{d \cdot \ell}\right)\right)\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\left(M \cdot D\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr60.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \color{blue}{\left(\left(h \cdot -0.5\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right), \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)}\right) \]
    12. Applied egg-rr67.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.02 \cdot 10^{+129}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -3 \cdot 10^{-76}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M \cdot \left(M \cdot \frac{\frac{-0.125}{\frac{d}{D \cdot D}}}{\frac{\ell}{{\left(\frac{\ell}{h}\right)}^{-0.5}}}\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{-47}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M \cdot D}}}{\frac{4}{D}}}{\frac{d}{M}}\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+141}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \left(-0.125 \cdot \frac{\frac{h}{\ell}}{d \cdot d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M \cdot D}}}{\frac{4}{D}}}{\frac{d}{M}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.0% accurate, 1.4× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;M\_m \cdot D\_m \leq 10^{-205}:\\ \;\;\;\;{\left(\frac{h}{d}\right)}^{-0.5} \cdot {\left(\frac{\ell}{d}\right)}^{-0.5}\\ \mathbf{elif}\;M\_m \cdot D\_m \leq 5 \cdot 10^{+205}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M\_m \cdot D\_m}{d} \cdot \frac{\frac{M\_m}{d} \cdot D\_m}{4}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{D\_m \cdot -0.125}{\ell} \cdot \frac{\frac{D\_m}{d}}{{\left(\frac{\ell}{h}\right)}^{0.5}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= (* M_m D_m) 1e-205)
   (* (pow (/ h d) -0.5) (pow (/ l d) -0.5))
   (if (<= (* M_m D_m) 5e+205)
     (*
      (sqrt (/ d l))
      (*
       (sqrt (/ d h))
       (+
        1.0
        (* (* -0.5 (/ h l)) (* (/ (* M_m D_m) d) (/ (* (/ M_m d) D_m) 4.0))))))
     (*
      (* M_m M_m)
      (* (/ (* D_m -0.125) l) (/ (/ D_m d) (pow (/ l h) 0.5)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if ((M_m * D_m) <= 1e-205) {
		tmp = pow((h / d), -0.5) * pow((l / d), -0.5);
	} else if ((M_m * D_m) <= 5e+205) {
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.5 * (h / l)) * (((M_m * D_m) / d) * (((M_m / d) * D_m) / 4.0)))));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if ((m_m * d_m) <= 1d-205) then
        tmp = ((h / d) ** (-0.5d0)) * ((l / d) ** (-0.5d0))
    else if ((m_m * d_m) <= 5d+205) then
        tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + (((-0.5d0) * (h / l)) * (((m_m * d_m) / d) * (((m_m / d) * d_m) / 4.0d0)))))
    else
        tmp = (m_m * m_m) * (((d_m * (-0.125d0)) / l) * ((d_m / d) / ((l / h) ** 0.5d0)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if ((M_m * D_m) <= 1e-205) {
		tmp = Math.pow((h / d), -0.5) * Math.pow((l / d), -0.5);
	} else if ((M_m * D_m) <= 5e+205) {
		tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((-0.5 * (h / l)) * (((M_m * D_m) / d) * (((M_m / d) * D_m) / 4.0)))));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / Math.pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if (M_m * D_m) <= 1e-205:
		tmp = math.pow((h / d), -0.5) * math.pow((l / d), -0.5)
	elif (M_m * D_m) <= 5e+205:
		tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((-0.5 * (h / l)) * (((M_m * D_m) / d) * (((M_m / d) * D_m) / 4.0)))))
	else:
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / math.pow((l / h), 0.5)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (Float64(M_m * D_m) <= 1e-205)
		tmp = Float64((Float64(h / d) ^ -0.5) * (Float64(l / d) ^ -0.5));
	elseif (Float64(M_m * D_m) <= 5e+205)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(-0.5 * Float64(h / l)) * Float64(Float64(Float64(M_m * D_m) / d) * Float64(Float64(Float64(M_m / d) * D_m) / 4.0))))));
	else
		tmp = Float64(Float64(M_m * M_m) * Float64(Float64(Float64(D_m * -0.125) / l) * Float64(Float64(D_m / d) / (Float64(l / h) ^ 0.5))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if ((M_m * D_m) <= 1e-205)
		tmp = ((h / d) ^ -0.5) * ((l / d) ^ -0.5);
	elseif ((M_m * D_m) <= 5e+205)
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.5 * (h / l)) * (((M_m * D_m) / d) * (((M_m / d) * D_m) / 4.0)))));
	else
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / ((l / h) ^ 0.5)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[N[(M$95$m * D$95$m), $MachinePrecision], 1e-205], N[(N[Power[N[(h / d), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[N[(l / d), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(M$95$m * D$95$m), $MachinePrecision], 5e+205], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(M$95$m * M$95$m), $MachinePrecision] * N[(N[(N[(D$95$m * -0.125), $MachinePrecision] / l), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] / N[Power[N[(l / h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \cdot D\_m \leq 10^{-205}:\\
\;\;\;\;{\left(\frac{h}{d}\right)}^{-0.5} \cdot {\left(\frac{\ell}{d}\right)}^{-0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 M D) < 1e-205

    1. Initial program 64.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified54.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6424.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified24.1%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \color{blue}{\left(\sqrt{\frac{d}{\ell}}\right)}\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{h}{d}}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      13. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{h}{d}\right)}^{-1}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      14. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\left(\frac{-1}{2}\right)}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\frac{-1}{2}}\right), \left(\sqrt{\frac{d}{\color{blue}{\ell}}}\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{d}\right), \frac{-1}{2}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      18. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right)\right) \]
      19. /-lowering-/.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right)\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{{\left(\frac{h}{d}\right)}^{-0.5} \cdot \sqrt{\frac{d}{\ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{\frac{1}{\frac{\ell}{d}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{{\left(\frac{\ell}{d}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left({\left(\frac{\ell}{d}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left({\left(\frac{\ell}{d}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{pow.f64}\left(\left(\frac{\ell}{d}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f6444.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, d\right), \frac{-1}{2}\right)\right) \]
    11. Applied egg-rr44.7%

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

    if 1e-205 < (*.f64 M D) < 5.0000000000000002e205

    1. Initial program 77.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified64.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr77.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{d} \cdot \frac{D}{4}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{M}{d} \cdot D}{4}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{d} \cdot D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{d}\right), D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    8. Applied egg-rr77.2%

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

    if 5.0000000000000002e205 < (*.f64 M D)

    1. Initial program 82.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6482.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr82.0%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified39.5%

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr91.0%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      4. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \color{blue}{\frac{1}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{{\color{blue}{\left(\frac{h}{\ell}\right)}}^{\frac{1}{2}}}}\right)\right) \]
      6. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{\sqrt{\frac{h}{\ell}}}}\right)\right) \]
      7. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{1}{\frac{h}{\ell}}}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      9. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \left(D \cdot \frac{D}{d}\right)}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(\frac{-1}{8} \cdot D\right) \cdot \frac{D}{d}}{\color{blue}{\ell} \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(D \cdot \frac{-1}{8}\right) \cdot \frac{D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      12. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{D \cdot \frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{D \cdot \frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}\right)}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{-1}{8}\right), \ell\right), \left(\frac{\color{blue}{\frac{D}{d}}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \left(\frac{\frac{\color{blue}{D}}{d}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\sqrt{\frac{\ell}{h}}\right)}\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\sqrt{\color{blue}{\frac{\ell}{h}}}\right)\right)\right)\right) \]
      18. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left({\left(\frac{\ell}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      19. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\left(\frac{\ell}{h}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      20. /-lowering-/.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, h\right), \frac{1}{2}\right)\right)\right)\right) \]
    13. Applied egg-rr91.0%

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

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

Alternative 8: 71.3% accurate, 1.4× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;M\_m \cdot D\_m \leq 10^{-205}:\\ \;\;\;\;{\left(\frac{h}{d}\right)}^{-0.5} \cdot {\left(\frac{\ell}{d}\right)}^{-0.5}\\ \mathbf{elif}\;M\_m \cdot D\_m \leq 5 \cdot 10^{+205}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(\frac{M\_m \cdot D\_m}{d \cdot 4} \cdot \frac{M\_m \cdot D\_m}{d}\right) \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{D\_m \cdot -0.125}{\ell} \cdot \frac{\frac{D\_m}{d}}{{\left(\frac{\ell}{h}\right)}^{0.5}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= (* M_m D_m) 1e-205)
   (* (pow (/ h d) -0.5) (pow (/ l d) -0.5))
   (if (<= (* M_m D_m) 5e+205)
     (*
      (sqrt (/ d l))
      (*
       (sqrt (/ d h))
       (+
        1.0
        (* (* (/ (* M_m D_m) (* d 4.0)) (/ (* M_m D_m) d)) (* -0.5 (/ h l))))))
     (*
      (* M_m M_m)
      (* (/ (* D_m -0.125) l) (/ (/ D_m d) (pow (/ l h) 0.5)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if ((M_m * D_m) <= 1e-205) {
		tmp = pow((h / d), -0.5) * pow((l / d), -0.5);
	} else if ((M_m * D_m) <= 5e+205) {
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if ((m_m * d_m) <= 1d-205) then
        tmp = ((h / d) ** (-0.5d0)) * ((l / d) ** (-0.5d0))
    else if ((m_m * d_m) <= 5d+205) then
        tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + ((((m_m * d_m) / (d * 4.0d0)) * ((m_m * d_m) / d)) * ((-0.5d0) * (h / l)))))
    else
        tmp = (m_m * m_m) * (((d_m * (-0.125d0)) / l) * ((d_m / d) / ((l / h) ** 0.5d0)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if ((M_m * D_m) <= 1e-205) {
		tmp = Math.pow((h / d), -0.5) * Math.pow((l / d), -0.5);
	} else if ((M_m * D_m) <= 5e+205) {
		tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / Math.pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if (M_m * D_m) <= 1e-205:
		tmp = math.pow((h / d), -0.5) * math.pow((l / d), -0.5)
	elif (M_m * D_m) <= 5e+205:
		tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))))
	else:
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / math.pow((l / h), 0.5)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (Float64(M_m * D_m) <= 1e-205)
		tmp = Float64((Float64(h / d) ^ -0.5) * (Float64(l / d) ^ -0.5));
	elseif (Float64(M_m * D_m) <= 5e+205)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(Float64(Float64(M_m * D_m) / Float64(d * 4.0)) * Float64(Float64(M_m * D_m) / d)) * Float64(-0.5 * Float64(h / l))))));
	else
		tmp = Float64(Float64(M_m * M_m) * Float64(Float64(Float64(D_m * -0.125) / l) * Float64(Float64(D_m / d) / (Float64(l / h) ^ 0.5))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if ((M_m * D_m) <= 1e-205)
		tmp = ((h / d) ^ -0.5) * ((l / d) ^ -0.5);
	elseif ((M_m * D_m) <= 5e+205)
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((((M_m * D_m) / (d * 4.0)) * ((M_m * D_m) / d)) * (-0.5 * (h / l)))));
	else
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / ((l / h) ^ 0.5)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[N[(M$95$m * D$95$m), $MachinePrecision], 1e-205], N[(N[Power[N[(h / d), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[N[(l / d), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(M$95$m * D$95$m), $MachinePrecision], 5e+205], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision] * N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(M$95$m * M$95$m), $MachinePrecision] * N[(N[(N[(D$95$m * -0.125), $MachinePrecision] / l), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] / N[Power[N[(l / h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \cdot D\_m \leq 10^{-205}:\\
\;\;\;\;{\left(\frac{h}{d}\right)}^{-0.5} \cdot {\left(\frac{\ell}{d}\right)}^{-0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 M D) < 1e-205

    1. Initial program 64.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified54.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6424.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified24.1%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \color{blue}{\left(\sqrt{\frac{d}{\ell}}\right)}\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{h}{d}}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      13. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{h}{d}\right)}^{-1}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      14. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\left(\frac{-1}{2}\right)}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\frac{-1}{2}}\right), \left(\sqrt{\frac{d}{\color{blue}{\ell}}}\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{d}\right), \frac{-1}{2}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
      18. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right)\right) \]
      19. /-lowering-/.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right)\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{{\left(\frac{h}{d}\right)}^{-0.5} \cdot \sqrt{\frac{d}{\ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{\frac{1}{\frac{\ell}{d}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{{\left(\frac{\ell}{d}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left({\left(\frac{\ell}{d}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left({\left(\frac{\ell}{d}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{pow.f64}\left(\left(\frac{\ell}{d}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f6444.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, d\right), \frac{-1}{2}\right)\right) \]
    11. Applied egg-rr44.7%

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

    if 1e-205 < (*.f64 M D) < 5.0000000000000002e205

    1. Initial program 77.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified64.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr77.2%

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

    if 5.0000000000000002e205 < (*.f64 M D)

    1. Initial program 82.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6482.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr82.0%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified39.5%

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr91.0%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      4. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \color{blue}{\frac{1}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{{\color{blue}{\left(\frac{h}{\ell}\right)}}^{\frac{1}{2}}}}\right)\right) \]
      6. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{\sqrt{\frac{h}{\ell}}}}\right)\right) \]
      7. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{1}{\frac{h}{\ell}}}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      9. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \left(D \cdot \frac{D}{d}\right)}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(\frac{-1}{8} \cdot D\right) \cdot \frac{D}{d}}{\color{blue}{\ell} \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(D \cdot \frac{-1}{8}\right) \cdot \frac{D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      12. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{D \cdot \frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{D \cdot \frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}\right)}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{-1}{8}\right), \ell\right), \left(\frac{\color{blue}{\frac{D}{d}}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \left(\frac{\frac{\color{blue}{D}}{d}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\sqrt{\frac{\ell}{h}}\right)}\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\sqrt{\color{blue}{\frac{\ell}{h}}}\right)\right)\right)\right) \]
      18. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left({\left(\frac{\ell}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      19. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\left(\frac{\ell}{h}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      20. /-lowering-/.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, h\right), \frac{1}{2}\right)\right)\right)\right) \]
    13. Applied egg-rr91.0%

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

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

Alternative 9: 63.4% accurate, 2.4× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M\_m \cdot D\_m}}}{\frac{4}{D\_m}}}{\frac{d}{M\_m}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= d -1.25e+85)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d 2.85e-305)
     (* M_m (* (* M_m (/ -0.125 (/ (/ d D_m) D_m))) (/ (pow (/ h l) 0.5) l)))
     (*
      (/ d (pow (* h l) 0.5))
      (+
       1.0
       (/
        (/ (/ (* h -0.5) (/ (* d l) (* M_m D_m))) (/ 4.0 D_m))
        (/ d M_m)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.25e+85) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= 2.85e-305) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (pow((h / l), 0.5) / l));
	} else {
		tmp = (d / pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (d <= (-1.25d+85)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= 2.85d-305) then
        tmp = m_m * ((m_m * ((-0.125d0) / ((d / d_m) / d_m))) * (((h / l) ** 0.5d0) / l))
    else
        tmp = (d / ((h * l) ** 0.5d0)) * (1.0d0 + ((((h * (-0.5d0)) / ((d * l) / (m_m * d_m))) / (4.0d0 / d_m)) / (d / m_m)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.25e+85) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= 2.85e-305) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (Math.pow((h / l), 0.5) / l));
	} else {
		tmp = (d / Math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if d <= -1.25e+85:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= 2.85e-305:
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (math.pow((h / l), 0.5) / l))
	else:
		tmp = (d / math.pow((h * l), 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (d <= -1.25e+85)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= 2.85e-305)
		tmp = Float64(M_m * Float64(Float64(M_m * Float64(-0.125 / Float64(Float64(d / D_m) / D_m))) * Float64((Float64(h / l) ^ 0.5) / l)));
	else
		tmp = Float64(Float64(d / (Float64(h * l) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(Float64(h * -0.5) / Float64(Float64(d * l) / Float64(M_m * D_m))) / Float64(4.0 / D_m)) / Float64(d / M_m))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (d <= -1.25e+85)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= 2.85e-305)
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (((h / l) ^ 0.5) / l));
	else
		tmp = (d / ((h * l) ^ 0.5)) * (1.0 + ((((h * -0.5) / ((d * l) / (M_m * D_m))) / (4.0 / D_m)) / (d / M_m)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[d, -1.25e+85], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.85e-305], N[(M$95$m * N[(N[(M$95$m * N[(-0.125 / N[(N[(d / D$95$m), $MachinePrecision] / D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(h / l), $MachinePrecision], 0.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(h * l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(N[(h * -0.5), $MachinePrecision] / N[(N[(d * l), $MachinePrecision] / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.0 / D$95$m), $MachinePrecision]), $MachinePrecision] / N[(d / M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.25 \cdot 10^{+85}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\
\;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -1.25e85

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. associate-*l*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6467.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified67.2%

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

    if -1.25e85 < d < 2.85000000000000001e-305

    1. Initial program 68.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr68.7%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified2.7%

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

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    11. Applied egg-rr58.0%

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

    if 2.85000000000000001e-305 < d

    1. Initial program 72.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6472.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr72.6%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M \cdot D}{d \cdot 4} \cdot \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\left(\frac{M}{d} \cdot \frac{D}{4}\right) \cdot \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \left(\frac{M}{d} \cdot \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \color{blue}{\left(\frac{D}{4} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\color{blue}{\frac{D}{4}} \cdot \left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\left(\frac{D}{4}\right), \color{blue}{\left(\frac{M \cdot D}{d} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\color{blue}{\frac{M \cdot D}{d}} \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{M \cdot D}{d} \cdot \frac{h \cdot \frac{-1}{2}}{\color{blue}{\ell}}\right)\right)\right)\right)\right)\right) \]
      9. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)}{\color{blue}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \left(h \cdot \frac{-1}{2}\right)\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(h \cdot \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6470.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(h, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
    8. Applied egg-rr70.3%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\frac{M}{d} \cdot \left(\frac{D}{4} \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot -0.5\right)}{d \cdot \ell}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\frac{\left(h \cdot \frac{-1}{2}\right) \cdot \left(M \cdot D\right)}{\color{blue}{d} \cdot \ell}\right)\right)\right)\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \left(\left(h \cdot \frac{-1}{2}\right) \cdot \color{blue}{\frac{M \cdot D}{d \cdot \ell}}\right)\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\left(h \cdot \frac{-1}{2}\right), \color{blue}{\left(\frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \left(\frac{\color{blue}{M \cdot D}}{d \cdot \ell}\right)\right)\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\left(M \cdot D\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f6471.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, 4\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr71.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \color{blue}{\left(\left(h \cdot -0.5\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)}\right)\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right), \color{blue}{\left(1 + \frac{M}{d} \cdot \left(\frac{D}{4} \cdot \left(\left(h \cdot \frac{-1}{2}\right) \cdot \frac{M \cdot D}{d \cdot \ell}\right)\right)\right)}\right) \]
    12. Applied egg-rr69.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 2.85 \cdot 10^{-305}:\\ \;\;\;\;M \cdot \left(\left(M \cdot \frac{-0.125}{\frac{\frac{d}{D}}{D}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{\frac{\frac{h \cdot -0.5}{\frac{d \cdot \ell}{M \cdot D}}}{\frac{4}{D}}}{\frac{d}{M}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.3% accurate, 2.4× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 1.25 \cdot 10^{-125}:\\ \;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \frac{\frac{D\_m}{\frac{d}{M\_m}}}{4 \cdot \frac{\frac{d}{M\_m}}{D\_m}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= d -1.05e+85)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d 1.25e-125)
     (* M_m (* (* M_m (/ -0.125 (/ (/ d D_m) D_m))) (/ (pow (/ h l) 0.5) l)))
     (*
      (/ d (sqrt (* h l)))
      (+
       1.0
       (*
        (* -0.5 (/ h l))
        (/ (/ D_m (/ d M_m)) (* 4.0 (/ (/ d M_m) D_m)))))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.05e+85) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= 1.25e-125) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (pow((h / l), 0.5) / l));
	} else {
		tmp = (d / sqrt((h * l))) * (1.0 + ((-0.5 * (h / l)) * ((D_m / (d / M_m)) / (4.0 * ((d / M_m) / D_m)))));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (d <= (-1.05d+85)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= 1.25d-125) then
        tmp = m_m * ((m_m * ((-0.125d0) / ((d / d_m) / d_m))) * (((h / l) ** 0.5d0) / l))
    else
        tmp = (d / sqrt((h * l))) * (1.0d0 + (((-0.5d0) * (h / l)) * ((d_m / (d / m_m)) / (4.0d0 * ((d / m_m) / d_m)))))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.05e+85) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= 1.25e-125) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (Math.pow((h / l), 0.5) / l));
	} else {
		tmp = (d / Math.sqrt((h * l))) * (1.0 + ((-0.5 * (h / l)) * ((D_m / (d / M_m)) / (4.0 * ((d / M_m) / D_m)))));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if d <= -1.05e+85:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= 1.25e-125:
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (math.pow((h / l), 0.5) / l))
	else:
		tmp = (d / math.sqrt((h * l))) * (1.0 + ((-0.5 * (h / l)) * ((D_m / (d / M_m)) / (4.0 * ((d / M_m) / D_m)))))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (d <= -1.05e+85)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= 1.25e-125)
		tmp = Float64(M_m * Float64(Float64(M_m * Float64(-0.125 / Float64(Float64(d / D_m) / D_m))) * Float64((Float64(h / l) ^ 0.5) / l)));
	else
		tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 + Float64(Float64(-0.5 * Float64(h / l)) * Float64(Float64(D_m / Float64(d / M_m)) / Float64(4.0 * Float64(Float64(d / M_m) / D_m))))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (d <= -1.05e+85)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= 1.25e-125)
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (((h / l) ^ 0.5) / l));
	else
		tmp = (d / sqrt((h * l))) * (1.0 + ((-0.5 * (h / l)) * ((D_m / (d / M_m)) / (4.0 * ((d / M_m) / D_m)))));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[d, -1.05e+85], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.25e-125], N[(M$95$m * N[(N[(M$95$m * N[(-0.125 / N[(N[(d / D$95$m), $MachinePrecision] / D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(h / l), $MachinePrecision], 0.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[(D$95$m / N[(d / M$95$m), $MachinePrecision]), $MachinePrecision] / N[(4.0 * N[(N[(d / M$95$m), $MachinePrecision] / D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.05 \cdot 10^{+85}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq 1.25 \cdot 10^{-125}:\\
\;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -1.05000000000000005e85

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. associate-*l*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6467.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified67.2%

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

    if -1.05000000000000005e85 < d < 1.24999999999999992e-125

    1. Initial program 61.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified51.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6461.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr61.7%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

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

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

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    11. Applied egg-rr56.1%

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

    if 1.24999999999999992e-125 < d

    1. Initial program 83.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6483.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr83.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \color{blue}{\left(\frac{M \cdot D}{d \cdot 4} \cdot \frac{M \cdot D}{d}\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right) \]
    7. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{d} \cdot \frac{D}{4}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{M}{d} \cdot D}{4}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{d} \cdot D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{d}\right), D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6483.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), D\right), 4\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    8. Applied egg-rr83.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 1.25 \cdot 10^{-125}:\\ \;\;\;\;M \cdot \left(\left(M \cdot \frac{-0.125}{\frac{\frac{d}{D}}{D}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \left(-0.5 \cdot \frac{h}{\ell}\right) \cdot \frac{\frac{D}{\frac{d}{M}}}{4 \cdot \frac{\frac{d}{M}}{D}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.9% accurate, 2.4× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.5 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 3.6 \cdot 10^{-161}:\\ \;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{h \cdot \frac{-0.125}{\frac{d \cdot d}{D\_m \cdot \left(M\_m \cdot \left(M\_m \cdot D\_m\right)\right)}}}{\ell}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= d -1.5e+85)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d 3.6e-161)
     (* M_m (* (* M_m (/ -0.125 (/ (/ d D_m) D_m))) (/ (pow (/ h l) 0.5) l)))
     (*
      (/ d (pow (* h l) 0.5))
      (+
       1.0
       (/ (* h (/ -0.125 (/ (* d d) (* D_m (* M_m (* M_m D_m)))))) l))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.5e+85) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= 3.6e-161) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (pow((h / l), 0.5) / l));
	} else {
		tmp = (d / pow((h * l), 0.5)) * (1.0 + ((h * (-0.125 / ((d * d) / (D_m * (M_m * (M_m * D_m)))))) / l));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (d <= (-1.5d+85)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= 3.6d-161) then
        tmp = m_m * ((m_m * ((-0.125d0) / ((d / d_m) / d_m))) * (((h / l) ** 0.5d0) / l))
    else
        tmp = (d / ((h * l) ** 0.5d0)) * (1.0d0 + ((h * ((-0.125d0) / ((d * d) / (d_m * (m_m * (m_m * d_m)))))) / l))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (d <= -1.5e+85) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= 3.6e-161) {
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (Math.pow((h / l), 0.5) / l));
	} else {
		tmp = (d / Math.pow((h * l), 0.5)) * (1.0 + ((h * (-0.125 / ((d * d) / (D_m * (M_m * (M_m * D_m)))))) / l));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if d <= -1.5e+85:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= 3.6e-161:
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (math.pow((h / l), 0.5) / l))
	else:
		tmp = (d / math.pow((h * l), 0.5)) * (1.0 + ((h * (-0.125 / ((d * d) / (D_m * (M_m * (M_m * D_m)))))) / l))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (d <= -1.5e+85)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= 3.6e-161)
		tmp = Float64(M_m * Float64(Float64(M_m * Float64(-0.125 / Float64(Float64(d / D_m) / D_m))) * Float64((Float64(h / l) ^ 0.5) / l)));
	else
		tmp = Float64(Float64(d / (Float64(h * l) ^ 0.5)) * Float64(1.0 + Float64(Float64(h * Float64(-0.125 / Float64(Float64(d * d) / Float64(D_m * Float64(M_m * Float64(M_m * D_m)))))) / l)));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (d <= -1.5e+85)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= 3.6e-161)
		tmp = M_m * ((M_m * (-0.125 / ((d / D_m) / D_m))) * (((h / l) ^ 0.5) / l));
	else
		tmp = (d / ((h * l) ^ 0.5)) * (1.0 + ((h * (-0.125 / ((d * d) / (D_m * (M_m * (M_m * D_m)))))) / l));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[d, -1.5e+85], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.6e-161], N[(M$95$m * N[(N[(M$95$m * N[(-0.125 / N[(N[(d / D$95$m), $MachinePrecision] / D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(h / l), $MachinePrecision], 0.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(h * l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(h * N[(-0.125 / N[(N[(d * d), $MachinePrecision] / N[(D$95$m * N[(M$95$m * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.5 \cdot 10^{+85}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq 3.6 \cdot 10^{-161}:\\
\;\;\;\;M\_m \cdot \left(\left(M\_m \cdot \frac{-0.125}{\frac{\frac{d}{D\_m}}{D\_m}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -1.5e85

    1. Initial program 62.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. associate-*l*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6467.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified67.2%

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

    if -1.5e85 < d < 3.60000000000000018e-161

    1. Initial program 63.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified52.3%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6463.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr63.2%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
    9. Simplified10.6%

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

        \[\leadsto M \cdot \color{blue}{\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right) \cdot \color{blue}{M} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right)\right)\right), \color{blue}{M}\right) \]
    11. Applied egg-rr56.4%

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

    if 3.60000000000000018e-161 < d

    1. Initial program 80.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6480.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr80.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.5 \cdot 10^{+85}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 3.6 \cdot 10^{-161}:\\ \;\;\;\;M \cdot \left(\left(M \cdot \frac{-0.125}{\frac{\frac{d}{D}}{D}}\right) \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}} \cdot \left(1 + \frac{h \cdot \frac{-0.125}{\frac{d \cdot d}{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}}}{\ell}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 40.2% accurate, 2.6× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{1}{h \cdot \ell}\\ \mathbf{if}\;\ell \leq -1.32 \cdot 10^{-105}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -7.5 \cdot 10^{-275}:\\ \;\;\;\;d \cdot {\left(t\_0 \cdot t\_0\right)}^{0.25}\\ \mathbf{elif}\;\ell \leq 10^{-202}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{t\_0}\\ \mathbf{elif}\;\ell \leq 1.26 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (/ 1.0 (* h l))))
   (if (<= l -1.32e-105)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= l -7.5e-275)
       (* d (pow (* t_0 t_0) 0.25))
       (if (<= l 1e-202)
         (* (- 0.0 d) (sqrt t_0))
         (if (<= l 1.26e+157)
           (* d (pow (* h l) -0.5))
           (sqrt (* (/ d h) (/ d l)))))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = 1.0 / (h * l);
	double tmp;
	if (l <= -1.32e-105) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -7.5e-275) {
		tmp = d * pow((t_0 * t_0), 0.25);
	} else if (l <= 1e-202) {
		tmp = (0.0 - d) * sqrt(t_0);
	} else if (l <= 1.26e+157) {
		tmp = d * pow((h * l), -0.5);
	} else {
		tmp = sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 / (h * l)
    if (l <= (-1.32d-105)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-7.5d-275)) then
        tmp = d * ((t_0 * t_0) ** 0.25d0)
    else if (l <= 1d-202) then
        tmp = (0.0d0 - d) * sqrt(t_0)
    else if (l <= 1.26d+157) then
        tmp = d * ((h * l) ** (-0.5d0))
    else
        tmp = sqrt(((d / h) * (d / l)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = 1.0 / (h * l);
	double tmp;
	if (l <= -1.32e-105) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -7.5e-275) {
		tmp = d * Math.pow((t_0 * t_0), 0.25);
	} else if (l <= 1e-202) {
		tmp = (0.0 - d) * Math.sqrt(t_0);
	} else if (l <= 1.26e+157) {
		tmp = d * Math.pow((h * l), -0.5);
	} else {
		tmp = Math.sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = 1.0 / (h * l)
	tmp = 0
	if l <= -1.32e-105:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -7.5e-275:
		tmp = d * math.pow((t_0 * t_0), 0.25)
	elif l <= 1e-202:
		tmp = (0.0 - d) * math.sqrt(t_0)
	elif l <= 1.26e+157:
		tmp = d * math.pow((h * l), -0.5)
	else:
		tmp = math.sqrt(((d / h) * (d / l)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = Float64(1.0 / Float64(h * l))
	tmp = 0.0
	if (l <= -1.32e-105)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -7.5e-275)
		tmp = Float64(d * (Float64(t_0 * t_0) ^ 0.25));
	elseif (l <= 1e-202)
		tmp = Float64(Float64(0.0 - d) * sqrt(t_0));
	elseif (l <= 1.26e+157)
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	else
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = 1.0 / (h * l);
	tmp = 0.0;
	if (l <= -1.32e-105)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -7.5e-275)
		tmp = d * ((t_0 * t_0) ^ 0.25);
	elseif (l <= 1e-202)
		tmp = (0.0 - d) * sqrt(t_0);
	elseif (l <= 1.26e+157)
		tmp = d * ((h * l) ^ -0.5);
	else
		tmp = sqrt(((d / h) * (d / l)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.32e-105], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -7.5e-275], N[(d * N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1e-202], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.26e+157], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \frac{1}{h \cdot \ell}\\
\mathbf{if}\;\ell \leq -1.32 \cdot 10^{-105}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -7.5 \cdot 10^{-275}:\\
\;\;\;\;d \cdot {\left(t\_0 \cdot t\_0\right)}^{0.25}\\

\mathbf{elif}\;\ell \leq 10^{-202}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{t\_0}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < -1.32000000000000006e-105

    1. Initial program 64.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified51.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f644.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified4.5%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f644.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr4.5%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
    10. Taylor expanded in l around -inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}, d\right) \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      3. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      4. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), d\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right), d\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right), d\right) \]
      10. /-lowering-/.f6446.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right), d\right) \]
    12. Simplified46.2%

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

    if -1.32000000000000006e-105 < l < -7.49999999999999943e-275

    1. Initial program 72.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified66.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6419.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified19.1%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{1}{4} + \color{blue}{\frac{1}{4}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{1}{4} + \frac{1}{4}\right)}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{1}{4} + \frac{1}{\color{blue}{4}}\right)}\right)\right) \]
      5. pow-prod-upN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{1}{4}\right)} \cdot \color{blue}{{\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{1}{4}\right)}}\right)\right) \]
      6. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell} \cdot \frac{1}{h \cdot \ell}\right)}^{\color{blue}{\left(\frac{1}{4}\right)}}\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{h \cdot \ell} \cdot \frac{1}{h \cdot \ell}\right), \color{blue}{\left(\frac{1}{4}\right)}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{h \cdot \ell}\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{\color{blue}{1}}{4}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\ell \cdot h\right)\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right), \mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right), \mathsf{/.f64}\left(1, \left(\ell \cdot h\right)\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right)\right), \left(\frac{1}{4}\right)\right)\right) \]
      15. metadata-eval45.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\ell, h\right)\right)\right), \frac{1}{4}\right)\right) \]
    9. Applied egg-rr45.6%

      \[\leadsto d \cdot \color{blue}{{\left(\frac{1}{\ell \cdot h} \cdot \frac{1}{\ell \cdot h}\right)}^{0.25}} \]

    if -7.49999999999999943e-275 < l < 1e-202

    1. Initial program 78.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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. associate-*l*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6443.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified43.4%

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

    if 1e-202 < l < 1.25999999999999996e157

    1. Initial program 74.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified62.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified41.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr42.3%

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

    if 1.25999999999999996e157 < l

    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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified26.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6445.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.32 \cdot 10^{-105}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -7.5 \cdot 10^{-275}:\\ \;\;\;\;d \cdot {\left(\frac{1}{h \cdot \ell} \cdot \frac{1}{h \cdot \ell}\right)}^{0.25}\\ \mathbf{elif}\;\ell \leq 10^{-202}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 1.26 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 54.6% accurate, 2.7× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;M\_m \leq 3.5 \cdot 10^{-144}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{D\_m \cdot -0.125}{\ell} \cdot \frac{\frac{D\_m}{d}}{{\left(\frac{\ell}{h}\right)}^{0.5}}\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= M_m 3.5e-144)
   (sqrt (* (/ d h) (/ d l)))
   (* (* M_m M_m) (* (/ (* D_m -0.125) l) (/ (/ D_m d) (pow (/ l h) 0.5))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 3.5e-144) {
		tmp = sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (m_m <= 3.5d-144) then
        tmp = sqrt(((d / h) * (d / l)))
    else
        tmp = (m_m * m_m) * (((d_m * (-0.125d0)) / l) * ((d_m / d) / ((l / h) ** 0.5d0)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 3.5e-144) {
		tmp = Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / Math.pow((l / h), 0.5)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if M_m <= 3.5e-144:
		tmp = math.sqrt(((d / h) * (d / l)))
	else:
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / math.pow((l / h), 0.5)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (M_m <= 3.5e-144)
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	else
		tmp = Float64(Float64(M_m * M_m) * Float64(Float64(Float64(D_m * -0.125) / l) * Float64(Float64(D_m / d) / (Float64(l / h) ^ 0.5))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (M_m <= 3.5e-144)
		tmp = sqrt(((d / h) * (d / l)));
	else
		tmp = (M_m * M_m) * (((D_m * -0.125) / l) * ((D_m / d) / ((l / h) ^ 0.5)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[M$95$m, 3.5e-144], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(M$95$m * M$95$m), $MachinePrecision] * N[(N[(N[(D$95$m * -0.125), $MachinePrecision] / l), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] / N[Power[N[(l / h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 3.5 \cdot 10^{-144}:\\
\;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 3.4999999999999998e-144

    1. Initial program 66.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6423.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified23.6%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6431.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr31.3%

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

    if 3.4999999999999998e-144 < M

    1. Initial program 75.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified60.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6475.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr75.5%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

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

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6444.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr44.3%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}{\ell}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{D \cdot D}{d}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\color{blue}{\frac{\ell}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      4. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \color{blue}{\frac{1}{{\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}}}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{{\color{blue}{\left(\frac{h}{\ell}\right)}}^{\frac{1}{2}}}}\right)\right) \]
      6. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \frac{\sqrt{1}}{\sqrt{\frac{h}{\ell}}}}\right)\right) \]
      7. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{1}{\frac{h}{\ell}}}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \frac{D \cdot D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      9. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\frac{-1}{8} \cdot \left(D \cdot \frac{D}{d}\right)}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(\frac{-1}{8} \cdot D\right) \cdot \frac{D}{d}}{\color{blue}{\ell} \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{\left(D \cdot \frac{-1}{8}\right) \cdot \frac{D}{d}}{\ell \cdot \sqrt{\frac{\ell}{h}}}\right)\right) \]
      12. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\frac{D \cdot \frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{D \cdot \frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{\frac{D}{d}}{\sqrt{\frac{\ell}{h}}}\right)}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{-1}{8}\right), \ell\right), \left(\frac{\color{blue}{\frac{D}{d}}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \left(\frac{\frac{\color{blue}{D}}{d}}{\sqrt{\frac{\ell}{h}}}\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\sqrt{\frac{\ell}{h}}\right)}\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\sqrt{\color{blue}{\frac{\ell}{h}}}\right)\right)\right)\right) \]
      18. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \left({\left(\frac{\ell}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      19. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\left(\frac{\ell}{h}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      20. /-lowering-/.f6451.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \frac{-1}{8}\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, h\right), \frac{1}{2}\right)\right)\right)\right) \]
    13. Applied egg-rr51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3.5 \cdot 10^{-144}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\frac{D \cdot -0.125}{\ell} \cdot \frac{\frac{D}{d}}{{\left(\frac{\ell}{h}\right)}^{0.5}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.5% accurate, 2.7× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;M\_m \leq 3 \cdot 10^{-143}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{D\_m}{d} \cdot \left(D\_m \cdot \left(-0.125 \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\right)\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= M_m 3e-143)
   (sqrt (* (/ d h) (/ d l)))
   (* (* M_m M_m) (* (/ D_m d) (* D_m (* -0.125 (/ (pow (/ h l) 0.5) l)))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 3e-143) {
		tmp = sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * ((D_m / d) * (D_m * (-0.125 * (pow((h / l), 0.5) / l))));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (m_m <= 3d-143) then
        tmp = sqrt(((d / h) * (d / l)))
    else
        tmp = (m_m * m_m) * ((d_m / d) * (d_m * ((-0.125d0) * (((h / l) ** 0.5d0) / l))))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 3e-143) {
		tmp = Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * ((D_m / d) * (D_m * (-0.125 * (Math.pow((h / l), 0.5) / l))));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if M_m <= 3e-143:
		tmp = math.sqrt(((d / h) * (d / l)))
	else:
		tmp = (M_m * M_m) * ((D_m / d) * (D_m * (-0.125 * (math.pow((h / l), 0.5) / l))))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (M_m <= 3e-143)
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	else
		tmp = Float64(Float64(M_m * M_m) * Float64(Float64(D_m / d) * Float64(D_m * Float64(-0.125 * Float64((Float64(h / l) ^ 0.5) / l)))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (M_m <= 3e-143)
		tmp = sqrt(((d / h) * (d / l)));
	else
		tmp = (M_m * M_m) * ((D_m / d) * (D_m * (-0.125 * (((h / l) ^ 0.5) / l))));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[M$95$m, 3e-143], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(M$95$m * M$95$m), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] * N[(D$95$m * N[(-0.125 * N[(N[Power[N[(h / l), $MachinePrecision], 0.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 3 \cdot 10^{-143}:\\
\;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 2.99999999999999985e-143

    1. Initial program 66.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6423.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified23.6%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6431.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr31.3%

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

    if 2.99999999999999985e-143 < M

    1. Initial program 75.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified60.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6475.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr75.5%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\frac{D \cdot D}{d}}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \frac{-1}{8}\right) \cdot \left(D \cdot \color{blue}{\frac{D}{d}}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \frac{-1}{8}\right) \cdot D\right) \cdot \color{blue}{\frac{D}{d}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \frac{-1}{8}\right) \cdot D\right), \color{blue}{\left(\frac{D}{d}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \frac{-1}{8}\right), D\right), \left(\frac{\color{blue}{D}}{d}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      7. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      9. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      10. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      11. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      13. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      15. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \frac{-1}{8}\right), D\right), \left(\frac{D}{d}\right)\right)\right) \]
      18. /-lowering-/.f6450.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \frac{-1}{8}\right), D\right), \mathsf{/.f64}\left(D, \color{blue}{d}\right)\right)\right) \]
    11. Applied egg-rr50.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3 \cdot 10^{-143}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\frac{D}{d} \cdot \left(D \cdot \left(-0.125 \cdot \frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.4% accurate, 2.7× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;M\_m \leq 1.02 \cdot 10^{-143}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{\sqrt{\frac{h}{\ell}}}{\ell} \cdot \left(-0.125 \cdot \frac{D\_m \cdot D\_m}{d}\right)\right)\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= M_m 1.02e-143)
   (sqrt (* (/ d h) (/ d l)))
   (* (* M_m M_m) (* (/ (sqrt (/ h l)) l) (* -0.125 (/ (* D_m D_m) d))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 1.02e-143) {
		tmp = sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * ((sqrt((h / l)) / l) * (-0.125 * ((D_m * D_m) / d)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (m_m <= 1.02d-143) then
        tmp = sqrt(((d / h) * (d / l)))
    else
        tmp = (m_m * m_m) * ((sqrt((h / l)) / l) * ((-0.125d0) * ((d_m * d_m) / d)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (M_m <= 1.02e-143) {
		tmp = Math.sqrt(((d / h) * (d / l)));
	} else {
		tmp = (M_m * M_m) * ((Math.sqrt((h / l)) / l) * (-0.125 * ((D_m * D_m) / d)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if M_m <= 1.02e-143:
		tmp = math.sqrt(((d / h) * (d / l)))
	else:
		tmp = (M_m * M_m) * ((math.sqrt((h / l)) / l) * (-0.125 * ((D_m * D_m) / d)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (M_m <= 1.02e-143)
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	else
		tmp = Float64(Float64(M_m * M_m) * Float64(Float64(sqrt(Float64(h / l)) / l) * Float64(-0.125 * Float64(Float64(D_m * D_m) / d))));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (M_m <= 1.02e-143)
		tmp = sqrt(((d / h) * (d / l)));
	else
		tmp = (M_m * M_m) * ((sqrt((h / l)) / l) * (-0.125 * ((D_m * D_m) / d)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[M$95$m, 1.02e-143], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(M$95$m * M$95$m), $MachinePrecision] * N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 * N[(N[(D$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 1.02 \cdot 10^{-143}:\\
\;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\left(M\_m \cdot M\_m\right) \cdot \left(\frac{\sqrt{\frac{h}{\ell}}}{\ell} \cdot \left(-0.125 \cdot \frac{D\_m \cdot D\_m}{d}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 1.02e-143

    1. Initial program 66.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6423.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified23.6%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6431.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr31.3%

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

    if 1.02e-143 < M

    1. Initial program 75.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified60.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{\left(4 \cdot d\right) \cdot d}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d} \cdot \frac{M \cdot D}{d}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{4 \cdot d}\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(h, \ell\right)}, \frac{-1}{2}\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{h}, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(4 \cdot d\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(d \cdot 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \left(\frac{M \cdot D}{d}\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \color{blue}{\ell}\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f6475.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{*.f64}\left(d, 4\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{-1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr75.5%

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

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

        \[\leadsto \frac{-1}{8} \cdot \frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}}{\color{blue}{d}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{d} \]
      3. associate-*r*N/A

        \[\leadsto \frac{-1}{8} \cdot \frac{\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot {D}^{2}\right) \cdot {M}^{2}}{d} \]
      4. associate-*l/N/A

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

        \[\leadsto \frac{-1}{8} \cdot \left(\left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{{D}^{2}}{d}\right) \cdot {\color{blue}{M}}^{2}\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \color{blue}{{M}^{2}} \]
      8. *-commutativeN/A

        \[\leadsto {M}^{2} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({M}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(M \cdot M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{D}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2}}{d}\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

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

      \[\leadsto \color{blue}{\left(M \cdot M\right) \cdot \left(\sqrt{\frac{\frac{h}{\ell \cdot \ell}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{\ell \cdot \ell}}\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\sqrt{{\ell}^{2}}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      5. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{\left(\frac{2}{2}\right)}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{{\ell}^{1}}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      7. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{h}{\ell}}}{\ell}\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\color{blue}{\frac{-1}{8}}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\frac{h}{\ell}\right)}^{\frac{1}{2}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{\ell}\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      11. /-lowering-/.f6444.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \frac{1}{2}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    11. Applied egg-rr44.3%

      \[\leadsto \left(M \cdot M\right) \cdot \left(\color{blue}{\frac{{\left(\frac{h}{\ell}\right)}^{0.5}}{\ell}} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right) \]
    12. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{h}{\ell}}\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell}\right)\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
      3. /-lowering-/.f6444.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \ell\right)\right), \ell\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right)\right)\right)\right) \]
    13. Applied egg-rr44.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 1.02 \cdot 10^{-143}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\frac{\sqrt{\frac{h}{\ell}}}{\ell} \cdot \left(-0.125 \cdot \frac{D \cdot D}{d}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 41.3% accurate, 2.8× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.35 \cdot 10^{-203}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= l 1.35e-203)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (if (<= l 2.5e+157) (* d (pow (* h l) -0.5)) (sqrt (* (/ d h) (/ d l))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (l <= 1.35e-203) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= 2.5e+157) {
		tmp = d * pow((h * l), -0.5);
	} else {
		tmp = sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (l <= 1.35d-203) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= 2.5d+157) then
        tmp = d * ((h * l) ** (-0.5d0))
    else
        tmp = sqrt(((d / h) * (d / l)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (l <= 1.35e-203) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= 2.5e+157) {
		tmp = d * Math.pow((h * l), -0.5);
	} else {
		tmp = Math.sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if l <= 1.35e-203:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= 2.5e+157:
		tmp = d * math.pow((h * l), -0.5)
	else:
		tmp = math.sqrt(((d / h) * (d / l)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (l <= 1.35e-203)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= 2.5e+157)
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	else
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (l <= 1.35e-203)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= 2.5e+157)
		tmp = d * ((h * l) ^ -0.5);
	else
		tmp = sqrt(((d / h) * (d / l)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[l, 1.35e-203], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.5e+157], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.35 \cdot 10^{-203}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.34999999999999999e-203

    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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6412.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified12.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f6412.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr12.8%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
    10. Taylor expanded in l around -inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}, d\right) \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      3. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      4. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - \sqrt{\frac{1}{h \cdot \ell}}\right), d\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), d\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), d\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right), d\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right), d\right) \]
      10. /-lowering-/.f6439.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right), d\right) \]
    12. Simplified39.9%

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

    if 1.34999999999999999e-203 < l < 2.49999999999999988e157

    1. Initial program 74.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified62.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified41.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr42.3%

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

    if 2.49999999999999988e157 < l

    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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified26.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6445.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.35 \cdot 10^{-203}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 41.2% accurate, 2.8× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{-204}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{+156}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (if (<= l 1.7e-204)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= l 5e+156) (* d (pow (* h l) -0.5)) (sqrt (* (/ d h) (/ d l))))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (l <= 1.7e-204) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (l <= 5e+156) {
		tmp = d * pow((h * l), -0.5);
	} else {
		tmp = sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: tmp
    if (l <= 1.7d-204) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (l <= 5d+156) then
        tmp = d * ((h * l) ** (-0.5d0))
    else
        tmp = sqrt(((d / h) * (d / l)))
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double tmp;
	if (l <= 1.7e-204) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (l <= 5e+156) {
		tmp = d * Math.pow((h * l), -0.5);
	} else {
		tmp = Math.sqrt(((d / h) * (d / l)));
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	tmp = 0
	if l <= 1.7e-204:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif l <= 5e+156:
		tmp = d * math.pow((h * l), -0.5)
	else:
		tmp = math.sqrt(((d / h) * (d / l)))
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	tmp = 0.0
	if (l <= 1.7e-204)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (l <= 5e+156)
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	else
		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	tmp = 0.0;
	if (l <= 1.7e-204)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (l <= 5e+156)
		tmp = d * ((h * l) ^ -0.5);
	else
		tmp = sqrt(((d / h) * (d / l)));
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[l, 1.7e-204], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5e+156], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-204}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.7000000000000001e-204

    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. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. associate-*l*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6439.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified39.6%

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

    if 1.7000000000000001e-204 < l < 4.99999999999999992e156

    1. Initial program 74.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified62.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified41.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr42.3%

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

    if 4.99999999999999992e156 < l

    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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified41.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified26.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6445.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{-204}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{+156}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.0% accurate, 2.8× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -2.9 \cdot 10^{-288}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 1.32 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m)
 :precision binary64
 (let* ((t_0 (sqrt (* (/ d h) (/ d l)))))
   (if (<= l -2.9e-288)
     t_0
     (if (<= l 1.32e+157) (* d (pow (* h l) -0.5)) t_0))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = sqrt(((d / h) * (d / l)));
	double tmp;
	if (l <= -2.9e-288) {
		tmp = t_0;
	} else if (l <= 1.32e+157) {
		tmp = d * pow((h * l), -0.5);
	} else {
		tmp = t_0;
	}
	return tmp;
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((d / h) * (d / l)))
    if (l <= (-2.9d-288)) then
        tmp = t_0
    else if (l <= 1.32d+157) then
        tmp = d * ((h * l) ** (-0.5d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	double t_0 = Math.sqrt(((d / h) * (d / l)));
	double tmp;
	if (l <= -2.9e-288) {
		tmp = t_0;
	} else if (l <= 1.32e+157) {
		tmp = d * Math.pow((h * l), -0.5);
	} else {
		tmp = t_0;
	}
	return tmp;
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	t_0 = math.sqrt(((d / h) * (d / l)))
	tmp = 0
	if l <= -2.9e-288:
		tmp = t_0
	elif l <= 1.32e+157:
		tmp = d * math.pow((h * l), -0.5)
	else:
		tmp = t_0
	return tmp
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	t_0 = sqrt(Float64(Float64(d / h) * Float64(d / l)))
	tmp = 0.0
	if (l <= -2.9e-288)
		tmp = t_0;
	elseif (l <= 1.32e+157)
		tmp = Float64(d * (Float64(h * l) ^ -0.5));
	else
		tmp = t_0;
	end
	return tmp
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp_2 = code(d, h, l, M_m, D_m)
	t_0 = sqrt(((d / h) * (d / l)));
	tmp = 0.0;
	if (l <= -2.9e-288)
		tmp = t_0;
	elseif (l <= 1.32e+157)
		tmp = d * ((h * l) ^ -0.5);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2.9e-288], t$95$0, If[LessEqual[l, 1.32e+157], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{if}\;\ell \leq -2.9 \cdot 10^{-288}:\\
\;\;\;\;t\_0\\

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -2.90000000000000015e-288 or 1.3199999999999999e157 < l

    1. Initial program 64.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified53.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6412.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified12.0%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      8. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
      9. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
      10. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      14. /-lowering-/.f6431.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr31.5%

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

    if -2.90000000000000015e-288 < l < 1.3199999999999999e157

    1. Initial program 77.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. *-commutativeN/A

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

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified65.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6437.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified37.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
      4. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
      8. *-lowering-*.f6438.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
    9. Applied egg-rr38.2%

      \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.9 \cdot 10^{-288}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;\ell \leq 1.32 \cdot 10^{+157}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 26.6% accurate, 3.1× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ d \cdot {\left(h \cdot \ell\right)}^{-0.5} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m) :precision binary64 (* d (pow (* h l) -0.5)))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	return d * pow((h * l), -0.5);
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    code = d * ((h * l) ** (-0.5d0))
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	return d * Math.pow((h * l), -0.5);
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	return d * math.pow((h * l), -0.5)
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	return Float64(d * (Float64(h * l) ^ -0.5))
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp = code(d, h, l, M_m, D_m)
	tmp = d * ((h * l) ^ -0.5);
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
d \cdot {\left(h \cdot \ell\right)}^{-0.5}
\end{array}
Derivation
  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. Step-by-step derivation
    1. *-commutativeN/A

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

      \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
    5. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
    6. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    10. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    11. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    14. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
  3. Simplified58.4%

    \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in d around inf

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
    4. *-lowering-*.f6422.8%

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
  7. Simplified22.8%

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  8. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{d}\right) \]
    3. inv-powN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(h \cdot \ell\right)}^{-1}}\right), d\right) \]
    4. sqrt-pow1N/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\frac{-1}{2}\right)}\right), d\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\frac{-1}{2}}\right), d\right) \]
    6. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \frac{-1}{2}\right), d\right) \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\ell \cdot h\right), \frac{-1}{2}\right), d\right) \]
    8. *-lowering-*.f6423.0%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\ell, h\right), \frac{-1}{2}\right), d\right) \]
  9. Applied egg-rr23.0%

    \[\leadsto \color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot d} \]
  10. Final simplification23.0%

    \[\leadsto d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
  11. Add Preprocessing

Alternative 20: 26.6% accurate, 3.2× speedup?

\[\begin{array}{l} M_m = \left|M\right| \\ D_m = \left|D\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \frac{d}{\sqrt{h \cdot \ell}} \end{array} \]
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M_m D_m) :precision binary64 (/ d (sqrt (* h l))))
M_m = fabs(M);
D_m = fabs(D);
assert(d < h && h < l && l < M_m && M_m < D_m);
double code(double d, double h, double l, double M_m, double D_m) {
	return d / sqrt((h * l));
}
M_m = abs(m)
D_m = abs(d)
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
real(8) function code(d, h, l, m_m, d_m)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m_m
    real(8), intent (in) :: d_m
    code = d / sqrt((h * l))
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
assert d < h && h < l && l < M_m && M_m < D_m;
public static double code(double d, double h, double l, double M_m, double D_m) {
	return d / Math.sqrt((h * l));
}
M_m = math.fabs(M)
D_m = math.fabs(D)
[d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
def code(d, h, l, M_m, D_m):
	return d / math.sqrt((h * l))
M_m = abs(M)
D_m = abs(D)
d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
function code(d, h, l, M_m, D_m)
	return Float64(d / sqrt(Float64(h * l)))
end
M_m = abs(M);
D_m = abs(D);
d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
function tmp = code(d, h, l, M_m, D_m)
	tmp = d / sqrt((h * l));
end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M$95$m_, D$95$m_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Derivation
  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. Step-by-step derivation
    1. *-commutativeN/A

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

      \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\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. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\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)}\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\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)\right) \]
    5. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
    6. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\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)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\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)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    10. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    11. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    14. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
  3. Simplified58.4%

    \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\left(M \cdot D\right) \cdot \left(M \cdot D\right)}{4 \cdot \left(d \cdot d\right)} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in d around inf

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
    4. *-lowering-*.f6422.8%

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
  7. Simplified22.8%

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  8. Step-by-step derivation
    1. sqrt-divN/A

      \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    2. metadata-evalN/A

      \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
    3. un-div-invN/A

      \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    4. rem-square-sqrtN/A

      \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
    5. *-commutativeN/A

      \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
    6. sqrt-prodN/A

      \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
    7. frac-timesN/A

      \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
    8. sqrt-divN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
    9. sqrt-divN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
    10. *-commutativeN/A

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \color{blue}{\left(\sqrt{\frac{d}{\ell}}\right)}\right) \]
    12. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{h}{d}}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
    13. inv-powN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{h}{d}\right)}^{-1}}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
    14. sqrt-pow1N/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\left(\frac{-1}{2}\right)}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{h}{d}\right)}^{\frac{-1}{2}}\right), \left(\sqrt{\frac{d}{\color{blue}{\ell}}}\right)\right) \]
    16. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{h}{d}\right), \frac{-1}{2}\right), \left(\sqrt{\color{blue}{\frac{d}{\ell}}}\right)\right) \]
    17. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \left(\sqrt{\frac{\color{blue}{d}}{\ell}}\right)\right) \]
    18. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right)\right) \]
    19. /-lowering-/.f6436.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(h, d\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right)\right) \]
  9. Applied egg-rr36.9%

    \[\leadsto \color{blue}{{\left(\frac{h}{d}\right)}^{-0.5} \cdot \sqrt{\frac{d}{\ell}}} \]
  10. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{h}{d}\right)}^{\frac{-1}{2}}} \]
    2. metadata-evalN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot {\left(\frac{h}{d}\right)}^{\left(\frac{-1}{\color{blue}{2}}\right)} \]
    3. sqrt-pow1N/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{{\left(\frac{h}{d}\right)}^{-1}} \]
    4. inv-powN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{1}{\frac{h}{d}}} \]
    5. clear-numN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}} \]
    6. sqrt-divN/A

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \]
    7. sqrt-divN/A

      \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \]
    8. frac-timesN/A

      \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
    9. rem-square-sqrtN/A

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell}} \cdot \sqrt{h}} \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{\ell} \cdot \sqrt{h}\right)}\right) \]
    11. sqrt-unprodN/A

      \[\leadsto \mathsf{/.f64}\left(d, \left(\sqrt{\ell \cdot h}\right)\right) \]
    12. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\ell \cdot h\right)\right)\right) \]
    13. *-lowering-*.f6422.9%

      \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\ell, h\right)\right)\right) \]
  11. Applied egg-rr22.9%

    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
  12. Final simplification22.9%

    \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
  13. Add Preprocessing

Reproduce

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