Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.6% → 78.8%
Time: 16.6s
Alternatives: 21
Speedup: 3.2×

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 21 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.6% 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: 78.8% accurate, 1.8× speedup?

\[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell}}\\ t_1 := \frac{M\_m}{d} \cdot D\_m\\ \mathbf{if}\;d \leq -2 \cdot 10^{+88}:\\ \;\;\;\;\frac{-d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\left(\frac{0.5}{d} \cdot M\_m\right) \cdot D\_m}{\ell} \cdot \frac{\left(0.5 \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{M\_m}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_1\right) \cdot t\_1, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_1 \cdot t\_1, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_0\\ \end{array} \end{array} \]
D_m = (fabs.f64 D)
M_m = (fabs.f64 M)
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 l))) (t_1 (* (/ M_m d) D_m)))
   (if (<= d -2e+88)
     (*
      (/ (- d) (sqrt (* h l)))
      (-
       1.0
       (*
        (/ (* (* (/ 0.5 d) M_m) D_m) l)
        (/ (* (* 0.5 (* D_m 0.5)) (/ M_m d)) (pow h -1.0)))))
     (if (<= d -5e-310)
       (*
        (* (fma -0.5 (* (* (* 0.25 (/ h l)) t_1) t_1) 1.0) (sqrt (/ d h)))
        (/ (sqrt (- d)) (sqrt (- l))))
       (if (<= d 1.85e+172)
         (*
          (/ (fma (* -0.125 (sqrt h)) (* t_1 t_1) (* (sqrt (pow h -1.0)) l)) l)
          t_0)
         (*
          (/
           (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
           (sqrt h))
          t_0))))))
D_m = fabs(D);
M_m = fabs(M);
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(l);
	double t_1 = (M_m / d) * D_m;
	double tmp;
	if (d <= -2e+88) {
		tmp = (-d / sqrt((h * l))) * (1.0 - (((((0.5 / d) * M_m) * D_m) / l) * (((0.5 * (D_m * 0.5)) * (M_m / d)) / pow(h, -1.0))));
	} else if (d <= -5e-310) {
		tmp = (fma(-0.5, (((0.25 * (h / l)) * t_1) * t_1), 1.0) * sqrt((d / h))) * (sqrt(-d) / sqrt(-l));
	} else if (d <= 1.85e+172) {
		tmp = (fma((-0.125 * sqrt(h)), (t_1 * t_1), (sqrt(pow(h, -1.0)) * l)) / l) * t_0;
	} else {
		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_0;
	}
	return tmp;
}
D_m = abs(D)
M_m = abs(M)
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(l))
	t_1 = Float64(Float64(M_m / d) * D_m)
	tmp = 0.0
	if (d <= -2e+88)
		tmp = Float64(Float64(Float64(-d) / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(0.5 / d) * M_m) * D_m) / l) * Float64(Float64(Float64(0.5 * Float64(D_m * 0.5)) * Float64(M_m / d)) / (h ^ -1.0)))));
	elseif (d <= -5e-310)
		tmp = Float64(Float64(fma(-0.5, Float64(Float64(Float64(0.25 * Float64(h / l)) * t_1) * t_1), 1.0) * sqrt(Float64(d / h))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))));
	elseif (d <= 1.85e+172)
		tmp = Float64(Float64(fma(Float64(-0.125 * sqrt(h)), Float64(t_1 * t_1), Float64(sqrt((h ^ -1.0)) * l)) / l) * t_0);
	else
		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_0);
	end
	return tmp
