Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.5% → 77.2%
Time: 16.1s
Alternatives: 22
Speedup: 3.7×

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 22 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.5% 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: 77.2% accurate, 1.8× speedup?

\[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} t_0 := \frac{h}{\ell} \cdot -0.5\\ t_1 := \sqrt{-d}\\ \mathbf{if}\;h \leq -3.5 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(\left(M \cdot \left(D\_m \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \frac{\left(D\_m \cdot 0.5\right) \cdot \left(M \cdot h\right)}{\ell \cdot d}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \frac{t\_1}{\sqrt{-h}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{\left(\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(t\_0, {\left(\frac{d}{D\_m} \cdot \frac{2}{M}\right)}^{-2}, 1\right)\right) \cdot t\_1}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{d} \cdot \mathsf{fma}\left({\left(\frac{\frac{d}{D\_m}}{M}\right)}^{-2} \cdot 0.25, t\_0, 1\right)}{\sqrt{\ell}} \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \end{array} \]
D_m = (fabs.f64 D)
NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
(FPCore (d h l M D_m)
 :precision binary64
 (let* ((t_0 (* (/ h l) -0.5)) (t_1 (sqrt (- d))))
   (if (<= h -3.5e+58)
     (*
      (fma
       (* (* M (* D_m (/ 0.5 d))) -0.5)
       (/ (* (* D_m 0.5) (* M h)) (* l d))
       1.0)
      (* (sqrt (/ d l)) (/ t_1 (sqrt (- h)))))
     (if (<= h -1e-309)
       (/
        (*
         (* (sqrt (/ d h)) (fma t_0 (pow (* (/ d D_m) (/ 2.0 M)) -2.0) 1.0))
         t_1)
        (sqrt (- l)))
       (/
        (*
         (/
          (* (sqrt d) (fma (* (pow (/ (/ d D_m) M) -2.0) 0.25) t_0 1.0))
          (sqrt l))
         (sqrt d))
        (sqrt h))))))
D_m = fabs(D);
assert(d < h && h < l && l < M && M < D_m);
double code(double d, double h, double l, double M, double D_m) {
	double t_0 = (h / l) * -0.5;
	double t_1 = sqrt(-d);
	double tmp;
	if (h <= -3.5e+58) {
		tmp = fma(((M * (D_m * (0.5 / d))) * -0.5), (((D_m * 0.5) * (M * h)) / (l * d)), 1.0) * (sqrt((d / l)) * (t_1 / sqrt(-h)));
	} else if (h <= -1e-309) {
		tmp = ((sqrt((d / h)) * fma(t_0, pow(((d / D_m) * (2.0 / M)), -2.0), 1.0)) * t_1) / sqrt(-l);
	} else {
		tmp = (((sqrt(d) * fma((pow(((d / D_m) / M), -2.0) * 0.25), t_0, 1.0)) / sqrt(l)) * sqrt(d)) / sqrt(h);
	}
	return tmp;
}
D_m = abs(D)
d, h, l, M, D_m = sort([d, h, l, M, D_m])
function code(d, h, l, M, D_m)
	t_0 = Float64(Float64(h / l) * -0.5)
	t_1 = sqrt(Float64(-d))
	tmp = 0.0
	if (h <= -3.5e+58)
		tmp = Float64(fma(Float64(Float64(M * Float64(D_m * Float64(0.5 / d))) * -0.5), Float64(Float64(Float64(D_m * 0.5) * Float64(M * h)) / Float64(l * d)), 1.0) * Float64(sqrt(Float64(d / l)) * Float64(t_1 / sqrt(Float64(-h)))));
	elseif (h <= -1e-309)
		tmp = Float64(Float64(Float64(sqrt(Float64(d / h)) * fma(t_0, (Float64(Float64(d / D_m) * Float64(2.0 / M)) ^ -2.0), 1.0)) * t_1) / sqrt(Float64(-l)));
	else
		tmp = Float64(Float64(Float64(Float64(sqrt(d) * fma(Float64((Float64(Float64(d / D_m) / M) ^ -2.0) * 0.25), t_0, 1.0)) / sqrt(l)) * sqrt(d)) / sqrt(h));
	end
	return tmp
end
D_m = N[Abs[D], $MachinePrecision]
NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D$95$m_] := Block[{t$95$0 = N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-d)], $MachinePrecision]}, If[LessEqual[h, -3.5e+58], N[(N[(N[(N[(M * N[(D$95$m * N[(0.5 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision] * N[(N[(N[(D$95$m * 0.5), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-309], N[(N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Power[N[(N[(d / D$95$m), $MachinePrecision] * N[(2.0 / M), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[d], $MachinePrecision] * N[(N[(N[Power[N[(N[(d / D$95$m), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
D_m = \left|D\right|
\\
[d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
\\
\begin{array}{l}
t_0 := \frac{h}{\ell} \cdot -0.5\\
t_1 := \sqrt{-d}\\
\mathbf{if}\;h \leq -3.5 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(\left(M \cdot \left(D\_m \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \frac{\left(D\_m \cdot 0.5\right) \cdot \left(M \cdot h\right)}{\ell \cdot d}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \frac{t\_1}{\sqrt{-h}}\right)\\

\mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{\left(\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(t\_0, {\left(\frac{d}{D\_m} \cdot \frac{2}{M}\right)}^{-2}, 1\right)\right) \cdot t\_1}{\sqrt{-\ell}}\\

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


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

    1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
      2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
      3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
      4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
      6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
      7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
      8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
      9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
      10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
      11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
      12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
    4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
    5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
      2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999997e58 < h < -1.000000000000002e-309

    1. Initial program 82.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Applied rewrites89.3%

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

    if -1.000000000000002e-309 < h

    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. Applied rewrites79.1%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 63.6% accurate, 0.5× speedup?

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

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-202}:\\
\;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000003e-130

    1. Initial program 89.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. Applied rewrites79.1%

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

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

    if -4.0000000000000003e-130 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2.0000000000000001e-202

    1. Initial program 24.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
      6. lower-*.f6424.8

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

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

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

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

        if 2.0000000000000001e-202 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

        1. Initial program 65.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -4 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(\frac{D}{d}, \left(\left(M \cdot -0.5\right) \cdot \left(\frac{D}{d} \cdot 0.5\right)\right) \cdot \left(\left(\frac{h}{\ell} \cdot M\right) \cdot 0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\ \mathbf{elif}\;\left(1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 2 \cdot 10^{-202}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 3: 62.7% accurate, 0.5× speedup?

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

          1. Initial program 89.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. Applied rewrites79.1%

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

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

          if -4.0000000000000003e-130 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2.0000000000000001e-202

          1. Initial program 24.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
            6. lower-*.f6424.8

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

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

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

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

              if 2.0000000000000001e-202 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

              1. Initial program 65.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -4 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(\frac{h}{\ell} \cdot M, \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\ \mathbf{elif}\;\left(1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 2 \cdot 10^{-202}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \]
              9. Add Preprocessing

              Alternative 4: 68.6% accurate, 0.8× speedup?

              \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq \infty:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\left(M \cdot \left(D\_m \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D\_m}{d} \cdot 0.5\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{-0.125 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}, \frac{D\_m \cdot D\_m}{d}, \ell\right)}{\ell}\\ \end{array} \end{array} \]
              D_m = (fabs.f64 D)
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              (FPCore (d h l M D_m)
               :precision binary64
               (if (<=
                    (*
                     (- 1.0 (* (* (pow (/ (* M D_m) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                     (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                    INFINITY)
                 (*
                  (* (sqrt (/ d h)) (sqrt (/ d l)))
                  (fma
                   (* (* M (* D_m (/ 0.5 d))) -0.5)
                   (* (* (/ h l) M) (* (/ D_m d) 0.5))
                   1.0))
                 (*
                  (sqrt (* (/ (/ d l) h) d))
                  (/ (fma (/ (* -0.125 (* (* M M) h)) d) (/ (* D_m D_m) d) l) l))))
              D_m = fabs(D);
              assert(d < h && h < l && l < M && M < D_m);
              double code(double d, double h, double l, double M, double D_m) {
              	double tmp;
              	if (((1.0 - ((pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= ((double) INFINITY)) {
              		tmp = (sqrt((d / h)) * sqrt((d / l))) * fma(((M * (D_m * (0.5 / d))) * -0.5), (((h / l) * M) * ((D_m / d) * 0.5)), 1.0);
              	} else {
              		tmp = sqrt((((d / l) / h) * d)) * (fma(((-0.125 * ((M * M) * h)) / d), ((D_m * D_m) / d), l) / l);
              	}
              	return tmp;
              }
              
              D_m = abs(D)
              d, h, l, M, D_m = sort([d, h, l, M, D_m])
              function code(d, h, l, M, D_m)
              	tmp = 0.0
              	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(M * D_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= Inf)
              		tmp = Float64(Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))) * fma(Float64(Float64(M * Float64(D_m * Float64(0.5 / d))) * -0.5), Float64(Float64(Float64(h / l) * M) * Float64(Float64(D_m / d) * 0.5)), 1.0));
              	else
              		tmp = Float64(sqrt(Float64(Float64(Float64(d / l) / h) * d)) * Float64(fma(Float64(Float64(-0.125 * Float64(Float64(M * M) * h)) / d), Float64(Float64(D_m * D_m) / d), l) / l));
              	end
              	return tmp
              end
              
              D_m = N[Abs[D], $MachinePrecision]
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(M * D$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * N[(D$95$m * N[(0.5 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision] * N[(N[(N[(h / l), $MachinePrecision] * M), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(d / l), $MachinePrecision] / h), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(-0.125 * N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              D_m = \left|D\right|
              \\
              [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq \infty:\\
              \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\left(M \cdot \left(D\_m \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D\_m}{d} \cdot 0.5\right), 1\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{-0.125 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}, \frac{D\_m \cdot D\_m}{d}, \ell\right)}{\ell}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                1. Initial program 87.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                  2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                  3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                  4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                  6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                  7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                  8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                  9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                  10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                  11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                  12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                4. Applied rewrites86.8%

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                  2. metadata-eval86.8

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

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

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

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

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

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

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

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

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

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

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

                if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                1. Initial program 0.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. Applied rewrites4.3%

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

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

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

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

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

              Alternative 5: 68.2% accurate, 0.8× speedup?

              \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(-0.25 \cdot \frac{M \cdot D\_m}{d}, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D\_m}{d} \cdot 0.5\right), 1\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{-0.125 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}, \frac{D\_m \cdot D\_m}{d}, \ell\right)}{\ell}\\ \end{array} \end{array} \]
              D_m = (fabs.f64 D)
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              (FPCore (d h l M D_m)
               :precision binary64
               (if (<=
                    (*
                     (- 1.0 (* (* (pow (/ (* M D_m) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                     (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                    INFINITY)
                 (*
                  (fma (* -0.25 (/ (* M D_m) d)) (* (* (/ h l) M) (* (/ D_m d) 0.5)) 1.0)
                  (* (sqrt (/ d h)) (sqrt (/ d l))))
                 (*
                  (sqrt (* (/ (/ d l) h) d))
                  (/ (fma (/ (* -0.125 (* (* M M) h)) d) (/ (* D_m D_m) d) l) l))))
              D_m = fabs(D);
              assert(d < h && h < l && l < M && M < D_m);
              double code(double d, double h, double l, double M, double D_m) {
              	double tmp;
              	if (((1.0 - ((pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= ((double) INFINITY)) {
              		tmp = fma((-0.25 * ((M * D_m) / d)), (((h / l) * M) * ((D_m / d) * 0.5)), 1.0) * (sqrt((d / h)) * sqrt((d / l)));
              	} else {
              		tmp = sqrt((((d / l) / h) * d)) * (fma(((-0.125 * ((M * M) * h)) / d), ((D_m * D_m) / d), l) / l);
              	}
              	return tmp;
              }
              
              D_m = abs(D)
              d, h, l, M, D_m = sort([d, h, l, M, D_m])
              function code(d, h, l, M, D_m)
              	tmp = 0.0
              	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(M * D_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= Inf)
              		tmp = Float64(fma(Float64(-0.25 * Float64(Float64(M * D_m) / d)), Float64(Float64(Float64(h / l) * M) * Float64(Float64(D_m / d) * 0.5)), 1.0) * Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))));
              	else
              		tmp = Float64(sqrt(Float64(Float64(Float64(d / l) / h) * d)) * Float64(fma(Float64(Float64(-0.125 * Float64(Float64(M * M) * h)) / d), Float64(Float64(D_m * D_m) / d), l) / l));
              	end
              	return tmp
              end
              
              D_m = N[Abs[D], $MachinePrecision]
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(M * D$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(-0.25 * N[(N[(M * D$95$m), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(h / l), $MachinePrecision] * M), $MachinePrecision] * N[(N[(D$95$m / d), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(d / l), $MachinePrecision] / h), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(-0.125 * N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              D_m = \left|D\right|
              \\
              [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq \infty:\\
              \;\;\;\;\mathsf{fma}\left(-0.25 \cdot \frac{M \cdot D\_m}{d}, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D\_m}{d} \cdot 0.5\right), 1\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \cdot \frac{\mathsf{fma}\left(\frac{-0.125 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}, \frac{D\_m \cdot D\_m}{d}, \ell\right)}{\ell}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                1. Initial program 87.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                  2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                  3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                  4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                  6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                  7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                  8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                  9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                  10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                  11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                  12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                4. Applied rewrites86.8%

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                  2. metadata-eval86.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                1. Initial program 0.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. Applied rewrites4.3%

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

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

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

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

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

              Alternative 6: 62.6% accurate, 0.8× speedup?

              \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 0:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}}}{\ell} \cdot \left(\left(\frac{D\_m \cdot D\_m}{d} \cdot -0.125\right) \cdot \left(M \cdot M\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \end{array} \]
              D_m = (fabs.f64 D)
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              (FPCore (d h l M D_m)
               :precision binary64
               (if (<=
                    (*
                     (- 1.0 (* (* (pow (/ (* M D_m) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                     (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                    0.0)
                 (* (/ (sqrt (/ h l)) l) (* (* (/ (* D_m D_m) d) -0.125) (* M M)))
                 (* (sqrt (/ d h)) (sqrt (/ d l)))))
              D_m = fabs(D);
              assert(d < h && h < l && l < M && M < D_m);
              double code(double d, double h, double l, double M, double D_m) {
              	double tmp;
              	if (((1.0 - ((pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= 0.0) {
              		tmp = (sqrt((h / l)) / l) * ((((D_m * D_m) / d) * -0.125) * (M * M));
              	} else {
              		tmp = sqrt((d / h)) * sqrt((d / l));
              	}
              	return tmp;
              }
              
              D_m = abs(d)
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              real(8) function code(d, h, l, m, d_m)
                  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_m
                  real(8) :: tmp
                  if (((1.0d0 - (((((m * d_m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= 0.0d0) then
                      tmp = (sqrt((h / l)) / l) * ((((d_m * d_m) / d) * (-0.125d0)) * (m * m))
                  else
                      tmp = sqrt((d / h)) * sqrt((d / l))
                  end if
                  code = tmp
              end function
              
              D_m = Math.abs(D);
              assert d < h && h < l && l < M && M < D_m;
              public static double code(double d, double h, double l, double M, double D_m) {
              	double tmp;
              	if (((1.0 - ((Math.pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / l), (1.0 / 2.0)) * Math.pow((d / h), (1.0 / 2.0)))) <= 0.0) {
              		tmp = (Math.sqrt((h / l)) / l) * ((((D_m * D_m) / d) * -0.125) * (M * M));
              	} else {
              		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
              	}
              	return tmp;
              }
              
              D_m = math.fabs(D)
              [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
              def code(d, h, l, M, D_m):
              	tmp = 0
              	if ((1.0 - ((math.pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / l), (1.0 / 2.0)) * math.pow((d / h), (1.0 / 2.0)))) <= 0.0:
              		tmp = (math.sqrt((h / l)) / l) * ((((D_m * D_m) / d) * -0.125) * (M * M))
              	else:
              		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
              	return tmp
              
              D_m = abs(D)
              d, h, l, M, D_m = sort([d, h, l, M, D_m])
              function code(d, h, l, M, D_m)
              	tmp = 0.0
              	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(M * D_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= 0.0)
              		tmp = Float64(Float64(sqrt(Float64(h / l)) / l) * Float64(Float64(Float64(Float64(D_m * D_m) / d) * -0.125) * Float64(M * M)));
              	else
              		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
              	end
              	return tmp
              end
              
              D_m = abs(D);
              d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
              function tmp_2 = code(d, h, l, M, D_m)
              	tmp = 0.0;
              	if (((1.0 - (((((M * D_m) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= 0.0)
              		tmp = (sqrt((h / l)) / l) * ((((D_m * D_m) / d) * -0.125) * (M * M));
              	else
              		tmp = sqrt((d / h)) * sqrt((d / l));
              	end
              	tmp_2 = tmp;
              end
              
              D_m = N[Abs[D], $MachinePrecision]
              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
              code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(M * D$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(N[(D$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] * -0.125), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              D_m = \left|D\right|
              \\
              [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 0:\\
              \;\;\;\;\frac{\sqrt{\frac{h}{\ell}}}{\ell} \cdot \left(\left(\frac{D\_m \cdot D\_m}{d} \cdot -0.125\right) \cdot \left(M \cdot M\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0

                1. Initial program 79.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                  6. lower-*.f6416.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                  1. Initial program 66.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                  Alternative 7: 44.6% accurate, 0.9× speedup?

                  \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -4 \cdot 10^{-130}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \end{array} \]
                  D_m = (fabs.f64 D)
                  NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D_m)
                   :precision binary64
                   (if (<=
                        (*
                         (- 1.0 (* (* (pow (/ (* M D_m) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                         (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                        -4e-130)
                     (/ d (sqrt (sqrt (* (* l h) (* l h)))))
                     (* (sqrt (/ d h)) (sqrt (/ d l)))))
                  D_m = fabs(D);
                  assert(d < h && h < l && l < M && M < D_m);
                  double code(double d, double h, double l, double M, double D_m) {
                  	double tmp;
                  	if (((1.0 - ((pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= -4e-130) {
                  		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                  	} else {
                  		tmp = sqrt((d / h)) * sqrt((d / l));
                  	}
                  	return tmp;
                  }
                  
                  D_m = abs(d)
                  NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                  real(8) function code(d, h, l, m, d_m)
                      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_m
                      real(8) :: tmp
                      if (((1.0d0 - (((((m * d_m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= (-4d-130)) then
                          tmp = d / sqrt(sqrt(((l * h) * (l * h))))
                      else
                          tmp = sqrt((d / h)) * sqrt((d / l))
                      end if
                      code = tmp
                  end function
                  
                  D_m = Math.abs(D);
                  assert d < h && h < l && l < M && M < D_m;
                  public static double code(double d, double h, double l, double M, double D_m) {
                  	double tmp;
                  	if (((1.0 - ((Math.pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / l), (1.0 / 2.0)) * Math.pow((d / h), (1.0 / 2.0)))) <= -4e-130) {
                  		tmp = d / Math.sqrt(Math.sqrt(((l * h) * (l * h))));
                  	} else {
                  		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
                  	}
                  	return tmp;
                  }
                  
                  D_m = math.fabs(D)
                  [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                  def code(d, h, l, M, D_m):
                  	tmp = 0
                  	if ((1.0 - ((math.pow(((M * D_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / l), (1.0 / 2.0)) * math.pow((d / h), (1.0 / 2.0)))) <= -4e-130:
                  		tmp = d / math.sqrt(math.sqrt(((l * h) * (l * h))))
                  	else:
                  		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
                  	return tmp
                  
                  D_m = abs(D)
                  d, h, l, M, D_m = sort([d, h, l, M, D_m])
                  function code(d, h, l, M, D_m)
                  	tmp = 0.0
                  	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(M * D_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= -4e-130)
                  		tmp = Float64(d / sqrt(sqrt(Float64(Float64(l * h) * Float64(l * h)))));
                  	else
                  		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
                  	end
                  	return tmp
                  end
                  
                  D_m = abs(D);
                  d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                  function tmp_2 = code(d, h, l, M, D_m)
                  	tmp = 0.0;
                  	if (((1.0 - (((((M * D_m) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= -4e-130)
                  		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                  	else
                  		tmp = sqrt((d / h)) * sqrt((d / l));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  D_m = N[Abs[D], $MachinePrecision]
                  NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(M * D$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-130], N[(d / N[Sqrt[N[Sqrt[N[(N[(l * h), $MachinePrecision] * N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  D_m = \left|D\right|
                  \\
                  [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -4 \cdot 10^{-130}:\\
                  \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000003e-130

                    1. Initial program 89.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                        if -4.0000000000000003e-130 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                        1. Initial program 62.3%

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

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

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

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

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

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

                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                          6. lower-*.f6430.7

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -4 \cdot 10^{-130}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 8: 76.7% accurate, 1.8× speedup?

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

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.4999999999999997e58 < h < -1.000000000000002e-309

                          1. Initial program 82.6%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. Add Preprocessing
                          3. Applied rewrites89.3%

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

                          if -1.000000000000002e-309 < h

                          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. Applied rewrites79.1%

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 78.4% accurate, 2.0× speedup?

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

                          1. Initial program 81.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites80.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval80.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.6000000000000001e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < 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. Applied rewrites79.1%

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 76.9% accurate, 2.7× speedup?

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

                          1. Initial program 81.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites80.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval80.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.6000000000000001e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < 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. Applied rewrites79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 75.6% accurate, 2.9× speedup?

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

                          1. Initial program 81.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites80.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval80.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.6000000000000001e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < 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. 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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites70.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval70.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 12: 76.1% accurate, 3.0× speedup?

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

                          1. Initial program 81.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites80.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval80.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.6000000000000001e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < 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. 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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites70.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval70.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{{\left(e^{\log \left(\frac{d}{h}\right)}\right)}^{\frac{1}{2}}} \cdot {d}^{\frac{1}{2}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            10. pow-prod-downN/A

                              \[\leadsto \frac{\color{blue}{{\left(e^{\log \left(\frac{d}{h}\right)} \cdot d\right)}^{\frac{1}{2}}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            11. rem-exp-logN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 13: 69.6% accurate, 3.1× speedup?

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

                          1. Initial program 80.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites79.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval79.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.6e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < d < 3.1999999999999999e-153

                          1. Initial program 44.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites47.8%

                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval47.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.6 \cdot 10^{-129}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \frac{\left(D \cdot 0.5\right) \cdot \left(M \cdot h\right)}{\ell \cdot d}, 1\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D}{d} \cdot 0.5\right), 1\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 3.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D}{d} \cdot 0.5\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \frac{\left(D \cdot 0.5\right) \cdot \left(M \cdot h\right)}{\ell \cdot d}, 1\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 14: 73.1% accurate, 3.2× speedup?

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

                          1. Initial program 81.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites80.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval80.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.6e-129 < d < -3.999999999999988e-310

                          1. Initial program 52.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--.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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites52.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval52.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.999999999999988e-310 < 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. 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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites70.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval70.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{{\left(e^{\log \left(\frac{d}{h}\right)}\right)}^{\frac{1}{2}}} \cdot {d}^{\frac{1}{2}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            10. pow-prod-downN/A

                              \[\leadsto \frac{\color{blue}{{\left(e^{\log \left(\frac{d}{h}\right)} \cdot d\right)}^{\frac{1}{2}}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            11. rem-exp-logN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 15: 68.5% accurate, 3.7× speedup?

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

                          1. Initial program 72.6%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. 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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites72.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval72.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\mathsf{neg}\left(\sqrt{\ell \cdot h}\right)} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            21. sqrt-unprodN/A

                              \[\leadsto \frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{\mathsf{neg}\left(\sqrt{\ell \cdot h}\right)} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            22. rem-square-sqrtN/A

                              \[\leadsto \frac{\color{blue}{d}}{\mathsf{neg}\left(\sqrt{\ell \cdot h}\right)} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            23. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{d}{\mathsf{neg}\left(\sqrt{\ell \cdot h}\right)}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            24. lower-neg.f6472.5

                              \[\leadsto \frac{d}{\color{blue}{-\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          10. Applied rewrites72.5%

                            \[\leadsto \color{blue}{\frac{d}{-\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]

                          if -4.999999999999985e-310 < l < 1.10000000000000002e203

                          1. Initial program 68.5%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. Add Preprocessing
                          3. 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 \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                            2. sub-negN/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 \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                            3. +-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 \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                            4. 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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\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(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right)\right) + 1\right) \]
                            6. 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(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)\right) + 1\right) \]
                            7. distribute-lft-neg-inN/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(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            8. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            9. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\right) + 1\right) \]
                            10. 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(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \]
                            11. associate-*r*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(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} + 1\right) \]
                            12. lower-fma.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 \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}, 1\right)} \]
                          4. Applied rewrites68.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}{\mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right)} \]
                          5. 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)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval68.3

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            3. lift-pow.f64N/A

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            4. pow1/2N/A

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            5. lift-sqrt.f6468.3

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          6. Applied rewrites68.3%

                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          7. Step-by-step derivation
                            1. lift-/.f64N/A

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. metadata-eval68.3

                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            3. lift-pow.f64N/A

                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            4. unpow1/2N/A

                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            5. lower-sqrt.f6468.3

                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          8. Applied rewrites68.3%

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          9. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            2. lift-sqrt.f64N/A

                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            3. lift-sqrt.f64N/A

                              \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            4. sqrt-unprodN/A

                              \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            5. lift-/.f64N/A

                              \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            6. lift-/.f64N/A

                              \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            7. frac-timesN/A

                              \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            8. *-commutativeN/A

                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            9. lift-*.f64N/A

                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            10. sqrt-divN/A

                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            11. sqrt-unprodN/A

                              \[\leadsto \frac{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            12. rem-square-sqrtN/A

                              \[\leadsto \frac{\color{blue}{d}}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            13. lift-sqrt.f64N/A

                              \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                            14. lower-/.f6470.6

                              \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]
                          10. Applied rewrites70.6%

                            \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right), \left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right), 1\right) \]

                          if 1.10000000000000002e203 < l

                          1. Initial program 79.3%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in d around inf

                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                            2. lower-*.f64N/A

                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                            3. lower-sqrt.f64N/A

                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                            4. lower-/.f64N/A

                              \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                            5. *-commutativeN/A

                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                            6. lower-*.f6424.7

                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                          5. Applied rewrites24.7%

                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                          6. Step-by-step derivation
                            1. Applied rewrites58.9%

                              \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                          7. Recombined 3 regimes into one program.
                          8. Final simplification71.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D}{d} \cdot 0.5\right), 1\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{+203}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot -0.5, \left(\frac{h}{\ell} \cdot M\right) \cdot \left(\frac{D}{d} \cdot 0.5\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 16: 49.7% accurate, 4.8× speedup?

                          \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;\frac{\left(-0.125 \cdot M\right) \cdot \left(\left(\left(\frac{D\_m}{d} \cdot D\_m\right) \cdot \sqrt{\ell \cdot h}\right) \cdot M\right)}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                          D_m = (fabs.f64 D)
                          NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                          (FPCore (d h l M D_m)
                           :precision binary64
                           (if (<= d -1.06e-206)
                             (/ (/ (- d) (sqrt (- h))) (sqrt (- l)))
                             (if (<= d -4e-310)
                               (/ d (sqrt (sqrt (* (* l h) (* l h)))))
                               (if (<= d 1.75e+14)
                                 (/ (* (* -0.125 M) (* (* (* (/ D_m d) D_m) (sqrt (* l h))) M)) (* l l))
                                 (/ (/ d (sqrt l)) (sqrt h))))))
                          D_m = fabs(D);
                          assert(d < h && h < l && l < M && M < D_m);
                          double code(double d, double h, double l, double M, double D_m) {
                          	double tmp;
                          	if (d <= -1.06e-206) {
                          		tmp = (-d / sqrt(-h)) / sqrt(-l);
                          	} else if (d <= -4e-310) {
                          		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                          	} else if (d <= 1.75e+14) {
                          		tmp = ((-0.125 * M) * ((((D_m / d) * D_m) * sqrt((l * h))) * M)) / (l * l);
                          	} else {
                          		tmp = (d / sqrt(l)) / sqrt(h);
                          	}
                          	return tmp;
                          }
                          
                          D_m = abs(d)
                          NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                          real(8) function code(d, h, l, m, d_m)
                              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_m
                              real(8) :: tmp
                              if (d <= (-1.06d-206)) then
                                  tmp = (-d / sqrt(-h)) / sqrt(-l)
                              else if (d <= (-4d-310)) then
                                  tmp = d / sqrt(sqrt(((l * h) * (l * h))))
                              else if (d <= 1.75d+14) then
                                  tmp = (((-0.125d0) * m) * ((((d_m / d) * d_m) * sqrt((l * h))) * m)) / (l * l)
                              else
                                  tmp = (d / sqrt(l)) / sqrt(h)
                              end if
                              code = tmp
                          end function
                          
                          D_m = Math.abs(D);
                          assert d < h && h < l && l < M && M < D_m;
                          public static double code(double d, double h, double l, double M, double D_m) {
                          	double tmp;
                          	if (d <= -1.06e-206) {
                          		tmp = (-d / Math.sqrt(-h)) / Math.sqrt(-l);
                          	} else if (d <= -4e-310) {
                          		tmp = d / Math.sqrt(Math.sqrt(((l * h) * (l * h))));
                          	} else if (d <= 1.75e+14) {
                          		tmp = ((-0.125 * M) * ((((D_m / d) * D_m) * Math.sqrt((l * h))) * M)) / (l * l);
                          	} else {
                          		tmp = (d / Math.sqrt(l)) / Math.sqrt(h);
                          	}
                          	return tmp;
                          }
                          
                          D_m = math.fabs(D)
                          [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                          def code(d, h, l, M, D_m):
                          	tmp = 0
                          	if d <= -1.06e-206:
                          		tmp = (-d / math.sqrt(-h)) / math.sqrt(-l)
                          	elif d <= -4e-310:
                          		tmp = d / math.sqrt(math.sqrt(((l * h) * (l * h))))
                          	elif d <= 1.75e+14:
                          		tmp = ((-0.125 * M) * ((((D_m / d) * D_m) * math.sqrt((l * h))) * M)) / (l * l)
                          	else:
                          		tmp = (d / math.sqrt(l)) / math.sqrt(h)
                          	return tmp
                          
                          D_m = abs(D)
                          d, h, l, M, D_m = sort([d, h, l, M, D_m])
                          function code(d, h, l, M, D_m)
                          	tmp = 0.0
                          	if (d <= -1.06e-206)
                          		tmp = Float64(Float64(Float64(-d) / sqrt(Float64(-h))) / sqrt(Float64(-l)));
                          	elseif (d <= -4e-310)
                          		tmp = Float64(d / sqrt(sqrt(Float64(Float64(l * h) * Float64(l * h)))));
                          	elseif (d <= 1.75e+14)
                          		tmp = Float64(Float64(Float64(-0.125 * M) * Float64(Float64(Float64(Float64(D_m / d) * D_m) * sqrt(Float64(l * h))) * M)) / Float64(l * l));
                          	else
                          		tmp = Float64(Float64(d / sqrt(l)) / sqrt(h));
                          	end
                          	return tmp
                          end
                          
                          D_m = abs(D);
                          d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                          function tmp_2 = code(d, h, l, M, D_m)
                          	tmp = 0.0;
                          	if (d <= -1.06e-206)
                          		tmp = (-d / sqrt(-h)) / sqrt(-l);
                          	elseif (d <= -4e-310)
                          		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                          	elseif (d <= 1.75e+14)
                          		tmp = ((-0.125 * M) * ((((D_m / d) * D_m) * sqrt((l * h))) * M)) / (l * l);
                          	else
                          		tmp = (d / sqrt(l)) / sqrt(h);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          D_m = N[Abs[D], $MachinePrecision]
                          NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                          code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, -1.06e-206], N[(N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d / N[Sqrt[N[Sqrt[N[(N[(l * h), $MachinePrecision] * N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.75e+14], N[(N[(N[(-0.125 * M), $MachinePrecision] * N[(N[(N[(N[(D$95$m / d), $MachinePrecision] * D$95$m), $MachinePrecision] * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          D_m = \left|D\right|
                          \\
                          [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\
                          \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                          
                          \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
                          \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\
                          
                          \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\
                          \;\;\;\;\frac{\left(-0.125 \cdot M\right) \cdot \left(\left(\left(\frac{D\_m}{d} \cdot D\_m\right) \cdot \sqrt{\ell \cdot h}\right) \cdot M\right)}{\ell \cdot \ell}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if d < -1.06e-206

                            1. Initial program 77.5%

                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in d around inf

                              \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                              2. lower-*.f64N/A

                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                              3. lower-sqrt.f64N/A

                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                              4. lower-/.f64N/A

                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                              5. *-commutativeN/A

                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                              6. lower-*.f649.0

                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                            5. Applied rewrites9.0%

                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                            6. Step-by-step derivation
                              1. Applied rewrites50.6%

                                \[\leadsto \frac{\sqrt{\frac{d}{h} \cdot \left(-d\right)}}{\color{blue}{\sqrt{-\ell}}} \]
                              2. Step-by-step derivation
                                1. Applied rewrites61.7%

                                  \[\leadsto \frac{\frac{d}{-\sqrt{-h}}}{\sqrt{\color{blue}{-\ell}}} \]

                                if -1.06e-206 < d < -3.999999999999988e-310

                                1. Initial program 46.4%

                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in d around inf

                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                  3. lower-sqrt.f64N/A

                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                  4. lower-/.f64N/A

                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                  5. *-commutativeN/A

                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                  6. lower-*.f6425.1

                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                5. Applied rewrites25.1%

                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites25.1%

                                    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                  2. Step-by-step derivation
                                    1. Applied rewrites29.5%

                                      \[\leadsto \frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}} \]

                                    if -3.999999999999988e-310 < d < 1.75e14

                                    1. Initial program 59.5%

                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in l around 0

                                      \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
                                    5. Applied rewrites35.5%

                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{\ell \cdot h}, \sqrt{\frac{{\ell}^{3}}{h}} \cdot d\right)}{\ell \cdot \ell}} \]
                                    6. Taylor expanded in d around 0

                                      \[\leadsto \frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right)}{\color{blue}{\ell} \cdot \ell} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites34.1%

                                        \[\leadsto \frac{\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{d} \cdot \sqrt{\ell \cdot h}\right)}{\color{blue}{\ell} \cdot \ell} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites47.5%

                                          \[\leadsto \frac{\left(\left(\left(\frac{D}{d} \cdot D\right) \cdot \sqrt{\ell \cdot h}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)}{\ell \cdot \ell} \]

                                        if 1.75e14 < d

                                        1. Initial program 79.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                        4. Step-by-step derivation
                                          1. *-commutativeN/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                          3. lower-sqrt.f64N/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                          4. lower-/.f64N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                          5. *-commutativeN/A

                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                          6. lower-*.f6465.0

                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                        5. Applied rewrites65.0%

                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites76.2%

                                            \[\leadsto \frac{\frac{d}{\sqrt{\ell}}}{\color{blue}{\sqrt{h}}} \]
                                        7. Recombined 4 regimes into one program.
                                        8. Final simplification59.1%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;\frac{\left(-0.125 \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot D\right) \cdot \sqrt{\ell \cdot h}\right) \cdot M\right)}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                        9. Add Preprocessing

                                        Alternative 17: 48.0% accurate, 4.8× speedup?

                                        \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 9.2 \cdot 10^{-291}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;\frac{\left(\frac{D\_m \cdot D\_m}{d} \cdot \sqrt{\ell \cdot h}\right) \cdot \left(-0.125 \cdot \left(M \cdot M\right)\right)}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                        D_m = (fabs.f64 D)
                                        NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                        (FPCore (d h l M D_m)
                                         :precision binary64
                                         (if (<= d -1.06e-206)
                                           (/ (/ (- d) (sqrt (- h))) (sqrt (- l)))
                                           (if (<= d 9.2e-291)
                                             (/ d (sqrt (sqrt (* (* l h) (* l h)))))
                                             (if (<= d 1.75e+14)
                                               (/ (* (* (/ (* D_m D_m) d) (sqrt (* l h))) (* -0.125 (* M M))) (* l l))
                                               (/ (/ d (sqrt l)) (sqrt h))))))
                                        D_m = fabs(D);
                                        assert(d < h && h < l && l < M && M < D_m);
                                        double code(double d, double h, double l, double M, double D_m) {
                                        	double tmp;
                                        	if (d <= -1.06e-206) {
                                        		tmp = (-d / sqrt(-h)) / sqrt(-l);
                                        	} else if (d <= 9.2e-291) {
                                        		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                                        	} else if (d <= 1.75e+14) {
                                        		tmp = ((((D_m * D_m) / d) * sqrt((l * h))) * (-0.125 * (M * M))) / (l * l);
                                        	} else {
                                        		tmp = (d / sqrt(l)) / sqrt(h);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        D_m = abs(d)
                                        NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                        real(8) function code(d, h, l, m, d_m)
                                            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_m
                                            real(8) :: tmp
                                            if (d <= (-1.06d-206)) then
                                                tmp = (-d / sqrt(-h)) / sqrt(-l)
                                            else if (d <= 9.2d-291) then
                                                tmp = d / sqrt(sqrt(((l * h) * (l * h))))
                                            else if (d <= 1.75d+14) then
                                                tmp = ((((d_m * d_m) / d) * sqrt((l * h))) * ((-0.125d0) * (m * m))) / (l * l)
                                            else
                                                tmp = (d / sqrt(l)) / sqrt(h)
                                            end if
                                            code = tmp
                                        end function
                                        
                                        D_m = Math.abs(D);
                                        assert d < h && h < l && l < M && M < D_m;
                                        public static double code(double d, double h, double l, double M, double D_m) {
                                        	double tmp;
                                        	if (d <= -1.06e-206) {
                                        		tmp = (-d / Math.sqrt(-h)) / Math.sqrt(-l);
                                        	} else if (d <= 9.2e-291) {
                                        		tmp = d / Math.sqrt(Math.sqrt(((l * h) * (l * h))));
                                        	} else if (d <= 1.75e+14) {
                                        		tmp = ((((D_m * D_m) / d) * Math.sqrt((l * h))) * (-0.125 * (M * M))) / (l * l);
                                        	} else {
                                        		tmp = (d / Math.sqrt(l)) / Math.sqrt(h);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        D_m = math.fabs(D)
                                        [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                        def code(d, h, l, M, D_m):
                                        	tmp = 0
                                        	if d <= -1.06e-206:
                                        		tmp = (-d / math.sqrt(-h)) / math.sqrt(-l)
                                        	elif d <= 9.2e-291:
                                        		tmp = d / math.sqrt(math.sqrt(((l * h) * (l * h))))
                                        	elif d <= 1.75e+14:
                                        		tmp = ((((D_m * D_m) / d) * math.sqrt((l * h))) * (-0.125 * (M * M))) / (l * l)
                                        	else:
                                        		tmp = (d / math.sqrt(l)) / math.sqrt(h)
                                        	return tmp
                                        
                                        D_m = abs(D)
                                        d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                        function code(d, h, l, M, D_m)
                                        	tmp = 0.0
                                        	if (d <= -1.06e-206)
                                        		tmp = Float64(Float64(Float64(-d) / sqrt(Float64(-h))) / sqrt(Float64(-l)));
                                        	elseif (d <= 9.2e-291)
                                        		tmp = Float64(d / sqrt(sqrt(Float64(Float64(l * h) * Float64(l * h)))));
                                        	elseif (d <= 1.75e+14)
                                        		tmp = Float64(Float64(Float64(Float64(Float64(D_m * D_m) / d) * sqrt(Float64(l * h))) * Float64(-0.125 * Float64(M * M))) / Float64(l * l));
                                        	else
                                        		tmp = Float64(Float64(d / sqrt(l)) / sqrt(h));
                                        	end
                                        	return tmp
                                        end
                                        
                                        D_m = abs(D);
                                        d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                        function tmp_2 = code(d, h, l, M, D_m)
                                        	tmp = 0.0;
                                        	if (d <= -1.06e-206)
                                        		tmp = (-d / sqrt(-h)) / sqrt(-l);
                                        	elseif (d <= 9.2e-291)
                                        		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                                        	elseif (d <= 1.75e+14)
                                        		tmp = ((((D_m * D_m) / d) * sqrt((l * h))) * (-0.125 * (M * M))) / (l * l);
                                        	else
                                        		tmp = (d / sqrt(l)) / sqrt(h);
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        D_m = N[Abs[D], $MachinePrecision]
                                        NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                        code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, -1.06e-206], N[(N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.2e-291], N[(d / N[Sqrt[N[Sqrt[N[(N[(l * h), $MachinePrecision] * N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.75e+14], N[(N[(N[(N[(N[(D$95$m * D$95$m), $MachinePrecision] / d), $MachinePrecision] * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        D_m = \left|D\right|
                                        \\
                                        [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\
                                        \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                        
                                        \mathbf{elif}\;d \leq 9.2 \cdot 10^{-291}:\\
                                        \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\
                                        
                                        \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\
                                        \;\;\;\;\frac{\left(\frac{D\_m \cdot D\_m}{d} \cdot \sqrt{\ell \cdot h}\right) \cdot \left(-0.125 \cdot \left(M \cdot M\right)\right)}{\ell \cdot \ell}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 4 regimes
                                        2. if d < -1.06e-206

                                          1. Initial program 77.5%

                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in d around inf

                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                          4. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                            3. lower-sqrt.f64N/A

                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                            4. lower-/.f64N/A

                                              \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                            5. *-commutativeN/A

                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                            6. lower-*.f649.0

                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                          5. Applied rewrites9.0%

                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites50.6%

                                              \[\leadsto \frac{\sqrt{\frac{d}{h} \cdot \left(-d\right)}}{\color{blue}{\sqrt{-\ell}}} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites61.7%

                                                \[\leadsto \frac{\frac{d}{-\sqrt{-h}}}{\sqrt{\color{blue}{-\ell}}} \]

                                              if -1.06e-206 < d < 9.2000000000000003e-291

                                              1. Initial program 47.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                              4. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                3. lower-sqrt.f64N/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                4. lower-/.f64N/A

                                                  \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                5. *-commutativeN/A

                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                6. lower-*.f6421.6

                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                              5. Applied rewrites21.6%

                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites21.6%

                                                  \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites25.3%

                                                    \[\leadsto \frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}} \]

                                                  if 9.2000000000000003e-291 < d < 1.75e14

                                                  1. Initial program 60.2%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in l around 0

                                                    \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
                                                  4. Step-by-step derivation
                                                    1. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
                                                  5. Applied rewrites38.1%

                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{\ell \cdot h}, \sqrt{\frac{{\ell}^{3}}{h}} \cdot d\right)}{\ell \cdot \ell}} \]
                                                  6. Taylor expanded in d around 0

                                                    \[\leadsto \frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right)}{\color{blue}{\ell} \cdot \ell} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites36.6%

                                                      \[\leadsto \frac{\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{d} \cdot \sqrt{\ell \cdot h}\right)}{\color{blue}{\ell} \cdot \ell} \]

                                                    if 1.75e14 < d

                                                    1. Initial program 79.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                    4. Step-by-step derivation
                                                      1. *-commutativeN/A

                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                      2. lower-*.f64N/A

                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                      3. lower-sqrt.f64N/A

                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                      4. lower-/.f64N/A

                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                      5. *-commutativeN/A

                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                      6. lower-*.f6465.0

                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                    5. Applied rewrites65.0%

                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites76.2%

                                                        \[\leadsto \frac{\frac{d}{\sqrt{\ell}}}{\color{blue}{\sqrt{h}}} \]
                                                    7. Recombined 4 regimes into one program.
                                                    8. Final simplification56.0%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 9.2 \cdot 10^{-291}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;\frac{\left(\frac{D \cdot D}{d} \cdot \sqrt{\ell \cdot h}\right) \cdot \left(-0.125 \cdot \left(M \cdot M\right)\right)}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                    9. Add Preprocessing

                                                    Alternative 18: 48.3% accurate, 7.0× speedup?

                                                    \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                    D_m = (fabs.f64 D)
                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                    (FPCore (d h l M D_m)
                                                     :precision binary64
                                                     (if (<= d -1.06e-206)
                                                       (/ (/ (- d) (sqrt (- h))) (sqrt (- l)))
                                                       (if (<= d -4e-310)
                                                         (/ d (sqrt (sqrt (* (* l h) (* l h)))))
                                                         (/ (/ d (sqrt l)) (sqrt h)))))
                                                    D_m = fabs(D);
                                                    assert(d < h && h < l && l < M && M < D_m);
                                                    double code(double d, double h, double l, double M, double D_m) {
                                                    	double tmp;
                                                    	if (d <= -1.06e-206) {
                                                    		tmp = (-d / sqrt(-h)) / sqrt(-l);
                                                    	} else if (d <= -4e-310) {
                                                    		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                                                    	} else {
                                                    		tmp = (d / sqrt(l)) / sqrt(h);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    D_m = abs(d)
                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                    real(8) function code(d, h, l, m, d_m)
                                                        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_m
                                                        real(8) :: tmp
                                                        if (d <= (-1.06d-206)) then
                                                            tmp = (-d / sqrt(-h)) / sqrt(-l)
                                                        else if (d <= (-4d-310)) then
                                                            tmp = d / sqrt(sqrt(((l * h) * (l * h))))
                                                        else
                                                            tmp = (d / sqrt(l)) / sqrt(h)
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    D_m = Math.abs(D);
                                                    assert d < h && h < l && l < M && M < D_m;
                                                    public static double code(double d, double h, double l, double M, double D_m) {
                                                    	double tmp;
                                                    	if (d <= -1.06e-206) {
                                                    		tmp = (-d / Math.sqrt(-h)) / Math.sqrt(-l);
                                                    	} else if (d <= -4e-310) {
                                                    		tmp = d / Math.sqrt(Math.sqrt(((l * h) * (l * h))));
                                                    	} else {
                                                    		tmp = (d / Math.sqrt(l)) / Math.sqrt(h);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    D_m = math.fabs(D)
                                                    [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                                    def code(d, h, l, M, D_m):
                                                    	tmp = 0
                                                    	if d <= -1.06e-206:
                                                    		tmp = (-d / math.sqrt(-h)) / math.sqrt(-l)
                                                    	elif d <= -4e-310:
                                                    		tmp = d / math.sqrt(math.sqrt(((l * h) * (l * h))))
                                                    	else:
                                                    		tmp = (d / math.sqrt(l)) / math.sqrt(h)
                                                    	return tmp
                                                    
                                                    D_m = abs(D)
                                                    d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                                    function code(d, h, l, M, D_m)
                                                    	tmp = 0.0
                                                    	if (d <= -1.06e-206)
                                                    		tmp = Float64(Float64(Float64(-d) / sqrt(Float64(-h))) / sqrt(Float64(-l)));
                                                    	elseif (d <= -4e-310)
                                                    		tmp = Float64(d / sqrt(sqrt(Float64(Float64(l * h) * Float64(l * h)))));
                                                    	else
                                                    		tmp = Float64(Float64(d / sqrt(l)) / sqrt(h));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    D_m = abs(D);
                                                    d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                                    function tmp_2 = code(d, h, l, M, D_m)
                                                    	tmp = 0.0;
                                                    	if (d <= -1.06e-206)
                                                    		tmp = (-d / sqrt(-h)) / sqrt(-l);
                                                    	elseif (d <= -4e-310)
                                                    		tmp = d / sqrt(sqrt(((l * h) * (l * h))));
                                                    	else
                                                    		tmp = (d / sqrt(l)) / sqrt(h);
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    D_m = N[Abs[D], $MachinePrecision]
                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                    code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, -1.06e-206], N[(N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d / N[Sqrt[N[Sqrt[N[(N[(l * h), $MachinePrecision] * N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]
                                                    
                                                    \begin{array}{l}
                                                    D_m = \left|D\right|
                                                    \\
                                                    [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\
                                                    \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                    
                                                    \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
                                                    \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if d < -1.06e-206

                                                      1. Initial program 77.5%

                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in d around inf

                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                      4. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                        3. lower-sqrt.f64N/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                        4. lower-/.f64N/A

                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                        6. lower-*.f649.0

                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                      5. Applied rewrites9.0%

                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites50.6%

                                                          \[\leadsto \frac{\sqrt{\frac{d}{h} \cdot \left(-d\right)}}{\color{blue}{\sqrt{-\ell}}} \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites61.7%

                                                            \[\leadsto \frac{\frac{d}{-\sqrt{-h}}}{\sqrt{\color{blue}{-\ell}}} \]

                                                          if -1.06e-206 < d < -3.999999999999988e-310

                                                          1. Initial program 46.4%

                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in d around inf

                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                          4. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                            2. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                            3. lower-sqrt.f64N/A

                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                            4. lower-/.f64N/A

                                                              \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                            5. *-commutativeN/A

                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                            6. lower-*.f6425.1

                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                          5. Applied rewrites25.1%

                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                          6. Step-by-step derivation
                                                            1. Applied rewrites25.1%

                                                              \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites29.5%

                                                                \[\leadsto \frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}} \]

                                                              if -3.999999999999988e-310 < 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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                2. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                3. lower-sqrt.f64N/A

                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                4. lower-/.f64N/A

                                                                  \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                5. *-commutativeN/A

                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                6. lower-*.f6442.1

                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                              5. Applied rewrites42.1%

                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                              6. Step-by-step derivation
                                                                1. Applied rewrites51.8%

                                                                  \[\leadsto \frac{\frac{d}{\sqrt{\ell}}}{\color{blue}{\sqrt{h}}} \]
                                                              7. Recombined 3 regimes into one program.
                                                              8. Final simplification54.4%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left(\ell \cdot h\right) \cdot \left(\ell \cdot h\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                              9. Add Preprocessing

                                                              Alternative 19: 44.5% accurate, 8.4× speedup?

                                                              \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                              D_m = (fabs.f64 D)
                                                              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                              (FPCore (d h l M D_m)
                                                               :precision binary64
                                                               (if (<= d 4.2e-179)
                                                                 (* (sqrt (/ 1.0 (* l h))) (- d))
                                                                 (/ (/ d (sqrt l)) (sqrt h))))
                                                              D_m = fabs(D);
                                                              assert(d < h && h < l && l < M && M < D_m);
                                                              double code(double d, double h, double l, double M, double D_m) {
                                                              	double tmp;
                                                              	if (d <= 4.2e-179) {
                                                              		tmp = sqrt((1.0 / (l * h))) * -d;
                                                              	} else {
                                                              		tmp = (d / sqrt(l)) / sqrt(h);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              D_m = abs(d)
                                                              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                              real(8) function code(d, h, l, m, d_m)
                                                                  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_m
                                                                  real(8) :: tmp
                                                                  if (d <= 4.2d-179) then
                                                                      tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                  else
                                                                      tmp = (d / sqrt(l)) / sqrt(h)
                                                                  end if
                                                                  code = tmp
                                                              end function
                                                              
                                                              D_m = Math.abs(D);
                                                              assert d < h && h < l && l < M && M < D_m;
                                                              public static double code(double d, double h, double l, double M, double D_m) {
                                                              	double tmp;
                                                              	if (d <= 4.2e-179) {
                                                              		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                              	} else {
                                                              		tmp = (d / Math.sqrt(l)) / Math.sqrt(h);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              D_m = math.fabs(D)
                                                              [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                                              def code(d, h, l, M, D_m):
                                                              	tmp = 0
                                                              	if d <= 4.2e-179:
                                                              		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                              	else:
                                                              		tmp = (d / math.sqrt(l)) / math.sqrt(h)
                                                              	return tmp
                                                              
                                                              D_m = abs(D)
                                                              d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                                              function code(d, h, l, M, D_m)
                                                              	tmp = 0.0
                                                              	if (d <= 4.2e-179)
                                                              		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                              	else
                                                              		tmp = Float64(Float64(d / sqrt(l)) / sqrt(h));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              D_m = abs(D);
                                                              d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                                              function tmp_2 = code(d, h, l, M, D_m)
                                                              	tmp = 0.0;
                                                              	if (d <= 4.2e-179)
                                                              		tmp = sqrt((1.0 / (l * h))) * -d;
                                                              	else
                                                              		tmp = (d / sqrt(l)) / sqrt(h);
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              D_m = N[Abs[D], $MachinePrecision]
                                                              NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                              code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, 4.2e-179], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              D_m = \left|D\right|
                                                              \\
                                                              [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\
                                                              \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if d < 4.1999999999999997e-179

                                                                1. Initial program 67.9%

                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in l around -inf

                                                                  \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                4. 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-*.f6443.4

                                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                5. Applied rewrites43.4%

                                                                  \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                if 4.1999999999999997e-179 < d

                                                                1. Initial program 77.5%

                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in d around inf

                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                  2. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                  3. lower-sqrt.f64N/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                  4. lower-/.f64N/A

                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                  5. *-commutativeN/A

                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                  6. lower-*.f6452.5

                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                5. Applied rewrites52.5%

                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites62.9%

                                                                    \[\leadsto \frac{\frac{d}{\sqrt{\ell}}}{\color{blue}{\sqrt{h}}} \]
                                                                7. Recombined 2 regimes into one program.
                                                                8. Final simplification50.3%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                                9. Add Preprocessing

                                                                Alternative 20: 45.0% accurate, 9.6× speedup?

                                                                \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
                                                                D_m = (fabs.f64 D)
                                                                NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                (FPCore (d h l M D_m)
                                                                 :precision binary64
                                                                 (if (<= d 4.2e-179)
                                                                   (* (sqrt (/ 1.0 (* l h))) (- d))
                                                                   (/ d (* (sqrt h) (sqrt l)))))
                                                                D_m = fabs(D);
                                                                assert(d < h && h < l && l < M && M < D_m);
                                                                double code(double d, double h, double l, double M, double D_m) {
                                                                	double tmp;
                                                                	if (d <= 4.2e-179) {
                                                                		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                	} else {
                                                                		tmp = d / (sqrt(h) * sqrt(l));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                D_m = abs(d)
                                                                NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                real(8) function code(d, h, l, m, d_m)
                                                                    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_m
                                                                    real(8) :: tmp
                                                                    if (d <= 4.2d-179) then
                                                                        tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                    else
                                                                        tmp = d / (sqrt(h) * sqrt(l))
                                                                    end if
                                                                    code = tmp
                                                                end function
                                                                
                                                                D_m = Math.abs(D);
                                                                assert d < h && h < l && l < M && M < D_m;
                                                                public static double code(double d, double h, double l, double M, double D_m) {
                                                                	double tmp;
                                                                	if (d <= 4.2e-179) {
                                                                		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                                	} else {
                                                                		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                D_m = math.fabs(D)
                                                                [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                                                def code(d, h, l, M, D_m):
                                                                	tmp = 0
                                                                	if d <= 4.2e-179:
                                                                		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                                	else:
                                                                		tmp = d / (math.sqrt(h) * math.sqrt(l))
                                                                	return tmp
                                                                
                                                                D_m = abs(D)
                                                                d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                                                function code(d, h, l, M, D_m)
                                                                	tmp = 0.0
                                                                	if (d <= 4.2e-179)
                                                                		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                                	else
                                                                		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                D_m = abs(D);
                                                                d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                                                function tmp_2 = code(d, h, l, M, D_m)
                                                                	tmp = 0.0;
                                                                	if (d <= 4.2e-179)
                                                                		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                	else
                                                                		tmp = d / (sqrt(h) * sqrt(l));
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                D_m = N[Abs[D], $MachinePrecision]
                                                                NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, 4.2e-179], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                D_m = \left|D\right|
                                                                \\
                                                                [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\
                                                                \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if d < 4.1999999999999997e-179

                                                                  1. Initial program 67.9%

                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in l around -inf

                                                                    \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                  4. 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-*.f6443.4

                                                                      \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                  5. Applied rewrites43.4%

                                                                    \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                  if 4.1999999999999997e-179 < d

                                                                  1. Initial program 77.5%

                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in d around inf

                                                                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                    2. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                    3. lower-sqrt.f64N/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                    4. lower-/.f64N/A

                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                    5. *-commutativeN/A

                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                    6. lower-*.f6452.5

                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                  5. Applied rewrites52.5%

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites53.4%

                                                                      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites62.8%

                                                                        \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                    3. Recombined 2 regimes into one program.
                                                                    4. Final simplification50.3%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 4.2 \cdot 10^{-179}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
                                                                    5. Add Preprocessing

                                                                    Alternative 21: 41.5% accurate, 10.3× speedup?

                                                                    \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                    D_m = (fabs.f64 D)
                                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                    (FPCore (d h l M D_m)
                                                                     :precision binary64
                                                                     (if (<= d -1.06e-206) (* (sqrt (/ 1.0 (* l h))) (- d)) (/ d (sqrt (* l h)))))
                                                                    D_m = fabs(D);
                                                                    assert(d < h && h < l && l < M && M < D_m);
                                                                    double code(double d, double h, double l, double M, double D_m) {
                                                                    	double tmp;
                                                                    	if (d <= -1.06e-206) {
                                                                    		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                    	} else {
                                                                    		tmp = d / sqrt((l * h));
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    D_m = abs(d)
                                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                    real(8) function code(d, h, l, m, d_m)
                                                                        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_m
                                                                        real(8) :: tmp
                                                                        if (d <= (-1.06d-206)) then
                                                                            tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                        else
                                                                            tmp = d / sqrt((l * h))
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    D_m = Math.abs(D);
                                                                    assert d < h && h < l && l < M && M < D_m;
                                                                    public static double code(double d, double h, double l, double M, double D_m) {
                                                                    	double tmp;
                                                                    	if (d <= -1.06e-206) {
                                                                    		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                                    	} else {
                                                                    		tmp = d / Math.sqrt((l * h));
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    D_m = math.fabs(D)
                                                                    [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                                                    def code(d, h, l, M, D_m):
                                                                    	tmp = 0
                                                                    	if d <= -1.06e-206:
                                                                    		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                                    	else:
                                                                    		tmp = d / math.sqrt((l * h))
                                                                    	return tmp
                                                                    
                                                                    D_m = abs(D)
                                                                    d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                                                    function code(d, h, l, M, D_m)
                                                                    	tmp = 0.0
                                                                    	if (d <= -1.06e-206)
                                                                    		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                                    	else
                                                                    		tmp = Float64(d / sqrt(Float64(l * h)));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    D_m = abs(D);
                                                                    d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                                                    function tmp_2 = code(d, h, l, M, D_m)
                                                                    	tmp = 0.0;
                                                                    	if (d <= -1.06e-206)
                                                                    		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                    	else
                                                                    		tmp = d / sqrt((l * h));
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    D_m = N[Abs[D], $MachinePrecision]
                                                                    NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                    code[d_, h_, l_, M_, D$95$m_] := If[LessEqual[d, -1.06e-206], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    D_m = \left|D\right|
                                                                    \\
                                                                    [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\
                                                                    \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if d < -1.06e-206

                                                                      1. Initial program 77.5%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in l around -inf

                                                                        \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      4. 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-*.f6456.1

                                                                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                      5. Applied rewrites56.1%

                                                                        \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                      if -1.06e-206 < d

                                                                      1. Initial program 66.1%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in d around inf

                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      4. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                        3. lower-sqrt.f64N/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                        4. lower-/.f64N/A

                                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                        5. *-commutativeN/A

                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                        6. lower-*.f6439.4

                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                      5. Applied rewrites39.4%

                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites40.0%

                                                                          \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                      7. Recombined 2 regimes into one program.
                                                                      8. Final simplification47.4%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.06 \cdot 10^{-206}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                      9. Add Preprocessing

                                                                      Alternative 22: 25.7% accurate, 15.3× speedup?

                                                                      \[\begin{array}{l} D_m = \left|D\right| \\ [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\ \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                      D_m = (fabs.f64 D)
                                                                      NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                      (FPCore (d h l M D_m) :precision binary64 (/ d (sqrt (* l h))))
                                                                      D_m = fabs(D);
                                                                      assert(d < h && h < l && l < M && M < D_m);
                                                                      double code(double d, double h, double l, double M, double D_m) {
                                                                      	return d / sqrt((l * h));
                                                                      }
                                                                      
                                                                      D_m = abs(d)
                                                                      NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                      real(8) function code(d, h, l, m, d_m)
                                                                          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_m
                                                                          code = d / sqrt((l * h))
                                                                      end function
                                                                      
                                                                      D_m = Math.abs(D);
                                                                      assert d < h && h < l && l < M && M < D_m;
                                                                      public static double code(double d, double h, double l, double M, double D_m) {
                                                                      	return d / Math.sqrt((l * h));
                                                                      }
                                                                      
                                                                      D_m = math.fabs(D)
                                                                      [d, h, l, M, D_m] = sort([d, h, l, M, D_m])
                                                                      def code(d, h, l, M, D_m):
                                                                      	return d / math.sqrt((l * h))
                                                                      
                                                                      D_m = abs(D)
                                                                      d, h, l, M, D_m = sort([d, h, l, M, D_m])
                                                                      function code(d, h, l, M, D_m)
                                                                      	return Float64(d / sqrt(Float64(l * h)))
                                                                      end
                                                                      
                                                                      D_m = abs(D);
                                                                      d, h, l, M, D_m = num2cell(sort([d, h, l, M, D_m])){:}
                                                                      function tmp = code(d, h, l, M, D_m)
                                                                      	tmp = d / sqrt((l * h));
                                                                      end
                                                                      
                                                                      D_m = N[Abs[D], $MachinePrecision]
                                                                      NOTE: d, h, l, M, and D_m should be sorted in increasing order before calling this function.
                                                                      code[d_, h_, l_, M_, D$95$m_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                      
                                                                      \begin{array}{l}
                                                                      D_m = \left|D\right|
                                                                      \\
                                                                      [d, h, l, M, D_m] = \mathsf{sort}([d, h, l, M, D_m])\\
                                                                      \\
                                                                      \frac{d}{\sqrt{\ell \cdot h}}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Initial program 71.3%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in d around inf

                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      4. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                        3. lower-sqrt.f64N/A

                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                        4. lower-/.f64N/A

                                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                        5. *-commutativeN/A

                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                        6. lower-*.f6425.5

                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                      5. Applied rewrites25.5%

                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites25.8%

                                                                          \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                        2. Add Preprocessing

                                                                        Reproduce

                                                                        ?
                                                                        herbie shell --seed 2024295 
                                                                        (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)))))