Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.4% → 79.1%
Time: 25.2s
Alternatives: 27
Speedup: 2.6×

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 27 alternatives:

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

Initial Program: 66.4% 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: 79.1% 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{d}{M\_m \cdot D\_m}\\ t_1 := \frac{0.5}{t\_0}\\ t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_3 := \frac{\frac{t\_1}{2}}{\ell}\\ \mathbf{if}\;h \leq -1.35 \cdot 10^{+48}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}\right)\right) \cdot \left({\left(0 - d\right)}^{0.5} \cdot \sqrt{\frac{-1}{\ell}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_2 \cdot \left(t\_3 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 1.45 \cdot 10^{+111}:\\ \;\;\;\;\left(1 + t\_3 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (/ d (* M_m D_m)))
        (t_1 (/ 0.5 t_0))
        (t_2 (* d (sqrt (/ 1.0 (* h l)))))
        (t_3 (/ (/ t_1 2.0) l)))
   (if (<= h -1.35e+48)
     (*
      (* (sqrt (/ d h)) (+ 1.0 (/ (* (/ -0.5 t_0) (/ (/ h 4.0) t_0)) l)))
      (* (pow (- 0.0 d) 0.5) (sqrt (/ -1.0 l))))
     (if (<= h -1e-309)
       (* t_2 (+ (* t_3 (/ t_1 (/ 1.0 h))) -1.0))
       (if (<= h 1.45e+111)
         (* (+ 1.0 (* t_3 (/ t_1 (/ -1.0 h)))) t_2)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d / (M_m * D_m);
	double t_1 = 0.5 / t_0;
	double t_2 = d * sqrt((1.0 / (h * l)));
	double t_3 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -1.35e+48) {
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (pow((0.0 - d), 0.5) * sqrt((-1.0 / l)));
	} else if (h <= -1e-309) {
		tmp = t_2 * ((t_3 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.45e+111) {
		tmp = (1.0 + (t_3 * (t_1 / (-1.0 / h)))) * t_2;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d / (m_m * d_m)
    t_1 = 0.5d0 / t_0
    t_2 = d * sqrt((1.0d0 / (h * l)))
    t_3 = (t_1 / 2.0d0) / l
    if (h <= (-1.35d+48)) then
        tmp = (sqrt((d / h)) * (1.0d0 + ((((-0.5d0) / t_0) * ((h / 4.0d0) / t_0)) / l))) * (((0.0d0 - d) ** 0.5d0) * sqrt(((-1.0d0) / l)))
    else if (h <= (-1d-309)) then
        tmp = t_2 * ((t_3 * (t_1 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 1.45d+111) then
        tmp = (1.0d0 + (t_3 * (t_1 / ((-1.0d0) / h)))) * t_2
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	double t_1 = 0.5 / t_0;
	double t_2 = d * Math.sqrt((1.0 / (h * l)));
	double t_3 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -1.35e+48) {
		tmp = (Math.sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (Math.pow((0.0 - d), 0.5) * Math.sqrt((-1.0 / l)));
	} else if (h <= -1e-309) {
		tmp = t_2 * ((t_3 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.45e+111) {
		tmp = (1.0 + (t_3 * (t_1 / (-1.0 / h)))) * t_2;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d / (M_m * D_m)
	t_1 = 0.5 / t_0
	t_2 = d * math.sqrt((1.0 / (h * l)))
	t_3 = (t_1 / 2.0) / l
	tmp = 0
	if h <= -1.35e+48:
		tmp = (math.sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (math.pow((0.0 - d), 0.5) * math.sqrt((-1.0 / l)))
	elif h <= -1e-309:
		tmp = t_2 * ((t_3 * (t_1 / (1.0 / h))) + -1.0)
	elif h <= 1.45e+111:
		tmp = (1.0 + (t_3 * (t_1 / (-1.0 / h)))) * t_2
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d / Float64(M_m * D_m))
	t_1 = Float64(0.5 / t_0)
	t_2 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_3 = Float64(Float64(t_1 / 2.0) / l)
	tmp = 0.0
	if (h <= -1.35e+48)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(Float64(-0.5 / t_0) * Float64(Float64(h / 4.0) / t_0)) / l))) * Float64((Float64(0.0 - d) ^ 0.5) * sqrt(Float64(-1.0 / l))));
	elseif (h <= -1e-309)
		tmp = Float64(t_2 * Float64(Float64(t_3 * Float64(t_1 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 1.45e+111)
		tmp = Float64(Float64(1.0 + Float64(t_3 * Float64(t_1 / Float64(-1.0 / h)))) * t_2);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	t_1 = 0.5 / t_0;
	t_2 = d * sqrt((1.0 / (h * l)));
	t_3 = (t_1 / 2.0) / l;
	tmp = 0.0;
	if (h <= -1.35e+48)
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (((0.0 - d) ^ 0.5) * sqrt((-1.0 / l)));
	elseif (h <= -1e-309)
		tmp = t_2 * ((t_3 * (t_1 / (1.0 / h))) + -1.0);
	elseif (h <= 1.45e+111)
		tmp = (1.0 + (t_3 * (t_1 / (-1.0 / h)))) * t_2;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -1.35e+48], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(N[(-0.5 / t$95$0), $MachinePrecision] * N[(N[(h / 4.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$2 * N[(N[(t$95$3 * N[(t$95$1 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.45e+111], N[(N[(1.0 + N[(t$95$3 * N[(t$95$1 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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{d}{M\_m \cdot D\_m}\\
t_1 := \frac{0.5}{t\_0}\\
t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_3 := \frac{\frac{t\_1}{2}}{\ell}\\
\mathbf{if}\;h \leq -1.35 \cdot 10^{+48}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}\right)\right) \cdot \left({\left(0 - d\right)}^{0.5} \cdot \sqrt{\frac{-1}{\ell}}\right)\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot \left(t\_3 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 1.45 \cdot 10^{+111}:\\
\;\;\;\;\left(1 + t\_3 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -1.35000000000000002e48

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr63.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \left(\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \]
      3. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}} \cdot \sqrt{\color{blue}{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \frac{1}{2}\right), \left(\sqrt{\color{blue}{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right)\right) \]
      7. neg-sub0N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\ell\right)\right)\right)\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(0 - \ell\right)\right)\right)\right)\right) \]
      12. --lowering--.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(0, \ell\right)\right)\right)\right)\right) \]
    9. Applied egg-rr77.2%

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

    if -1.35000000000000002e48 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified90.3%

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

    if -1.000000000000002e-309 < h < 1.45e111

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 1.45e111 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.1% 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{d}{M\_m \cdot D\_m}\\ t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_2 := \frac{0.5}{t\_0}\\ t_3 := \frac{\frac{t\_2}{2}}{\ell}\\ \mathbf{if}\;h \leq -4.5 \cdot 10^{+54}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}\right)\right) \cdot \frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_1 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 6 \cdot 10^{+111}:\\ \;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (/ d (* M_m D_m)))
        (t_1 (* d (sqrt (/ 1.0 (* h l)))))
        (t_2 (/ 0.5 t_0))
        (t_3 (/ (/ t_2 2.0) l)))
   (if (<= h -4.5e+54)
     (*
      (* (sqrt (/ d h)) (+ 1.0 (/ (* (/ -0.5 t_0) (/ (/ h 4.0) t_0)) l)))
      (/ (pow (- 0.0 d) 0.5) (pow (- 0.0 l) 0.5)))
     (if (<= h -1e-309)
       (* t_1 (+ (* t_3 (/ t_2 (/ 1.0 h))) -1.0))
       (if (<= h 6e+111)
         (* (+ 1.0 (* t_3 (/ t_2 (/ -1.0 h)))) t_1)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d / (M_m * D_m);
	double t_1 = d * sqrt((1.0 / (h * l)));
	double t_2 = 0.5 / t_0;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -4.5e+54) {
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (pow((0.0 - d), 0.5) / pow((0.0 - l), 0.5));
	} else if (h <= -1e-309) {
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 6e+111) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d / (m_m * d_m)
    t_1 = d * sqrt((1.0d0 / (h * l)))
    t_2 = 0.5d0 / t_0
    t_3 = (t_2 / 2.0d0) / l
    if (h <= (-4.5d+54)) then
        tmp = (sqrt((d / h)) * (1.0d0 + ((((-0.5d0) / t_0) * ((h / 4.0d0) / t_0)) / l))) * (((0.0d0 - d) ** 0.5d0) / ((0.0d0 - l) ** 0.5d0))
    else if (h <= (-1d-309)) then
        tmp = t_1 * ((t_3 * (t_2 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 6d+111) then
        tmp = (1.0d0 + (t_3 * (t_2 / ((-1.0d0) / h)))) * t_1
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	double t_1 = d * Math.sqrt((1.0 / (h * l)));
	double t_2 = 0.5 / t_0;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -4.5e+54) {
		tmp = (Math.sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (Math.pow((0.0 - d), 0.5) / Math.pow((0.0 - l), 0.5));
	} else if (h <= -1e-309) {
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 6e+111) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d / (M_m * D_m)
	t_1 = d * math.sqrt((1.0 / (h * l)))
	t_2 = 0.5 / t_0
	t_3 = (t_2 / 2.0) / l
	tmp = 0
	if h <= -4.5e+54:
		tmp = (math.sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (math.pow((0.0 - d), 0.5) / math.pow((0.0 - l), 0.5))
	elif h <= -1e-309:
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0)
	elif h <= 6e+111:
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d / Float64(M_m * D_m))
	t_1 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_2 = Float64(0.5 / t_0)
	t_3 = Float64(Float64(t_2 / 2.0) / l)
	tmp = 0.0
	if (h <= -4.5e+54)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(Float64(-0.5 / t_0) * Float64(Float64(h / 4.0) / t_0)) / l))) * Float64((Float64(0.0 - d) ^ 0.5) / (Float64(0.0 - l) ^ 0.5)));
	elseif (h <= -1e-309)
		tmp = Float64(t_1 * Float64(Float64(t_3 * Float64(t_2 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 6e+111)
		tmp = Float64(Float64(1.0 + Float64(t_3 * Float64(t_2 / Float64(-1.0 / h)))) * t_1);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	t_1 = d * sqrt((1.0 / (h * l)));
	t_2 = 0.5 / t_0;
	t_3 = (t_2 / 2.0) / l;
	tmp = 0.0;
	if (h <= -4.5e+54)
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l))) * (((0.0 - d) ^ 0.5) / ((0.0 - l) ^ 0.5));
	elseif (h <= -1e-309)
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	elseif (h <= 6e+111)
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -4.5e+54], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(N[(-0.5 / t$95$0), $MachinePrecision] * N[(N[(h / 4.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision] / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$1 * N[(N[(t$95$3 * N[(t$95$2 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 6e+111], N[(N[(1.0 + N[(t$95$3 * N[(t$95$2 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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{d}{M\_m \cdot D\_m}\\
t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_2 := \frac{0.5}{t\_0}\\
t_3 := \frac{\frac{t\_2}{2}}{\ell}\\
\mathbf{if}\;h \leq -4.5 \cdot 10^{+54}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}\right)\right) \cdot \frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}}\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_1 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 6 \cdot 10^{+111}:\\
\;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -4.49999999999999984e54

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr63.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right)\right) \]
      2. sqrt-divN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \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)\right) \]
      11. --lowering--.f6477.2%

        \[\leadsto \mathsf{*.f64}\left(\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(\frac{-1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 4\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right), \ell\right)\right)\right), \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)\right) \]
    9. Applied egg-rr77.2%

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

    if -4.49999999999999984e54 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified90.3%

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

    if -1.000000000000002e-309 < h < 6e111

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 6e111 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.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} t_0 := \frac{d}{M\_m \cdot D\_m}\\ t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_2 := \frac{0.5}{t\_0}\\ t_3 := \frac{\frac{t\_2}{2}}{\ell}\\ \mathbf{if}\;h \leq -1.65 \cdot 10^{+55}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{0.5 \cdot \frac{h}{\frac{4}{\frac{M\_m \cdot D\_m}{d}}}}{t\_0 \cdot \ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_1 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 9.2 \cdot 10^{+101}:\\ \;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (/ d (* M_m D_m)))
        (t_1 (* d (sqrt (/ 1.0 (* h l)))))
        (t_2 (/ 0.5 t_0))
        (t_3 (/ (/ t_2 2.0) l)))
   (if (<= h -1.65e+55)
     (*
      (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
      (- 1.0 (/ (* 0.5 (/ h (/ 4.0 (/ (* M_m D_m) d)))) (* t_0 l))))
     (if (<= h -1e-309)
       (* t_1 (+ (* t_3 (/ t_2 (/ 1.0 h))) -1.0))
       (if (<= h 9.2e+101)
         (* (+ 1.0 (* t_3 (/ t_2 (/ -1.0 h)))) t_1)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d / (M_m * D_m);
	double t_1 = d * sqrt((1.0 / (h * l)));
	double t_2 = 0.5 / t_0;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -1.65e+55) {
		tmp = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - ((0.5 * (h / (4.0 / ((M_m * D_m) / d)))) / (t_0 * l)));
	} else if (h <= -1e-309) {
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 9.2e+101) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d / (m_m * d_m)
    t_1 = d * sqrt((1.0d0 / (h * l)))
    t_2 = 0.5d0 / t_0
    t_3 = (t_2 / 2.0d0) / l
    if (h <= (-1.65d+55)) then
        tmp = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - ((0.5d0 * (h / (4.0d0 / ((m_m * d_m) / d)))) / (t_0 * l)))
    else if (h <= (-1d-309)) then
        tmp = t_1 * ((t_3 * (t_2 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 9.2d+101) then
        tmp = (1.0d0 + (t_3 * (t_2 / ((-1.0d0) / h)))) * t_1
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	double t_1 = d * Math.sqrt((1.0 / (h * l)));
	double t_2 = 0.5 / t_0;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -1.65e+55) {
		tmp = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - ((0.5 * (h / (4.0 / ((M_m * D_m) / d)))) / (t_0 * l)));
	} else if (h <= -1e-309) {
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 9.2e+101) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d / (M_m * D_m)
	t_1 = d * math.sqrt((1.0 / (h * l)))
	t_2 = 0.5 / t_0
	t_3 = (t_2 / 2.0) / l
	tmp = 0
	if h <= -1.65e+55:
		tmp = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - ((0.5 * (h / (4.0 / ((M_m * D_m) / d)))) / (t_0 * l)))
	elif h <= -1e-309:
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0)
	elif h <= 9.2e+101:
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d / Float64(M_m * D_m))
	t_1 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_2 = Float64(0.5 / t_0)
	t_3 = Float64(Float64(t_2 / 2.0) / l)
	tmp = 0.0
	if (h <= -1.65e+55)
		tmp = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(0.5 * Float64(h / Float64(4.0 / Float64(Float64(M_m * D_m) / d)))) / Float64(t_0 * l))));
	elseif (h <= -1e-309)
		tmp = Float64(t_1 * Float64(Float64(t_3 * Float64(t_2 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 9.2e+101)
		tmp = Float64(Float64(1.0 + Float64(t_3 * Float64(t_2 / Float64(-1.0 / h)))) * t_1);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d / (M_m * D_m);
	t_1 = d * sqrt((1.0 / (h * l)));
	t_2 = 0.5 / t_0;
	t_3 = (t_2 / 2.0) / l;
	tmp = 0.0;
	if (h <= -1.65e+55)
		tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - ((0.5 * (h / (4.0 / ((M_m * D_m) / d)))) / (t_0 * l)));
	elseif (h <= -1e-309)
		tmp = t_1 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	elseif (h <= 9.2e+101)
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_1;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -1.65e+55], 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[(0.5 * N[(h / N[(4.0 / N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$1 * N[(N[(t$95$3 * N[(t$95$2 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 9.2e+101], N[(N[(1.0 + N[(t$95$3 * N[(t$95$2 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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{d}{M\_m \cdot D\_m}\\
t_1 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_2 := \frac{0.5}{t\_0}\\
t_3 := \frac{\frac{t\_2}{2}}{\ell}\\
\mathbf{if}\;h \leq -1.65 \cdot 10^{+55}:\\
\;\;\;\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{0.5 \cdot \frac{h}{\frac{4}{\frac{M\_m \cdot D\_m}{d}}}}{t\_0 \cdot \ell}\right)\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_1 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 9.2 \cdot 10^{+101}:\\
\;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -1.65e55

    1. Initial program 63.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell}\right), \color{blue}{\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)}\right)\right)\right) \]
    4. Applied egg-rr71.7%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}}{2} \cdot \frac{\frac{1}{2}}{\frac{d}{M \cdot D}}}{\color{blue}{\ell \cdot \frac{1}{h}}}\right)\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}}{2} \cdot \frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right) \cdot \color{blue}{\frac{1}{\ell \cdot \frac{1}{h}}}\right)\right)\right) \]
      3. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\frac{\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}}{2} \cdot h\right) \cdot \frac{1}{2}\right), \color{blue}{\left(\ell \cdot \frac{d}{M \cdot D}\right)}\right)\right)\right) \]
    6. Applied egg-rr71.7%

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

    if -1.65e55 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified90.3%

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

    if -1.000000000000002e-309 < h < 9.2000000000000005e101

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 9.2000000000000005e101 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 78.1% 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} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_2 := \frac{\frac{t\_1}{2}}{\ell}\\ t_3 := 1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\\ \mathbf{if}\;h \leq -4.2 \cdot 10^{+98}:\\ \;\;\;\;t\_3 \cdot \frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 1.05 \cdot 10^{+97}:\\ \;\;\;\;t\_3 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (* d (sqrt (/ 1.0 (* h l)))))
        (t_1 (/ 0.5 (/ d (* M_m D_m))))
        (t_2 (/ (/ t_1 2.0) l))
        (t_3 (+ 1.0 (* t_2 (/ t_1 (/ -1.0 h))))))
   (if (<= h -4.2e+98)
     (* t_3 (/ (sqrt (/ d h)) (sqrt (/ l d))))
     (if (<= h -1e-309)
       (* t_0 (+ (* t_2 (/ t_1 (/ 1.0 h))) -1.0))
       (if (<= h 1.05e+97)
         (* t_3 t_0)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d * sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double t_3 = 1.0 + (t_2 * (t_1 / (-1.0 / h)));
	double tmp;
	if (h <= -4.2e+98) {
		tmp = t_3 * (sqrt((d / h)) / sqrt((l / d)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.05e+97) {
		tmp = t_3 * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d * sqrt((1.0d0 / (h * l)))
    t_1 = 0.5d0 / (d / (m_m * d_m))
    t_2 = (t_1 / 2.0d0) / l
    t_3 = 1.0d0 + (t_2 * (t_1 / ((-1.0d0) / h)))
    if (h <= (-4.2d+98)) then
        tmp = t_3 * (sqrt((d / h)) / sqrt((l / d)))
    else if (h <= (-1d-309)) then
        tmp = t_0 * ((t_2 * (t_1 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 1.05d+97) then
        tmp = t_3 * t_0
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d * Math.sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double t_3 = 1.0 + (t_2 * (t_1 / (-1.0 / h)));
	double tmp;
	if (h <= -4.2e+98) {
		tmp = t_3 * (Math.sqrt((d / h)) / Math.sqrt((l / d)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.05e+97) {
		tmp = t_3 * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d * math.sqrt((1.0 / (h * l)))
	t_1 = 0.5 / (d / (M_m * D_m))
	t_2 = (t_1 / 2.0) / l
	t_3 = 1.0 + (t_2 * (t_1 / (-1.0 / h)))
	tmp = 0
	if h <= -4.2e+98:
		tmp = t_3 * (math.sqrt((d / h)) / math.sqrt((l / d)))
	elif h <= -1e-309:
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0)
	elif h <= 1.05e+97:
		tmp = t_3 * t_0
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_1 = Float64(0.5 / Float64(d / Float64(M_m * D_m)))
	t_2 = Float64(Float64(t_1 / 2.0) / l)
	t_3 = Float64(1.0 + Float64(t_2 * Float64(t_1 / Float64(-1.0 / h))))
	tmp = 0.0
	if (h <= -4.2e+98)
		tmp = Float64(t_3 * Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))));
	elseif (h <= -1e-309)
		tmp = Float64(t_0 * Float64(Float64(t_2 * Float64(t_1 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 1.05e+97)
		tmp = Float64(t_3 * t_0);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d * sqrt((1.0 / (h * l)));
	t_1 = 0.5 / (d / (M_m * D_m));
	t_2 = (t_1 / 2.0) / l;
	t_3 = 1.0 + (t_2 * (t_1 / (-1.0 / h)));
	tmp = 0.0;
	if (h <= -4.2e+98)
		tmp = t_3 * (sqrt((d / h)) / sqrt((l / d)));
	elseif (h <= -1e-309)
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	elseif (h <= 1.05e+97)
		tmp = t_3 * t_0;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 / N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(t$95$2 * N[(t$95$1 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -4.2e+98], N[(t$95$3 * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$0 * N[(N[(t$95$2 * N[(t$95$1 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.05e+97], N[(t$95$3 * t$95$0), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_2 := \frac{\frac{t\_1}{2}}{\ell}\\
t_3 := 1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\\
\mathbf{if}\;h \leq -4.2 \cdot 10^{+98}:\\
\;\;\;\;t\_3 \cdot \frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 1.05 \cdot 10^{+97}:\\
\;\;\;\;t\_3 \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -4.20000000000000008e98

    1. Initial program 60.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}}\right) \]
    5. Step-by-step derivation
      1. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      3. pow-flipN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{{\left(\frac{d}{\ell}\right)}^{\frac{-1}{2}}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000008e98 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified89.0%

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

    if -1.000000000000002e-309 < h < 1.05000000000000006e97

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 1.05000000000000006e97 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.5% 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} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_2 := \frac{\frac{t\_1}{2}}{\ell}\\ \mathbf{if}\;h \leq -6.8 \cdot 10^{+99}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{\frac{\frac{M\_m \cdot D\_m}{d \cdot 4}}{\ell}}{\frac{\frac{d}{h \cdot \left(M\_m \cdot D\_m\right)}}{0.5}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 1.3 \cdot 10^{+111}:\\ \;\;\;\;\left(1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (* d (sqrt (/ 1.0 (* h l)))))
        (t_1 (/ 0.5 (/ d (* M_m D_m))))
        (t_2 (/ (/ t_1 2.0) l)))
   (if (<= h -6.8e+99)
     (*
      (/ (sqrt (/ d h)) (sqrt (/ l d)))
      (-
       1.0
       (/ (/ (/ (* M_m D_m) (* d 4.0)) l) (/ (/ d (* h (* M_m D_m))) 0.5))))
     (if (<= h -1e-309)
       (* t_0 (+ (* t_2 (/ t_1 (/ 1.0 h))) -1.0))
       (if (<= h 1.3e+111)
         (* (+ 1.0 (* t_2 (/ t_1 (/ -1.0 h)))) t_0)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d * sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -6.8e+99) {
		tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((((M_m * D_m) / (d * 4.0)) / l) / ((d / (h * (M_m * D_m))) / 0.5)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.3e+111) {
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d * sqrt((1.0d0 / (h * l)))
    t_1 = 0.5d0 / (d / (m_m * d_m))
    t_2 = (t_1 / 2.0d0) / l
    if (h <= (-6.8d+99)) then
        tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0d0 - ((((m_m * d_m) / (d * 4.0d0)) / l) / ((d / (h * (m_m * d_m))) / 0.5d0)))
    else if (h <= (-1d-309)) then
        tmp = t_0 * ((t_2 * (t_1 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 1.3d+111) then
        tmp = (1.0d0 + (t_2 * (t_1 / ((-1.0d0) / h)))) * t_0
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d * Math.sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -6.8e+99) {
		tmp = (Math.sqrt((d / h)) / Math.sqrt((l / d))) * (1.0 - ((((M_m * D_m) / (d * 4.0)) / l) / ((d / (h * (M_m * D_m))) / 0.5)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 1.3e+111) {
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d * math.sqrt((1.0 / (h * l)))
	t_1 = 0.5 / (d / (M_m * D_m))
	t_2 = (t_1 / 2.0) / l
	tmp = 0
	if h <= -6.8e+99:
		tmp = (math.sqrt((d / h)) / math.sqrt((l / d))) * (1.0 - ((((M_m * D_m) / (d * 4.0)) / l) / ((d / (h * (M_m * D_m))) / 0.5)))
	elif h <= -1e-309:
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0)
	elif h <= 1.3e+111:
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_1 = Float64(0.5 / Float64(d / Float64(M_m * D_m)))
	t_2 = Float64(Float64(t_1 / 2.0) / l)
	tmp = 0.0
	if (h <= -6.8e+99)
		tmp = Float64(Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))) * Float64(1.0 - Float64(Float64(Float64(Float64(M_m * D_m) / Float64(d * 4.0)) / l) / Float64(Float64(d / Float64(h * Float64(M_m * D_m))) / 0.5))));
	elseif (h <= -1e-309)
		tmp = Float64(t_0 * Float64(Float64(t_2 * Float64(t_1 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 1.3e+111)
		tmp = Float64(Float64(1.0 + Float64(t_2 * Float64(t_1 / Float64(-1.0 / h)))) * t_0);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d * sqrt((1.0 / (h * l)));
	t_1 = 0.5 / (d / (M_m * D_m));
	t_2 = (t_1 / 2.0) / l;
	tmp = 0.0;
	if (h <= -6.8e+99)
		tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((((M_m * D_m) / (d * 4.0)) / l) / ((d / (h * (M_m * D_m))) / 0.5)));
	elseif (h <= -1e-309)
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	elseif (h <= 1.3e+111)
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 / N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -6.8e+99], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / N[(N[(d / N[(h * N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$0 * N[(N[(t$95$2 * N[(t$95$1 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.3e+111], N[(N[(1.0 + N[(t$95$2 * N[(t$95$1 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_2 := \frac{\frac{t\_1}{2}}{\ell}\\
\mathbf{if}\;h \leq -6.8 \cdot 10^{+99}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{\frac{\frac{M\_m \cdot D\_m}{d \cdot 4}}{\ell}}{\frac{\frac{d}{h \cdot \left(M\_m \cdot D\_m\right)}}{0.5}}\right)\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 1.3 \cdot 10^{+111}:\\
\;\;\;\;\left(1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -6.79999999999999968e99

    1. Initial program 60.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}}\right) \]
    5. Step-by-step derivation
      1. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      3. pow-flipN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{{\left(\frac{d}{\ell}\right)}^{\frac{-1}{2}}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999968e99 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified89.0%

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

    if -1.000000000000002e-309 < h < 1.2999999999999999e111

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 1.2999999999999999e111 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.7% 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} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{d}{M\_m \cdot D\_m}\\ t_2 := \frac{0.5}{t\_1}\\ t_3 := \frac{\frac{t\_2}{2}}{\ell}\\ \mathbf{if}\;h \leq -9 \cdot 10^{+49}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_1} \cdot \frac{\frac{h}{4}}{t\_1}}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_0 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 1.25 \cdot 10^{+106}:\\ \;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (* d (sqrt (/ 1.0 (* h l)))))
        (t_1 (/ d (* M_m D_m)))
        (t_2 (/ 0.5 t_1))
        (t_3 (/ (/ t_2 2.0) l)))
   (if (<= h -9e+49)
     (*
      (* (sqrt (/ d h)) (+ 1.0 (/ (* (/ -0.5 t_1) (/ (/ h 4.0) t_1)) l)))
      (sqrt (/ d l)))
     (if (<= h -1e-309)
       (* t_0 (+ (* t_3 (/ t_2 (/ 1.0 h))) -1.0))
       (if (<= h 1.25e+106)
         (* (+ 1.0 (* t_3 (/ t_2 (/ -1.0 h)))) t_0)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d * sqrt((1.0 / (h * l)));
	double t_1 = d / (M_m * D_m);
	double t_2 = 0.5 / t_1;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -9e+49) {
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_1) * ((h / 4.0) / t_1)) / l))) * sqrt((d / l));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 1.25e+106) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d * sqrt((1.0d0 / (h * l)))
    t_1 = d / (m_m * d_m)
    t_2 = 0.5d0 / t_1
    t_3 = (t_2 / 2.0d0) / l
    if (h <= (-9d+49)) then
        tmp = (sqrt((d / h)) * (1.0d0 + ((((-0.5d0) / t_1) * ((h / 4.0d0) / t_1)) / l))) * sqrt((d / l))
    else if (h <= (-1d-309)) then
        tmp = t_0 * ((t_3 * (t_2 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 1.25d+106) then
        tmp = (1.0d0 + (t_3 * (t_2 / ((-1.0d0) / h)))) * t_0
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d * Math.sqrt((1.0 / (h * l)));
	double t_1 = d / (M_m * D_m);
	double t_2 = 0.5 / t_1;
	double t_3 = (t_2 / 2.0) / l;
	double tmp;
	if (h <= -9e+49) {
		tmp = (Math.sqrt((d / h)) * (1.0 + (((-0.5 / t_1) * ((h / 4.0) / t_1)) / l))) * Math.sqrt((d / l));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	} else if (h <= 1.25e+106) {
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d * math.sqrt((1.0 / (h * l)))
	t_1 = d / (M_m * D_m)
	t_2 = 0.5 / t_1
	t_3 = (t_2 / 2.0) / l
	tmp = 0
	if h <= -9e+49:
		tmp = (math.sqrt((d / h)) * (1.0 + (((-0.5 / t_1) * ((h / 4.0) / t_1)) / l))) * math.sqrt((d / l))
	elif h <= -1e-309:
		tmp = t_0 * ((t_3 * (t_2 / (1.0 / h))) + -1.0)
	elif h <= 1.25e+106:
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_0
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_1 = Float64(d / Float64(M_m * D_m))
	t_2 = Float64(0.5 / t_1)
	t_3 = Float64(Float64(t_2 / 2.0) / l)
	tmp = 0.0
	if (h <= -9e+49)
		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(Float64(-0.5 / t_1) * Float64(Float64(h / 4.0) / t_1)) / l))) * sqrt(Float64(d / l)));
	elseif (h <= -1e-309)
		tmp = Float64(t_0 * Float64(Float64(t_3 * Float64(t_2 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 1.25e+106)
		tmp = Float64(Float64(1.0 + Float64(t_3 * Float64(t_2 / Float64(-1.0 / h)))) * t_0);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d * sqrt((1.0 / (h * l)));
	t_1 = d / (M_m * D_m);
	t_2 = 0.5 / t_1;
	t_3 = (t_2 / 2.0) / l;
	tmp = 0.0;
	if (h <= -9e+49)
		tmp = (sqrt((d / h)) * (1.0 + (((-0.5 / t_1) * ((h / 4.0) / t_1)) / l))) * sqrt((d / l));
	elseif (h <= -1e-309)
		tmp = t_0 * ((t_3 * (t_2 / (1.0 / h))) + -1.0);
	elseif (h <= 1.25e+106)
		tmp = (1.0 + (t_3 * (t_2 / (-1.0 / h)))) * t_0;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -9e+49], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(N[(-0.5 / t$95$1), $MachinePrecision] * N[(N[(h / 4.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$0 * N[(N[(t$95$3 * N[(t$95$2 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.25e+106], N[(N[(1.0 + N[(t$95$3 * N[(t$95$2 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_1 := \frac{d}{M\_m \cdot D\_m}\\
t_2 := \frac{0.5}{t\_1}\\
t_3 := \frac{\frac{t\_2}{2}}{\ell}\\
\mathbf{if}\;h \leq -9 \cdot 10^{+49}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{t\_1} \cdot \frac{\frac{h}{4}}{t\_1}}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_3 \cdot \frac{t\_2}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 1.25 \cdot 10^{+106}:\\
\;\;\;\;\left(1 + t\_3 \cdot \frac{t\_2}{\frac{-1}{h}}\right) \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -8.99999999999999965e49

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr63.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999965e49 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified90.3%

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

    if -1.000000000000002e-309 < h < 1.25e106

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 1.25e106 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.9% 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} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_2 := \frac{\frac{t\_1}{2}}{\ell}\\ \mathbf{if}\;h \leq -2.8 \cdot 10^{+99}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 7 \cdot 10^{+110}:\\ \;\;\;\;\left(1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (* d (sqrt (/ 1.0 (* h l)))))
        (t_1 (/ 0.5 (/ d (* M_m D_m))))
        (t_2 (/ (/ t_1 2.0) l)))
   (if (<= h -2.8e+99)
     (*
      (/ (sqrt (/ d h)) (sqrt (/ l d)))
      (- 1.0 (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l)))
     (if (<= h -1e-309)
       (* t_0 (+ (* t_2 (/ t_1 (/ 1.0 h))) -1.0))
       (if (<= h 7e+110)
         (* (+ 1.0 (* t_2 (/ t_1 (/ -1.0 h)))) t_0)
         (/
          (/
           (*
            d
            (-
             1.0
             (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
           (sqrt h))
          (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 = d * sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -2.8e+99) {
		tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 7e+110) {
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = d * sqrt((1.0d0 / (h * l)))
    t_1 = 0.5d0 / (d / (m_m * d_m))
    t_2 = (t_1 / 2.0d0) / l
    if (h <= (-2.8d+99)) then
        tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0d0 - ((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l))
    else if (h <= (-1d-309)) then
        tmp = t_0 * ((t_2 * (t_1 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 7d+110) then
        tmp = (1.0d0 + (t_2 * (t_1 / ((-1.0d0) / h)))) * t_0
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 = d * Math.sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = (t_1 / 2.0) / l;
	double tmp;
	if (h <= -2.8e+99) {
		tmp = (Math.sqrt((d / h)) / Math.sqrt((l / d))) * (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	} else if (h <= 7e+110) {
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 = d * math.sqrt((1.0 / (h * l)))
	t_1 = 0.5 / (d / (M_m * D_m))
	t_2 = (t_1 / 2.0) / l
	tmp = 0
	if h <= -2.8e+99:
		tmp = (math.sqrt((d / h)) / math.sqrt((l / d))) * (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l))
	elif h <= -1e-309:
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0)
	elif h <= 7e+110:
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_1 = Float64(0.5 / Float64(d / Float64(M_m * D_m)))
	t_2 = Float64(Float64(t_1 / 2.0) / l)
	tmp = 0.0
	if (h <= -2.8e+99)
		tmp = Float64(Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))) * Float64(1.0 - Float64(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l)));
	elseif (h <= -1e-309)
		tmp = Float64(t_0 * Float64(Float64(t_2 * Float64(t_1 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 7e+110)
		tmp = Float64(Float64(1.0 + Float64(t_2 * Float64(t_1 / Float64(-1.0 / h)))) * t_0);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 = d * sqrt((1.0 / (h * l)));
	t_1 = 0.5 / (d / (M_m * D_m));
	t_2 = (t_1 / 2.0) / l;
	tmp = 0.0;
	if (h <= -2.8e+99)
		tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l));
	elseif (h <= -1e-309)
		tmp = t_0 * ((t_2 * (t_1 / (1.0 / h))) + -1.0);
	elseif (h <= 7e+110)
		tmp = (1.0 + (t_2 * (t_1 / (-1.0 / h)))) * t_0;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 / N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[h, -2.8e+99], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$0 * N[(N[(t$95$2 * N[(t$95$1 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 7e+110], N[(N[(1.0 + N[(t$95$2 * N[(t$95$1 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_2 := \frac{\frac{t\_1}{2}}{\ell}\\
\mathbf{if}\;h \leq -2.8 \cdot 10^{+99}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\right)\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_2 \cdot \frac{t\_1}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 7 \cdot 10^{+110}:\\
\;\;\;\;\left(1 + t\_2 \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if h < -2.8e99

    1. Initial program 60.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified61.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. pow-flipN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{{\left(\frac{d}{\ell}\right)}^{\frac{-1}{2}}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{\ell}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      16. /-lowering-/.f6461.3%

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

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

    if -2.8e99 < h < -1.000000000000002e-309

    1. Initial program 71.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified89.0%

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

    if -1.000000000000002e-309 < h < 6.9999999999999998e110

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 6.9999999999999998e110 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.1% 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} t_0 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_1 := \frac{\frac{t\_0}{2}}{\ell}\\ t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot \frac{t\_0}{\frac{1}{h}} + -1\right)\\ \mathbf{elif}\;h \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;\left(1 + t\_1 \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 - \frac{D\_m \cdot \left(\left(M\_m \cdot D\_m\right) \cdot \left(h \cdot \left(M\_m \cdot 0.125\right)\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)}{\sqrt{h}}}{\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 (/ d (* M_m D_m))))
        (t_1 (/ (/ t_0 2.0) l))
        (t_2 (* d (sqrt (/ 1.0 (* h l))))))
   (if (<= h -1e-309)
     (* t_2 (+ (* t_1 (/ t_0 (/ 1.0 h))) -1.0))
     (if (<= h 6.5e+109)
       (* (+ 1.0 (* t_1 (/ t_0 (/ -1.0 h)))) t_2)
       (/
        (/
         (*
          d
          (-
           1.0
           (/ (* D_m (* (* M_m D_m) (* h (* M_m 0.125)))) (* l (* d d)))))
         (sqrt h))
        (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 / (d / (M_m * D_m));
	double t_1 = (t_0 / 2.0) / l;
	double t_2 = d * sqrt((1.0 / (h * l)));
	double tmp;
	if (h <= -1e-309) {
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	} else if (h <= 6.5e+109) {
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * t_2;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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) :: tmp
    t_0 = 0.5d0 / (d / (m_m * d_m))
    t_1 = (t_0 / 2.0d0) / l
    t_2 = d * sqrt((1.0d0 / (h * l)))
    if (h <= (-1d-309)) then
        tmp = t_2 * ((t_1 * (t_0 / (1.0d0 / h))) + (-1.0d0))
    else if (h <= 6.5d+109) then
        tmp = (1.0d0 + (t_1 * (t_0 / ((-1.0d0) / h)))) * t_2
    else
        tmp = ((d * (1.0d0 - ((d_m * ((m_m * d_m) * (h * (m_m * 0.125d0)))) / (l * (d * d))))) / sqrt(h)) / 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 / (d / (M_m * D_m));
	double t_1 = (t_0 / 2.0) / l;
	double t_2 = d * Math.sqrt((1.0 / (h * l)));
	double tmp;
	if (h <= -1e-309) {
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	} else if (h <= 6.5e+109) {
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * t_2;
	} else {
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / Math.sqrt(h)) / 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 / (d / (M_m * D_m))
	t_1 = (t_0 / 2.0) / l
	t_2 = d * math.sqrt((1.0 / (h * l)))
	tmp = 0
	if h <= -1e-309:
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0)
	elif h <= 6.5e+109:
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * t_2
	else:
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / math.sqrt(h)) / 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(d / Float64(M_m * D_m)))
	t_1 = Float64(Float64(t_0 / 2.0) / l)
	t_2 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	tmp = 0.0
	if (h <= -1e-309)
		tmp = Float64(t_2 * Float64(Float64(t_1 * Float64(t_0 / Float64(1.0 / h))) + -1.0));
	elseif (h <= 6.5e+109)
		tmp = Float64(Float64(1.0 + Float64(t_1 * Float64(t_0 / Float64(-1.0 / h)))) * t_2);
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 - Float64(Float64(D_m * Float64(Float64(M_m * D_m) * Float64(h * Float64(M_m * 0.125)))) / Float64(l * Float64(d * d))))) / sqrt(h)) / 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 / (d / (M_m * D_m));
	t_1 = (t_0 / 2.0) / l;
	t_2 = d * sqrt((1.0 / (h * l)));
	tmp = 0.0;
	if (h <= -1e-309)
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	elseif (h <= 6.5e+109)
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * t_2;
	else
		tmp = ((d * (1.0 - ((D_m * ((M_m * D_m) * (h * (M_m * 0.125)))) / (l * (d * d))))) / sqrt(h)) / 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[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -1e-309], N[(t$95$2 * N[(N[(t$95$1 * N[(t$95$0 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 6.5e+109], N[(N[(1.0 + N[(t$95$1 * N[(t$95$0 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[(d * N[(1.0 - N[(N[(D$95$m * N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(h * N[(M$95$m * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $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{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_1 := \frac{\frac{t\_0}{2}}{\ell}\\
t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \frac{t\_0}{\frac{1}{h}} + -1\right)\\

\mathbf{elif}\;h \leq 6.5 \cdot 10^{+109}:\\
\;\;\;\;\left(1 + t\_1 \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot t\_2\\

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


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

    1. Initial program 68.3%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell}\right), \color{blue}{\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)}\right)\right)\right) \]
    4. Applied egg-rr73.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified78.1%

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

    if -1.000000000000002e-309 < h < 6.5e109

    1. Initial program 70.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified88.1%

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

    if 6.5e109 < h

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified44.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.8% accurate, 2.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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_2 := \frac{t\_1}{2}\\ \mathbf{if}\;h \leq -6.2 \cdot 10^{+99}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{M\_m \cdot D\_m}{d}}{\ell} \cdot \left(h \cdot \left(\left(M\_m \cdot D\_m\right) \cdot 0.125\right)\right)}{d}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(t\_2 \cdot \frac{h}{\ell}\right) + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{t\_2}{\ell} \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot 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 (* d (sqrt (/ 1.0 (* h l)))))
        (t_1 (/ 0.5 (/ d (* M_m D_m))))
        (t_2 (/ t_1 2.0)))
   (if (<= h -6.2e+99)
     (*
      (- 1.0 (/ (* (/ (/ (* M_m D_m) d) l) (* h (* (* M_m D_m) 0.125))) d))
      (sqrt (/ (/ d l) (/ h d))))
     (if (<= h -1e-309)
       (* t_0 (+ (* t_1 (* t_2 (/ h l))) -1.0))
       (* (+ 1.0 (* (/ t_2 l) (/ t_1 (/ -1.0 h)))) 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 = d * sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = t_1 / 2.0;
	double tmp;
	if (h <= -6.2e+99) {
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * sqrt(((d / l) / (h / d)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_1 * (t_2 * (h / l))) + -1.0);
	} else {
		tmp = (1.0 + ((t_2 / l) * (t_1 / (-1.0 / h)))) * 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = d * sqrt((1.0d0 / (h * l)))
    t_1 = 0.5d0 / (d / (m_m * d_m))
    t_2 = t_1 / 2.0d0
    if (h <= (-6.2d+99)) then
        tmp = (1.0d0 - (((((m_m * d_m) / d) / l) * (h * ((m_m * d_m) * 0.125d0))) / d)) * sqrt(((d / l) / (h / d)))
    else if (h <= (-1d-309)) then
        tmp = t_0 * ((t_1 * (t_2 * (h / l))) + (-1.0d0))
    else
        tmp = (1.0d0 + ((t_2 / l) * (t_1 / ((-1.0d0) / h)))) * 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 = d * Math.sqrt((1.0 / (h * l)));
	double t_1 = 0.5 / (d / (M_m * D_m));
	double t_2 = t_1 / 2.0;
	double tmp;
	if (h <= -6.2e+99) {
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * Math.sqrt(((d / l) / (h / d)));
	} else if (h <= -1e-309) {
		tmp = t_0 * ((t_1 * (t_2 * (h / l))) + -1.0);
	} else {
		tmp = (1.0 + ((t_2 / l) * (t_1 / (-1.0 / h)))) * 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 = d * math.sqrt((1.0 / (h * l)))
	t_1 = 0.5 / (d / (M_m * D_m))
	t_2 = t_1 / 2.0
	tmp = 0
	if h <= -6.2e+99:
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * math.sqrt(((d / l) / (h / d)))
	elif h <= -1e-309:
		tmp = t_0 * ((t_1 * (t_2 * (h / l))) + -1.0)
	else:
		tmp = (1.0 + ((t_2 / l) * (t_1 / (-1.0 / h)))) * 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 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	t_1 = Float64(0.5 / Float64(d / Float64(M_m * D_m)))
	t_2 = Float64(t_1 / 2.0)
	tmp = 0.0
	if (h <= -6.2e+99)
		tmp = Float64(Float64(1.0 - Float64(Float64(Float64(Float64(Float64(M_m * D_m) / d) / l) * Float64(h * Float64(Float64(M_m * D_m) * 0.125))) / d)) * sqrt(Float64(Float64(d / l) / Float64(h / d))));
	elseif (h <= -1e-309)
		tmp = Float64(t_0 * Float64(Float64(t_1 * Float64(t_2 * Float64(h / l))) + -1.0));
	else
		tmp = Float64(Float64(1.0 + Float64(Float64(t_2 / l) * Float64(t_1 / Float64(-1.0 / h)))) * 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 = d * sqrt((1.0 / (h * l)));
	t_1 = 0.5 / (d / (M_m * D_m));
	t_2 = t_1 / 2.0;
	tmp = 0.0;
	if (h <= -6.2e+99)
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * sqrt(((d / l) / (h / d)));
	elseif (h <= -1e-309)
		tmp = t_0 * ((t_1 * (t_2 * (h / l))) + -1.0);
	else
		tmp = (1.0 + ((t_2 / l) * (t_1 / (-1.0 / h)))) * 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[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 / N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / 2.0), $MachinePrecision]}, If[LessEqual[h, -6.2e+99], N[(N[(1.0 - N[(N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision] * N[(h * N[(N[(M$95$m * D$95$m), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(t$95$0 * N[(N[(t$95$1 * N[(t$95$2 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(t$95$2 / l), $MachinePrecision] * N[(t$95$1 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $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 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
t_1 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_2 := \frac{t\_1}{2}\\
\mathbf{if}\;h \leq -6.2 \cdot 10^{+99}:\\
\;\;\;\;\left(1 - \frac{\frac{\frac{M\_m \cdot D\_m}{d}}{\ell} \cdot \left(h \cdot \left(\left(M\_m \cdot D\_m\right) \cdot 0.125\right)\right)}{d}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(t\_2 \cdot \frac{h}{\ell}\right) + -1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{t\_2}{\ell} \cdot \frac{t\_1}{\frac{-1}{h}}\right) \cdot t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if h < -6.2000000000000001e99

    1. Initial program 60.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000001e99 < h < -1.000000000000002e-309

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    7. Simplified87.9%

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

    if -1.000000000000002e-309 < h

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified77.5%

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

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

Alternative 10: 64.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 -4.3 \cdot 10^{+188}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-180}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{M\_m \cdot D\_m}{d}}{\ell} \cdot \left(h \cdot \left(\left(M\_m \cdot D\_m\right) \cdot 0.125\right)\right)}{d}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq -4.9 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(0.125 \cdot \left(D\_m \cdot \frac{D\_m \cdot \left(M\_m \cdot M\_m\right)}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \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 (<= d -4.3e+188)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d -1e-180)
     (*
      (- 1.0 (/ (* (/ (/ (* M_m D_m) d) l) (* h (* (* M_m D_m) 0.125))) d))
      (sqrt (/ (/ d l) (/ h d))))
     (if (<= d -4.9e-296)
       (*
        (sqrt (/ (/ h l) (* l l)))
        (* 0.125 (* D_m (/ (* D_m (* M_m M_m)) d))))
       (*
        (- 1.0 (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l))
        (/ 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) {
	double tmp;
	if (d <= -4.3e+188) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -1e-180) {
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * sqrt(((d / l) / (h / d)));
	} else if (d <= -4.9e-296) {
		tmp = sqrt(((h / l) / (l * l))) * (0.125 * (D_m * ((D_m * (M_m * M_m)) / d)));
	} else {
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / sqrt((h * 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 <= (-4.3d+188)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-1d-180)) then
        tmp = (1.0d0 - (((((m_m * d_m) / d) / l) * (h * ((m_m * d_m) * 0.125d0))) / d)) * sqrt(((d / l) / (h / d)))
    else if (d <= (-4.9d-296)) then
        tmp = sqrt(((h / l) / (l * l))) * (0.125d0 * (d_m * ((d_m * (m_m * m_m)) / d)))
    else
        tmp = (1.0d0 - ((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l)) * (d / sqrt((h * 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 <= -4.3e+188) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -1e-180) {
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * Math.sqrt(((d / l) / (h / d)));
	} else if (d <= -4.9e-296) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (0.125 * (D_m * ((D_m * (M_m * M_m)) / d)));
	} else {
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / Math.sqrt((h * 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 <= -4.3e+188:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -1e-180:
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * math.sqrt(((d / l) / (h / d)))
	elif d <= -4.9e-296:
		tmp = math.sqrt(((h / l) / (l * l))) * (0.125 * (D_m * ((D_m * (M_m * M_m)) / d)))
	else:
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / math.sqrt((h * 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 <= -4.3e+188)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -1e-180)
		tmp = Float64(Float64(1.0 - Float64(Float64(Float64(Float64(Float64(M_m * D_m) / d) / l) * Float64(h * Float64(Float64(M_m * D_m) * 0.125))) / d)) * sqrt(Float64(Float64(d / l) / Float64(h / d))));
	elseif (d <= -4.9e-296)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(0.125 * Float64(D_m * Float64(Float64(D_m * Float64(M_m * M_m)) / d))));
	else
		tmp = Float64(Float64(1.0 - Float64(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l)) * Float64(d / sqrt(Float64(h * 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 <= -4.3e+188)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -1e-180)
		tmp = (1.0 - (((((M_m * D_m) / d) / l) * (h * ((M_m * D_m) * 0.125))) / d)) * sqrt(((d / l) / (h / d)));
	elseif (d <= -4.9e-296)
		tmp = sqrt(((h / l) / (l * l))) * (0.125 * (D_m * ((D_m * (M_m * M_m)) / d)));
	else
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / sqrt((h * 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, -4.3e+188], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1e-180], N[(N[(1.0 - N[(N[(N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision] * N[(h * N[(N[(M$95$m * D$95$m), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.9e-296], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.125 * N[(D$95$m * N[(N[(D$95$m * N[(M$95$m * M$95$m), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $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 -4.3 \cdot 10^{+188}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -4.29999999999999985e188

    1. Initial program 74.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6477.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified77.6%

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

    if -4.29999999999999985e188 < d < -1e-180

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-180 < d < -4.8999999999999998e-296

    1. Initial program 50.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8999999999999998e-296 < d

    1. Initial program 61.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.2%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d} \cdot \sqrt{d}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. rem-square-sqrt67.3%

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

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

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

Alternative 11: 63.0% 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} t_0 := 1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\\ \mathbf{if}\;d \leq -1.75 \cdot 10^{+188}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-94}:\\ \;\;\;\;t\_0 \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \frac{d}{\sqrt{h \cdot \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
          (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l))))
   (if (<= d -1.75e+188)
     (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
     (if (<= d -3.5e-94)
       (* t_0 (sqrt (/ (/ d l) (/ h d))))
       (if (<= d -3.25e-308)
         (*
          (sqrt (/ h (* l (* l l))))
          (* (* M_m (/ M_m d)) (* 0.125 (* D_m D_m))))
         (* t_0 (/ 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) {
	double t_0 = 1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l);
	double tmp;
	if (d <= -1.75e+188) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -3.5e-94) {
		tmp = t_0 * sqrt(((d / l) / (h / d)));
	} else if (d <= -3.25e-308) {
		tmp = sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else {
		tmp = t_0 * (d / sqrt((h * 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 - ((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l)
    if (d <= (-1.75d+188)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-3.5d-94)) then
        tmp = t_0 * sqrt(((d / l) / (h / d)))
    else if (d <= (-3.25d-308)) then
        tmp = sqrt((h / (l * (l * l)))) * ((m_m * (m_m / d)) * (0.125d0 * (d_m * d_m)))
    else
        tmp = t_0 * (d / sqrt((h * 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 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l);
	double tmp;
	if (d <= -1.75e+188) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -3.5e-94) {
		tmp = t_0 * Math.sqrt(((d / l) / (h / d)));
	} else if (d <= -3.25e-308) {
		tmp = Math.sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else {
		tmp = t_0 * (d / Math.sqrt((h * 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 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)
	tmp = 0
	if d <= -1.75e+188:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -3.5e-94:
		tmp = t_0 * math.sqrt(((d / l) / (h / d)))
	elif d <= -3.25e-308:
		tmp = math.sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)))
	else:
		tmp = t_0 * (d / math.sqrt((h * 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(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l))
	tmp = 0.0
	if (d <= -1.75e+188)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -3.5e-94)
		tmp = Float64(t_0 * sqrt(Float64(Float64(d / l) / Float64(h / d))));
	elseif (d <= -3.25e-308)
		tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(M_m * Float64(M_m / d)) * Float64(0.125 * Float64(D_m * D_m))));
	else
		tmp = Float64(t_0 * Float64(d / sqrt(Float64(h * 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 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l);
	tmp = 0.0;
	if (d <= -1.75e+188)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -3.5e-94)
		tmp = t_0 * sqrt(((d / l) / (h / d)));
	elseif (d <= -3.25e-308)
		tmp = sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	else
		tmp = t_0 * (d / sqrt((h * 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[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.75e+188], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.5e-94], N[(t$95$0 * N[Sqrt[N[(N[(d / l), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.25e-308], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(d / N[Sqrt[N[(h * l), $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 := 1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\\
\mathbf{if}\;d \leq -1.75 \cdot 10^{+188}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq -3.5 \cdot 10^{-94}:\\
\;\;\;\;t\_0 \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.75000000000000004e188

    1. Initial program 74.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6477.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified77.6%

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

    if -1.75000000000000004e188 < d < -3.49999999999999998e-94

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified73.0%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999998e-94 < d < -3.24999999999999995e-308

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.24999999999999995e-308 < d

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in M around 0

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6447.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr47.7%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Step-by-step derivation
      1. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d} \cdot \sqrt{d}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. rem-square-sqrt67.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Applied egg-rr67.8%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification63.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.75 \cdot 10^{+188}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-94}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 77.1% 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} t_0 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ t_1 := \frac{\frac{t\_0}{2}}{\ell}\\ t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot \frac{t\_0}{\frac{1}{h}} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + t\_1 \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot 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 (/ 0.5 (/ d (* M_m D_m))))
        (t_1 (/ (/ t_0 2.0) l))
        (t_2 (* d (sqrt (/ 1.0 (* h l))))))
   (if (<= h -1e-309)
     (* t_2 (+ (* t_1 (/ t_0 (/ 1.0 h))) -1.0))
     (* (+ 1.0 (* t_1 (/ t_0 (/ -1.0 h)))) 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 = 0.5 / (d / (M_m * D_m));
	double t_1 = (t_0 / 2.0) / l;
	double t_2 = d * sqrt((1.0 / (h * l)));
	double tmp;
	if (h <= -1e-309) {
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	} else {
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * 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 = 0.5d0 / (d / (m_m * d_m))
    t_1 = (t_0 / 2.0d0) / l
    t_2 = d * sqrt((1.0d0 / (h * l)))
    if (h <= (-1d-309)) then
        tmp = t_2 * ((t_1 * (t_0 / (1.0d0 / h))) + (-1.0d0))
    else
        tmp = (1.0d0 + (t_1 * (t_0 / ((-1.0d0) / h)))) * 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 = 0.5 / (d / (M_m * D_m));
	double t_1 = (t_0 / 2.0) / l;
	double t_2 = d * Math.sqrt((1.0 / (h * l)));
	double tmp;
	if (h <= -1e-309) {
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	} else {
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * 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 = 0.5 / (d / (M_m * D_m))
	t_1 = (t_0 / 2.0) / l
	t_2 = d * math.sqrt((1.0 / (h * l)))
	tmp = 0
	if h <= -1e-309:
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0)
	else:
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * 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 = Float64(0.5 / Float64(d / Float64(M_m * D_m)))
	t_1 = Float64(Float64(t_0 / 2.0) / l)
	t_2 = Float64(d * sqrt(Float64(1.0 / Float64(h * l))))
	tmp = 0.0
	if (h <= -1e-309)
		tmp = Float64(t_2 * Float64(Float64(t_1 * Float64(t_0 / Float64(1.0 / h))) + -1.0));
	else
		tmp = Float64(Float64(1.0 + Float64(t_1 * Float64(t_0 / Float64(-1.0 / h)))) * 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 = 0.5 / (d / (M_m * D_m));
	t_1 = (t_0 / 2.0) / l;
	t_2 = d * sqrt((1.0 / (h * l)));
	tmp = 0.0;
	if (h <= -1e-309)
		tmp = t_2 * ((t_1 * (t_0 / (1.0 / h))) + -1.0);
	else
		tmp = (1.0 + (t_1 * (t_0 / (-1.0 / h)))) * 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[(0.5 / N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 / 2.0), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -1e-309], N[(t$95$2 * N[(N[(t$95$1 * N[(t$95$0 / N[(1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(t$95$1 * N[(t$95$0 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $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{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
t_1 := \frac{\frac{t\_0}{2}}{\ell}\\
t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \frac{t\_0}{\frac{1}{h}} + -1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 + t\_1 \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < -1.000000000000002e-309

    1. Initial program 68.3%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}{\frac{\ell}{h}}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \color{blue}{\frac{1}{h}}}\right)\right)\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell}\right), \color{blue}{\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)}\right)\right)\right) \]
    4. Applied egg-rr73.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}}\right) \]
    5. Taylor expanded in h around -inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)}, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      11. --lowering--.f6478.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, d\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)\right)} \cdot \left(1 - \frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}\right) \]

    if -1.000000000000002e-309 < h

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}{\frac{\ell}{h}}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \color{blue}{\frac{1}{h}}}\right)\right)\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell}\right), \color{blue}{\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)}\right)\right)\right) \]
    4. Applied egg-rr68.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}}\right) \]
    5. Taylor expanded in d around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)}, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f6477.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified77.5%

      \[\leadsto \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{-1}{h}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 72.5% 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} t_0 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\ \mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{\frac{t\_0}{2}}{\ell} \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \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
 (let* ((t_0 (/ 0.5 (/ d (* M_m D_m)))))
   (if (<= h -1e-309)
     (*
      (/ d (sqrt (* h l)))
      (+ (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l) -1.0))
     (*
      (+ 1.0 (* (/ (/ t_0 2.0) l) (/ t_0 (/ -1.0 h))))
      (* d (sqrt (/ 1.0 (* 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) {
	double t_0 = 0.5 / (d / (M_m * D_m));
	double tmp;
	if (h <= -1e-309) {
		tmp = (d / sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	} else {
		tmp = (1.0 + (((t_0 / 2.0) / l) * (t_0 / (-1.0 / h)))) * (d * sqrt((1.0 / (h * 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 = 0.5d0 / (d / (m_m * d_m))
    if (h <= (-1d-309)) then
        tmp = (d / sqrt((h * l))) * (((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l) + (-1.0d0))
    else
        tmp = (1.0d0 + (((t_0 / 2.0d0) / l) * (t_0 / ((-1.0d0) / h)))) * (d * sqrt((1.0d0 / (h * 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 / (d / (M_m * D_m));
	double tmp;
	if (h <= -1e-309) {
		tmp = (d / Math.sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	} else {
		tmp = (1.0 + (((t_0 / 2.0) / l) * (t_0 / (-1.0 / h)))) * (d * Math.sqrt((1.0 / (h * 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 / (d / (M_m * D_m))
	tmp = 0
	if h <= -1e-309:
		tmp = (d / math.sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0)
	else:
		tmp = (1.0 + (((t_0 / 2.0) / l) * (t_0 / (-1.0 / h)))) * (d * math.sqrt((1.0 / (h * 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(d / Float64(M_m * D_m)))
	tmp = 0.0
	if (h <= -1e-309)
		tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(Float64(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l) + -1.0));
	else
		tmp = Float64(Float64(1.0 + Float64(Float64(Float64(t_0 / 2.0) / l) * Float64(t_0 / Float64(-1.0 / h)))) * Float64(d * sqrt(Float64(1.0 / Float64(h * 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 / (d / (M_m * D_m));
	tmp = 0.0;
	if (h <= -1e-309)
		tmp = (d / sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	else
		tmp = (1.0 + (((t_0 / 2.0) / l) * (t_0 / (-1.0 / h)))) * (d * sqrt((1.0 / (h * 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[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -1e-309], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(t$95$0 / 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$0 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Sqrt[N[(1.0 / N[(h * 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}
t_0 := \frac{0.5}{\frac{d}{M\_m \cdot D\_m}}\\
\mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{\frac{t\_0}{2}}{\ell} \cdot \frac{t\_0}{\frac{-1}{h}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < -1.000000000000002e-309

    1. Initial program 68.3%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified60.9%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6442.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr42.8%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Taylor expanded in d around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot d\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. --lowering--.f6466.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    10. Simplified66.9%

      \[\leadsto \frac{\color{blue}{0 - d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]

    if -1.000000000000002e-309 < h

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{1}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\color{blue}{\frac{\ell}{h}}}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}{\frac{\ell}{h}}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\color{blue}{\ell}}{h}}\right)\right)\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \color{blue}{\frac{1}{h}}}\right)\right)\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell}\right), \color{blue}{\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)}\right)\right)\right) \]
    4. Applied egg-rr68.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}}\right) \]
    5. Taylor expanded in d around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)}, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f6477.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(1, h\right)\right)\right)\right)\right) \]
    7. Simplified77.5%

      \[\leadsto \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{1}{h}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2}}{\ell} \cdot \frac{\frac{0.5}{\frac{d}{M \cdot D}}}{\frac{-1}{h}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 59.1% accurate, 2.5× 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 -8.8 \cdot 10^{-23}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \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 (<= d -8.8e-23)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d -3.25e-308)
     (* (sqrt (/ h (* l (* l l)))) (* (* M_m (/ M_m d)) (* 0.125 (* D_m D_m))))
     (*
      (- 1.0 (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l))
      (/ 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) {
	double tmp;
	if (d <= -8.8e-23) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else {
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / sqrt((h * 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 <= (-8.8d-23)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-3.25d-308)) then
        tmp = sqrt((h / (l * (l * l)))) * ((m_m * (m_m / d)) * (0.125d0 * (d_m * d_m)))
    else
        tmp = (1.0d0 - ((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l)) * (d / sqrt((h * 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 <= -8.8e-23) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = Math.sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else {
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / Math.sqrt((h * 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 <= -8.8e-23:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -3.25e-308:
		tmp = math.sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)))
	else:
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / math.sqrt((h * 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 <= -8.8e-23)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -3.25e-308)
		tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(M_m * Float64(M_m / d)) * Float64(0.125 * Float64(D_m * D_m))));
	else
		tmp = Float64(Float64(1.0 - Float64(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l)) * Float64(d / sqrt(Float64(h * 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 <= -8.8e-23)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -3.25e-308)
		tmp = sqrt((h / (l * (l * l)))) * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	else
		tmp = (1.0 - ((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l)) * (d / sqrt((h * 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, -8.8e-23], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.25e-308], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $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 -8.8 \cdot 10^{-23}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 - \frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -8.7999999999999998e-23

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified66.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6464.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified64.3%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -8.7999999999999998e-23 < d < -3.24999999999999995e-308

    1. Initial program 56.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr57.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6445.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr45.0%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)\right) \]
    7. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{\color{blue}{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}{d}\right)\right) \]
      12. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
      13. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right) \]
      15. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
    9. Simplified41.8%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)} \]

    if -3.24999999999999995e-308 < d

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6447.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr47.7%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Step-by-step derivation
      1. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d} \cdot \sqrt{d}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. rem-square-sqrt67.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Applied egg-rr67.8%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.8 \cdot 10^{-23}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 49.1% accurate, 2.5× 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{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\ \mathbf{if}\;d \leq -5.4 \cdot 10^{-25}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;t\_0 \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{-122}:\\ \;\;\;\;\left(D\_m \cdot D\_m\right) \cdot \left(t\_0 \cdot \left(-0.125 \cdot \frac{M\_m \cdot M\_m}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{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 (/ h (* l (* l l))))))
   (if (<= d -5.4e-25)
     (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
     (if (<= d -3.25e-308)
       (* t_0 (* (* M_m (/ M_m d)) (* 0.125 (* D_m D_m))))
       (if (<= d 4.8e-122)
         (* (* D_m D_m) (* t_0 (* -0.125 (/ (* M_m M_m) d))))
         (* d (sqrt (/ (/ 1.0 l) 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((h / (l * (l * l))));
	double tmp;
	if (d <= -5.4e-25) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else if (d <= 4.8e-122) {
		tmp = (D_m * D_m) * (t_0 * (-0.125 * ((M_m * M_m) / d)));
	} else {
		tmp = d * sqrt(((1.0 / l) / 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((h / (l * (l * l))))
    if (d <= (-5.4d-25)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-3.25d-308)) then
        tmp = t_0 * ((m_m * (m_m / d)) * (0.125d0 * (d_m * d_m)))
    else if (d <= 4.8d-122) then
        tmp = (d_m * d_m) * (t_0 * ((-0.125d0) * ((m_m * m_m) / d)))
    else
        tmp = d * sqrt(((1.0d0 / l) / 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((h / (l * (l * l))));
	double tmp;
	if (d <= -5.4e-25) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else if (d <= 4.8e-122) {
		tmp = (D_m * D_m) * (t_0 * (-0.125 * ((M_m * M_m) / d)));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / 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((h / (l * (l * l))))
	tmp = 0
	if d <= -5.4e-25:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -3.25e-308:
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)))
	elif d <= 4.8e-122:
		tmp = (D_m * D_m) * (t_0 * (-0.125 * ((M_m * M_m) / d)))
	else:
		tmp = d * math.sqrt(((1.0 / l) / 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(h / Float64(l * Float64(l * l))))
	tmp = 0.0
	if (d <= -5.4e-25)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -3.25e-308)
		tmp = Float64(t_0 * Float64(Float64(M_m * Float64(M_m / d)) * Float64(0.125 * Float64(D_m * D_m))));
	elseif (d <= 4.8e-122)
		tmp = Float64(Float64(D_m * D_m) * Float64(t_0 * Float64(-0.125 * Float64(Float64(M_m * M_m) / d))));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / 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((h / (l * (l * l))));
	tmp = 0.0;
	if (d <= -5.4e-25)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -3.25e-308)
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	elseif (d <= 4.8e-122)
		tmp = (D_m * D_m) * (t_0 * (-0.125 * ((M_m * M_m) / d)));
	else
		tmp = d * sqrt(((1.0 / l) / 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[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -5.4e-25], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.25e-308], N[(t$95$0 * N[(N[(M$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.8e-122], N[(N[(D$95$m * D$95$m), $MachinePrecision] * N[(t$95$0 * N[(-0.125 * N[(N[(M$95$m * M$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $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{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -5.4 \cdot 10^{-25}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\
\;\;\;\;t\_0 \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\

\mathbf{elif}\;d \leq 4.8 \cdot 10^{-122}:\\
\;\;\;\;\left(D\_m \cdot D\_m\right) \cdot \left(t\_0 \cdot \left(-0.125 \cdot \frac{M\_m \cdot M\_m}{d}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -5.40000000000000032e-25

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified66.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6464.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified64.3%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -5.40000000000000032e-25 < d < -3.24999999999999995e-308

    1. Initial program 56.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr57.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6445.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr45.0%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)\right) \]
    7. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{\color{blue}{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}{d}\right)\right) \]
      12. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
      13. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right) \]
      15. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
    9. Simplified41.8%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)} \]

    if -3.24999999999999995e-308 < d < 4.79999999999999975e-122

    1. Initial program 37.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr41.6%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6432.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr32.5%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)\right) \]
    7. Applied egg-rr39.3%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{\frac{-0.5}{\frac{d}{M \cdot D}} \cdot \frac{\frac{h}{4}}{\frac{d}{M \cdot D}}}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\ell}}} \]
    8. 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)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
      2. associate-/l*N/A

        \[\leadsto \left(\left({D}^{2} \cdot \frac{{M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \frac{-1}{8} \]
      3. associate-*l*N/A

        \[\leadsto \left({D}^{2} \cdot \left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right) \cdot \frac{-1}{8} \]
      4. associate-*r*N/A

        \[\leadsto {D}^{2} \cdot \color{blue}{\left(\left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \frac{-1}{8}\right)} \]
      5. *-commutativeN/A

        \[\leadsto {D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)}\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \left(\frac{{M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}}\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)}\right)\right) \]
      12. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      14. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
    10. Simplified42.2%

      \[\leadsto \color{blue}{\left(D \cdot D\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(-0.125 \cdot \frac{M \cdot M}{d}\right)\right)} \]

    if 4.79999999999999975e-122 < d

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified68.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6454.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified54.3%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    10. Applied egg-rr54.9%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification53.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.4 \cdot 10^{-25}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{-122}:\\ \;\;\;\;\left(D \cdot D\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(-0.125 \cdot \frac{M \cdot M}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 49.0% accurate, 2.5× 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{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\ \mathbf{if}\;d \leq -5.6 \cdot 10^{-19}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;t\_0 \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.1 \cdot 10^{-119}:\\ \;\;\;\;t\_0 \cdot \left(\left(D\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot M\_m\right) \cdot -0.125}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{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 (/ h (* l (* l l))))))
   (if (<= d -5.6e-19)
     (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
     (if (<= d -3.25e-308)
       (* t_0 (* (* M_m (/ M_m d)) (* 0.125 (* D_m D_m))))
       (if (<= d 2.1e-119)
         (* t_0 (* (* D_m D_m) (/ (* (* M_m M_m) -0.125) d)))
         (* d (sqrt (/ (/ 1.0 l) 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((h / (l * (l * l))));
	double tmp;
	if (d <= -5.6e-19) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else if (d <= 2.1e-119) {
		tmp = t_0 * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	} else {
		tmp = d * sqrt(((1.0 / l) / 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((h / (l * (l * l))))
    if (d <= (-5.6d-19)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-3.25d-308)) then
        tmp = t_0 * ((m_m * (m_m / d)) * (0.125d0 * (d_m * d_m)))
    else if (d <= 2.1d-119) then
        tmp = t_0 * ((d_m * d_m) * (((m_m * m_m) * (-0.125d0)) / d))
    else
        tmp = d * sqrt(((1.0d0 / l) / 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((h / (l * (l * l))));
	double tmp;
	if (d <= -5.6e-19) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -3.25e-308) {
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	} else if (d <= 2.1e-119) {
		tmp = t_0 * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / 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((h / (l * (l * l))))
	tmp = 0
	if d <= -5.6e-19:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -3.25e-308:
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)))
	elif d <= 2.1e-119:
		tmp = t_0 * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d))
	else:
		tmp = d * math.sqrt(((1.0 / l) / 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(h / Float64(l * Float64(l * l))))
	tmp = 0.0
	if (d <= -5.6e-19)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -3.25e-308)
		tmp = Float64(t_0 * Float64(Float64(M_m * Float64(M_m / d)) * Float64(0.125 * Float64(D_m * D_m))));
	elseif (d <= 2.1e-119)
		tmp = Float64(t_0 * Float64(Float64(D_m * D_m) * Float64(Float64(Float64(M_m * M_m) * -0.125) / d)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / 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((h / (l * (l * l))));
	tmp = 0.0;
	if (d <= -5.6e-19)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -3.25e-308)
		tmp = t_0 * ((M_m * (M_m / d)) * (0.125 * (D_m * D_m)));
	elseif (d <= 2.1e-119)
		tmp = t_0 * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	else
		tmp = d * sqrt(((1.0 / l) / 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[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -5.6e-19], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.25e-308], N[(t$95$0 * N[(N[(M$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.1e-119], N[(t$95$0 * N[(N[(D$95$m * D$95$m), $MachinePrecision] * N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * -0.125), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $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{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -5.6 \cdot 10^{-19}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\
\;\;\;\;t\_0 \cdot \left(\left(M\_m \cdot \frac{M\_m}{d}\right) \cdot \left(0.125 \cdot \left(D\_m \cdot D\_m\right)\right)\right)\\

\mathbf{elif}\;d \leq 2.1 \cdot 10^{-119}:\\
\;\;\;\;t\_0 \cdot \left(\left(D\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot M\_m\right) \cdot -0.125}{d}\right)\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -5.60000000000000005e-19

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified66.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6464.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified64.3%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -5.60000000000000005e-19 < d < -3.24999999999999995e-308

    1. Initial program 56.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr57.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6445.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr45.0%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)\right) \]
    7. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{\color{blue}{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}{d}\right)\right) \]
      12. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
      13. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \frac{{M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}}{d}\right)\right)\right) \]
      15. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot {D}^{2}\right) \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)\right) \]
    9. Simplified41.8%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)} \]

    if -3.24999999999999995e-308 < d < 2.1e-119

    1. Initial program 37.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr41.6%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6432.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr32.5%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\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-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      11. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{\color{blue}{d}}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot {D}^{2}\right)}{d}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot {D}^{2}}{d}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{D}^{2} \cdot \left(\frac{-1}{8} \cdot {M}^{2}\right)}{d}\right)\right) \]
      15. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left({D}^{2} \cdot \color{blue}{\frac{\frac{-1}{8} \cdot {M}^{2}}{d}}\right)\right) \]
      16. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2}}{d}}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)}\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      20. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot {M}^{2}}{\color{blue}{d}}\right)\right)\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), \color{blue}{d}\right)\right)\right) \]
    9. Simplified39.6%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{d}\right)} \]

    if 2.1e-119 < d

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified68.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6454.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified54.3%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    10. Applied egg-rr54.9%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.6 \cdot 10^{-19}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -3.25 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(M \cdot \frac{M}{d}\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.1 \cdot 10^{-119}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 45.8% accurate, 2.5× 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 -6.6 \cdot 10^{-37}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-120}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot M\_m\right) \cdot -0.125}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{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
 (if (<= d -6.6e-37)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= d -5e-310)
     (* d (pow (/ (/ 1.0 (* h (* l l))) h) 0.25))
     (if (<= d 2.8e-120)
       (*
        (sqrt (/ h (* l (* l l))))
        (* (* D_m D_m) (/ (* (* M_m M_m) -0.125) d)))
       (* d (sqrt (/ (/ 1.0 l) 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 tmp;
	if (d <= -6.6e-37) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (d <= -5e-310) {
		tmp = d * pow(((1.0 / (h * (l * l))) / h), 0.25);
	} else if (d <= 2.8e-120) {
		tmp = sqrt((h / (l * (l * l)))) * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	} else {
		tmp = d * sqrt(((1.0 / l) / 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) :: tmp
    if (d <= (-6.6d-37)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (d <= (-5d-310)) then
        tmp = d * (((1.0d0 / (h * (l * l))) / h) ** 0.25d0)
    else if (d <= 2.8d-120) then
        tmp = sqrt((h / (l * (l * l)))) * ((d_m * d_m) * (((m_m * m_m) * (-0.125d0)) / d))
    else
        tmp = d * sqrt(((1.0d0 / l) / 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 tmp;
	if (d <= -6.6e-37) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (d <= -5e-310) {
		tmp = d * Math.pow(((1.0 / (h * (l * l))) / h), 0.25);
	} else if (d <= 2.8e-120) {
		tmp = Math.sqrt((h / (l * (l * l)))) * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / 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):
	tmp = 0
	if d <= -6.6e-37:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif d <= -5e-310:
		tmp = d * math.pow(((1.0 / (h * (l * l))) / h), 0.25)
	elif d <= 2.8e-120:
		tmp = math.sqrt((h / (l * (l * l)))) * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d))
	else:
		tmp = d * math.sqrt(((1.0 / l) / 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)
	tmp = 0.0
	if (d <= -6.6e-37)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (d <= -5e-310)
		tmp = Float64(d * (Float64(Float64(1.0 / Float64(h * Float64(l * l))) / h) ^ 0.25));
	elseif (d <= 2.8e-120)
		tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D_m * D_m) * Float64(Float64(Float64(M_m * M_m) * -0.125) / d)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / 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)
	tmp = 0.0;
	if (d <= -6.6e-37)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (d <= -5e-310)
		tmp = d * (((1.0 / (h * (l * l))) / h) ^ 0.25);
	elseif (d <= 2.8e-120)
		tmp = sqrt((h / (l * (l * l)))) * ((D_m * D_m) * (((M_m * M_m) * -0.125) / d));
	else
		tmp = d * sqrt(((1.0 / l) / 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_] := If[LessEqual[d, -6.6e-37], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(d * N[Power[N[(N[(1.0 / N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-120], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D$95$m * D$95$m), $MachinePrecision] * N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * -0.125), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $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 -6.6 \cdot 10^{-37}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\

\mathbf{elif}\;d \leq 2.8 \cdot 10^{-120}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D\_m \cdot D\_m\right) \cdot \frac{\left(M\_m \cdot M\_m\right) \cdot -0.125}{d}\right)\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -6.59999999999999964e-37

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified67.2%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6464.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified64.0%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -6.59999999999999964e-37 < d < -4.999999999999985e-310

    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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified51.8%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified12.3%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. 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}{\color{blue}{2}}\right)}\right)\right) \]
      3. sqr-powN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot \color{blue}{{\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}\right)\right) \]
      4. 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{\frac{1}{2}}{2}\right)}}\right)\right) \]
      5. 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{\frac{1}{2}}{2}\right)}\right)\right) \]
      6. *-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}{\frac{1}{2}}}{2}\right)\right)\right) \]
      7. /-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{\frac{\color{blue}{1}}{2}}{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(\frac{\frac{1}{\color{blue}{2}}}{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      12. metadata-eval27.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
    10. Applied egg-rr27.0%

      \[\leadsto d \cdot \color{blue}{{\left(\frac{1}{h \cdot \ell} \cdot \frac{1}{h \cdot \ell}\right)}^{0.25}} \]
    11. Taylor expanded in h around 0

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\color{blue}{\left(\frac{1}{{h}^{2} \cdot {\ell}^{2}}\right)}, \frac{1}{4}\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot {h}^{2}}\right), \frac{1}{4}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot \left(h \cdot h\right)}\right), \frac{1}{4}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{\left({\ell}^{2} \cdot h\right) \cdot h}\right), \frac{1}{4}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{{\ell}^{2} \cdot h}}{h}\right), \frac{1}{4}\right)\right) \]
      5. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{\frac{\frac{1}{h}}{{\ell}^{2}}}{h}\right), \frac{1}{4}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{1}{h}}{{\ell}^{2}}\right), h\right), \frac{1}{4}\right)\right) \]
      7. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot h}\right), h\right), \frac{1}{4}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left({\ell}^{2} \cdot h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left({\ell}^{2}\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      11. *-lowering-*.f6434.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
    13. Simplified34.6%

      \[\leadsto d \cdot {\color{blue}{\left(\frac{\frac{1}{\left(\ell \cdot \ell\right) \cdot h}}{h}\right)}}^{0.25} \]

    if -4.999999999999985e-310 < d < 2.79999999999999994e-120

    1. Initial program 38.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr42.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6433.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr33.3%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\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-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left({\ell}^{3}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \left(\ell \cdot {\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      11. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{\color{blue}{d}}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot {D}^{2}\right)}{d}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot {D}^{2}}{d}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{D}^{2} \cdot \left(\frac{-1}{8} \cdot {M}^{2}\right)}{d}\right)\right) \]
      15. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left({D}^{2} \cdot \color{blue}{\frac{\frac{-1}{8} \cdot {M}^{2}}{d}}\right)\right) \]
      16. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2}}{d}}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2}}{d}\right)}\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2}}{d}\right)\right)\right) \]
      20. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot {M}^{2}}{\color{blue}{d}}\right)\right)\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(h, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), \color{blue}{d}\right)\right)\right) \]
    9. Simplified40.7%

      \[\leadsto \color{blue}{\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{d}\right)} \]

    if 2.79999999999999994e-120 < d

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified68.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6454.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified54.3%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    10. Applied egg-rr54.9%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -6.6 \cdot 10^{-37}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-120}:\\ \;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 71.7% accurate, 2.5× 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{d}{M\_m \cdot D\_m}\\ \mathbf{if}\;d \leq 5.2 \cdot 10^{-304}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}}{\frac{{\left(h \cdot \ell\right)}^{0.5}}{d}}\\ \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 (/ d (* M_m D_m))))
   (if (<= d 5.2e-304)
     (*
      (/ d (sqrt (* h l)))
      (+ (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l) -1.0))
     (/
      (+ 1.0 (/ (* (/ -0.5 t_0) (/ (/ h 4.0) t_0)) l))
      (/ (pow (* h l) 0.5) 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 t_0 = d / (M_m * D_m);
	double tmp;
	if (d <= 5.2e-304) {
		tmp = (d / sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	} else {
		tmp = (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l)) / (pow((h * l), 0.5) / 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) :: t_0
    real(8) :: tmp
    t_0 = d / (m_m * d_m)
    if (d <= 5.2d-304) then
        tmp = (d / sqrt((h * l))) * (((((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l) + (-1.0d0))
    else
        tmp = (1.0d0 + ((((-0.5d0) / t_0) * ((h / 4.0d0) / t_0)) / l)) / (((h * l) ** 0.5d0) / 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 t_0 = d / (M_m * D_m);
	double tmp;
	if (d <= 5.2e-304) {
		tmp = (d / Math.sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	} else {
		tmp = (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l)) / (Math.pow((h * l), 0.5) / 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):
	t_0 = d / (M_m * D_m)
	tmp = 0
	if d <= 5.2e-304:
		tmp = (d / math.sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0)
	else:
		tmp = (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l)) / (math.pow((h * l), 0.5) / 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)
	t_0 = Float64(d / Float64(M_m * D_m))
	tmp = 0.0
	if (d <= 5.2e-304)
		tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(Float64(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l) + -1.0));
	else
		tmp = Float64(Float64(1.0 + Float64(Float64(Float64(-0.5 / t_0) * Float64(Float64(h / 4.0) / t_0)) / l)) / Float64((Float64(h * l) ^ 0.5) / 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)
	t_0 = d / (M_m * D_m);
	tmp = 0.0;
	if (d <= 5.2e-304)
		tmp = (d / sqrt((h * l))) * (((((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l) + -1.0);
	else
		tmp = (1.0 + (((-0.5 / t_0) * ((h / 4.0) / t_0)) / l)) / (((h * l) ^ 0.5) / 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_] := Block[{t$95$0 = N[(d / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 5.2e-304], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(-0.5 / t$95$0), $MachinePrecision] * N[(N[(h / 4.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(h * l), $MachinePrecision], 0.5], $MachinePrecision] / d), $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{d}{M\_m \cdot D\_m}\\
\mathbf{if}\;d \leq 5.2 \cdot 10^{-304}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{\frac{-0.5}{t\_0} \cdot \frac{\frac{h}{4}}{t\_0}}{\ell}}{\frac{{\left(h \cdot \ell\right)}^{0.5}}{d}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 5.19999999999999993e-304

    1. Initial program 67.8%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified60.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6442.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr42.5%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Taylor expanded in d around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot d\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. --lowering--.f6466.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    10. Simplified66.4%

      \[\leadsto \frac{\color{blue}{0 - d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]

    if 5.19999999999999993e-304 < d

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{\frac{2 \cdot d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot \frac{d}{M \cdot D}}\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{\frac{d}{M \cdot D}}\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), \left(\frac{d}{M \cdot D}\right)\right), \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(\frac{d}{M \cdot D}\right)\right), \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{\color{blue}{2}}\right) \cdot \frac{h}{\ell}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{\color{blue}{h}}{\ell}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right), \color{blue}{\left(\frac{h}{\ell}\right)}\right)\right)\right)\right) \]
    4. Applied egg-rr65.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)}\right) \]
    5. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{h}{d}} \cdot \frac{d}{\ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{\ell}{d}}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f6454.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), 2\right), \mathsf{/.f64}\left(h, \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr54.4%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \cdot \left(1 - \frac{0.5}{\frac{d}{M \cdot D}} \cdot \left(\frac{\frac{0.5}{\frac{d}{M \cdot D}}}{2} \cdot \frac{h}{\ell}\right)\right) \]
    7. Applied egg-rr74.5%

      \[\leadsto \color{blue}{\frac{1 + \frac{\frac{-0.5}{\frac{d}{M \cdot D}} \cdot \frac{\frac{h}{4}}{\frac{d}{M \cdot D}}}{\ell}}{\frac{{\left(h \cdot \ell\right)}^{0.5}}{d}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5.2 \cdot 10^{-304}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{\frac{-0.5}{\frac{d}{M \cdot D}} \cdot \frac{\frac{h}{4}}{\frac{d}{M \cdot D}}}{\ell}}{\frac{{\left(h \cdot \ell\right)}^{0.5}}{d}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 67.8% 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{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\\ t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;\ell \leq 4.45 \cdot 10^{-305}:\\ \;\;\;\;t\_1 \cdot \left(t\_0 + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\_0\right) \cdot 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 (/ (/ (/ (* D_m (* D_m (* M_m (* 0.125 (* h M_m))))) d) d) l))
        (t_1 (/ d (sqrt (* h l)))))
   (if (<= l 4.45e-305) (* t_1 (+ t_0 -1.0)) (* (- 1.0 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 = (((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l;
	double t_1 = d / sqrt((h * l));
	double tmp;
	if (l <= 4.45e-305) {
		tmp = t_1 * (t_0 + -1.0);
	} else {
		tmp = (1.0 - t_0) * 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 = (((d_m * (d_m * (m_m * (0.125d0 * (h * m_m))))) / d) / d) / l
    t_1 = d / sqrt((h * l))
    if (l <= 4.45d-305) then
        tmp = t_1 * (t_0 + (-1.0d0))
    else
        tmp = (1.0d0 - t_0) * 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 = (((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l;
	double t_1 = d / Math.sqrt((h * l));
	double tmp;
	if (l <= 4.45e-305) {
		tmp = t_1 * (t_0 + -1.0);
	} else {
		tmp = (1.0 - t_0) * 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 = (((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l
	t_1 = d / math.sqrt((h * l))
	tmp = 0
	if l <= 4.45e-305:
		tmp = t_1 * (t_0 + -1.0)
	else:
		tmp = (1.0 - t_0) * 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(Float64(Float64(Float64(D_m * Float64(D_m * Float64(M_m * Float64(0.125 * Float64(h * M_m))))) / d) / d) / l)
	t_1 = Float64(d / sqrt(Float64(h * l)))
	tmp = 0.0
	if (l <= 4.45e-305)
		tmp = Float64(t_1 * Float64(t_0 + -1.0));
	else
		tmp = Float64(Float64(1.0 - t_0) * 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 = (((D_m * (D_m * (M_m * (0.125 * (h * M_m))))) / d) / d) / l;
	t_1 = d / sqrt((h * l));
	tmp = 0.0;
	if (l <= 4.45e-305)
		tmp = t_1 * (t_0 + -1.0);
	else
		tmp = (1.0 - t_0) * 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[(N[(N[(D$95$m * N[(D$95$m * N[(M$95$m * N[(0.125 * N[(h * M$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.45e-305], N[(t$95$1 * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t$95$0), $MachinePrecision] * t$95$1), $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{\frac{\frac{D\_m \cdot \left(D\_m \cdot \left(M\_m \cdot \left(0.125 \cdot \left(h \cdot M\_m\right)\right)\right)\right)}{d}}{d}}{\ell}\\
t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;\ell \leq 4.45 \cdot 10^{-305}:\\
\;\;\;\;t\_1 \cdot \left(t\_0 + -1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 - t\_0\right) \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 4.4499999999999998e-305

    1. Initial program 68.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified60.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6442.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr42.5%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Taylor expanded in d around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot d\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. --lowering--.f6466.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    10. Simplified66.4%

      \[\leadsto \frac{\color{blue}{0 - d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]

    if 4.4499999999999998e-305 < l

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified58.6%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Step-by-step derivation
      1. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      3. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}}\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d \cdot d}\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(d \cdot d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \left(\sqrt{h \cdot \ell}\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      10. *-lowering-*.f6448.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(d, d\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    7. Applied egg-rr48.5%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
    8. Step-by-step derivation
      1. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{d} \cdot \sqrt{d}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
      2. rem-square-sqrt68.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right), d\right), d\right), \ell\right)\right)\right) \]
    9. Applied egg-rr68.9%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.45 \cdot 10^{-305}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 45.2% 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}\;\ell \leq -3.4 \cdot 10^{-134}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq -2.6 \cdot 10^{-308}:\\ \;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\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 -3.4e-134)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (if (<= l -2.6e-308)
     (* d (pow (/ (/ 1.0 (* h (* l l))) h) 0.25))
     (* d (sqrt (/ (/ 1.0 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) {
	double tmp;
	if (l <= -3.4e-134) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else if (l <= -2.6e-308) {
		tmp = d * pow(((1.0 / (h * (l * l))) / h), 0.25);
	} else {
		tmp = d * sqrt(((1.0 / h) / 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 <= (-3.4d-134)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else if (l <= (-2.6d-308)) then
        tmp = d * (((1.0d0 / (h * (l * l))) / h) ** 0.25d0)
    else
        tmp = d * sqrt(((1.0d0 / h) / 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 <= -3.4e-134) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else if (l <= -2.6e-308) {
		tmp = d * Math.pow(((1.0 / (h * (l * l))) / h), 0.25);
	} else {
		tmp = d * Math.sqrt(((1.0 / h) / 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 <= -3.4e-134:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	elif l <= -2.6e-308:
		tmp = d * math.pow(((1.0 / (h * (l * l))) / h), 0.25)
	else:
		tmp = d * math.sqrt(((1.0 / h) / 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 <= -3.4e-134)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (l <= -2.6e-308)
		tmp = Float64(d * (Float64(Float64(1.0 / Float64(h * Float64(l * l))) / h) ^ 0.25));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / 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 <= -3.4e-134)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	elseif (l <= -2.6e-308)
		tmp = d * (((1.0 / (h * (l * l))) / h) ^ 0.25);
	else
		tmp = d * sqrt(((1.0 / h) / 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, -3.4e-134], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2.6e-308], N[(d * N[Power[N[(N[(1.0 / N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $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}\;\ell \leq -3.4 \cdot 10^{-134}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;\ell \leq -2.6 \cdot 10^{-308}:\\
\;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -3.39999999999999977e-134

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified58.1%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6454.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified54.3%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -3.39999999999999977e-134 < l < -2.6e-308

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified67.0%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6418.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified18.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. 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}{\color{blue}{2}}\right)}\right)\right) \]
      3. sqr-powN/A

        \[\leadsto \mathsf{*.f64}\left(d, \left({\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot \color{blue}{{\left(\frac{1}{h \cdot \ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}\right)\right) \]
      4. 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{\frac{1}{2}}{2}\right)}}\right)\right) \]
      5. 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{\frac{1}{2}}{2}\right)}\right)\right) \]
      6. *-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}{\frac{1}{2}}}{2}\right)\right)\right) \]
      7. /-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{\frac{\color{blue}{1}}{2}}{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \left(\frac{1}{h \cdot \ell}\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(\frac{\frac{1}{\color{blue}{2}}}{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right) \]
      12. metadata-eval39.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
    10. Applied egg-rr39.8%

      \[\leadsto d \cdot \color{blue}{{\left(\frac{1}{h \cdot \ell} \cdot \frac{1}{h \cdot \ell}\right)}^{0.25}} \]
    11. Taylor expanded in h around 0

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\color{blue}{\left(\frac{1}{{h}^{2} \cdot {\ell}^{2}}\right)}, \frac{1}{4}\right)\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot {h}^{2}}\right), \frac{1}{4}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot \left(h \cdot h\right)}\right), \frac{1}{4}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{1}{\left({\ell}^{2} \cdot h\right) \cdot h}\right), \frac{1}{4}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{{\ell}^{2} \cdot h}}{h}\right), \frac{1}{4}\right)\right) \]
      5. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\left(\frac{\frac{\frac{1}{h}}{{\ell}^{2}}}{h}\right), \frac{1}{4}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{1}{h}}{{\ell}^{2}}\right), h\right), \frac{1}{4}\right)\right) \]
      7. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{{\ell}^{2} \cdot h}\right), h\right), \frac{1}{4}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left({\ell}^{2} \cdot h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left({\ell}^{2}\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
      11. *-lowering-*.f6450.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), h\right)\right), h\right), \frac{1}{4}\right)\right) \]
    13. Simplified50.8%

      \[\leadsto d \cdot {\color{blue}{\left(\frac{\frac{1}{\left(\ell \cdot \ell\right) \cdot h}}{h}\right)}}^{0.25} \]

    if -2.6e-308 < l

    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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified58.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6442.9%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified42.9%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6443.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Applied egg-rr43.3%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.4 \cdot 10^{-134}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq -2.6 \cdot 10^{-308}:\\ \;\;\;\;d \cdot {\left(\frac{\frac{1}{h \cdot \left(\ell \cdot \ell\right)}}{h}\right)}^{0.25}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 42.7% accurate, 2.9× 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 5 \cdot 10^{-156}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{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
 (if (<= d 5e-156)
   (* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
   (* d (sqrt (/ (/ 1.0 l) 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 tmp;
	if (d <= 5e-156) {
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	} else {
		tmp = d * sqrt(((1.0 / l) / 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) :: tmp
    if (d <= 5d-156) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
    else
        tmp = d * sqrt(((1.0d0 / l) / 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 tmp;
	if (d <= 5e-156) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / 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):
	tmp = 0
	if d <= 5e-156:
		tmp = (0.0 - d) * math.sqrt((1.0 / (h * l)))
	else:
		tmp = d * math.sqrt(((1.0 / l) / 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)
	tmp = 0.0
	if (d <= 5e-156)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l))));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / 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)
	tmp = 0.0;
	if (d <= 5e-156)
		tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
	else
		tmp = d * sqrt(((1.0 / l) / 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_] := If[LessEqual[d, 5e-156], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $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 5 \cdot 10^{-156}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 5.00000000000000007e-156

    1. Initial program 63.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified57.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. 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}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{d} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right)\right) \]
      8. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6442.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    8. Simplified42.6%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if 5.00000000000000007e-156 < d

    1. Initial program 68.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified63.0%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6451.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified51.5%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6452.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    10. Applied egg-rr52.0%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5 \cdot 10^{-156}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 34.8% accurate, 2.9× 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.14 \cdot 10^{-60}:\\ \;\;\;\;{\left(\frac{h \cdot \ell}{d \cdot d}\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\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 (<= d -1.14e-60)
   (pow (/ (* h l) (* d d)) -0.5)
   (* d (sqrt (/ (/ 1.0 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) {
	double tmp;
	if (d <= -1.14e-60) {
		tmp = pow(((h * l) / (d * d)), -0.5);
	} else {
		tmp = d * sqrt(((1.0 / h) / 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.14d-60)) then
        tmp = ((h * l) / (d * d)) ** (-0.5d0)
    else
        tmp = d * sqrt(((1.0d0 / h) / 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.14e-60) {
		tmp = Math.pow(((h * l) / (d * d)), -0.5);
	} else {
		tmp = d * Math.sqrt(((1.0 / h) / 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.14e-60:
		tmp = math.pow(((h * l) / (d * d)), -0.5)
	else:
		tmp = d * math.sqrt(((1.0 / h) / 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.14e-60)
		tmp = Float64(Float64(h * l) / Float64(d * d)) ^ -0.5;
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / 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.14e-60)
		tmp = ((h * l) / (d * d)) ^ -0.5;
	else
		tmp = d * sqrt(((1.0 / h) / 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.14e-60], N[Power[N[(N[(h * l), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $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.14 \cdot 10^{-60}:\\
\;\;\;\;{\left(\frac{h \cdot \ell}{d \cdot d}\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < -1.14000000000000001e-60

    1. Initial program 76.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified66.7%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f646.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified6.5%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. rem-square-sqrtN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{d}\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. sqrt-prodN/A

        \[\leadsto \sqrt{d \cdot d} \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. sqrt-unprodN/A

        \[\leadsto \sqrt{\left(d \cdot d\right) \cdot \frac{1}{h \cdot \ell}} \]
      4. div-invN/A

        \[\leadsto \sqrt{\frac{d \cdot d}{h \cdot \ell}} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\ell \cdot h}} \]
      6. frac-timesN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      7. clear-numN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{1}{\frac{h}{d}}} \]
      8. div-invN/A

        \[\leadsto \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}} \]
      9. clear-numN/A

        \[\leadsto \sqrt{\frac{1}{\frac{\frac{h}{d}}{\frac{d}{\ell}}}} \]
      10. inv-powN/A

        \[\leadsto \sqrt{{\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right)}^{-1}} \]
      11. sqrt-pow1N/A

        \[\leadsto {\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}} \]
      12. metadata-evalN/A

        \[\leadsto {\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right)}^{\frac{-1}{2}} \]
      13. metadata-evalN/A

        \[\leadsto {\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      14. metadata-evalN/A

        \[\leadsto {\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      15. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{\frac{h}{d}}{\frac{d}{\ell}}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{\frac{1}{\frac{d}{h}}}{\frac{d}{\ell}}\right), \left(\mathsf{neg}\left(\frac{\color{blue}{1}}{2}\right)\right)\right) \]
      17. associate-/l/N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{1}{\frac{d}{\ell} \cdot \frac{d}{h}}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right) \]
      18. frac-timesN/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{1}{\frac{d \cdot d}{\ell \cdot h}}\right), \left(\mathsf{neg}\left(\frac{1}{\color{blue}{2}}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{1}{\frac{d \cdot d}{h \cdot \ell}}\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right) \]
      20. clear-numN/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{1}{\frac{1}{\frac{h \cdot \ell}{d \cdot d}}}\right), \left(\mathsf{neg}\left(\frac{1}{\color{blue}{2}}\right)\right)\right) \]
      21. remove-double-divN/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\frac{h \cdot \ell}{d \cdot d}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right) \]
      22. /-lowering-/.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(h \cdot \ell\right), \left(d \cdot d\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right) \]
      23. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \left(d \cdot d\right)\right), \left(\mathsf{neg}\left(\frac{\color{blue}{1}}{2}\right)\right)\right) \]
      24. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \mathsf{*.f64}\left(d, d\right)\right), \left(\mathsf{neg}\left(\frac{1}{\color{blue}{2}}\right)\right)\right) \]
    10. Applied egg-rr38.2%

      \[\leadsto \color{blue}{{\left(\frac{h \cdot \ell}{d \cdot d}\right)}^{-0.5}} \]

    if -1.14000000000000001e-60 < d

    1. Initial program 60.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified56.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6433.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified33.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6434.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Applied egg-rr34.1%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 38.7% accurate, 3.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} \mathbf{if}\;\ell \leq -1.75 \cdot 10^{-249}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\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.75e-249)
   (sqrt (/ (/ d l) (/ h d)))
   (* d (sqrt (/ (/ 1.0 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) {
	double tmp;
	if (l <= -1.75e-249) {
		tmp = sqrt(((d / l) / (h / d)));
	} else {
		tmp = d * sqrt(((1.0 / h) / 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.75d-249)) then
        tmp = sqrt(((d / l) / (h / d)))
    else
        tmp = d * sqrt(((1.0d0 / h) / 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.75e-249) {
		tmp = Math.sqrt(((d / l) / (h / d)));
	} else {
		tmp = d * Math.sqrt(((1.0 / h) / 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.75e-249:
		tmp = math.sqrt(((d / l) / (h / d)))
	else:
		tmp = d * math.sqrt(((1.0 / h) / 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.75e-249)
		tmp = sqrt(Float64(Float64(d / l) / Float64(h / d)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / 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.75e-249)
		tmp = sqrt(((d / l) / (h / d)));
	else
		tmp = d * sqrt(((1.0 / h) / 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.75e-249], N[Sqrt[N[(N[(d / l), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $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}\;\ell \leq -1.75 \cdot 10^{-249}:\\
\;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -1.75000000000000006e-249

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified61.6%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Applied egg-rr42.4%

      \[\leadsto \color{blue}{\left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot 0.125\right)\right) \cdot D\right)}{\left(d \cdot \ell\right) \cdot d}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}} \]
    7. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(h, d\right)\right)\right)\right) \]
    8. Step-by-step derivation
      1. Simplified33.6%

        \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}} \]

      if -1.75000000000000006e-249 < l

      1. Initial program 61.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. Add Preprocessing
      3. Taylor expanded in M around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
      5. Simplified57.7%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      7. 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-*.f6442.2%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
      8. Simplified42.2%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      9. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
        3. /-lowering-/.f6442.6%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
      10. Applied egg-rr42.6%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    9. Recombined 2 regimes into one program.
    10. Final simplification38.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.75 \cdot 10^{-249}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
    11. Add Preprocessing

    Alternative 24: 35.0% accurate, 3.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} \mathbf{if}\;d \leq -6.5 \cdot 10^{-57}:\\ \;\;\;\;\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\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 (<= d -6.5e-57) (sqrt (/ (/ (* d d) l) h)) (* d (sqrt (/ (/ 1.0 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) {
    	double tmp;
    	if (d <= -6.5e-57) {
    		tmp = sqrt((((d * d) / l) / h));
    	} else {
    		tmp = d * sqrt(((1.0 / h) / 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 <= (-6.5d-57)) then
            tmp = sqrt((((d * d) / l) / h))
        else
            tmp = d * sqrt(((1.0d0 / h) / 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 <= -6.5e-57) {
    		tmp = Math.sqrt((((d * d) / l) / h));
    	} else {
    		tmp = d * Math.sqrt(((1.0 / h) / 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 <= -6.5e-57:
    		tmp = math.sqrt((((d * d) / l) / h))
    	else:
    		tmp = d * math.sqrt(((1.0 / h) / 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 <= -6.5e-57)
    		tmp = sqrt(Float64(Float64(Float64(d * d) / l) / h));
    	else
    		tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / 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 <= -6.5e-57)
    		tmp = sqrt((((d * d) / l) / h));
    	else
    		tmp = d * sqrt(((1.0 / h) / 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, -6.5e-57], N[Sqrt[N[(N[(N[(d * d), $MachinePrecision] / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $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 -6.5 \cdot 10^{-57}:\\
    \;\;\;\;\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}\\
    
    \mathbf{else}:\\
    \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if d < -6.49999999999999992e-57

      1. Initial program 76.6%

        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in M around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
      5. Simplified66.7%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      7. 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-*.f646.5%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
      8. Simplified6.5%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      9. Step-by-step derivation
        1. rem-square-sqrtN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{d}\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
        2. sqrt-prodN/A

          \[\leadsto \sqrt{d \cdot d} \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
        3. sqrt-unprodN/A

          \[\leadsto \sqrt{\left(d \cdot d\right) \cdot \frac{1}{h \cdot \ell}} \]
        4. div-invN/A

          \[\leadsto \sqrt{\frac{d \cdot d}{h \cdot \ell}} \]
        5. *-commutativeN/A

          \[\leadsto \sqrt{\frac{d \cdot d}{\ell \cdot h}} \]
        6. frac-timesN/A

          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
        7. clear-numN/A

          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{1}{\frac{h}{d}}} \]
        8. div-invN/A

          \[\leadsto \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}} \]
        9. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right) \]
        10. div-invN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{1}{\frac{h}{d}}\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
        12. frac-timesN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d \cdot d}{\ell \cdot h}\right)\right) \]
        13. associate-/r*N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\frac{d \cdot d}{\ell}}{h}\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d \cdot d}{\ell}\right), h\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(d \cdot d\right), \ell\right), h\right)\right) \]
        16. *-lowering-*.f6437.9%

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right), h\right)\right) \]
      10. Applied egg-rr37.9%

        \[\leadsto \color{blue}{\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}} \]

      if -6.49999999999999992e-57 < d

      1. Initial program 60.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. Add Preprocessing
      3. Taylor expanded in M around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
      5. Simplified56.3%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      7. 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-*.f6433.8%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
      8. Simplified33.8%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      9. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
        3. /-lowering-/.f6434.1%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
      10. Applied egg-rr34.1%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 25: 34.9% accurate, 3.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} \mathbf{if}\;d \leq -3.4 \cdot 10^{-60}:\\ \;\;\;\;\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}}\\ \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 -3.4e-60) (sqrt (/ (/ (* d d) l) h)) (/ 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) {
    	double tmp;
    	if (d <= -3.4e-60) {
    		tmp = sqrt((((d * d) / l) / h));
    	} else {
    		tmp = d / pow((h * l), 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 (d <= (-3.4d-60)) then
            tmp = sqrt((((d * d) / l) / h))
        else
            tmp = d / ((h * l) ** 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 (d <= -3.4e-60) {
    		tmp = Math.sqrt((((d * d) / l) / h));
    	} else {
    		tmp = d / Math.pow((h * l), 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 d <= -3.4e-60:
    		tmp = math.sqrt((((d * d) / l) / h))
    	else:
    		tmp = d / math.pow((h * l), 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 (d <= -3.4e-60)
    		tmp = sqrt(Float64(Float64(Float64(d * d) / l) / h));
    	else
    		tmp = Float64(d / (Float64(h * l) ^ 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 (d <= -3.4e-60)
    		tmp = sqrt((((d * d) / l) / h));
    	else
    		tmp = d / ((h * l) ^ 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[d, -3.4e-60], N[Sqrt[N[(N[(N[(d * d), $MachinePrecision] / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision], 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])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;d \leq -3.4 \cdot 10^{-60}:\\
    \;\;\;\;\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{d}{{\left(h \cdot \ell\right)}^{0.5}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if d < -3.40000000000000007e-60

      1. Initial program 76.6%

        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in M around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
      5. Simplified66.7%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      7. 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-*.f646.5%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
      8. Simplified6.5%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      9. Step-by-step derivation
        1. rem-square-sqrtN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{d}\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
        2. sqrt-prodN/A

          \[\leadsto \sqrt{d \cdot d} \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
        3. sqrt-unprodN/A

          \[\leadsto \sqrt{\left(d \cdot d\right) \cdot \frac{1}{h \cdot \ell}} \]
        4. div-invN/A

          \[\leadsto \sqrt{\frac{d \cdot d}{h \cdot \ell}} \]
        5. *-commutativeN/A

          \[\leadsto \sqrt{\frac{d \cdot d}{\ell \cdot h}} \]
        6. frac-timesN/A

          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
        7. clear-numN/A

          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{1}{\frac{h}{d}}} \]
        8. div-invN/A

          \[\leadsto \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}} \]
        9. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\frac{d}{\ell}}{\frac{h}{d}}\right)\right) \]
        10. div-invN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{1}{\frac{h}{d}}\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
        12. frac-timesN/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d \cdot d}{\ell \cdot h}\right)\right) \]
        13. associate-/r*N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\frac{d \cdot d}{\ell}}{h}\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{d \cdot d}{\ell}\right), h\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(d \cdot d\right), \ell\right), h\right)\right) \]
        16. *-lowering-*.f6437.9%

          \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right), h\right)\right) \]
      10. Applied egg-rr37.9%

        \[\leadsto \color{blue}{\sqrt{\frac{\frac{d \cdot d}{\ell}}{h}}} \]

      if -3.40000000000000007e-60 < d

      1. Initial program 60.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. Add Preprocessing
      3. Taylor expanded in M around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      4. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
      5. Simplified56.3%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      7. 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-*.f6433.8%

          \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
      8. Simplified33.8%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      9. 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. div-invN/A

          \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
        5. pow1/2N/A

          \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\left(\frac{1}{\color{blue}{2}}\right)}\right)\right) \]
        7. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(h \cdot \ell\right), \color{blue}{\left(\frac{1}{2}\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \left(\frac{\color{blue}{1}}{2}\right)\right)\right) \]
        9. metadata-eval34.1%

          \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \frac{1}{2}\right)\right) \]
      10. Applied egg-rr34.1%

        \[\leadsto \color{blue}{\frac{d}{{\left(h \cdot \ell\right)}^{0.5}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 26: 26.4% 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])\\ \\ \frac{d}{{\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])\\
    \\
    \frac{d}{{\left(h \cdot \ell\right)}^{0.5}}
    \end{array}
    
    Derivation
    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified59.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6425.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified25.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. 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. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\left(\frac{1}{\color{blue}{2}}\right)}\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(h \cdot \ell\right), \color{blue}{\left(\frac{1}{2}\right)}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \left(\frac{\color{blue}{1}}{2}\right)\right)\right) \]
      9. metadata-eval25.6%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \frac{1}{2}\right)\right) \]
    10. Applied egg-rr25.6%

      \[\leadsto \color{blue}{\frac{d}{{\left(h \cdot \ell\right)}^{0.5}}} \]
    11. Add Preprocessing

    Alternative 27: 26.4% 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 65.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. Add Preprocessing
    3. Taylor expanded in M around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\color{blue}{\ell}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(1, 2\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(1, 2\right)\right)\right), \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right), \color{blue}{\ell}\right)\right)\right) \]
    5. Simplified59.5%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{\frac{D \cdot \left(D \cdot \left(M \cdot \left(0.125 \cdot \left(M \cdot h\right)\right)\right)\right)}{d}}{d}}{\ell}}\right) \]
    6. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. 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-*.f6425.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    8. Simplified25.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. 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. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), d\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(h \cdot \ell\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), d\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(h \cdot \ell\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right), d\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right), d\right) \]
      11. metadata-eval25.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \ell\right), \frac{-1}{2}\right), d\right) \]
    10. Applied egg-rr25.6%

      \[\leadsto \color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot d} \]
    11. Final simplification25.6%

      \[\leadsto d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024192 
    (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)))))