end
D_m = N[Abs[D], $MachinePrecision]
M_m = N[Abs[M], $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[l], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]}, If[LessEqual[d, -2e+88], N[(N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(0.5 / d), $MachinePrecision] * M$95$m), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(0.5 * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] / N[Power[h, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(N[(-0.5 * N[(N[(N[(0.25 * N[(h / l), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.85e+172], N[(N[(N[(N[(-0.125 * N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision] + N[(N[Sqrt[N[Power[h, -1.0], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
D_m = \left|D\right|
\\
M_m = \left|M\right|
\\
[d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{\ell}}\\
t_1 := \frac{M\_m}{d} \cdot D\_m\\
\mathbf{if}\;d \leq -2 \cdot 10^{+88}:\\
\;\;\;\;\frac{-d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\left(\frac{0.5}{d} \cdot M\_m\right) \cdot D\_m}{\ell} \cdot \frac{\left(0.5 \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{M\_m}{d}}{{h}^{-1}}\right)\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_1\right) \cdot t\_1, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\

\mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_1 \cdot t\_1, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.99999999999999992e88

    1. Initial program 62.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. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      3. clear-numN/A

        \[\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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      4. un-div-invN/A

        \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}}\right) \]
      5. lift-*.f64N/A

        \[\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 - \frac{\color{blue}{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}}{\frac{\ell}{h}}\right) \]
      6. *-commutativeN/A

        \[\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 - \frac{\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}}}{\frac{\ell}{h}}\right) \]
      7. lift-pow.f64N/A

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

        \[\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 - \frac{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}}{\frac{\ell}{h}}\right) \]
      9. associate-*l*N/A

        \[\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 - \frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}}{\frac{\ell}{h}}\right) \]
      10. div-invN/A

        \[\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 - \frac{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}{\color{blue}{\ell \cdot \frac{1}{h}}}\right) \]
      11. times-fracN/A

        \[\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{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
      12. lower-*.f64N/A

        \[\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{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
    4. Applied rewrites69.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{\left(\frac{0.5}{d} \cdot M\right) \cdot D}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}}\right) \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
      7. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}}}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
      18. rem-square-sqrtN/A

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

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

        \[\leadsto \frac{-d}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
      21. lower-*.f6495.6

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

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

    if -1.99999999999999992e88 < d < -4.999999999999985e-310

    1. Initial program 78.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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
      10. lower-*.f6477.2

        \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
      11. lift-*.f64N/A

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

        \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
      13. lower-*.f6477.2

        \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
      14. lift-*.f64N/A

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

        \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
      16. lower-*.f6477.2

        \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
    7. Applied rewrites77.2%

      \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
    8. Step-by-step derivation
      1. lift-sqrt.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}} \]
      9. lower-neg.f6487.2

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

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

    if -4.999999999999985e-310 < d < 1.84999999999999986e172

    1. Initial program 70.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 d around inf

      \[\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 \color{blue}{1} \]
    4. Step-by-step derivation
      1. Applied rewrites34.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 \color{blue}{1} \]
      2. Applied rewrites34.3%

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

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

          \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
        3. associate-/l*N/A

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

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

          \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
        6. lower-/.f6434.2

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

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

          \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
        9. sqrt-prodN/A

          \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
        10. lift-/.f64N/A

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

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

          \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
        13. rem-square-sqrtN/A

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

        \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
      5. Taylor expanded in l around 0

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

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

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

      if 1.84999999999999986e172 < 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 d around inf

        \[\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 \color{blue}{1} \]
      4. Step-by-step derivation
        1. Applied rewrites38.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 \color{blue}{1} \]
        2. Applied rewrites60.9%

          \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
        3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
        7. Applied rewrites79.8%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{+88}:\\ \;\;\;\;\frac{-d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{\left(\frac{0.5}{d} \cdot M\right) \cdot D}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, \left(\frac{M}{d} \cdot D\right) \cdot \left(\frac{M}{d} \cdot D\right), \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 2: 77.6% accurate, 1.8× speedup?

      \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{M\_m}{d} \cdot D\_m\\ t_1 := \frac{d}{\sqrt{\ell}}\\ \mathbf{if}\;d \leq -8.8 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D\_m \cdot \frac{M\_m}{d}\right)}^{2}\right), 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_1\\ \end{array} \end{array} \]
      D_m = (fabs.f64 D)
      M_m = (fabs.f64 M)
      NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
      (FPCore (d h l M_m D_m)
       :precision binary64
       (let* ((t_0 (* (/ M_m d) D_m)) (t_1 (/ d (sqrt l))))
         (if (<= d -8.8e+88)
           (*
            (fma -0.5 (* (/ h l) (* 0.25 (pow (* D_m (/ M_m d)) 2.0))) 1.0)
            (/ (- d) (sqrt (* h l))))
           (if (<= d -5e-310)
             (*
              (* (fma -0.5 (* (* (* 0.25 (/ h l)) t_0) t_0) 1.0) (sqrt (/ d h)))
              (/ (sqrt (- d)) (sqrt (- l))))
             (if (<= d 1.85e+172)
               (*
                (/ (fma (* -0.125 (sqrt h)) (* t_0 t_0) (* (sqrt (pow h -1.0)) l)) l)
                t_1)
               (*
                (/
                 (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                 (sqrt h))
                t_1))))))
      D_m = fabs(D);
      M_m = fabs(M);
      assert(d < h && h < l && l < M_m && M_m < D_m);
      double code(double d, double h, double l, double M_m, double D_m) {
      	double t_0 = (M_m / d) * D_m;
      	double t_1 = d / sqrt(l);
      	double tmp;
      	if (d <= -8.8e+88) {
      		tmp = fma(-0.5, ((h / l) * (0.25 * pow((D_m * (M_m / d)), 2.0))), 1.0) * (-d / sqrt((h * l)));
      	} else if (d <= -5e-310) {
      		tmp = (fma(-0.5, (((0.25 * (h / l)) * t_0) * t_0), 1.0) * sqrt((d / h))) * (sqrt(-d) / sqrt(-l));
      	} else if (d <= 1.85e+172) {
      		tmp = (fma((-0.125 * sqrt(h)), (t_0 * t_0), (sqrt(pow(h, -1.0)) * l)) / l) * t_1;
      	} else {
      		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_1;
      	}
      	return tmp;
      }
      
      D_m = abs(D)
      M_m = abs(M)
      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(M_m / d) * D_m)
      	t_1 = Float64(d / sqrt(l))
      	tmp = 0.0
      	if (d <= -8.8e+88)
      		tmp = Float64(fma(-0.5, Float64(Float64(h / l) * Float64(0.25 * (Float64(D_m * Float64(M_m / d)) ^ 2.0))), 1.0) * Float64(Float64(-d) / sqrt(Float64(h * l))));
      	elseif (d <= -5e-310)
      		tmp = Float64(Float64(fma(-0.5, Float64(Float64(Float64(0.25 * Float64(h / l)) * t_0) * t_0), 1.0) * sqrt(Float64(d / h))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))));
      	elseif (d <= 1.85e+172)
      		tmp = Float64(Float64(fma(Float64(-0.125 * sqrt(h)), Float64(t_0 * t_0), Float64(sqrt((h ^ -1.0)) * l)) / l) * t_1);
      	else
      		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_1);
      	end
      	return tmp
      end
      
      D_m = N[Abs[D], $MachinePrecision]
      M_m = N[Abs[M], $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[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.8e+88], N[(N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[(0.25 * N[Power[N[(D$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(N[(-0.5 * N[(N[(N[(0.25 * N[(h / l), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.85e+172], N[(N[(N[(N[(-0.125 * N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision] + N[(N[Sqrt[N[Power[h, -1.0], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      D_m = \left|D\right|
      \\
      M_m = \left|M\right|
      \\
      [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
      \\
      \begin{array}{l}
      t_0 := \frac{M\_m}{d} \cdot D\_m\\
      t_1 := \frac{d}{\sqrt{\ell}}\\
      \mathbf{if}\;d \leq -8.8 \cdot 10^{+88}:\\
      \;\;\;\;\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D\_m \cdot \frac{M\_m}{d}\right)}^{2}\right), 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\
      
      \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
      \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\
      
      \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if d < -8.80000000000000035e88

        1. Initial program 62.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. Step-by-step derivation
          1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        if -8.80000000000000035e88 < d < -4.999999999999985e-310

        1. Initial program 78.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. Step-by-step derivation
          1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
          10. lower-*.f6477.2

            \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
          11. lift-*.f64N/A

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
          13. lower-*.f6477.2

            \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
          14. lift-*.f64N/A

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
          16. lower-*.f6477.2

            \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
        7. Applied rewrites77.2%

          \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
        8. Step-by-step derivation
          1. lift-sqrt.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}} \]
          9. lower-neg.f6487.2

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

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

        if -4.999999999999985e-310 < d < 1.84999999999999986e172

        1. Initial program 70.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 d around inf

          \[\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 \color{blue}{1} \]
        4. Step-by-step derivation
          1. Applied rewrites34.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 \color{blue}{1} \]
          2. Applied rewrites34.3%

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
            3. associate-/l*N/A

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

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

              \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
            6. lower-/.f6434.2

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

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

              \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
            9. sqrt-prodN/A

              \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
            10. lift-/.f64N/A

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

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

              \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
            13. rem-square-sqrtN/A

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

            \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
          5. Taylor expanded in l around 0

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

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

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

          if 1.84999999999999986e172 < 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 d around inf

            \[\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 \color{blue}{1} \]
          4. Step-by-step derivation
            1. Applied rewrites38.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 \color{blue}{1} \]
            2. Applied rewrites60.9%

              \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
            3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
            7. Applied rewrites79.8%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.8 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right), 1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, \left(\frac{M}{d} \cdot D\right) \cdot \left(\frac{M}{d} \cdot D\right), \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 3: 71.4% accurate, 1.8× speedup?

          \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{M\_m}{d} \cdot D\_m\\ \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-153}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M\_m}{\ell}\right) \cdot \left(D\_m \cdot \frac{M\_m}{d}\right), D\_m \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;\ell \leq 1.22 \cdot 10^{+244}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
          D_m = (fabs.f64 D)
          M_m = (fabs.f64 M)
          NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
          (FPCore (d h l M_m D_m)
           :precision binary64
           (let* ((t_0 (* (/ M_m d) D_m)))
             (if (<= l -2.9e+129)
               (* (- d) (sqrt (pow (* l h) -1.0)))
               (if (<= l 1.72e-153)
                 (*
                  (*
                   (fma
                    (* (* (/ (* h 0.25) d) (/ M_m l)) (* D_m (/ M_m d)))
                    (* D_m -0.5)
                    1.0)
                   (sqrt (/ d h)))
                  (sqrt (/ d l)))
                 (if (<= l 1.22e+244)
                   (*
                    (/ (fma (* -0.125 (sqrt h)) (* t_0 t_0) (* (sqrt (pow h -1.0)) l)) l)
                    (/ d (sqrt l)))
                   (/ d (sqrt (* l h))))))))
          D_m = fabs(D);
          M_m = fabs(M);
          assert(d < h && h < l && l < M_m && M_m < D_m);
          double code(double d, double h, double l, double M_m, double D_m) {
          	double t_0 = (M_m / d) * D_m;
          	double tmp;
          	if (l <= -2.9e+129) {
          		tmp = -d * sqrt(pow((l * h), -1.0));
          	} else if (l <= 1.72e-153) {
          		tmp = (fma(((((h * 0.25) / d) * (M_m / l)) * (D_m * (M_m / d))), (D_m * -0.5), 1.0) * sqrt((d / h))) * sqrt((d / l));
          	} else if (l <= 1.22e+244) {
          		tmp = (fma((-0.125 * sqrt(h)), (t_0 * t_0), (sqrt(pow(h, -1.0)) * l)) / l) * (d / sqrt(l));
          	} else {
          		tmp = d / sqrt((l * h));
          	}
          	return tmp;
          }
          
          D_m = abs(D)
          M_m = abs(M)
          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(M_m / d) * D_m)
          	tmp = 0.0
          	if (l <= -2.9e+129)
          		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
          	elseif (l <= 1.72e-153)
          		tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(h * 0.25) / d) * Float64(M_m / l)) * Float64(D_m * Float64(M_m / d))), Float64(D_m * -0.5), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
          	elseif (l <= 1.22e+244)
          		tmp = Float64(Float64(fma(Float64(-0.125 * sqrt(h)), Float64(t_0 * t_0), Float64(sqrt((h ^ -1.0)) * l)) / l) * Float64(d / sqrt(l)));
          	else
          		tmp = Float64(d / sqrt(Float64(l * h)));
          	end
          	return tmp
          end
          
          D_m = N[Abs[D], $MachinePrecision]
          M_m = N[Abs[M], $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[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]}, If[LessEqual[l, -2.9e+129], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.72e-153], N[(N[(N[(N[(N[(N[(N[(h * 0.25), $MachinePrecision] / d), $MachinePrecision] * N[(M$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.22e+244], N[(N[(N[(N[(-0.125 * N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision] + N[(N[Sqrt[N[Power[h, -1.0], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          D_m = \left|D\right|
          \\
          M_m = \left|M\right|
          \\
          [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
          \\
          \begin{array}{l}
          t_0 := \frac{M\_m}{d} \cdot D\_m\\
          \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\
          \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
          
          \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-153}:\\
          \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M\_m}{\ell}\right) \cdot \left(D\_m \cdot \frac{M\_m}{d}\right), D\_m \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
          
          \mathbf{elif}\;\ell \leq 1.22 \cdot 10^{+244}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if l < -2.90000000000000003e129

            1. Initial program 35.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. lift-pow.f64N/A

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

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

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

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

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

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              7. div-invN/A

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

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

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

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

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

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              13. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
              5. mul-1-negN/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
              6. lower-neg.f64N/A

                \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
              7. lower-sqrt.f64N/A

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

                \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
              9. *-commutativeN/A

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

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

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

            if -2.90000000000000003e129 < l < 1.71999999999999997e-153

            1. Initial program 85.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. Step-by-step derivation
              1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
              10. lower-*.f6484.4

                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
              11. lift-*.f64N/A

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
              13. lower-*.f6484.4

                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
              14. lift-*.f64N/A

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

                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
              16. lower-*.f6484.4

                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
            7. Applied rewrites84.4%

              \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
            8. Step-by-step derivation
              1. lift-fma.f64N/A

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

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

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

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

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

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

                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \frac{M}{d}, D \cdot \frac{-1}{2}, 1\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
            9. Applied rewrites82.1%

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

            if 1.71999999999999997e-153 < l < 1.22000000000000005e244

            1. Initial program 68.7%

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

              \[\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 \color{blue}{1} \]
            4. Step-by-step derivation
              1. Applied rewrites42.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 \color{blue}{1} \]
              2. Applied rewrites43.1%

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

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

                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
                3. associate-/l*N/A

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

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

                  \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                6. lower-/.f6443.0

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

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

                  \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                9. sqrt-prodN/A

                  \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
                10. lift-/.f64N/A

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

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

                  \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
                13. rem-square-sqrtN/A

                  \[\leadsto \frac{1}{\sqrt{h}} \cdot \frac{\color{blue}{d}}{\sqrt{\ell}} \]
              4. Applied rewrites48.0%

                \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
              5. Taylor expanded in l around 0

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

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

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

              if 1.22000000000000005e244 < l

              1. Initial program 22.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 d around inf

                \[\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 \color{blue}{1} \]
              4. Step-by-step derivation
                1. Applied rewrites23.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 \color{blue}{1} \]
                2. Taylor expanded in d around -inf

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

                    \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                  2. mul-1-negN/A

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

                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                  4. unpow2N/A

                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                  5. rem-square-sqrtN/A

                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                  6. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                  7. remove-double-negN/A

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

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

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

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

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

                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                  13. lower-*.f6480.0

                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                4. Applied rewrites80.0%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-153}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M}{\ell}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;\ell \leq 1.22 \cdot 10^{+244}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, \left(\frac{M}{d} \cdot D\right) \cdot \left(\frac{M}{d} \cdot D\right), \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                8. Add Preprocessing

                Alternative 4: 77.7% accurate, 1.8× speedup?

                \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{M\_m}{d} \cdot D\_m\\ t_1 := \frac{d}{\sqrt{\ell}}\\ \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_1\\ \end{array} \end{array} \]
                D_m = (fabs.f64 D)
                M_m = (fabs.f64 M)
                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                (FPCore (d h l M_m D_m)
                 :precision binary64
                 (let* ((t_0 (* (/ M_m d) D_m)) (t_1 (/ d (sqrt l))))
                   (if (<= d -5e-310)
                     (*
                      (* (fma -0.5 (* (* (* 0.25 (/ h l)) t_0) t_0) 1.0) (sqrt (/ d h)))
                      (/ (sqrt (- d)) (sqrt (- l))))
                     (if (<= d 1.85e+172)
                       (*
                        (/ (fma (* -0.125 (sqrt h)) (* t_0 t_0) (* (sqrt (pow h -1.0)) l)) l)
                        t_1)
                       (*
                        (/
                         (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                         (sqrt h))
                        t_1)))))
                D_m = fabs(D);
                M_m = fabs(M);
                assert(d < h && h < l && l < M_m && M_m < D_m);
                double code(double d, double h, double l, double M_m, double D_m) {
                	double t_0 = (M_m / d) * D_m;
                	double t_1 = d / sqrt(l);
                	double tmp;
                	if (d <= -5e-310) {
                		tmp = (fma(-0.5, (((0.25 * (h / l)) * t_0) * t_0), 1.0) * sqrt((d / h))) * (sqrt(-d) / sqrt(-l));
                	} else if (d <= 1.85e+172) {
                		tmp = (fma((-0.125 * sqrt(h)), (t_0 * t_0), (sqrt(pow(h, -1.0)) * l)) / l) * t_1;
                	} else {
                		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_1;
                	}
                	return tmp;
                }
                
                D_m = abs(D)
                M_m = abs(M)
                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(M_m / d) * D_m)
                	t_1 = Float64(d / sqrt(l))
                	tmp = 0.0
                	if (d <= -5e-310)
                		tmp = Float64(Float64(fma(-0.5, Float64(Float64(Float64(0.25 * Float64(h / l)) * t_0) * t_0), 1.0) * sqrt(Float64(d / h))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))));
                	elseif (d <= 1.85e+172)
                		tmp = Float64(Float64(fma(Float64(-0.125 * sqrt(h)), Float64(t_0 * t_0), Float64(sqrt((h ^ -1.0)) * l)) / l) * t_1);
                	else
                		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * t_1);
                	end
                	return tmp
                end
                
                D_m = N[Abs[D], $MachinePrecision]
                M_m = N[Abs[M], $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[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5e-310], N[(N[(N[(-0.5 * N[(N[(N[(0.25 * N[(h / l), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.85e+172], N[(N[(N[(N[(-0.125 * N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision] + N[(N[Sqrt[N[Power[h, -1.0], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                
                \begin{array}{l}
                D_m = \left|D\right|
                \\
                M_m = \left|M\right|
                \\
                [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                \\
                \begin{array}{l}
                t_0 := \frac{M\_m}{d} \cdot D\_m\\
                t_1 := \frac{d}{\sqrt{\ell}}\\
                \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\
                \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\
                
                \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, t\_0 \cdot t\_0, \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot t\_1\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if d < -4.999999999999985e-310

                  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. Step-by-step derivation
                    1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                    10. lower-*.f6473.4

                      \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                    11. lift-*.f64N/A

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

                      \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                    13. lower-*.f6473.4

                      \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                    14. lift-*.f64N/A

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

                      \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                    16. lower-*.f6473.4

                      \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                  7. Applied rewrites73.4%

                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                  8. Step-by-step derivation
                    1. lift-sqrt.f64N/A

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

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

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

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}} \]
                    9. lower-neg.f6481.6

                      \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-\ell}}} \]
                  9. Applied rewrites81.6%

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

                  if -4.999999999999985e-310 < d < 1.84999999999999986e172

                  1. Initial program 70.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 d around inf

                    \[\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 \color{blue}{1} \]
                  4. Step-by-step derivation
                    1. Applied rewrites34.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 \color{blue}{1} \]
                    2. Applied rewrites34.3%

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

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

                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
                      3. associate-/l*N/A

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

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

                        \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                      6. lower-/.f6434.2

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

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

                        \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                      9. sqrt-prodN/A

                        \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
                      10. lift-/.f64N/A

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

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

                        \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
                      13. rem-square-sqrtN/A

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

                      \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                    5. Taylor expanded in l around 0

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

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

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

                    if 1.84999999999999986e172 < 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 d around inf

                      \[\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 \color{blue}{1} \]
                    4. Step-by-step derivation
                      1. Applied rewrites38.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 \color{blue}{1} \]
                      2. Applied rewrites60.9%

                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                      3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
                      7. Applied rewrites79.8%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.85 \cdot 10^{+172}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \sqrt{h}, \left(\frac{M}{d} \cdot D\right) \cdot \left(\frac{M}{d} \cdot D\right), \sqrt{{h}^{-1}} \cdot \ell\right)}{\ell} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 5: 58.5% accurate, 1.9× speedup?

                    \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{-0.125}{\ell \cdot d}\\ t_2 := \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}\\ \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(t\_1 \cdot t\_2\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(t\_1, t\_2, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                    D_m = (fabs.f64 D)
                    M_m = (fabs.f64 M)
                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                    (FPCore (d h l M_m D_m)
                     :precision binary64
                     (let* ((t_0 (sqrt (/ d h)))
                            (t_1 (/ -0.125 (* l d)))
                            (t_2 (* (* (* (* M_m M_m) h) D_m) (/ D_m d))))
                       (if (<= d -8.6e+82)
                         (* (- d) (sqrt (pow (* l h) -1.0)))
                         (if (<= d -1.75e+33)
                           (* (* (* t_1 t_2) t_0) (sqrt (/ d l)))
                           (if (<= d 1.15e-304)
                             (* (* t_0 (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                             (/ (* (* (sqrt (pow l -1.0)) d) (fma t_1 t_2 1.0)) (sqrt h)))))))
                    D_m = fabs(D);
                    M_m = fabs(M);
                    assert(d < h && h < l && l < M_m && M_m < D_m);
                    double code(double d, double h, double l, double M_m, double D_m) {
                    	double t_0 = sqrt((d / h));
                    	double t_1 = -0.125 / (l * d);
                    	double t_2 = (((M_m * M_m) * h) * D_m) * (D_m / d);
                    	double tmp;
                    	if (d <= -8.6e+82) {
                    		tmp = -d * sqrt(pow((l * h), -1.0));
                    	} else if (d <= -1.75e+33) {
                    		tmp = ((t_1 * t_2) * t_0) * sqrt((d / l));
                    	} else if (d <= 1.15e-304) {
                    		tmp = (t_0 * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                    	} else {
                    		tmp = ((sqrt(pow(l, -1.0)) * d) * fma(t_1, t_2, 1.0)) / sqrt(h);
                    	}
                    	return tmp;
                    }
                    
                    D_m = abs(D)
                    M_m = abs(M)
                    d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                    function code(d, h, l, M_m, D_m)
                    	t_0 = sqrt(Float64(d / h))
                    	t_1 = Float64(-0.125 / Float64(l * d))
                    	t_2 = Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d))
                    	tmp = 0.0
                    	if (d <= -8.6e+82)
                    		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                    	elseif (d <= -1.75e+33)
                    		tmp = Float64(Float64(Float64(t_1 * t_2) * t_0) * sqrt(Float64(d / l)));
                    	elseif (d <= 1.15e-304)
                    		tmp = Float64(Float64(t_0 * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                    	else
                    		tmp = Float64(Float64(Float64(sqrt((l ^ -1.0)) * d) * fma(t_1, t_2, 1.0)) / sqrt(h));
                    	end
                    	return tmp
                    end
                    
                    D_m = N[Abs[D], $MachinePrecision]
                    M_m = N[Abs[M], $MachinePrecision]
                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                    code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.6e+82], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.75e+33], N[(N[(N[(t$95$1 * t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(t$95$0 * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(N[Sqrt[N[Power[l, -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision] * N[(t$95$1 * t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]
                    
                    \begin{array}{l}
                    D_m = \left|D\right|
                    \\
                    M_m = \left|M\right|
                    \\
                    [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                    \\
                    \begin{array}{l}
                    t_0 := \sqrt{\frac{d}{h}}\\
                    t_1 := \frac{-0.125}{\ell \cdot d}\\
                    t_2 := \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}\\
                    \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\
                    \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                    
                    \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\
                    \;\;\;\;\left(\left(t\_1 \cdot t\_2\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\
                    
                    \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                    \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(t\_1, t\_2, 1\right)}{\sqrt{h}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if d < -8.60000000000000029e82

                      1. Initial program 64.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. Step-by-step derivation
                        1. lift-pow.f64N/A

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

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

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

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        7. div-invN/A

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

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

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

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        13. neg-mul-1N/A

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        16. lower-/.f6469.5

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                        5. mul-1-negN/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                        6. lower-neg.f64N/A

                          \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                        7. lower-sqrt.f64N/A

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

                          \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                        9. *-commutativeN/A

                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                        10. lower-*.f6479.6

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

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

                      if -8.60000000000000029e82 < d < -1.75000000000000005e33

                      1. Initial program 99.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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.75000000000000005e33 < d < 1.15e-304

                      1. Initial program 74.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. Step-by-step derivation
                        1. lift-pow.f64N/A

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

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

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

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        7. div-invN/A

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

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

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

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        13. neg-mul-1N/A

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        16. lower-/.f6481.7

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

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

                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                      6. Step-by-step derivation
                        1. Applied rewrites47.3%

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                        2. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                          2. lift-pow.f64N/A

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

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

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                          5. lift-sqrt.f6447.3

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                        3. Applied rewrites47.3%

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

                        if 1.15e-304 < d

                        1. Initial program 68.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 d around inf

                          \[\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 \color{blue}{1} \]
                        4. Step-by-step derivation
                          1. Applied rewrites35.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 \color{blue}{1} \]
                          2. Applied rewrites39.8%

                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                          3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(\sqrt{\color{blue}{\frac{1}{\ell}}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                          8. Applied rewrites71.4%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 6: 70.0% accurate, 2.0× speedup?

                        \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M\_m}{\ell}\right) \cdot \left(D\_m \cdot \frac{M\_m}{d}\right), D\_m \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                        D_m = (fabs.f64 D)
                        M_m = (fabs.f64 M)
                        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 -2.9e+129)
                           (* (- d) (sqrt (pow (* l h) -1.0)))
                           (if (<= l 2.8e-152)
                             (*
                              (*
                               (fma
                                (* (* (/ (* h 0.25) d) (/ M_m l)) (* D_m (/ M_m d)))
                                (* D_m -0.5)
                                1.0)
                               (sqrt (/ d h)))
                              (sqrt (/ d l)))
                             (/
                              (*
                               (* (sqrt (pow l -1.0)) d)
                               (fma (/ -0.125 (* l d)) (* (* (* (* M_m M_m) h) D_m) (/ D_m d)) 1.0))
                              (sqrt h)))))
                        D_m = fabs(D);
                        M_m = fabs(M);
                        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 <= -2.9e+129) {
                        		tmp = -d * sqrt(pow((l * h), -1.0));
                        	} else if (l <= 2.8e-152) {
                        		tmp = (fma(((((h * 0.25) / d) * (M_m / l)) * (D_m * (M_m / d))), (D_m * -0.5), 1.0) * sqrt((d / h))) * sqrt((d / l));
                        	} else {
                        		tmp = ((sqrt(pow(l, -1.0)) * d) * fma((-0.125 / (l * d)), ((((M_m * M_m) * h) * D_m) * (D_m / d)), 1.0)) / sqrt(h);
                        	}
                        	return tmp;
                        }
                        
                        D_m = abs(D)
                        M_m = abs(M)
                        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 <= -2.9e+129)
                        		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                        	elseif (l <= 2.8e-152)
                        		tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(h * 0.25) / d) * Float64(M_m / l)) * Float64(D_m * Float64(M_m / d))), Float64(D_m * -0.5), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
                        	else
                        		tmp = Float64(Float64(Float64(sqrt((l ^ -1.0)) * d) * fma(Float64(-0.125 / Float64(l * d)), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d)), 1.0)) / sqrt(h));
                        	end
                        	return tmp
                        end
                        
                        D_m = N[Abs[D], $MachinePrecision]
                        M_m = N[Abs[M], $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, -2.9e+129], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.8e-152], N[(N[(N[(N[(N[(N[(N[(h * 0.25), $MachinePrecision] / d), $MachinePrecision] * N[(M$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[Power[l, -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision] * N[(N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        D_m = \left|D\right|
                        \\
                        M_m = \left|M\right|
                        \\
                        [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\
                        \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                        
                        \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\
                        \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M\_m}{\ell}\right) \cdot \left(D\_m \cdot \frac{M\_m}{d}\right), D\_m \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if l < -2.90000000000000003e129

                          1. Initial program 35.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. lift-pow.f64N/A

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

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

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

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

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

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            7. div-invN/A

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

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

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

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

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

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            13. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                            5. mul-1-negN/A

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                            6. lower-neg.f64N/A

                              \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                            7. lower-sqrt.f64N/A

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

                              \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                            9. *-commutativeN/A

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

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

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

                          if -2.90000000000000003e129 < l < 2.79999999999999984e-152

                          1. Initial program 85.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. Step-by-step derivation
                            1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            10. lower-*.f6484.4

                              \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            11. lift-*.f64N/A

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

                              \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            13. lower-*.f6484.4

                              \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            14. lift-*.f64N/A

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

                              \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            16. lower-*.f6484.4

                              \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                          7. Applied rewrites84.4%

                            \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                          8. Step-by-step derivation
                            1. lift-fma.f64N/A

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

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

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

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

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

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

                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \frac{M}{d}, D \cdot \frac{-1}{2}, 1\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                          9. Applied rewrites82.1%

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

                          if 2.79999999999999984e-152 < l

                          1. Initial program 63.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 d around inf

                            \[\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 \color{blue}{1} \]
                          4. Step-by-step derivation
                            1. Applied rewrites40.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 \color{blue}{1} \]
                            2. Applied rewrites46.0%

                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                            3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\left(\sqrt{\color{blue}{\frac{1}{\ell}}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                            8. Applied rewrites70.4%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+129}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{h \cdot 0.25}{d} \cdot \frac{M}{\ell}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot -0.5, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 7: 70.1% accurate, 2.0× speedup?

                          \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \frac{M\_m}{d} \cdot D\_m\\ \mathbf{if}\;\ell \leq -1.15 \cdot 10^{+145}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                          D_m = (fabs.f64 D)
                          M_m = (fabs.f64 M)
                          NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                          (FPCore (d h l M_m D_m)
                           :precision binary64
                           (let* ((t_0 (* (/ M_m d) D_m)))
                             (if (<= l -1.15e+145)
                               (* (- d) (sqrt (pow (* l h) -1.0)))
                               (if (<= l 2.8e-152)
                                 (*
                                  (* (fma -0.5 (* (* (* 0.25 (/ h l)) t_0) t_0) 1.0) (sqrt (/ d h)))
                                  (sqrt (/ d l)))
                                 (/
                                  (*
                                   (* (sqrt (pow l -1.0)) d)
                                   (fma (/ -0.125 (* l d)) (* (* (* (* M_m M_m) h) D_m) (/ D_m d)) 1.0))
                                  (sqrt h))))))
                          D_m = fabs(D);
                          M_m = fabs(M);
                          assert(d < h && h < l && l < M_m && M_m < D_m);
                          double code(double d, double h, double l, double M_m, double D_m) {
                          	double t_0 = (M_m / d) * D_m;
                          	double tmp;
                          	if (l <= -1.15e+145) {
                          		tmp = -d * sqrt(pow((l * h), -1.0));
                          	} else if (l <= 2.8e-152) {
                          		tmp = (fma(-0.5, (((0.25 * (h / l)) * t_0) * t_0), 1.0) * sqrt((d / h))) * sqrt((d / l));
                          	} else {
                          		tmp = ((sqrt(pow(l, -1.0)) * d) * fma((-0.125 / (l * d)), ((((M_m * M_m) * h) * D_m) * (D_m / d)), 1.0)) / sqrt(h);
                          	}
                          	return tmp;
                          }
                          
                          D_m = abs(D)
                          M_m = abs(M)
                          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(M_m / d) * D_m)
                          	tmp = 0.0
                          	if (l <= -1.15e+145)
                          		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                          	elseif (l <= 2.8e-152)
                          		tmp = Float64(Float64(fma(-0.5, Float64(Float64(Float64(0.25 * Float64(h / l)) * t_0) * t_0), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
                          	else
                          		tmp = Float64(Float64(Float64(sqrt((l ^ -1.0)) * d) * fma(Float64(-0.125 / Float64(l * d)), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d)), 1.0)) / sqrt(h));
                          	end
                          	return tmp
                          end
                          
                          D_m = N[Abs[D], $MachinePrecision]
                          M_m = N[Abs[M], $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[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]}, If[LessEqual[l, -1.15e+145], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.8e-152], N[(N[(N[(-0.5 * N[(N[(N[(0.25 * N[(h / l), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[Power[l, -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision] * N[(N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          D_m = \left|D\right|
                          \\
                          M_m = \left|M\right|
                          \\
                          [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                          \\
                          \begin{array}{l}
                          t_0 := \frac{M\_m}{d} \cdot D\_m\\
                          \mathbf{if}\;\ell \leq -1.15 \cdot 10^{+145}:\\
                          \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                          
                          \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\
                          \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot t\_0\right) \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if l < -1.15e145

                            1. Initial program 27.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. Step-by-step derivation
                              1. lift-pow.f64N/A

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

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

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

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

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

                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              7. div-invN/A

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

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

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

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

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

                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              13. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                              5. mul-1-negN/A

                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                              6. lower-neg.f64N/A

                                \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                              7. lower-sqrt.f64N/A

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

                                \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                              9. *-commutativeN/A

                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                              10. lower-*.f6461.4

                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                            7. Applied rewrites61.4%

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

                            if -1.15e145 < l < 2.79999999999999984e-152

                            1. Initial program 86.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. Step-by-step derivation
                              1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                              10. lower-*.f6484.9

                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                              11. lift-*.f64N/A

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

                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                              13. lower-*.f6484.9

                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                              14. lift-*.f64N/A

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

                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                              16. lower-*.f6484.9

                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                            7. Applied rewrites84.9%

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

                            if 2.79999999999999984e-152 < l

                            1. Initial program 63.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 d around inf

                              \[\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 \color{blue}{1} \]
                            4. Step-by-step derivation
                              1. Applied rewrites40.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 \color{blue}{1} \]
                              2. Applied rewrites46.0%

                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                              3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\left(\sqrt{\color{blue}{\frac{1}{\ell}}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                              8. Applied rewrites70.4%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.15 \cdot 10^{+145}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-152}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\sqrt{{\ell}^{-1}} \cdot d\right) \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 8: 46.5% accurate, 3.1× speedup?

                            \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\ \;\;\;\;\left(-d\right) \cdot t\_0\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\_0 \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                            D_m = (fabs.f64 D)
                            M_m = (fabs.f64 M)
                            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 (pow (* l h) -1.0))))
                               (if (<= l -3.9e-222)
                                 (* (- d) t_0)
                                 (if (<= l -5e-310) (* t_0 d) (/ d (* (sqrt l) (sqrt h)))))))
                            D_m = fabs(D);
                            M_m = fabs(M);
                            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(pow((l * h), -1.0));
                            	double tmp;
                            	if (l <= -3.9e-222) {
                            		tmp = -d * t_0;
                            	} else if (l <= -5e-310) {
                            		tmp = t_0 * d;
                            	} else {
                            		tmp = d / (sqrt(l) * sqrt(h));
                            	}
                            	return tmp;
                            }
                            
                            D_m = abs(d)
                            M_m = abs(m)
                            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(((l * h) ** (-1.0d0)))
                                if (l <= (-3.9d-222)) then
                                    tmp = -d * t_0
                                else if (l <= (-5d-310)) then
                                    tmp = t_0 * d
                                else
                                    tmp = d / (sqrt(l) * sqrt(h))
                                end if
                                code = tmp
                            end function
                            
                            D_m = Math.abs(D);
                            M_m = Math.abs(M);
                            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(Math.pow((l * h), -1.0));
                            	double tmp;
                            	if (l <= -3.9e-222) {
                            		tmp = -d * t_0;
                            	} else if (l <= -5e-310) {
                            		tmp = t_0 * d;
                            	} else {
                            		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                            	}
                            	return tmp;
                            }
                            
                            D_m = math.fabs(D)
                            M_m = math.fabs(M)
                            [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(math.pow((l * h), -1.0))
                            	tmp = 0
                            	if l <= -3.9e-222:
                            		tmp = -d * t_0
                            	elif l <= -5e-310:
                            		tmp = t_0 * d
                            	else:
                            		tmp = d / (math.sqrt(l) * math.sqrt(h))
                            	return tmp
                            
                            D_m = abs(D)
                            M_m = abs(M)
                            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(l * h) ^ -1.0))
                            	tmp = 0.0
                            	if (l <= -3.9e-222)
                            		tmp = Float64(Float64(-d) * t_0);
                            	elseif (l <= -5e-310)
                            		tmp = Float64(t_0 * d);
                            	else
                            		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                            	end
                            	return tmp
                            end
                            
                            D_m = abs(D);
                            M_m = abs(M);
                            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(((l * h) ^ -1.0));
                            	tmp = 0.0;
                            	if (l <= -3.9e-222)
                            		tmp = -d * t_0;
                            	elseif (l <= -5e-310)
                            		tmp = t_0 * d;
                            	else
                            		tmp = d / (sqrt(l) * sqrt(h));
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            D_m = N[Abs[D], $MachinePrecision]
                            M_m = N[Abs[M], $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[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -3.9e-222], N[((-d) * t$95$0), $MachinePrecision], If[LessEqual[l, -5e-310], N[(t$95$0 * d), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            D_m = \left|D\right|
                            \\
                            M_m = \left|M\right|
                            \\
                            [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                            \\
                            \begin{array}{l}
                            t_0 := \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                            \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\
                            \;\;\;\;\left(-d\right) \cdot t\_0\\
                            
                            \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                            \;\;\;\;t\_0 \cdot d\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if l < -3.9000000000000001e-222

                              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. lift-pow.f64N/A

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

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

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

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

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

                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                7. div-invN/A

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

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

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

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

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

                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                13. neg-mul-1N/A

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

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

                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                16. lower-/.f6478.0

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                5. mul-1-negN/A

                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                6. lower-neg.f64N/A

                                  \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                7. lower-sqrt.f64N/A

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

                                  \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                9. *-commutativeN/A

                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                10. lower-*.f6461.4

                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                              7. Applied rewrites61.4%

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

                              if -3.9000000000000001e-222 < l < -4.999999999999985e-310

                              1. Initial program 80.2%

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

                                \[\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 \color{blue}{1} \]
                              4. Step-by-step derivation
                                1. Applied rewrites16.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 \color{blue}{1} \]
                                2. Taylor expanded in d around -inf

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

                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                  2. mul-1-negN/A

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

                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                  4. unpow2N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                  5. rem-square-sqrtN/A

                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                  6. mul-1-negN/A

                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                  7. remove-double-negN/A

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

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

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

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

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

                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                  13. lower-*.f6433.9

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

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

                                if -4.999999999999985e-310 < l

                                1. Initial program 69.0%

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

                                  \[\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 \color{blue}{1} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites35.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 \color{blue}{1} \]
                                  2. Taylor expanded in d around -inf

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

                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                    2. mul-1-negN/A

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

                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                    4. unpow2N/A

                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                    5. rem-square-sqrtN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                    6. mul-1-negN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                    7. remove-double-negN/A

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

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

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

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

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

                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                    13. lower-*.f6440.5

                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                  4. Applied rewrites40.5%

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                    5. Add Preprocessing

                                    Alternative 9: 59.4% accurate, 3.2× speedup?

                                    \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\\ t_2 := \frac{d}{\sqrt{\ell}}\\ \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(t\_1 \cdot \frac{D\_m}{d}\right)\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{elif}\;d \leq 2.5 \cdot 10^{-116}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right), 1\right)}{\sqrt{h}} \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{t\_1}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_2\\ \end{array} \end{array} \]
                                    D_m = (fabs.f64 D)
                                    M_m = (fabs.f64 M)
                                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                    (FPCore (d h l M_m D_m)
                                     :precision binary64
                                     (let* ((t_0 (sqrt (/ d h)))
                                            (t_1 (* (* (* M_m M_m) h) D_m))
                                            (t_2 (/ d (sqrt l))))
                                       (if (<= d -8.6e+82)
                                         (* (- d) (sqrt (pow (* l h) -1.0)))
                                         (if (<= d -1.75e+33)
                                           (* (* (* (/ -0.125 (* l d)) (* t_1 (/ D_m d))) t_0) (sqrt (/ d l)))
                                           (if (<= d 1.15e-304)
                                             (* (* t_0 (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                             (if (<= d 2.5e-116)
                                               (*
                                                (/
                                                 (fma
                                                  (/ -0.125 (* d l))
                                                  (* (* h (/ (* M_m M_m) d)) (* D_m D_m))
                                                  1.0)
                                                 (sqrt h))
                                                t_2)
                                               (*
                                                (/ (fma (/ (* -0.125 (/ D_m d)) d) (/ t_1 l) 1.0) (sqrt h))
                                                t_2)))))))
                                    D_m = fabs(D);
                                    M_m = fabs(M);
                                    assert(d < h && h < l && l < M_m && M_m < D_m);
                                    double code(double d, double h, double l, double M_m, double D_m) {
                                    	double t_0 = sqrt((d / h));
                                    	double t_1 = ((M_m * M_m) * h) * D_m;
                                    	double t_2 = d / sqrt(l);
                                    	double tmp;
                                    	if (d <= -8.6e+82) {
                                    		tmp = -d * sqrt(pow((l * h), -1.0));
                                    	} else if (d <= -1.75e+33) {
                                    		tmp = (((-0.125 / (l * d)) * (t_1 * (D_m / d))) * t_0) * sqrt((d / l));
                                    	} else if (d <= 1.15e-304) {
                                    		tmp = (t_0 * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                    	} else if (d <= 2.5e-116) {
                                    		tmp = (fma((-0.125 / (d * l)), ((h * ((M_m * M_m) / d)) * (D_m * D_m)), 1.0) / sqrt(h)) * t_2;
                                    	} else {
                                    		tmp = (fma(((-0.125 * (D_m / d)) / d), (t_1 / l), 1.0) / sqrt(h)) * t_2;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    D_m = abs(D)
                                    M_m = abs(M)
                                    d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                    function code(d, h, l, M_m, D_m)
                                    	t_0 = sqrt(Float64(d / h))
                                    	t_1 = Float64(Float64(Float64(M_m * M_m) * h) * D_m)
                                    	t_2 = Float64(d / sqrt(l))
                                    	tmp = 0.0
                                    	if (d <= -8.6e+82)
                                    		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                    	elseif (d <= -1.75e+33)
                                    		tmp = Float64(Float64(Float64(Float64(-0.125 / Float64(l * d)) * Float64(t_1 * Float64(D_m / d))) * t_0) * sqrt(Float64(d / l)));
                                    	elseif (d <= 1.15e-304)
                                    		tmp = Float64(Float64(t_0 * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                    	elseif (d <= 2.5e-116)
                                    		tmp = Float64(Float64(fma(Float64(-0.125 / Float64(d * l)), Float64(Float64(h * Float64(Float64(M_m * M_m) / d)) * Float64(D_m * D_m)), 1.0) / sqrt(h)) * t_2);
                                    	else
                                    		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(t_1 / l), 1.0) / sqrt(h)) * t_2);
                                    	end
                                    	return tmp
                                    end
                                    
                                    D_m = N[Abs[D], $MachinePrecision]
                                    M_m = N[Abs[M], $MachinePrecision]
                                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                    code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.6e+82], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.75e+33], N[(N[(N[(N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(t$95$0 * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, 2.5e-116], N[(N[(N[(N[(-0.125 / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(N[(M$95$m * M$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]
                                    
                                    \begin{array}{l}
                                    D_m = \left|D\right|
                                    \\
                                    M_m = \left|M\right|
                                    \\
                                    [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                    \\
                                    \begin{array}{l}
                                    t_0 := \sqrt{\frac{d}{h}}\\
                                    t_1 := \left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\\
                                    t_2 := \frac{d}{\sqrt{\ell}}\\
                                    \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\
                                    \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                    
                                    \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\
                                    \;\;\;\;\left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(t\_1 \cdot \frac{D\_m}{d}\right)\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                    
                                    \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                                    \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                    
                                    \mathbf{elif}\;d \leq 2.5 \cdot 10^{-116}:\\
                                    \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right), 1\right)}{\sqrt{h}} \cdot t\_2\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{t\_1}{\ell}, 1\right)}{\sqrt{h}} \cdot t\_2\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 5 regimes
                                    2. if d < -8.60000000000000029e82

                                      1. Initial program 64.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. Step-by-step derivation
                                        1. lift-pow.f64N/A

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

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

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

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        7. div-invN/A

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

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

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

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        13. neg-mul-1N/A

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        16. lower-/.f6469.5

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                        5. mul-1-negN/A

                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                        6. lower-neg.f64N/A

                                          \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                        7. lower-sqrt.f64N/A

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

                                          \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                        9. *-commutativeN/A

                                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                        10. lower-*.f6479.6

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

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

                                      if -8.60000000000000029e82 < d < -1.75000000000000005e33

                                      1. Initial program 99.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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -1.75000000000000005e33 < d < 1.15e-304

                                      1. Initial program 74.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. Step-by-step derivation
                                        1. lift-pow.f64N/A

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

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

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

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        7. div-invN/A

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

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

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

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        13. neg-mul-1N/A

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

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

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        16. lower-/.f6481.7

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

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

                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites47.3%

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                        2. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                          2. lift-pow.f64N/A

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

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

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                          5. lift-sqrt.f6447.3

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                        3. Applied rewrites47.3%

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

                                        if 1.15e-304 < d < 2.5000000000000001e-116

                                        1. Initial program 41.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 d around inf

                                          \[\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 \color{blue}{1} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites19.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 \color{blue}{1} \]
                                          2. Applied rewrites16.5%

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

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

                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
                                            3. associate-/l*N/A

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

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

                                              \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                                            6. lower-/.f6416.5

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

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

                                              \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                                            9. sqrt-prodN/A

                                              \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
                                            10. lift-/.f64N/A

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

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

                                              \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
                                            13. rem-square-sqrtN/A

                                              \[\leadsto \frac{1}{\sqrt{h}} \cdot \frac{\color{blue}{d}}{\sqrt{\ell}} \]
                                          4. Applied rewrites23.3%

                                            \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                                          5. Taylor expanded in d around 0

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

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

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

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

                                              \[\leadsto \frac{1 - \frac{1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                            5. cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

                                          if 2.5000000000000001e-116 < d

                                          1. Initial program 76.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 d around inf

                                            \[\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 \color{blue}{1} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites40.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 \color{blue}{1} \]
                                            2. Applied rewrites46.1%

                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                            3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
                                            7. Applied rewrites76.2%

                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                                          5. Recombined 5 regimes into one program.
                                          6. Final simplification67.0%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{elif}\;d \leq 2.5 \cdot 10^{-116}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M \cdot M}{d}\right) \cdot \left(D \cdot D\right), 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
                                          7. Add Preprocessing

                                          Alternative 10: 67.8% accurate, 3.2× speedup?

                                          \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(-0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\_m\right) \cdot \frac{M\_m}{d}\right)\right) \cdot \frac{M\_m}{d}, D\_m, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \end{array} \]
                                          D_m = (fabs.f64 D)
                                          M_m = (fabs.f64 M)
                                          NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                          (FPCore (d h l M_m D_m)
                                           :precision binary64
                                           (if (<= d -1.25e+91)
                                             (* (- d) (sqrt (pow (* l h) -1.0)))
                                             (if (<= d 7e-228)
                                               (*
                                                (*
                                                 (fma (* (* -0.125 (* (* (/ h l) D_m) (/ M_m d))) (/ M_m d)) D_m 1.0)
                                                 (sqrt (/ d h)))
                                                (sqrt (/ d l)))
                                               (*
                                                (/
                                                 (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                                                 (sqrt h))
                                                (/ d (sqrt l))))))
                                          D_m = fabs(D);
                                          M_m = fabs(M);
                                          assert(d < h && h < l && l < M_m && M_m < D_m);
                                          double code(double d, double h, double l, double M_m, double D_m) {
                                          	double tmp;
                                          	if (d <= -1.25e+91) {
                                          		tmp = -d * sqrt(pow((l * h), -1.0));
                                          	} else if (d <= 7e-228) {
                                          		tmp = (fma(((-0.125 * (((h / l) * D_m) * (M_m / d))) * (M_m / d)), D_m, 1.0) * sqrt((d / h))) * sqrt((d / l));
                                          	} else {
                                          		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * (d / sqrt(l));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          D_m = abs(D)
                                          M_m = abs(M)
                                          d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                          function code(d, h, l, M_m, D_m)
                                          	tmp = 0.0
                                          	if (d <= -1.25e+91)
                                          		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                          	elseif (d <= 7e-228)
                                          		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(Float64(Float64(h / l) * D_m) * Float64(M_m / d))) * Float64(M_m / d)), D_m, 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
                                          	else
                                          		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * Float64(d / sqrt(l)));
                                          	end
                                          	return tmp
                                          end
                                          
                                          D_m = N[Abs[D], $MachinePrecision]
                                          M_m = N[Abs[M], $MachinePrecision]
                                          NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                          code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[d, -1.25e+91], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7e-228], N[(N[(N[(N[(N[(-0.125 * N[(N[(N[(h / l), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * D$95$m + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          D_m = \left|D\right|
                                          \\
                                          M_m = \left|M\right|
                                          \\
                                          [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\
                                          \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                          
                                          \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\
                                          \;\;\;\;\left(\mathsf{fma}\left(\left(-0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\_m\right) \cdot \frac{M\_m}{d}\right)\right) \cdot \frac{M\_m}{d}, D\_m, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if d < -1.2500000000000001e91

                                            1. Initial program 62.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. Step-by-step derivation
                                              1. lift-pow.f64N/A

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

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

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

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

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

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              7. div-invN/A

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

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

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

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

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

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              13. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                              5. mul-1-negN/A

                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                              6. lower-neg.f64N/A

                                                \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                              7. lower-sqrt.f64N/A

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

                                                \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                              9. *-commutativeN/A

                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                              10. lower-*.f6478.8

                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                            7. Applied rewrites78.8%

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

                                            if -1.2500000000000001e91 < d < 6.9999999999999995e-228

                                            1. Initial program 76.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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              10. lower-*.f6473.1

                                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              11. lift-*.f64N/A

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

                                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              13. lower-*.f6473.1

                                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              14. lift-*.f64N/A

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

                                                \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              16. lower-*.f6473.1

                                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                            7. Applied rewrites73.1%

                                              \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                            8. Step-by-step derivation
                                              1. lift-fma.f64N/A

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

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

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

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

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

                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{-1}{2} \cdot \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right)\right) \cdot \frac{M}{d}, D, 1\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                            9. Applied rewrites67.7%

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

                                            if 6.9999999999999995e-228 < d

                                            1. Initial program 69.8%

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

                                              \[\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 \color{blue}{1} \]
                                            4. Step-by-step derivation
                                              1. Applied rewrites36.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 \color{blue}{1} \]
                                              2. Applied rewrites41.8%

                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                              3. Taylor expanded in d around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
                                              7. Applied rewrites74.1%

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(-0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\right) \cdot \frac{M}{d}\right)\right) \cdot \frac{M}{d}, D, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
                                            7. Add Preprocessing

                                            Alternative 11: 67.8% accurate, 3.2× speedup?

                                            \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\ \;\;\;\;\left(\mathsf{fma}\left(D\_m \cdot \frac{M\_m}{d}, -0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\_m\right) \cdot \frac{M\_m}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \end{array} \]
                                            D_m = (fabs.f64 D)
                                            M_m = (fabs.f64 M)
                                            NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                            (FPCore (d h l M_m D_m)
                                             :precision binary64
                                             (if (<= d -1.25e+91)
                                               (* (- d) (sqrt (pow (* l h) -1.0)))
                                               (if (<= d 7e-228)
                                                 (*
                                                  (*
                                                   (fma (* D_m (/ M_m d)) (* -0.125 (* (* (/ h l) D_m) (/ M_m d))) 1.0)
                                                   (sqrt (/ d h)))
                                                  (sqrt (/ d l)))
                                                 (*
                                                  (/
                                                   (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                                                   (sqrt h))
                                                  (/ d (sqrt l))))))
                                            D_m = fabs(D);
                                            M_m = fabs(M);
                                            assert(d < h && h < l && l < M_m && M_m < D_m);
                                            double code(double d, double h, double l, double M_m, double D_m) {
                                            	double tmp;
                                            	if (d <= -1.25e+91) {
                                            		tmp = -d * sqrt(pow((l * h), -1.0));
                                            	} else if (d <= 7e-228) {
                                            		tmp = (fma((D_m * (M_m / d)), (-0.125 * (((h / l) * D_m) * (M_m / d))), 1.0) * sqrt((d / h))) * sqrt((d / l));
                                            	} else {
                                            		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * (d / sqrt(l));
                                            	}
                                            	return tmp;
                                            }
                                            
                                            D_m = abs(D)
                                            M_m = abs(M)
                                            d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                            function code(d, h, l, M_m, D_m)
                                            	tmp = 0.0
                                            	if (d <= -1.25e+91)
                                            		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                            	elseif (d <= 7e-228)
                                            		tmp = Float64(Float64(fma(Float64(D_m * Float64(M_m / d)), Float64(-0.125 * Float64(Float64(Float64(h / l) * D_m) * Float64(M_m / d))), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
                                            	else
                                            		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * Float64(d / sqrt(l)));
                                            	end
                                            	return tmp
                                            end
                                            
                                            D_m = N[Abs[D], $MachinePrecision]
                                            M_m = N[Abs[M], $MachinePrecision]
                                            NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                            code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[d, -1.25e+91], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7e-228], N[(N[(N[(N[(D$95$m * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(N[(N[(h / l), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(M$95$m / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            D_m = \left|D\right|
                                            \\
                                            M_m = \left|M\right|
                                            \\
                                            [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\
                                            \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                            
                                            \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\
                                            \;\;\;\;\left(\mathsf{fma}\left(D\_m \cdot \frac{M\_m}{d}, -0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\_m\right) \cdot \frac{M\_m}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if d < -1.2500000000000001e91

                                              1. Initial program 62.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. Step-by-step derivation
                                                1. lift-pow.f64N/A

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

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

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

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

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

                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                7. div-invN/A

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

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

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

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

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

                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                13. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                5. mul-1-negN/A

                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                6. lower-neg.f64N/A

                                                  \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                7. lower-sqrt.f64N/A

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

                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                9. *-commutativeN/A

                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                10. lower-*.f6478.8

                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                              7. Applied rewrites78.8%

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

                                              if -1.2500000000000001e91 < d < 6.9999999999999995e-228

                                              1. Initial program 76.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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                10. lower-*.f6473.1

                                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                11. lift-*.f64N/A

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

                                                  \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                13. lower-*.f6473.1

                                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                14. lift-*.f64N/A

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

                                                  \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                16. lower-*.f6473.1

                                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              7. Applied rewrites73.1%

                                                \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              8. Step-by-step derivation
                                                1. lift-fma.f64N/A

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

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

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

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

                                                  \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M}{d} \cdot D, \frac{-1}{2} \cdot \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right), 1\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                              9. Applied rewrites69.8%

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

                                              if 6.9999999999999995e-228 < d

                                              1. Initial program 69.8%

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

                                                \[\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 \color{blue}{1} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites36.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 \color{blue}{1} \]
                                                2. Applied rewrites41.8%

                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                3. Taylor expanded in d around 0

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

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

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

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

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                  5. associate-*r/N/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                  6. cancel-sign-sub-invN/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                  7. metadata-evalN/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                  9. associate-*r/N/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                  10. *-commutativeN/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                  11. unpow2N/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                  12. associate-*r*N/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                  13. times-fracN/A

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                5. Applied rewrites60.5%

                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                6. Step-by-step derivation
                                                  1. lift-/.f64N/A

                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                  3. associate-/l*N/A

                                                    \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}} \]
                                                  4. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                                                  5. lift-sqrt.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \]
                                                  6. lift-*.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                                                  7. lift-/.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}} \cdot d} \]
                                                  8. associate-*l/N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
                                                7. Applied rewrites74.1%

                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                                              5. Recombined 3 regimes into one program.
                                              6. Final simplification73.5%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-228}:\\ \;\;\;\;\left(\mathsf{fma}\left(D \cdot \frac{M}{d}, -0.125 \cdot \left(\left(\frac{h}{\ell} \cdot D\right) \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
                                              7. Add Preprocessing

                                              Alternative 12: 68.5% accurate, 3.2× speedup?

                                              \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\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 \cdot 10^{+145}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 1.5 \cdot 10^{-308}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \frac{\left(h \cdot 0.25\right) \cdot \left(D\_m \cdot M\_m\right)}{d \cdot \ell} \cdot \left(\frac{M\_m}{d} \cdot D\_m\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \end{array} \]
                                              D_m = (fabs.f64 D)
                                              M_m = (fabs.f64 M)
                                              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 -1e+145)
                                                 (* (- d) (sqrt (pow (* l h) -1.0)))
                                                 (if (<= l 1.5e-308)
                                                   (*
                                                    (*
                                                     (fma
                                                      -0.5
                                                      (* (/ (* (* h 0.25) (* D_m M_m)) (* d l)) (* (/ M_m d) D_m))
                                                      1.0)
                                                     (sqrt (/ d h)))
                                                    (sqrt (/ d l)))
                                                   (*
                                                    (/
                                                     (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                                                     (sqrt h))
                                                    (/ d (sqrt l))))))
                                              D_m = fabs(D);
                                              M_m = fabs(M);
                                              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 <= -1e+145) {
                                              		tmp = -d * sqrt(pow((l * h), -1.0));
                                              	} else if (l <= 1.5e-308) {
                                              		tmp = (fma(-0.5, ((((h * 0.25) * (D_m * M_m)) / (d * l)) * ((M_m / d) * D_m)), 1.0) * sqrt((d / h))) * sqrt((d / l));
                                              	} else {
                                              		tmp = (fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * (d / sqrt(l));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              D_m = abs(D)
                                              M_m = abs(M)
                                              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 <= -1e+145)
                                              		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                              	elseif (l <= 1.5e-308)
                                              		tmp = Float64(Float64(fma(-0.5, Float64(Float64(Float64(Float64(h * 0.25) * Float64(D_m * M_m)) / Float64(d * l)) * Float64(Float64(M_m / d) * D_m)), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
                                              	else
                                              		tmp = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) / sqrt(h)) * Float64(d / sqrt(l)));
                                              	end
                                              	return tmp
                                              end
                                              
                                              D_m = N[Abs[D], $MachinePrecision]
                                              M_m = N[Abs[M], $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, -1e+145], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.5e-308], N[(N[(N[(-0.5 * N[(N[(N[(N[(h * 0.25), $MachinePrecision] * N[(D$95$m * M$95$m), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(M$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              D_m = \left|D\right|
                                              \\
                                              M_m = \left|M\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 \cdot 10^{+145}:\\
                                              \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                              
                                              \mathbf{elif}\;\ell \leq 1.5 \cdot 10^{-308}:\\
                                              \;\;\;\;\left(\mathsf{fma}\left(-0.5, \frac{\left(h \cdot 0.25\right) \cdot \left(D\_m \cdot M\_m\right)}{d \cdot \ell} \cdot \left(\frac{M\_m}{d} \cdot D\_m\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if l < -9.9999999999999999e144

                                                1. Initial program 27.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. Step-by-step derivation
                                                  1. lift-pow.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  3. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. unpow1/2N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. frac-2negN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. div-invN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  8. sqrt-prodN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  9. lower-*.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  10. lower-sqrt.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  11. lower-neg.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  12. lower-sqrt.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  13. neg-mul-1N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  14. associate-/r*N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  15. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  16. lower-/.f6446.8

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                4. Applied rewrites46.8%

                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                5. Taylor expanded in d around inf

                                                  \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                6. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                  2. unpow2N/A

                                                    \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                  3. rem-square-sqrtN/A

                                                    \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                  5. mul-1-negN/A

                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                  6. lower-neg.f64N/A

                                                    \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                  7. lower-sqrt.f64N/A

                                                    \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                  8. lower-/.f64N/A

                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                  9. *-commutativeN/A

                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                  10. lower-*.f6461.4

                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                7. Applied rewrites61.4%

                                                  \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                if -9.9999999999999999e144 < l < 1.4999999999999999e-308

                                                1. Initial program 86.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. Step-by-step derivation
                                                  1. lift-pow.f64N/A

                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  3. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. unpow1/2N/A

                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. lift-/.f64N/A

                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. sqrt-divN/A

                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. lower-/.f64N/A

                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  8. lower-sqrt.f64N/A

                                                    \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  9. lower-sqrt.f640.0

                                                    \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                4. Applied rewrites0.0%

                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                5. Applied rewrites86.9%

                                                  \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}} \]
                                                6. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{h}{\ell} \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{h}{\ell} \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  3. associate-*r*N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  4. lift-pow.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  5. unpow2N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  6. associate-*r*N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  7. lower-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  8. lower-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  9. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  10. lower-*.f6486.9

                                                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  11. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  12. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  13. lower-*.f6486.9

                                                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  14. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  15. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  16. lower-*.f6486.9

                                                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                7. Applied rewrites86.9%

                                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                8. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right)} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  3. lift-/.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \color{blue}{\frac{h}{\ell}}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  4. associate-*r/N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\frac{\frac{1}{4} \cdot h}{\ell}} \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  5. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{\frac{1}{4} \cdot h}{\ell} \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  6. lift-/.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{\frac{1}{4} \cdot h}{\ell} \cdot \left(\color{blue}{\frac{M}{d}} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  7. associate-*l/N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{\frac{1}{4} \cdot h}{\ell} \cdot \color{blue}{\frac{M \cdot D}{d}}\right) \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  8. frac-timesN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{\left(\frac{1}{4} \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot d}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  9. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(\frac{1}{4} \cdot h\right) \cdot \left(M \cdot D\right)}{\color{blue}{\ell \cdot d}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  10. lower-/.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{\left(\frac{1}{4} \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot d}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  11. lower-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\left(\frac{1}{4} \cdot h\right) \cdot \left(M \cdot D\right)}}{\ell \cdot d} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  12. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\left(h \cdot \frac{1}{4}\right)} \cdot \left(M \cdot D\right)}{\ell \cdot d} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  13. lower-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\left(h \cdot \frac{1}{4}\right)} \cdot \left(M \cdot D\right)}{\ell \cdot d} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  14. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(h \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(D \cdot M\right)}}{\ell \cdot d} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  15. lower-*.f6483.9

                                                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \frac{\left(h \cdot 0.25\right) \cdot \color{blue}{\left(D \cdot M\right)}}{\ell \cdot d} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  16. lift-*.f64N/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot M\right)}{\color{blue}{\ell \cdot d}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  17. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot M\right)}{\color{blue}{d \cdot \ell}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  18. lower-*.f6483.9

                                                    \[\leadsto \left(\mathsf{fma}\left(-0.5, \frac{\left(h \cdot 0.25\right) \cdot \left(D \cdot M\right)}{\color{blue}{d \cdot \ell}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                9. Applied rewrites83.9%

                                                  \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\frac{\left(h \cdot 0.25\right) \cdot \left(D \cdot M\right)}{d \cdot \ell}} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]

                                                if 1.4999999999999999e-308 < l

                                                1. Initial program 69.0%

                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in d around inf

                                                  \[\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 \color{blue}{1} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites35.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 \color{blue}{1} \]
                                                  2. Applied rewrites39.5%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                  3. Taylor expanded in d around 0

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                  4. Step-by-step derivation
                                                    1. div-subN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                    2. *-inversesN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                    3. associate-*r/N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                    4. associate-/l/N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                    5. associate-*r/N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                    6. cancel-sign-sub-invN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                    7. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                    8. +-commutativeN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                    9. associate-*r/N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                    10. *-commutativeN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                    11. unpow2N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                    12. associate-*r*N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                    13. times-fracN/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                  5. Applied rewrites57.3%

                                                    \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                  6. Step-by-step derivation
                                                    1. lift-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}} \]
                                                    2. lift-*.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                    3. associate-/l*N/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}} \]
                                                    4. *-commutativeN/A

                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                                                    5. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \]
                                                    6. lift-*.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                                                    7. lift-/.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}} \cdot d} \]
                                                    8. associate-*l/N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \]
                                                  7. Applied rewrites72.3%

                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                                                5. Recombined 3 regimes into one program.
                                                6. Final simplification75.4%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{+145}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;\ell \leq 1.5 \cdot 10^{-308}:\\ \;\;\;\;\left(\mathsf{fma}\left(-0.5, \frac{\left(h \cdot 0.25\right) \cdot \left(D \cdot M\right)}{d \cdot \ell} \cdot \left(\frac{M}{d} \cdot D\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \end{array} \]
                                                7. Add Preprocessing

                                                Alternative 13: 58.5% accurate, 3.2× speedup?

                                                \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \frac{-0.125}{\ell \cdot d}\\ t_2 := \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}\\ \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(t\_1 \cdot t\_2\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(t\_1, t\_2, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                D_m = (fabs.f64 D)
                                                M_m = (fabs.f64 M)
                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                (FPCore (d h l M_m D_m)
                                                 :precision binary64
                                                 (let* ((t_0 (sqrt (/ d h)))
                                                        (t_1 (/ -0.125 (* l d)))
                                                        (t_2 (* (* (* (* M_m M_m) h) D_m) (/ D_m d))))
                                                   (if (<= d -8.6e+82)
                                                     (* (- d) (sqrt (pow (* l h) -1.0)))
                                                     (if (<= d -1.75e+33)
                                                       (* (* (* t_1 t_2) t_0) (sqrt (/ d l)))
                                                       (if (<= d 1.15e-304)
                                                         (* (* t_0 (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                         (/ (* (/ d (sqrt l)) (fma t_1 t_2 1.0)) (sqrt h)))))))
                                                D_m = fabs(D);
                                                M_m = fabs(M);
                                                assert(d < h && h < l && l < M_m && M_m < D_m);
                                                double code(double d, double h, double l, double M_m, double D_m) {
                                                	double t_0 = sqrt((d / h));
                                                	double t_1 = -0.125 / (l * d);
                                                	double t_2 = (((M_m * M_m) * h) * D_m) * (D_m / d);
                                                	double tmp;
                                                	if (d <= -8.6e+82) {
                                                		tmp = -d * sqrt(pow((l * h), -1.0));
                                                	} else if (d <= -1.75e+33) {
                                                		tmp = ((t_1 * t_2) * t_0) * sqrt((d / l));
                                                	} else if (d <= 1.15e-304) {
                                                		tmp = (t_0 * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                	} else {
                                                		tmp = ((d / sqrt(l)) * fma(t_1, t_2, 1.0)) / sqrt(h);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                D_m = abs(D)
                                                M_m = abs(M)
                                                d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                function code(d, h, l, M_m, D_m)
                                                	t_0 = sqrt(Float64(d / h))
                                                	t_1 = Float64(-0.125 / Float64(l * d))
                                                	t_2 = Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d))
                                                	tmp = 0.0
                                                	if (d <= -8.6e+82)
                                                		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                	elseif (d <= -1.75e+33)
                                                		tmp = Float64(Float64(Float64(t_1 * t_2) * t_0) * sqrt(Float64(d / l)));
                                                	elseif (d <= 1.15e-304)
                                                		tmp = Float64(Float64(t_0 * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                	else
                                                		tmp = Float64(Float64(Float64(d / sqrt(l)) * fma(t_1, t_2, 1.0)) / sqrt(h));
                                                	end
                                                	return tmp
                                                end
                                                
                                                D_m = N[Abs[D], $MachinePrecision]
                                                M_m = N[Abs[M], $MachinePrecision]
                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.6e+82], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.75e+33], N[(N[(N[(t$95$1 * t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(t$95$0 * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]
                                                
                                                \begin{array}{l}
                                                D_m = \left|D\right|
                                                \\
                                                M_m = \left|M\right|
                                                \\
                                                [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                \\
                                                \begin{array}{l}
                                                t_0 := \sqrt{\frac{d}{h}}\\
                                                t_1 := \frac{-0.125}{\ell \cdot d}\\
                                                t_2 := \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}\\
                                                \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\
                                                \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                
                                                \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\
                                                \;\;\;\;\left(\left(t\_1 \cdot t\_2\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                                
                                                \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                                                \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(t\_1, t\_2, 1\right)}{\sqrt{h}}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 4 regimes
                                                2. if d < -8.60000000000000029e82

                                                  1. Initial program 64.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. Step-by-step derivation
                                                    1. lift-pow.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. unpow1/2N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    5. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    6. frac-2negN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. div-invN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    8. sqrt-prodN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    9. lower-*.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-neg.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. neg-mul-1N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. associate-/r*N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. lower-/.f6469.5

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. Applied rewrites69.5%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Taylor expanded in d around inf

                                                    \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                  6. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                    2. unpow2N/A

                                                      \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                    3. rem-square-sqrtN/A

                                                      \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                    5. mul-1-negN/A

                                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                    6. lower-neg.f64N/A

                                                      \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                    7. lower-sqrt.f64N/A

                                                      \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                    8. lower-/.f64N/A

                                                      \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                    9. *-commutativeN/A

                                                      \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                    10. lower-*.f6479.6

                                                      \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                  7. Applied rewrites79.6%

                                                    \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                  if -8.60000000000000029e82 < d < -1.75000000000000005e33

                                                  1. Initial program 99.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. lift-pow.f64N/A

                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. unpow1/2N/A

                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    5. lift-/.f64N/A

                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    6. sqrt-divN/A

                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. lower-/.f64N/A

                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    8. lower-sqrt.f64N/A

                                                      \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    9. lower-sqrt.f640.0

                                                      \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. Applied rewrites0.0%

                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Applied rewrites99.7%

                                                    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}} \]
                                                  6. Taylor expanded in d around 0

                                                    \[\leadsto \left(\color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  7. Step-by-step derivation
                                                    1. associate-*r/N/A

                                                      \[\leadsto \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    2. *-commutativeN/A

                                                      \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    3. unpow2N/A

                                                      \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    4. associate-*r*N/A

                                                      \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    5. times-fracN/A

                                                      \[\leadsto \left(\color{blue}{\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    6. lower-*.f64N/A

                                                      \[\leadsto \left(\color{blue}{\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    7. lower-/.f64N/A

                                                      \[\leadsto \left(\left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    8. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\color{blue}{\ell \cdot d}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    9. *-commutativeN/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{\color{blue}{\left({M}^{2} \cdot h\right) \cdot {D}^{2}}}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    10. unpow2N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{\left({M}^{2} \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    11. associate-*r*N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{\color{blue}{\left(\left({M}^{2} \cdot h\right) \cdot D\right) \cdot D}}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    12. associate-/l*N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \color{blue}{\left(\left(\left({M}^{2} \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    13. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \color{blue}{\left(\left(\left({M}^{2} \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    14. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \left(\color{blue}{\left(\left({M}^{2} \cdot h\right) \cdot D\right)} \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    15. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \left(\left(\color{blue}{\left({M}^{2} \cdot h\right)} \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    16. unpow2N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \left(\left(\left(\color{blue}{\left(M \cdot M\right)} \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    17. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \left(\left(\left(\color{blue}{\left(M \cdot M\right)} \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                    18. lower-/.f6483.8

                                                      \[\leadsto \left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \color{blue}{\frac{D}{d}}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                  8. Applied rewrites83.8%

                                                    \[\leadsto \left(\color{blue}{\left(\frac{-0.125}{\ell \cdot d} \cdot \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]

                                                  if -1.75000000000000005e33 < d < 1.15e-304

                                                  1. Initial program 74.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. Step-by-step derivation
                                                    1. lift-pow.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. unpow1/2N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    5. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    6. frac-2negN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. div-invN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    8. sqrt-prodN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    9. lower-*.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-neg.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. neg-mul-1N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. associate-/r*N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. lower-/.f6481.7

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. Applied rewrites81.7%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Taylor expanded in d around inf

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites47.3%

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                    2. Step-by-step derivation
                                                      1. lift-/.f64N/A

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                      2. lift-pow.f64N/A

                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                      3. metadata-evalN/A

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                      4. pow1/2N/A

                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                      5. lift-sqrt.f6447.3

                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                    3. Applied rewrites47.3%

                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                    if 1.15e-304 < d

                                                    1. Initial program 68.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 d around inf

                                                      \[\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 \color{blue}{1} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites35.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 \color{blue}{1} \]
                                                      2. Applied rewrites39.8%

                                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                      3. Taylor expanded in d around 0

                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                      4. Step-by-step derivation
                                                        1. div-subN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                        2. *-inversesN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                        3. associate-*r/N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                        4. associate-/l/N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                        5. associate-*r/N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                        6. cancel-sign-sub-invN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                        7. metadata-evalN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                        8. +-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                        9. associate-*r/N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                        10. *-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                        11. unpow2N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                        12. associate-*r*N/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                        13. times-fracN/A

                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                      5. Applied rewrites57.8%

                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                      6. Step-by-step derivation
                                                        1. lift-sqrt.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        3. lift-/.f64N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell}} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        4. associate-*l/N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        5. sqrt-divN/A

                                                          \[\leadsto \frac{\color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        6. sqrt-prodN/A

                                                          \[\leadsto \frac{\frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        7. rem-square-sqrtN/A

                                                          \[\leadsto \frac{\frac{\color{blue}{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        8. lift-sqrt.f64N/A

                                                          \[\leadsto \frac{\frac{d}{\color{blue}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        9. lift-/.f6471.4

                                                          \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                      7. Applied rewrites71.4%

                                                        \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                    5. Recombined 4 regimes into one program.
                                                    6. Final simplification67.4%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.6 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -1.75 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{\ell \cdot d} \cdot \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                                                    7. Add Preprocessing

                                                    Alternative 14: 58.4% accurate, 3.2× speedup?

                                                    \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -2.3 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -2.5 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right)\right)\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                    D_m = (fabs.f64 D)
                                                    M_m = (fabs.f64 M)
                                                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                    (FPCore (d h l M_m D_m)
                                                     :precision binary64
                                                     (let* ((t_0 (sqrt (/ d h))))
                                                       (if (<= d -2.3e+82)
                                                         (* (- d) (sqrt (pow (* l h) -1.0)))
                                                         (if (<= d -2.5e+33)
                                                           (*
                                                            (* (* (/ -0.125 (* d l)) (* (* h (/ (* M_m M_m) d)) (* D_m D_m))) t_0)
                                                            (sqrt (/ d l)))
                                                           (if (<= d 1.15e-304)
                                                             (* (* t_0 (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                             (/
                                                              (*
                                                               (/ d (sqrt l))
                                                               (fma
                                                                (/ -0.125 (* l d))
                                                                (* (* (* (* M_m M_m) h) D_m) (/ D_m d))
                                                                1.0))
                                                              (sqrt h)))))))
                                                    D_m = fabs(D);
                                                    M_m = fabs(M);
                                                    assert(d < h && h < l && l < M_m && M_m < D_m);
                                                    double code(double d, double h, double l, double M_m, double D_m) {
                                                    	double t_0 = sqrt((d / h));
                                                    	double tmp;
                                                    	if (d <= -2.3e+82) {
                                                    		tmp = -d * sqrt(pow((l * h), -1.0));
                                                    	} else if (d <= -2.5e+33) {
                                                    		tmp = (((-0.125 / (d * l)) * ((h * ((M_m * M_m) / d)) * (D_m * D_m))) * t_0) * sqrt((d / l));
                                                    	} else if (d <= 1.15e-304) {
                                                    		tmp = (t_0 * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                    	} else {
                                                    		tmp = ((d / sqrt(l)) * fma((-0.125 / (l * d)), ((((M_m * M_m) * h) * D_m) * (D_m / d)), 1.0)) / sqrt(h);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    D_m = abs(D)
                                                    M_m = abs(M)
                                                    d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                    function code(d, h, l, M_m, D_m)
                                                    	t_0 = sqrt(Float64(d / h))
                                                    	tmp = 0.0
                                                    	if (d <= -2.3e+82)
                                                    		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                    	elseif (d <= -2.5e+33)
                                                    		tmp = Float64(Float64(Float64(Float64(-0.125 / Float64(d * l)) * Float64(Float64(h * Float64(Float64(M_m * M_m) / d)) * Float64(D_m * D_m))) * t_0) * sqrt(Float64(d / l)));
                                                    	elseif (d <= 1.15e-304)
                                                    		tmp = Float64(Float64(t_0 * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                    	else
                                                    		tmp = Float64(Float64(Float64(d / sqrt(l)) * fma(Float64(-0.125 / Float64(l * d)), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d)), 1.0)) / sqrt(h));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    D_m = N[Abs[D], $MachinePrecision]
                                                    M_m = N[Abs[M], $MachinePrecision]
                                                    NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                    code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.3e+82], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.5e+33], N[(N[(N[(N[(-0.125 / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(N[(M$95$m * M$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(t$95$0 * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]
                                                    
                                                    \begin{array}{l}
                                                    D_m = \left|D\right|
                                                    \\
                                                    M_m = \left|M\right|
                                                    \\
                                                    [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                    \\
                                                    \begin{array}{l}
                                                    t_0 := \sqrt{\frac{d}{h}}\\
                                                    \mathbf{if}\;d \leq -2.3 \cdot 10^{+82}:\\
                                                    \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                    
                                                    \mathbf{elif}\;d \leq -2.5 \cdot 10^{+33}:\\
                                                    \;\;\;\;\left(\left(\frac{-0.125}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right)\right)\right) \cdot t\_0\right) \cdot \sqrt{\frac{d}{\ell}}\\
                                                    
                                                    \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                                                    \;\;\;\;\left(t\_0 \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 4 regimes
                                                    2. if d < -2.29999999999999988e82

                                                      1. Initial program 64.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. Step-by-step derivation
                                                        1. lift-pow.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        3. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        4. unpow1/2N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        5. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        6. frac-2negN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        7. div-invN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        8. sqrt-prodN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        9. lower-*.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        10. lower-sqrt.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        11. lower-neg.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        12. lower-sqrt.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        13. neg-mul-1N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        14. associate-/r*N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        15. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        16. lower-/.f6469.5

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      4. Applied rewrites69.5%

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      5. Taylor expanded in d around inf

                                                        \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                      6. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                        2. unpow2N/A

                                                          \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                        3. rem-square-sqrtN/A

                                                          \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                        5. mul-1-negN/A

                                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                        6. lower-neg.f64N/A

                                                          \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                        7. lower-sqrt.f64N/A

                                                          \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                        8. lower-/.f64N/A

                                                          \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                        9. *-commutativeN/A

                                                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                        10. lower-*.f6479.6

                                                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                      7. Applied rewrites79.6%

                                                        \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                      if -2.29999999999999988e82 < d < -2.49999999999999986e33

                                                      1. Initial program 99.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. lift-pow.f64N/A

                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        3. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        4. unpow1/2N/A

                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        5. lift-/.f64N/A

                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        6. sqrt-divN/A

                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        7. lower-/.f64N/A

                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        8. lower-sqrt.f64N/A

                                                          \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        9. lower-sqrt.f640.0

                                                          \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      4. Applied rewrites0.0%

                                                        \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      5. Applied rewrites99.7%

                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot \left(0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}} \]
                                                      6. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{h}{\ell} \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \frac{h}{\ell} \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        3. associate-*r*N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        4. lift-pow.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        5. unpow2N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        6. associate-*r*N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        7. lower-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        8. lower-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        9. *-commutativeN/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\color{blue}{\left(\frac{1}{4} \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        10. lower-*.f6499.7

                                                          \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\color{blue}{\left(0.25 \cdot \frac{h}{\ell}\right)} \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        11. lift-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        12. *-commutativeN/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        13. lower-*.f6499.7

                                                          \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}\right) \cdot \left(D \cdot \frac{M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        14. lift-*.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        15. *-commutativeN/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\frac{-1}{2}, \left(\left(\frac{1}{4} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        16. lower-*.f6499.7

                                                          \[\leadsto \left(\mathsf{fma}\left(-0.5, \left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                      7. Applied rewrites99.7%

                                                        \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\left(\left(0.25 \cdot \frac{h}{\ell}\right) \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{M}{d} \cdot D\right)}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                      8. Taylor expanded in d around 0

                                                        \[\leadsto \left(\color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                      9. Step-by-step derivation
                                                        1. associate-*r/N/A

                                                          \[\leadsto \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        2. *-commutativeN/A

                                                          \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        3. unpow2N/A

                                                          \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        4. associate-*r*N/A

                                                          \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(d \cdot \ell\right)} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        6. times-fracN/A

                                                          \[\leadsto \left(\color{blue}{\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        7. lower-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        8. lower-/.f64N/A

                                                          \[\leadsto \left(\left(\color{blue}{\frac{\frac{-1}{8}}{d \cdot \ell}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        9. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{\color{blue}{d \cdot \ell}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        10. associate-/l*N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{d}\right)}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        11. *-commutativeN/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{d} \cdot {D}^{2}\right)}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        12. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{d} \cdot {D}^{2}\right)}\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        13. *-commutativeN/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\frac{\color{blue}{h \cdot {M}^{2}}}{d} \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        14. associate-/l*N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\color{blue}{\left(h \cdot \frac{{M}^{2}}{d}\right)} \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        15. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\color{blue}{\left(h \cdot \frac{{M}^{2}}{d}\right)} \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        16. lower-/.f64N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\left(h \cdot \color{blue}{\frac{{M}^{2}}{d}}\right) \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        17. unpow2N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{\color{blue}{M \cdot M}}{d}\right) \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        18. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{\color{blue}{M \cdot M}}{d}\right) \cdot {D}^{2}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        19. unpow2N/A

                                                          \[\leadsto \left(\left(\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M \cdot M}{d}\right) \cdot \color{blue}{\left(D \cdot D\right)}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                        20. lower-*.f6475.6

                                                          \[\leadsto \left(\left(\frac{-0.125}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M \cdot M}{d}\right) \cdot \color{blue}{\left(D \cdot D\right)}\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]
                                                      10. Applied rewrites75.6%

                                                        \[\leadsto \left(\color{blue}{\left(\frac{-0.125}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M \cdot M}{d}\right) \cdot \left(D \cdot D\right)\right)\right)} \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}} \]

                                                      if -2.49999999999999986e33 < d < 1.15e-304

                                                      1. Initial program 74.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. Step-by-step derivation
                                                        1. lift-pow.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        3. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        4. unpow1/2N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        5. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        6. frac-2negN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        7. div-invN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        8. sqrt-prodN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        9. lower-*.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        10. lower-sqrt.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        11. lower-neg.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        12. lower-sqrt.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        13. neg-mul-1N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        14. associate-/r*N/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        15. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        16. lower-/.f6481.7

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      4. Applied rewrites81.7%

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      5. Taylor expanded in d around inf

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites47.3%

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                        2. Step-by-step derivation
                                                          1. lift-/.f64N/A

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                          2. lift-pow.f64N/A

                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                          3. metadata-evalN/A

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                          4. pow1/2N/A

                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                          5. lift-sqrt.f6447.3

                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                        3. Applied rewrites47.3%

                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                        if 1.15e-304 < d

                                                        1. Initial program 68.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 d around inf

                                                          \[\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 \color{blue}{1} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites35.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 \color{blue}{1} \]
                                                          2. Applied rewrites39.8%

                                                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                          3. Taylor expanded in d around 0

                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                          4. Step-by-step derivation
                                                            1. div-subN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                            2. *-inversesN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                            3. associate-*r/N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                            4. associate-/l/N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                            5. associate-*r/N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                            6. cancel-sign-sub-invN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                            7. metadata-evalN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                            8. +-commutativeN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                            9. associate-*r/N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                            10. *-commutativeN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                            11. unpow2N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                            12. associate-*r*N/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                            13. times-fracN/A

                                                              \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                          5. Applied rewrites57.8%

                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                          6. Step-by-step derivation
                                                            1. lift-sqrt.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            2. lift-*.f64N/A

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            3. lift-/.f64N/A

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell}} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            4. associate-*l/N/A

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            5. sqrt-divN/A

                                                              \[\leadsto \frac{\color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            6. sqrt-prodN/A

                                                              \[\leadsto \frac{\frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            7. rem-square-sqrtN/A

                                                              \[\leadsto \frac{\frac{\color{blue}{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            8. lift-sqrt.f64N/A

                                                              \[\leadsto \frac{\frac{d}{\color{blue}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            9. lift-/.f6471.4

                                                              \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                          7. Applied rewrites71.4%

                                                            \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                        5. Recombined 4 regimes into one program.
                                                        6. Final simplification67.0%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.3 \cdot 10^{+82}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -2.5 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(\frac{-0.125}{d \cdot \ell} \cdot \left(\left(h \cdot \frac{M \cdot M}{d}\right) \cdot \left(D \cdot D\right)\right)\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                                                        7. Add Preprocessing

                                                        Alternative 15: 59.2% accurate, 3.2× speedup?

                                                        \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\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^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                        D_m = (fabs.f64 D)
                                                        M_m = (fabs.f64 M)
                                                        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+31)
                                                           (* (- d) (sqrt (pow (* l h) -1.0)))
                                                           (if (<= d 1.15e-304)
                                                             (* (* (sqrt (/ d h)) (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                             (/
                                                              (*
                                                               (/ d (sqrt l))
                                                               (fma (/ -0.125 (* l d)) (* (* (* (* M_m M_m) h) D_m) (/ D_m d)) 1.0))
                                                              (sqrt h)))))
                                                        D_m = fabs(D);
                                                        M_m = fabs(M);
                                                        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+31) {
                                                        		tmp = -d * sqrt(pow((l * h), -1.0));
                                                        	} else if (d <= 1.15e-304) {
                                                        		tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                        	} else {
                                                        		tmp = ((d / sqrt(l)) * fma((-0.125 / (l * d)), ((((M_m * M_m) * h) * D_m) * (D_m / d)), 1.0)) / sqrt(h);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        D_m = abs(D)
                                                        M_m = abs(M)
                                                        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+31)
                                                        		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                        	elseif (d <= 1.15e-304)
                                                        		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                        	else
                                                        		tmp = Float64(Float64(Float64(d / sqrt(l)) * fma(Float64(-0.125 / Float64(l * d)), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) * Float64(D_m / d)), 1.0)) / sqrt(h));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        D_m = N[Abs[D], $MachinePrecision]
                                                        M_m = N[Abs[M], $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+31], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        D_m = \left|D\right|
                                                        \\
                                                        M_m = \left|M\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^{+31}:\\
                                                        \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                        
                                                        \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                                                        \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m\right) \cdot \frac{D\_m}{d}, 1\right)}{\sqrt{h}}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if d < -5.00000000000000027e31

                                                          1. Initial program 70.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. lift-pow.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            2. lift-/.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            3. metadata-evalN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            4. unpow1/2N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            5. lift-/.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            6. frac-2negN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            7. div-invN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            8. sqrt-prodN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            9. lower-*.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            10. lower-sqrt.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            11. lower-neg.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            12. lower-sqrt.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            13. neg-mul-1N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            14. associate-/r*N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            15. metadata-evalN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            16. lower-/.f6474.4

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          4. Applied rewrites74.4%

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          5. Taylor expanded in d around inf

                                                            \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                          6. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                            2. unpow2N/A

                                                              \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                            3. rem-square-sqrtN/A

                                                              \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                            4. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                            5. mul-1-negN/A

                                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                            6. lower-neg.f64N/A

                                                              \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                            7. lower-sqrt.f64N/A

                                                              \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                            8. lower-/.f64N/A

                                                              \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                            9. *-commutativeN/A

                                                              \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                            10. lower-*.f6465.6

                                                              \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                          7. Applied rewrites65.6%

                                                            \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                          if -5.00000000000000027e31 < d < 1.15e-304

                                                          1. Initial program 75.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. lift-pow.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            2. lift-/.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            3. metadata-evalN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            4. unpow1/2N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            5. lift-/.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            6. frac-2negN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            7. div-invN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            8. sqrt-prodN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            9. lower-*.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            10. lower-sqrt.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            11. lower-neg.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            12. lower-sqrt.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            13. neg-mul-1N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            14. associate-/r*N/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            15. metadata-evalN/A

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            16. lower-/.f6482.7

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          4. Applied rewrites82.7%

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          5. Taylor expanded in d around inf

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                          6. Step-by-step derivation
                                                            1. Applied rewrites47.3%

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                            2. Step-by-step derivation
                                                              1. lift-/.f64N/A

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                              2. lift-pow.f64N/A

                                                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                              3. metadata-evalN/A

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                              4. pow1/2N/A

                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                              5. lift-sqrt.f6447.3

                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                            3. Applied rewrites47.3%

                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                            if 1.15e-304 < d

                                                            1. Initial program 68.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 d around inf

                                                              \[\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 \color{blue}{1} \]
                                                            4. Step-by-step derivation
                                                              1. Applied rewrites35.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 \color{blue}{1} \]
                                                              2. Applied rewrites39.8%

                                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                              3. Taylor expanded in d around 0

                                                                \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                              4. Step-by-step derivation
                                                                1. div-subN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                                2. *-inversesN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                3. associate-*r/N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                4. associate-/l/N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                5. associate-*r/N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                6. cancel-sign-sub-invN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                                7. metadata-evalN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                                8. +-commutativeN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                                9. associate-*r/N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                                10. *-commutativeN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                                11. unpow2N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                                12. associate-*r*N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                                13. times-fracN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                              5. Applied rewrites57.8%

                                                                \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                              6. Step-by-step derivation
                                                                1. lift-sqrt.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                2. lift-*.f64N/A

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                3. lift-/.f64N/A

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{d}{\ell}} \cdot d} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                4. associate-*l/N/A

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{d \cdot d}{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                5. sqrt-divN/A

                                                                  \[\leadsto \frac{\color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                6. sqrt-prodN/A

                                                                  \[\leadsto \frac{\frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                7. rem-square-sqrtN/A

                                                                  \[\leadsto \frac{\frac{\color{blue}{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                8. lift-sqrt.f64N/A

                                                                  \[\leadsto \frac{\frac{d}{\color{blue}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{\frac{-1}{8}}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                                9. lift-/.f6471.4

                                                                  \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                              7. Applied rewrites71.4%

                                                                \[\leadsto \frac{\color{blue}{\frac{d}{\sqrt{\ell}}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}} \]
                                                            5. Recombined 3 regimes into one program.
                                                            6. Final simplification63.9%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}{\sqrt{h}}\\ \end{array} \]
                                                            7. Add Preprocessing

                                                            Alternative 16: 57.0% accurate, 3.2× speedup?

                                                            \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\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^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{elif}\;d \leq 1.34 \cdot 10^{-20}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right), 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                            D_m = (fabs.f64 D)
                                                            M_m = (fabs.f64 M)
                                                            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+31)
                                                               (* (- d) (sqrt (pow (* l h) -1.0)))
                                                               (if (<= d 1.15e-304)
                                                                 (* (* (sqrt (/ d h)) (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                                 (if (<= d 1.34e-20)
                                                                   (*
                                                                    (/
                                                                     (fma (/ -0.125 (* d l)) (* (* h (/ (* M_m M_m) d)) (* D_m D_m)) 1.0)
                                                                     (sqrt h))
                                                                    (/ d (sqrt l)))
                                                                   (*
                                                                    (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                                                                    (/ d (sqrt (* l h))))))))
                                                            D_m = fabs(D);
                                                            M_m = fabs(M);
                                                            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+31) {
                                                            		tmp = -d * sqrt(pow((l * h), -1.0));
                                                            	} else if (d <= 1.15e-304) {
                                                            		tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                            	} else if (d <= 1.34e-20) {
                                                            		tmp = (fma((-0.125 / (d * l)), ((h * ((M_m * M_m) / d)) * (D_m * D_m)), 1.0) / sqrt(h)) * (d / sqrt(l));
                                                            	} else {
                                                            		tmp = fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) * (d / sqrt((l * h)));
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            D_m = abs(D)
                                                            M_m = abs(M)
                                                            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+31)
                                                            		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                            	elseif (d <= 1.15e-304)
                                                            		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                            	elseif (d <= 1.34e-20)
                                                            		tmp = Float64(Float64(fma(Float64(-0.125 / Float64(d * l)), Float64(Float64(h * Float64(Float64(M_m * M_m) / d)) * Float64(D_m * D_m)), 1.0) / sqrt(h)) * Float64(d / sqrt(l)));
                                                            	else
                                                            		tmp = Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            D_m = N[Abs[D], $MachinePrecision]
                                                            M_m = N[Abs[M], $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+31], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.15e-304], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, 1.34e-20], N[(N[(N[(N[(-0.125 / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(N[(M$95$m * M$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(D$95$m * D$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                            
                                                            \begin{array}{l}
                                                            D_m = \left|D\right|
                                                            \\
                                                            M_m = \left|M\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^{+31}:\\
                                                            \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                            
                                                            \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\
                                                            \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                            
                                                            \mathbf{elif}\;d \leq 1.34 \cdot 10^{-20}:\\
                                                            \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M\_m \cdot M\_m}{d}\right) \cdot \left(D\_m \cdot D\_m\right), 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 4 regimes
                                                            2. if d < -5.00000000000000027e31

                                                              1. Initial program 70.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. lift-pow.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. lift-/.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                3. metadata-evalN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                4. unpow1/2N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                5. lift-/.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                6. frac-2negN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                7. div-invN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                8. sqrt-prodN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                9. lower-*.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                10. lower-sqrt.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                11. lower-neg.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                12. lower-sqrt.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                13. neg-mul-1N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                14. associate-/r*N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                15. metadata-evalN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                16. lower-/.f6474.4

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              4. Applied rewrites74.4%

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              5. Taylor expanded in d around inf

                                                                \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                              6. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                2. unpow2N/A

                                                                  \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                3. rem-square-sqrtN/A

                                                                  \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                4. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                5. mul-1-negN/A

                                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                6. lower-neg.f64N/A

                                                                  \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                7. lower-sqrt.f64N/A

                                                                  \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                8. lower-/.f64N/A

                                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                                9. *-commutativeN/A

                                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                10. lower-*.f6465.6

                                                                  \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                              7. Applied rewrites65.6%

                                                                \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                              if -5.00000000000000027e31 < d < 1.15e-304

                                                              1. Initial program 75.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. lift-pow.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. lift-/.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                3. metadata-evalN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                4. unpow1/2N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                5. lift-/.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                6. frac-2negN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                7. div-invN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                8. sqrt-prodN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                9. lower-*.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                10. lower-sqrt.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                11. lower-neg.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                12. lower-sqrt.f64N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                13. neg-mul-1N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                14. associate-/r*N/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                15. metadata-evalN/A

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                16. lower-/.f6482.7

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              4. Applied rewrites82.7%

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              5. Taylor expanded in d around inf

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                              6. Step-by-step derivation
                                                                1. Applied rewrites47.3%

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                                2. Step-by-step derivation
                                                                  1. lift-/.f64N/A

                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                  2. lift-pow.f64N/A

                                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                  3. metadata-evalN/A

                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                  4. pow1/2N/A

                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                  5. lift-sqrt.f6447.3

                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                3. Applied rewrites47.3%

                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                                if 1.15e-304 < d < 1.3399999999999999e-20

                                                                1. Initial program 59.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 d around inf

                                                                  \[\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 \color{blue}{1} \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites26.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 \color{blue}{1} \]
                                                                  2. Applied rewrites25.7%

                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                                  3. Step-by-step derivation
                                                                    1. lift-/.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                                    2. lift-*.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}}{\sqrt{h}} \]
                                                                    3. associate-/l*N/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot d} \cdot \frac{1}{\sqrt{h}}} \]
                                                                    4. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                                                                    5. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell} \cdot d}} \]
                                                                    6. lower-/.f6425.7

                                                                      \[\leadsto \color{blue}{\frac{1}{\sqrt{h}}} \cdot \sqrt{\frac{d}{\ell} \cdot d} \]
                                                                    7. lift-sqrt.f64N/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot d}} \]
                                                                    8. lift-*.f64N/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell} \cdot d}} \]
                                                                    9. sqrt-prodN/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{d}\right)} \]
                                                                    10. lift-/.f64N/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{d}\right) \]
                                                                    11. sqrt-divN/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}} \cdot \sqrt{d}\right) \]
                                                                    12. associate-*l/N/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell}}} \]
                                                                    13. rem-square-sqrtN/A

                                                                      \[\leadsto \frac{1}{\sqrt{h}} \cdot \frac{\color{blue}{d}}{\sqrt{\ell}} \]
                                                                  4. Applied rewrites29.6%

                                                                    \[\leadsto \color{blue}{\frac{1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}} \]
                                                                  5. Taylor expanded in d around 0

                                                                    \[\leadsto \frac{\color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                  6. Step-by-step derivation
                                                                    1. div-subN/A

                                                                      \[\leadsto \frac{\color{blue}{\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    2. *-inversesN/A

                                                                      \[\leadsto \frac{\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    3. associate-/l*N/A

                                                                      \[\leadsto \frac{1 - \color{blue}{\frac{1}{8} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    4. associate-/l/N/A

                                                                      \[\leadsto \frac{1 - \frac{1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    5. cancel-sign-sub-invN/A

                                                                      \[\leadsto \frac{\color{blue}{1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    6. metadata-evalN/A

                                                                      \[\leadsto \frac{1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    7. +-commutativeN/A

                                                                      \[\leadsto \frac{\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    8. associate-*r/N/A

                                                                      \[\leadsto \frac{\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    9. *-commutativeN/A

                                                                      \[\leadsto \frac{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    10. unpow2N/A

                                                                      \[\leadsto \frac{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    11. associate-*r*N/A

                                                                      \[\leadsto \frac{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    12. *-commutativeN/A

                                                                      \[\leadsto \frac{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(d \cdot \ell\right)} \cdot d} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                    13. times-fracN/A

                                                                      \[\leadsto \frac{\color{blue}{\frac{\frac{-1}{8}}{d \cdot \ell} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]
                                                                  7. Applied rewrites57.1%

                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M \cdot M}{d}\right) \cdot \left(D \cdot D\right), 1\right)}}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}} \]

                                                                  if 1.3399999999999999e-20 < d

                                                                  1. Initial program 77.0%

                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in d around inf

                                                                    \[\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 \color{blue}{1} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites43.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 \color{blue}{1} \]
                                                                    2. Applied rewrites52.0%

                                                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                                    3. Taylor expanded in d around 0

                                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                                    4. Step-by-step derivation
                                                                      1. div-subN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                                      2. *-inversesN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                      3. associate-*r/N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                      4. associate-/l/N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                      5. associate-*r/N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                      6. cancel-sign-sub-invN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                                      7. metadata-evalN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                                      8. +-commutativeN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                                      9. associate-*r/N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                                      10. *-commutativeN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                                      11. unpow2N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                                      12. associate-*r*N/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                                      13. times-fracN/A

                                                                        \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                                    5. Applied rewrites67.0%

                                                                      \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                                    6. Applied rewrites69.5%

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                  5. Recombined 4 regimes into one program.
                                                                  6. Final simplification60.1%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq 1.15 \cdot 10^{-304}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{elif}\;d \leq 1.34 \cdot 10^{-20}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-0.125}{d \cdot \ell}, \left(h \cdot \frac{M \cdot M}{d}\right) \cdot \left(D \cdot D\right), 1\right)}{\sqrt{h}} \cdot \frac{d}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                  7. Add Preprocessing

                                                                  Alternative 17: 54.2% accurate, 3.2× speedup?

                                                                  \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\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^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                  D_m = (fabs.f64 D)
                                                                  M_m = (fabs.f64 M)
                                                                  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+31)
                                                                     (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                     (if (<= d -5e-310)
                                                                       (* (* (sqrt (/ d h)) (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                                       (*
                                                                        (fma (/ (* -0.125 (/ D_m d)) d) (/ (* (* (* M_m M_m) h) D_m) l) 1.0)
                                                                        (/ d (sqrt (* l h)))))))
                                                                  D_m = fabs(D);
                                                                  M_m = fabs(M);
                                                                  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+31) {
                                                                  		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                  	} else if (d <= -5e-310) {
                                                                  		tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                                  	} else {
                                                                  		tmp = fma(((-0.125 * (D_m / d)) / d), ((((M_m * M_m) * h) * D_m) / l), 1.0) * (d / sqrt((l * h)));
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  D_m = abs(D)
                                                                  M_m = abs(M)
                                                                  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+31)
                                                                  		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                  	elseif (d <= -5e-310)
                                                                  		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                                  	else
                                                                  		tmp = Float64(fma(Float64(Float64(-0.125 * Float64(D_m / d)) / d), Float64(Float64(Float64(Float64(M_m * M_m) * h) * D_m) / l), 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  D_m = N[Abs[D], $MachinePrecision]
                                                                  M_m = N[Abs[M], $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+31], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(N[(-0.125 * N[(D$95$m / d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(M$95$m * M$95$m), $MachinePrecision] * h), $MachinePrecision] * D$95$m), $MachinePrecision] / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  D_m = \left|D\right|
                                                                  \\
                                                                  M_m = \left|M\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^{+31}:\\
                                                                  \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                  
                                                                  \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
                                                                  \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D\_m}{d}}{d}, \frac{\left(\left(M\_m \cdot M\_m\right) \cdot h\right) \cdot D\_m}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if d < -5.00000000000000027e31

                                                                    1. Initial program 70.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. lift-pow.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. lift-/.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      3. metadata-evalN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      4. unpow1/2N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      5. lift-/.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      6. frac-2negN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      7. div-invN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      8. sqrt-prodN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      9. lower-*.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      10. lower-sqrt.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      11. lower-neg.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      12. lower-sqrt.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      13. neg-mul-1N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      14. associate-/r*N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      15. metadata-evalN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      16. lower-/.f6474.4

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    4. Applied rewrites74.4%

                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    5. Taylor expanded in d around inf

                                                                      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                    6. Step-by-step derivation
                                                                      1. *-commutativeN/A

                                                                        \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                      2. unpow2N/A

                                                                        \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                      3. rem-square-sqrtN/A

                                                                        \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                      4. lower-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      5. mul-1-negN/A

                                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                      6. lower-neg.f64N/A

                                                                        \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                      7. lower-sqrt.f64N/A

                                                                        \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      8. lower-/.f64N/A

                                                                        \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                                      9. *-commutativeN/A

                                                                        \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                      10. lower-*.f6465.6

                                                                        \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                    7. Applied rewrites65.6%

                                                                      \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                    if -5.00000000000000027e31 < d < -4.999999999999985e-310

                                                                    1. Initial program 74.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. Step-by-step derivation
                                                                      1. lift-pow.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. lift-/.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      3. metadata-evalN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      4. unpow1/2N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      5. lift-/.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      6. frac-2negN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      7. div-invN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      8. sqrt-prodN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      9. lower-*.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      10. lower-sqrt.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      11. lower-neg.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      12. lower-sqrt.f64N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      13. neg-mul-1N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      14. associate-/r*N/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      15. metadata-evalN/A

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      16. lower-/.f6484.1

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    4. Applied rewrites84.1%

                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    5. Taylor expanded in d around inf

                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites48.0%

                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                                      2. Step-by-step derivation
                                                                        1. lift-/.f64N/A

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                        2. lift-pow.f64N/A

                                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                        3. metadata-evalN/A

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                        4. pow1/2N/A

                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                        5. lift-sqrt.f6448.0

                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                      3. Applied rewrites48.0%

                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                                      if -4.999999999999985e-310 < d

                                                                      1. Initial program 69.0%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in d around inf

                                                                        \[\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 \color{blue}{1} \]
                                                                      4. Step-by-step derivation
                                                                        1. Applied rewrites35.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 \color{blue}{1} \]
                                                                        2. Applied rewrites39.5%

                                                                          \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot 1}{\sqrt{h}}} \]
                                                                        3. Taylor expanded in d around 0

                                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}}}{\sqrt{h}} \]
                                                                        4. Step-by-step derivation
                                                                          1. div-subN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{{d}^{2}}{{d}^{2}} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}}{\sqrt{h}} \]
                                                                          2. *-inversesN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{1} - \frac{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                          3. associate-*r/N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \frac{\color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell}}}{{d}^{2}}\right)}{\sqrt{h}} \]
                                                                          4. associate-/l/N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{\frac{1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                          5. associate-*r/N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 - \color{blue}{\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}}\right)}{\sqrt{h}} \]
                                                                          6. cancel-sign-sub-invN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}}{\sqrt{h}} \]
                                                                          7. metadata-evalN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(1 + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}{\sqrt{h}} \]
                                                                          8. +-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} + 1\right)}}{\sqrt{h}} \]
                                                                          9. associate-*r/N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}} + 1\right)}{\sqrt{h}} \]
                                                                          10. *-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\ell \cdot {d}^{2}}} + 1\right)}{\sqrt{h}} \]
                                                                          11. unpow2N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\ell \cdot \color{blue}{\left(d \cdot d\right)}} + 1\right)}{\sqrt{h}} \]
                                                                          12. associate-*r*N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{\left(\ell \cdot d\right) \cdot d}} + 1\right)}{\sqrt{h}} \]
                                                                          13. times-fracN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \left(\color{blue}{\frac{\frac{-1}{8}}{\ell \cdot d} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}} + 1\right)}{\sqrt{h}} \]
                                                                        5. Applied rewrites57.3%

                                                                          \[\leadsto \frac{\sqrt{\frac{d}{\ell} \cdot d} \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.125}{\ell \cdot d}, \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot D\right) \cdot \frac{D}{d}, 1\right)}}{\sqrt{h}} \]
                                                                        6. Applied rewrites63.9%

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                      5. Recombined 3 regimes into one program.
                                                                      6. Final simplification60.4%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.125 \cdot \frac{D}{d}}{d}, \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot D}{\ell}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                      7. Add Preprocessing

                                                                      Alternative 18: 47.9% accurate, 3.2× speedup?

                                                                      \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\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^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                      D_m = (fabs.f64 D)
                                                                      M_m = (fabs.f64 M)
                                                                      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+31)
                                                                         (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                         (if (<= d -5e-310)
                                                                           (* (* (sqrt (/ d h)) (* (sqrt (- d)) (sqrt (/ -1.0 l)))) 1.0)
                                                                           (/ d (* (sqrt l) (sqrt h))))))
                                                                      D_m = fabs(D);
                                                                      M_m = fabs(M);
                                                                      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+31) {
                                                                      		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                      	} else if (d <= -5e-310) {
                                                                      		tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                                      	} else {
                                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      D_m = abs(d)
                                                                      M_m = abs(m)
                                                                      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+31)) then
                                                                              tmp = -d * sqrt(((l * h) ** (-1.0d0)))
                                                                          else if (d <= (-5d-310)) then
                                                                              tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt(((-1.0d0) / l)))) * 1.0d0
                                                                          else
                                                                              tmp = d / (sqrt(l) * sqrt(h))
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      D_m = Math.abs(D);
                                                                      M_m = Math.abs(M);
                                                                      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+31) {
                                                                      		tmp = -d * Math.sqrt(Math.pow((l * h), -1.0));
                                                                      	} else if (d <= -5e-310) {
                                                                      		tmp = (Math.sqrt((d / h)) * (Math.sqrt(-d) * Math.sqrt((-1.0 / l)))) * 1.0;
                                                                      	} else {
                                                                      		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      D_m = math.fabs(D)
                                                                      M_m = math.fabs(M)
                                                                      [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+31:
                                                                      		tmp = -d * math.sqrt(math.pow((l * h), -1.0))
                                                                      	elif d <= -5e-310:
                                                                      		tmp = (math.sqrt((d / h)) * (math.sqrt(-d) * math.sqrt((-1.0 / l)))) * 1.0
                                                                      	else:
                                                                      		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                      	return tmp
                                                                      
                                                                      D_m = abs(D)
                                                                      M_m = abs(M)
                                                                      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+31)
                                                                      		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                      	elseif (d <= -5e-310)
                                                                      		tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * 1.0);
                                                                      	else
                                                                      		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      D_m = abs(D);
                                                                      M_m = abs(M);
                                                                      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+31)
                                                                      		tmp = -d * sqrt(((l * h) ^ -1.0));
                                                                      	elseif (d <= -5e-310)
                                                                      		tmp = (sqrt((d / h)) * (sqrt(-d) * sqrt((-1.0 / l)))) * 1.0;
                                                                      	else
                                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      D_m = N[Abs[D], $MachinePrecision]
                                                                      M_m = N[Abs[M], $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+31], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      D_m = \left|D\right|
                                                                      \\
                                                                      M_m = \left|M\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^{+31}:\\
                                                                      \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                      
                                                                      \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
                                                                      \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 3 regimes
                                                                      2. if d < -5.00000000000000027e31

                                                                        1. Initial program 70.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. lift-pow.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          2. lift-/.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          3. metadata-evalN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          4. unpow1/2N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          5. lift-/.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          6. frac-2negN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          7. div-invN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          8. sqrt-prodN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          9. lower-*.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          10. lower-sqrt.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          11. lower-neg.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          12. lower-sqrt.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          13. neg-mul-1N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          14. associate-/r*N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          15. metadata-evalN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          16. lower-/.f6474.4

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        4. Applied rewrites74.4%

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        5. Taylor expanded in d around inf

                                                                          \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                        6. Step-by-step derivation
                                                                          1. *-commutativeN/A

                                                                            \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                          2. unpow2N/A

                                                                            \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                          3. rem-square-sqrtN/A

                                                                            \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                          5. mul-1-negN/A

                                                                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                          6. lower-neg.f64N/A

                                                                            \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                          7. lower-sqrt.f64N/A

                                                                            \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                          8. lower-/.f64N/A

                                                                            \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                                          9. *-commutativeN/A

                                                                            \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                          10. lower-*.f6465.6

                                                                            \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                        7. Applied rewrites65.6%

                                                                          \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                        if -5.00000000000000027e31 < d < -4.999999999999985e-310

                                                                        1. Initial program 74.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. Step-by-step derivation
                                                                          1. lift-pow.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          2. lift-/.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          3. metadata-evalN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          4. unpow1/2N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          5. lift-/.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          6. frac-2negN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          7. div-invN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          8. sqrt-prodN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          9. lower-*.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          10. lower-sqrt.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          11. lower-neg.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          12. lower-sqrt.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          13. neg-mul-1N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          14. associate-/r*N/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          15. metadata-evalN/A

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          16. lower-/.f6484.1

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        4. Applied rewrites84.1%

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        5. Taylor expanded in d around inf

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites48.0%

                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \color{blue}{1} \]
                                                                          2. Step-by-step derivation
                                                                            1. lift-/.f64N/A

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                            2. lift-pow.f64N/A

                                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                            3. metadata-evalN/A

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                            4. pow1/2N/A

                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                            5. lift-sqrt.f6448.0

                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]
                                                                          3. Applied rewrites48.0%

                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1 \]

                                                                          if -4.999999999999985e-310 < d

                                                                          1. Initial program 69.0%

                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          2. Add Preprocessing
                                                                          3. Taylor expanded in d around inf

                                                                            \[\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 \color{blue}{1} \]
                                                                          4. Step-by-step derivation
                                                                            1. Applied rewrites35.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 \color{blue}{1} \]
                                                                            2. Taylor expanded in d around -inf

                                                                              \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                            3. Step-by-step derivation
                                                                              1. associate-*r*N/A

                                                                                \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                              2. mul-1-negN/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              3. *-commutativeN/A

                                                                                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              4. unpow2N/A

                                                                                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              5. rem-square-sqrtN/A

                                                                                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              6. mul-1-negN/A

                                                                                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              7. remove-double-negN/A

                                                                                \[\leadsto \color{blue}{d} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              8. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                              9. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                              10. lower-sqrt.f64N/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                              11. lower-/.f64N/A

                                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                              12. *-commutativeN/A

                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                              13. lower-*.f6440.5

                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                            4. Applied rewrites40.5%

                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                            5. Step-by-step derivation
                                                                              1. Applied rewrites40.5%

                                                                                \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites46.3%

                                                                                  \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                              3. Recombined 3 regimes into one program.
                                                                              4. Final simplification51.6%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{+31}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                              5. Add Preprocessing

                                                                              Alternative 19: 42.7% accurate, 3.2× speedup?

                                                                              \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\ \;\;\;\;\left(-d\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot d\\ \end{array} \end{array} \]
                                                                              D_m = (fabs.f64 D)
                                                                              M_m = (fabs.f64 M)
                                                                              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 (pow (* l h) -1.0))))
                                                                                 (if (<= l -3.9e-222) (* (- d) t_0) (* t_0 d))))
                                                                              D_m = fabs(D);
                                                                              M_m = fabs(M);
                                                                              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(pow((l * h), -1.0));
                                                                              	double tmp;
                                                                              	if (l <= -3.9e-222) {
                                                                              		tmp = -d * t_0;
                                                                              	} else {
                                                                              		tmp = t_0 * d;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              D_m = abs(d)
                                                                              M_m = abs(m)
                                                                              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(((l * h) ** (-1.0d0)))
                                                                                  if (l <= (-3.9d-222)) then
                                                                                      tmp = -d * t_0
                                                                                  else
                                                                                      tmp = t_0 * d
                                                                                  end if
                                                                                  code = tmp
                                                                              end function
                                                                              
                                                                              D_m = Math.abs(D);
                                                                              M_m = Math.abs(M);
                                                                              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(Math.pow((l * h), -1.0));
                                                                              	double tmp;
                                                                              	if (l <= -3.9e-222) {
                                                                              		tmp = -d * t_0;
                                                                              	} else {
                                                                              		tmp = t_0 * d;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              D_m = math.fabs(D)
                                                                              M_m = math.fabs(M)
                                                                              [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(math.pow((l * h), -1.0))
                                                                              	tmp = 0
                                                                              	if l <= -3.9e-222:
                                                                              		tmp = -d * t_0
                                                                              	else:
                                                                              		tmp = t_0 * d
                                                                              	return tmp
                                                                              
                                                                              D_m = abs(D)
                                                                              M_m = abs(M)
                                                                              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(l * h) ^ -1.0))
                                                                              	tmp = 0.0
                                                                              	if (l <= -3.9e-222)
                                                                              		tmp = Float64(Float64(-d) * t_0);
                                                                              	else
                                                                              		tmp = Float64(t_0 * d);
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              D_m = abs(D);
                                                                              M_m = abs(M);
                                                                              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(((l * h) ^ -1.0));
                                                                              	tmp = 0.0;
                                                                              	if (l <= -3.9e-222)
                                                                              		tmp = -d * t_0;
                                                                              	else
                                                                              		tmp = t_0 * d;
                                                                              	end
                                                                              	tmp_2 = tmp;
                                                                              end
                                                                              
                                                                              D_m = N[Abs[D], $MachinePrecision]
                                                                              M_m = N[Abs[M], $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[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -3.9e-222], N[((-d) * t$95$0), $MachinePrecision], N[(t$95$0 * d), $MachinePrecision]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              D_m = \left|D\right|
                                                                              \\
                                                                              M_m = \left|M\right|
                                                                              \\
                                                                              [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_0 := \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                              \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\
                                                                              \;\;\;\;\left(-d\right) \cdot t\_0\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;t\_0 \cdot d\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if l < -3.9000000000000001e-222

                                                                                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. lift-pow.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  2. lift-/.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  3. metadata-evalN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  4. unpow1/2N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  5. lift-/.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  6. frac-2negN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  7. div-invN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  8. sqrt-prodN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  9. lower-*.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  10. lower-sqrt.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  11. lower-neg.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  12. lower-sqrt.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(\ell\right)}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  13. neg-mul-1N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{1}{\color{blue}{-1 \cdot \ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  14. associate-/r*N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\frac{1}{-1}}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  15. metadata-evalN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{\ell}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  16. lower-/.f6478.0

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{-1}{\ell}}}\right)\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                4. Applied rewrites78.0%

                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                5. Taylor expanded in d around inf

                                                                                  \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                6. Step-by-step derivation
                                                                                  1. *-commutativeN/A

                                                                                    \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                  2. unpow2N/A

                                                                                    \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                  3. rem-square-sqrtN/A

                                                                                    \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                  5. mul-1-negN/A

                                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                  6. lower-neg.f64N/A

                                                                                    \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                  7. lower-sqrt.f64N/A

                                                                                    \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                  8. lower-/.f64N/A

                                                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                                                  9. *-commutativeN/A

                                                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                  10. lower-*.f6461.4

                                                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                7. Applied rewrites61.4%

                                                                                  \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                if -3.9000000000000001e-222 < l

                                                                                1. Initial program 70.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 d around inf

                                                                                  \[\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 \color{blue}{1} \]
                                                                                4. Step-by-step derivation
                                                                                  1. Applied rewrites32.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 \color{blue}{1} \]
                                                                                  2. Taylor expanded in d around -inf

                                                                                    \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. associate-*r*N/A

                                                                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                    2. mul-1-negN/A

                                                                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    4. unpow2N/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    5. rem-square-sqrtN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    6. mul-1-negN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    7. remove-double-negN/A

                                                                                      \[\leadsto \color{blue}{d} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                    9. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                    10. lower-sqrt.f64N/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                    11. lower-/.f64N/A

                                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                    12. *-commutativeN/A

                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                    13. lower-*.f6439.4

                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                  4. Applied rewrites39.4%

                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                5. Recombined 2 regimes into one program.
                                                                                6. Final simplification48.3%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.9 \cdot 10^{-222}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \end{array} \]
                                                                                7. Add Preprocessing

                                                                                Alternative 20: 26.7% accurate, 3.4× speedup?

                                                                                \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d \end{array} \]
                                                                                D_m = (fabs.f64 D)
                                                                                M_m = (fabs.f64 M)
                                                                                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 (* (sqrt (pow (* l h) -1.0)) d))
                                                                                D_m = fabs(D);
                                                                                M_m = fabs(M);
                                                                                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 sqrt(pow((l * h), -1.0)) * d;
                                                                                }
                                                                                
                                                                                D_m = abs(d)
                                                                                M_m = abs(m)
                                                                                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 = sqrt(((l * h) ** (-1.0d0))) * d
                                                                                end function
                                                                                
                                                                                D_m = Math.abs(D);
                                                                                M_m = Math.abs(M);
                                                                                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 Math.sqrt(Math.pow((l * h), -1.0)) * d;
                                                                                }
                                                                                
                                                                                D_m = math.fabs(D)
                                                                                M_m = math.fabs(M)
                                                                                [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 math.sqrt(math.pow((l * h), -1.0)) * d
                                                                                
                                                                                D_m = abs(D)
                                                                                M_m = abs(M)
                                                                                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(sqrt((Float64(l * h) ^ -1.0)) * d)
                                                                                end
                                                                                
                                                                                D_m = abs(D);
                                                                                M_m = abs(M);
                                                                                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 = sqrt(((l * h) ^ -1.0)) * d;
                                                                                end
                                                                                
                                                                                D_m = N[Abs[D], $MachinePrecision]
                                                                                M_m = N[Abs[M], $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[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]
                                                                                
                                                                                \begin{array}{l}
                                                                                D_m = \left|D\right|
                                                                                \\
                                                                                M_m = \left|M\right|
                                                                                \\
                                                                                [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                \\
                                                                                \sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Initial program 70.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. Taylor expanded in d around inf

                                                                                  \[\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 \color{blue}{1} \]
                                                                                4. Step-by-step derivation
                                                                                  1. Applied rewrites39.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 \color{blue}{1} \]
                                                                                  2. Taylor expanded in d around -inf

                                                                                    \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. associate-*r*N/A

                                                                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                    2. mul-1-negN/A

                                                                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    4. unpow2N/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    5. rem-square-sqrtN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    6. mul-1-negN/A

                                                                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    7. remove-double-negN/A

                                                                                      \[\leadsto \color{blue}{d} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                    9. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                    10. lower-sqrt.f64N/A

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                    11. lower-/.f64N/A

                                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                    12. *-commutativeN/A

                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                    13. lower-*.f6426.2

                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                  4. Applied rewrites26.2%

                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                  5. Final simplification26.2%

                                                                                    \[\leadsto \sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d \]
                                                                                  6. Add Preprocessing

                                                                                  Alternative 21: 26.5% accurate, 15.3× speedup?

                                                                                  \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                  D_m = (fabs.f64 D)
                                                                                  M_m = (fabs.f64 M)
                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                  (FPCore (d h l M_m D_m) :precision binary64 (/ d (sqrt (* l h))))
                                                                                  D_m = fabs(D);
                                                                                  M_m = fabs(M);
                                                                                  assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                  double code(double d, double h, double l, double M_m, double D_m) {
                                                                                  	return d / sqrt((l * h));
                                                                                  }
                                                                                  
                                                                                  D_m = abs(d)
                                                                                  M_m = abs(m)
                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                  real(8) function code(d, h, l, m_m, d_m)
                                                                                      real(8), intent (in) :: d
                                                                                      real(8), intent (in) :: h
                                                                                      real(8), intent (in) :: l
                                                                                      real(8), intent (in) :: m_m
                                                                                      real(8), intent (in) :: d_m
                                                                                      code = d / sqrt((l * h))
                                                                                  end function
                                                                                  
                                                                                  D_m = Math.abs(D);
                                                                                  M_m = Math.abs(M);
                                                                                  assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                  public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                  	return d / Math.sqrt((l * h));
                                                                                  }
                                                                                  
                                                                                  D_m = math.fabs(D)
                                                                                  M_m = math.fabs(M)
                                                                                  [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                  def code(d, h, l, M_m, D_m):
                                                                                  	return d / math.sqrt((l * h))
                                                                                  
                                                                                  D_m = abs(D)
                                                                                  M_m = abs(M)
                                                                                  d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                  function code(d, h, l, M_m, D_m)
                                                                                  	return Float64(d / sqrt(Float64(l * h)))
                                                                                  end
                                                                                  
                                                                                  D_m = abs(D);
                                                                                  M_m = abs(M);
                                                                                  d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                  function tmp = code(d, h, l, M_m, D_m)
                                                                                  	tmp = d / sqrt((l * h));
                                                                                  end
                                                                                  
                                                                                  D_m = N[Abs[D], $MachinePrecision]
                                                                                  M_m = N[Abs[M], $MachinePrecision]
                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                  code[d_, h_, l_, M$95$m_, D$95$m_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  D_m = \left|D\right|
                                                                                  \\
                                                                                  M_m = \left|M\right|
                                                                                  \\
                                                                                  [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                  \\
                                                                                  \frac{d}{\sqrt{\ell \cdot h}}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Initial program 70.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. Taylor expanded in d around inf

                                                                                    \[\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 \color{blue}{1} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites39.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 \color{blue}{1} \]
                                                                                    2. Taylor expanded in d around -inf

                                                                                      \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                                    3. Step-by-step derivation
                                                                                      1. associate-*r*N/A

                                                                                        \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                      2. mul-1-negN/A

                                                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      3. *-commutativeN/A

                                                                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      4. unpow2N/A

                                                                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      5. rem-square-sqrtN/A

                                                                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      6. mul-1-negN/A

                                                                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      7. remove-double-negN/A

                                                                                        \[\leadsto \color{blue}{d} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                                      8. *-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      9. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      10. lower-sqrt.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      11. lower-/.f64N/A

                                                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      12. *-commutativeN/A

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                      13. lower-*.f6426.2

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                    4. Applied rewrites26.2%

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                    5. Step-by-step derivation
                                                                                      1. Applied rewrites25.5%

                                                                                        \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                      2. Add Preprocessing

                                                                                      Reproduce

                                                                                      ?
                                                                                      herbie shell --seed 2024304 
                                                                                      (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)))))