Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.0% → 80.8%
Time: 16.6s
Alternatives: 22
Speedup: 2.9×

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.0% 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: 80.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;d \leq 8.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, t\_0, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\

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


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

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999991e-277 < d < -9.999999999999969e-311

    1. Initial program 26.9%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
      3. 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{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
      4. Applied rewrites50.4%

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

      if -9.999999999999969e-311 < d < 8.5000000000000001e-182

      1. Initial program 21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.5000000000000001e-182 < d

      1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 58.2% accurate, 0.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.00000000000000032e-159 < (*.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)))) < 9.99999999999999943e-253 or 4.99999999999999961e273 < (*.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 24.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
      4. Step-by-step derivation
        1. Applied rewrites30.1%

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

          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
        3. 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-*.f6434.0

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

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

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

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

            if 9.99999999999999943e-253 < (*.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.99999999999999961e273

            1. Initial program 99.3%

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

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

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

                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
              3. 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-*.f6436.3

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

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

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

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

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

                Alternative 3: 52.8% accurate, 0.3× speedup?

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

                  1. Initial program 80.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                  4. Step-by-step derivation
                    1. Applied rewrites5.4%

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

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. 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-*.f6419.2

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

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

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

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

                        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)))) < 4.99999999999999961e273

                        1. Initial program 99.3%

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

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

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

                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                          3. 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-*.f6436.0

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

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

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

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

                              if 4.99999999999999961e273 < (*.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 21.7%

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

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

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

                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                3. 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-*.f6428.3

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

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

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

                                      \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                  3. Recombined 3 regimes into one program.
                                  4. Final simplification52.5%

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

                                  Alternative 4: 51.8% accurate, 0.3× speedup?

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

                                    1. Initial program 80.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites5.4%

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

                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                      3. 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-*.f6419.2

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

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

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

                                        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)))) < 4.99999999999999961e273

                                        1. Initial program 99.3%

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

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

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

                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                          3. 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-*.f6436.0

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

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

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

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

                                              if 4.99999999999999961e273 < (*.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 21.7%

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

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

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

                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                3. 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-*.f6428.3

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

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

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

                                                      \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                                  3. Recombined 3 regimes into one program.
                                                  4. Final simplification51.8%

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

                                                  Alternative 5: 49.2% accurate, 0.3× speedup?

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

                                                    1. Initial program 82.0%

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

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

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

                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                      3. 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.2

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

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

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

                                                        if 9.99999999999999943e-158 < (*.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)))) < 5.99999999999999949e142

                                                        1. Initial program 99.3%

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

                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites98.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}{1} \]
                                                          2. Taylor expanded in d around inf

                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                          3. 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-*.f6436.2

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

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

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

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

                                                              if 5.99999999999999949e142 < (*.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 35.7%

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

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

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

                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                3. 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-*.f6429.1

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

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

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

                                                                      \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                                                  3. Recombined 3 regimes into one program.
                                                                  4. Final simplification47.8%

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

                                                                  Alternative 6: 45.9% accurate, 0.6× speedup?

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

                                                                    1. Initial program 87.6%

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

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

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

                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                      3. 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-*.f6411.8

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

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

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

                                                                        if -5.00000000000000032e-159 < (*.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 60.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites62.9%

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

                                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                          3. 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-*.f6435.1

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

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

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

                                                                                \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                                                            3. Recombined 2 regimes into one program.
                                                                            4. Final simplification44.4%

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

                                                                            Alternative 7: 80.4% accurate, 1.4× speedup?

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

                                                                              1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              if -1.74999999999999991e-277 < d < -9.999999999999969e-311

                                                                              1. Initial program 26.9%

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

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

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

                                                                                  \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                3. 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{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                4. Applied rewrites50.4%

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

                                                                                if -9.999999999999969e-311 < d

                                                                                1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Alternative 8: 78.6% accurate, 2.0× speedup?

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

                                                                                1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if -2.24999999999999996e-277 < d < -9.999999999999969e-311

                                                                                1. Initial program 26.9%

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

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

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

                                                                                    \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                  3. 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{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                  4. Applied rewrites50.4%

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

                                                                                  if -9.999999999999969e-311 < d

                                                                                  1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 9: 80.3% accurate, 2.0× speedup?

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

                                                                                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -3.999999999999988e-310 < l

                                                                                  1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 10: 78.6% accurate, 2.1× speedup?

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

                                                                                  1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -7.4e-302 < d

                                                                                  1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 11: 78.6% accurate, 2.1× speedup?

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

                                                                                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -3.999999999999988e-310 < l

                                                                                  1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 12: 77.5% accurate, 2.1× speedup?

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

                                                                                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -3.999999999999988e-310 < l

                                                                                  1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 13: 74.0% accurate, 2.2× speedup?

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

                                                                                  1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -2.5999999999999998e-301 < h < 3.1999999999999999e186

                                                                                  1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if 3.1999999999999999e186 < h

                                                                                  1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 14: 71.2% accurate, 2.4× speedup?

                                                                                \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\ \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 9 \cdot 10^{-190}:\\ \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\ \end{array} \end{array} \]
                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                (FPCore (d h l M D)
                                                                                 :precision binary64
                                                                                 (let* ((t_0 (* (* (/ D d) 0.5) M)))
                                                                                   (if (<= d -5.6e-300)
                                                                                     (/
                                                                                      (* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
                                                                                      (sqrt (- l)))
                                                                                     (if (<= d 9e-190)
                                                                                       (* (* -0.125 (* (* D D) (/ (* M M) d))) (sqrt (/ h (pow l 3.0))))
                                                                                       (if (<= d 2.8e+70)
                                                                                         (*
                                                                                          (* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
                                                                                          (/ (fma (* (* D D) (/ (* (* M M) h) l)) -0.125 (* d d)) (* d d)))
                                                                                         (* (/ (pow l -0.5) (sqrt h)) d))))))
                                                                                assert(d < h && h < l && l < M && M < D);
                                                                                double code(double d, double h, double l, double M, double D) {
                                                                                	double t_0 = ((D / d) * 0.5) * M;
                                                                                	double tmp;
                                                                                	if (d <= -5.6e-300) {
                                                                                		tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
                                                                                	} else if (d <= 9e-190) {
                                                                                		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * sqrt((h / pow(l, 3.0)));
                                                                                	} else if (d <= 2.8e+70) {
                                                                                		tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((D * D) * (((M * M) * h) / l)), -0.125, (d * d)) / (d * d));
                                                                                	} else {
                                                                                		tmp = (pow(l, -0.5) / sqrt(h)) * d;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                d, h, l, M, D = sort([d, h, l, M, D])
                                                                                function code(d, h, l, M, D)
                                                                                	t_0 = Float64(Float64(Float64(D / d) * 0.5) * M)
                                                                                	tmp = 0.0
                                                                                	if (d <= -5.6e-300)
                                                                                		tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l)));
                                                                                	elseif (d <= 9e-190)
                                                                                		tmp = Float64(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))) * sqrt(Float64(h / (l ^ 3.0))));
                                                                                	elseif (d <= 2.8e+70)
                                                                                		tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(D * D) * Float64(Float64(Float64(M * M) * h) / l)), -0.125, Float64(d * d)) / Float64(d * d)));
                                                                                	else
                                                                                		tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d);
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9e-190], N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.125 + N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
                                                                                \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
                                                                                \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                                                
                                                                                \mathbf{elif}\;d \leq 9 \cdot 10^{-190}:\\
                                                                                \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}\\
                                                                                
                                                                                \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
                                                                                \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 4 regimes
                                                                                2. if d < -5.59999999999999988e-300

                                                                                  1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -5.59999999999999988e-300 < d < 9.00000000000000042e-190

                                                                                  1. Initial program 16.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\color{blue}{\frac{h}{{\ell}^{3}}}} \]
                                                                                      13. lower-pow.f6423.5

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

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

                                                                                    if 9.00000000000000042e-190 < d < 2.7999999999999999e70

                                                                                    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if 2.7999999999999999e70 < d

                                                                                    1. Initial program 73.6%

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

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

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

                                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                      3. 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-*.f6466.1

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

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

                                                                                          \[\leadsto \frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d \]
                                                                                      6. Recombined 4 regimes into one program.
                                                                                      7. Add Preprocessing

                                                                                      Alternative 15: 69.3% accurate, 2.8× speedup?

                                                                                      \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\ \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\ \end{array} \end{array} \]
                                                                                      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                      (FPCore (d h l M D)
                                                                                       :precision binary64
                                                                                       (let* ((t_0 (* (* (/ D d) 0.5) M)))
                                                                                         (if (<= d -5.6e-300)
                                                                                           (/
                                                                                            (* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
                                                                                            (sqrt (- l)))
                                                                                           (if (<= d 1.9e-196)
                                                                                             (pow (/ (sqrt (* l h)) d) -1.0)
                                                                                             (if (<= d 2.8e+70)
                                                                                               (*
                                                                                                (* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
                                                                                                (/ (fma (* (* D D) (/ (* (* M M) h) l)) -0.125 (* d d)) (* d d)))
                                                                                               (* (/ (pow l -0.5) (sqrt h)) d))))))
                                                                                      assert(d < h && h < l && l < M && M < D);
                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                      	double t_0 = ((D / d) * 0.5) * M;
                                                                                      	double tmp;
                                                                                      	if (d <= -5.6e-300) {
                                                                                      		tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
                                                                                      	} else if (d <= 1.9e-196) {
                                                                                      		tmp = pow((sqrt((l * h)) / d), -1.0);
                                                                                      	} else if (d <= 2.8e+70) {
                                                                                      		tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((D * D) * (((M * M) * h) / l)), -0.125, (d * d)) / (d * d));
                                                                                      	} else {
                                                                                      		tmp = (pow(l, -0.5) / sqrt(h)) * d;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      d, h, l, M, D = sort([d, h, l, M, D])
                                                                                      function code(d, h, l, M, D)
                                                                                      	t_0 = Float64(Float64(Float64(D / d) * 0.5) * M)
                                                                                      	tmp = 0.0
                                                                                      	if (d <= -5.6e-300)
                                                                                      		tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l)));
                                                                                      	elseif (d <= 1.9e-196)
                                                                                      		tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0;
                                                                                      	elseif (d <= 2.8e+70)
                                                                                      		tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(D * D) * Float64(Float64(Float64(M * M) * h) / l)), -0.125, Float64(d * d)) / Float64(d * d)));
                                                                                      	else
                                                                                      		tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d);
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.125 + N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
                                                                                      \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
                                                                                      \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                                                      
                                                                                      \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
                                                                                      \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
                                                                                      
                                                                                      \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
                                                                                      \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 4 regimes
                                                                                      2. if d < -5.59999999999999988e-300

                                                                                        1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        if -5.59999999999999988e-300 < d < 1.9000000000000001e-196

                                                                                        1. Initial program 14.2%

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

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

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

                                                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                          3. 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-*.f6426.4

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

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

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

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

                                                                                              if 1.9000000000000001e-196 < d < 2.7999999999999999e70

                                                                                              1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                6. sqrt-divN/A

                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                7. lift-sqrt.f64N/A

                                                                                                  \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                8. lower-/.f64N/A

                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                9. lower-sqrt.f6480.5

                                                                                                  \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              6. Applied rewrites80.5%

                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              7. Taylor expanded in d around 0

                                                                                                \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{{d}^{2} - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}}} \]
                                                                                              8. Step-by-step derivation
                                                                                                1. cancel-sub-sign-invN/A

                                                                                                  \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\color{blue}{{d}^{2} + \left(\mathsf{neg}\left(\frac{1}{8}\right)\right) \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}}{{d}^{2}} \]
                                                                                                2. metadata-evalN/A

                                                                                                  \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{{d}^{2} + \color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell}}{{d}^{2}} \]
                                                                                                3. +-commutativeN/A

                                                                                                  \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell} + {d}^{2}}}{{d}^{2}} \]
                                                                                                4. lower-/.f64N/A

                                                                                                  \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell} + {d}^{2}}{{d}^{2}}} \]
                                                                                              9. Applied rewrites75.6%

                                                                                                \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}} \]

                                                                                              if 2.7999999999999999e70 < d

                                                                                              1. Initial program 73.6%

                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              2. Add Preprocessing
                                                                                              3. Taylor expanded in d around inf

                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. Applied rewrites58.2%

                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                2. Taylor expanded in d around inf

                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                3. 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-*.f6466.1

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                4. Applied rewrites66.1%

                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                5. Step-by-step derivation
                                                                                                  1. Applied rewrites77.0%

                                                                                                    \[\leadsto \frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d \]
                                                                                                6. Recombined 4 regimes into one program.
                                                                                                7. Final simplification77.7%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\ \end{array} \]
                                                                                                8. Add Preprocessing

                                                                                                Alternative 16: 69.2% accurate, 2.8× speedup?

                                                                                                \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\ \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\ \end{array} \end{array} \]
                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                (FPCore (d h l M D)
                                                                                                 :precision binary64
                                                                                                 (let* ((t_0 (* (* (/ D d) 0.5) M)))
                                                                                                   (if (<= d -5.6e-300)
                                                                                                     (/
                                                                                                      (* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
                                                                                                      (sqrt (- l)))
                                                                                                     (if (<= d 1.9e-196)
                                                                                                       (pow (/ (sqrt (* l h)) d) -1.0)
                                                                                                       (if (<= d 2.8e+70)
                                                                                                         (*
                                                                                                          (* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
                                                                                                          (/ (fma (/ (* (* (* M M) h) (* D D)) (* d d)) -0.125 l) l))
                                                                                                         (* (/ (pow l -0.5) (sqrt h)) d))))))
                                                                                                assert(d < h && h < l && l < M && M < D);
                                                                                                double code(double d, double h, double l, double M, double D) {
                                                                                                	double t_0 = ((D / d) * 0.5) * M;
                                                                                                	double tmp;
                                                                                                	if (d <= -5.6e-300) {
                                                                                                		tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
                                                                                                	} else if (d <= 1.9e-196) {
                                                                                                		tmp = pow((sqrt((l * h)) / d), -1.0);
                                                                                                	} else if (d <= 2.8e+70) {
                                                                                                		tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((((M * M) * h) * (D * D)) / (d * d)), -0.125, l) / l);
                                                                                                	} else {
                                                                                                		tmp = (pow(l, -0.5) / sqrt(h)) * d;
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                function code(d, h, l, M, D)
                                                                                                	t_0 = Float64(Float64(Float64(D / d) * 0.5) * M)
                                                                                                	tmp = 0.0
                                                                                                	if (d <= -5.6e-300)
                                                                                                		tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l)));
                                                                                                	elseif (d <= 1.9e-196)
                                                                                                		tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0;
                                                                                                	elseif (d <= 2.8e+70)
                                                                                                		tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(d * d)), -0.125, l) / l));
                                                                                                	else
                                                                                                		tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d);
                                                                                                	end
                                                                                                	return tmp
                                                                                                end
                                                                                                
                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125 + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                \\
                                                                                                \begin{array}{l}
                                                                                                t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
                                                                                                \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
                                                                                                \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                                                                
                                                                                                \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
                                                                                                \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
                                                                                                
                                                                                                \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
                                                                                                \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 4 regimes
                                                                                                2. if d < -5.59999999999999988e-300

                                                                                                  1. Initial program 77.7%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Step-by-step derivation
                                                                                                    1. lift-*.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                                                    2. lift-*.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                                                                                                    3. lift-pow.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    4. unpow2N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    5. 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(1 - \color{blue}{\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\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(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                    7. lower-*.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                  4. Applied rewrites73.8%

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)}\right) \]
                                                                                                  5. Step-by-step derivation
                                                                                                    1. lift-/.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    2. metadata-eval73.8

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    3. lift-pow.f64N/A

                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    4. unpow1/2N/A

                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    5. lift-/.f64N/A

                                                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    6. frac-2negN/A

                                                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    7. sqrt-divN/A

                                                                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    8. lower-/.f64N/A

                                                                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    9. lower-sqrt.f64N/A

                                                                                                      \[\leadsto \left(\frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    10. lower-neg.f64N/A

                                                                                                      \[\leadsto \left(\frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    11. lower-sqrt.f64N/A

                                                                                                      \[\leadsto \left(\frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                    12. lower-neg.f6482.4

                                                                                                      \[\leadsto \left(\frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                  6. Applied rewrites82.4%

                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                  7. Applied rewrites88.8%

                                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5 \cdot {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}} \]
                                                                                                  8. Step-by-step derivation
                                                                                                    1. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot {\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    2. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2} \cdot \frac{-1}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    3. lift-pow.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    4. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    5. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(M \cdot \left(\frac{D}{d} \cdot \frac{1}{2}\right)\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    6. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{1}{2}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    7. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{D}{d}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    8. associate-*r*N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(M \cdot \frac{1}{2}\right) \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    9. metadata-evalN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(\left(M \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    10. div-invN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(\color{blue}{\frac{M}{2}} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    11. lift-/.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M}{2} \cdot \color{blue}{\frac{D}{d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    12. times-fracN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    13. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    14. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    15. lift-/.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    16. unpow2N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    17. associate-*l*N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                    18. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                  9. Applied rewrites88.8%

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]

                                                                                                  if -5.59999999999999988e-300 < d < 1.9000000000000001e-196

                                                                                                  1. Initial program 14.2%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Taylor expanded in d around inf

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites14.7%

                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                    2. Taylor expanded in d around inf

                                                                                                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                    3. 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-*.f6426.4

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                    4. Applied rewrites26.4%

                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                    5. Step-by-step derivation
                                                                                                      1. Applied rewrites26.4%

                                                                                                        \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites26.4%

                                                                                                          \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\ell \cdot h}}{d}}} \]

                                                                                                        if 1.9000000000000001e-196 < d < 2.7999999999999999e70

                                                                                                        1. Initial program 71.4%

                                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Step-by-step derivation
                                                                                                          1. lift-pow.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. lift-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          3. metadata-evalN/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. unpow1/2N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. lift-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          6. sqrt-divN/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          7. lower-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          8. lower-sqrt.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          9. lower-sqrt.f6475.9

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        4. Applied rewrites75.9%

                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        5. Step-by-step derivation
                                                                                                          1. lift-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. metadata-eval75.9

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          3. lift-pow.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. unpow1/2N/A

                                                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. lift-/.f64N/A

                                                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          6. sqrt-divN/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          7. lift-sqrt.f64N/A

                                                                                                            \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          8. lower-/.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          9. lower-sqrt.f6480.5

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        6. Applied rewrites80.5%

                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        7. Taylor expanded in l around 0

                                                                                                          \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\ell - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \]
                                                                                                        8. Step-by-step derivation
                                                                                                          1. metadata-evalN/A

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\ell - \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{8}\right)\right)} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell} \]
                                                                                                          2. cancel-sign-sub-invN/A

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\color{blue}{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}}{\ell} \]
                                                                                                          3. lower-/.f64N/A

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \]
                                                                                                        9. Applied rewrites71.0%

                                                                                                          \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}} \]

                                                                                                        if 2.7999999999999999e70 < d

                                                                                                        1. Initial program 73.6%

                                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Taylor expanded in d around inf

                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. Applied rewrites58.2%

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                          2. Taylor expanded in d around inf

                                                                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                          3. 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-*.f6466.1

                                                                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                          4. Applied rewrites66.1%

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                          5. Step-by-step derivation
                                                                                                            1. Applied rewrites77.0%

                                                                                                              \[\leadsto \frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d \]
                                                                                                          6. Recombined 4 regimes into one program.
                                                                                                          7. Final simplification76.6%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\ \end{array} \]
                                                                                                          8. Add Preprocessing

                                                                                                          Alternative 17: 69.2% accurate, 2.9× speedup?

                                                                                                          \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\ \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 3 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                          (FPCore (d h l M D)
                                                                                                           :precision binary64
                                                                                                           (let* ((t_0 (* (* (/ D d) 0.5) M)))
                                                                                                             (if (<= d -5.6e-300)
                                                                                                               (/
                                                                                                                (* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
                                                                                                                (sqrt (- l)))
                                                                                                               (if (<= d 1.9e-196)
                                                                                                                 (pow (/ (sqrt (* l h)) d) -1.0)
                                                                                                                 (if (<= d 3e+70)
                                                                                                                   (*
                                                                                                                    (* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
                                                                                                                    (/ (fma (/ (* (* (* M M) h) (* D D)) (* d d)) -0.125 l) l))
                                                                                                                   (/ d (* (sqrt l) (sqrt h))))))))
                                                                                                          assert(d < h && h < l && l < M && M < D);
                                                                                                          double code(double d, double h, double l, double M, double D) {
                                                                                                          	double t_0 = ((D / d) * 0.5) * M;
                                                                                                          	double tmp;
                                                                                                          	if (d <= -5.6e-300) {
                                                                                                          		tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
                                                                                                          	} else if (d <= 1.9e-196) {
                                                                                                          		tmp = pow((sqrt((l * h)) / d), -1.0);
                                                                                                          	} else if (d <= 3e+70) {
                                                                                                          		tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((((M * M) * h) * (D * D)) / (d * d)), -0.125, l) / l);
                                                                                                          	} else {
                                                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                          function code(d, h, l, M, D)
                                                                                                          	t_0 = Float64(Float64(Float64(D / d) * 0.5) * M)
                                                                                                          	tmp = 0.0
                                                                                                          	if (d <= -5.6e-300)
                                                                                                          		tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l)));
                                                                                                          	elseif (d <= 1.9e-196)
                                                                                                          		tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0;
                                                                                                          	elseif (d <= 3e+70)
                                                                                                          		tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(d * d)), -0.125, l) / l));
                                                                                                          	else
                                                                                                          		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 3e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125 + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
                                                                                                          \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
                                                                                                          \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                                                                          
                                                                                                          \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
                                                                                                          \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
                                                                                                          
                                                                                                          \mathbf{elif}\;d \leq 3 \cdot 10^{+70}:\\
                                                                                                          \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 4 regimes
                                                                                                          2. if d < -5.59999999999999988e-300

                                                                                                            1. Initial program 77.7%

                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Step-by-step derivation
                                                                                                              1. lift-*.f64N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                                                              2. lift-*.f64N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                                                                                                              3. lift-pow.f64N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                              4. unpow2N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                              5. 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(1 - \color{blue}{\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\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(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                              7. lower-*.f64N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                            4. Applied rewrites73.8%

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)}\right) \]
                                                                                                            5. Step-by-step derivation
                                                                                                              1. lift-/.f64N/A

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              2. metadata-eval73.8

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              3. lift-pow.f64N/A

                                                                                                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              4. unpow1/2N/A

                                                                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              5. lift-/.f64N/A

                                                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              6. frac-2negN/A

                                                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              7. sqrt-divN/A

                                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              8. lower-/.f64N/A

                                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              9. lower-sqrt.f64N/A

                                                                                                                \[\leadsto \left(\frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              10. lower-neg.f64N/A

                                                                                                                \[\leadsto \left(\frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              11. lower-sqrt.f64N/A

                                                                                                                \[\leadsto \left(\frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                              12. lower-neg.f6482.4

                                                                                                                \[\leadsto \left(\frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                            6. Applied rewrites82.4%

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                            7. Applied rewrites88.8%

                                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5 \cdot {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}} \]
                                                                                                            8. Step-by-step derivation
                                                                                                              1. lift-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot {\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              2. *-commutativeN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2} \cdot \frac{-1}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              3. lift-pow.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              4. lift-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              5. *-commutativeN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(M \cdot \left(\frac{D}{d} \cdot \frac{1}{2}\right)\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              6. lift-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{1}{2}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              7. *-commutativeN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{D}{d}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              8. associate-*r*N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(M \cdot \frac{1}{2}\right) \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              9. metadata-evalN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(\left(M \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              10. div-invN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(\color{blue}{\frac{M}{2}} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              11. lift-/.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M}{2} \cdot \color{blue}{\frac{D}{d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              12. times-fracN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              13. lift-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              14. lift-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              15. lift-/.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              16. unpow2N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              17. associate-*l*N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                              18. lower-*.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                            9. Applied rewrites88.8%

                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]

                                                                                                            if -5.59999999999999988e-300 < d < 1.9000000000000001e-196

                                                                                                            1. Initial program 14.2%

                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in d around inf

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. Applied rewrites14.7%

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                              2. Taylor expanded in d around inf

                                                                                                                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                              3. 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-*.f6426.4

                                                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                              4. Applied rewrites26.4%

                                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                              5. Step-by-step derivation
                                                                                                                1. Applied rewrites26.4%

                                                                                                                  \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                2. Step-by-step derivation
                                                                                                                  1. Applied rewrites26.4%

                                                                                                                    \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\ell \cdot h}}{d}}} \]

                                                                                                                  if 1.9000000000000001e-196 < d < 2.99999999999999976e70

                                                                                                                  1. Initial program 71.4%

                                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. lift-pow.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    2. lift-/.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    3. metadata-evalN/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    4. unpow1/2N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    5. lift-/.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    6. sqrt-divN/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    7. lower-/.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    8. lower-sqrt.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    9. lower-sqrt.f6475.9

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  4. Applied rewrites75.9%

                                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  5. Step-by-step derivation
                                                                                                                    1. lift-/.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    2. metadata-eval75.9

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    3. lift-pow.f64N/A

                                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    4. unpow1/2N/A

                                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    5. lift-/.f64N/A

                                                                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    6. sqrt-divN/A

                                                                                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    7. lift-sqrt.f64N/A

                                                                                                                      \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    8. lower-/.f64N/A

                                                                                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    9. lower-sqrt.f6480.5

                                                                                                                      \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  6. Applied rewrites80.5%

                                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  7. Taylor expanded in l around 0

                                                                                                                    \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\ell - \frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \]
                                                                                                                  8. Step-by-step derivation
                                                                                                                    1. metadata-evalN/A

                                                                                                                      \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\ell - \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{8}\right)\right)} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell} \]
                                                                                                                    2. cancel-sign-sub-invN/A

                                                                                                                      \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\color{blue}{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}}{\ell} \]
                                                                                                                    3. lower-/.f64N/A

                                                                                                                      \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \]
                                                                                                                  9. Applied rewrites71.0%

                                                                                                                    \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}} \]

                                                                                                                  if 2.99999999999999976e70 < d

                                                                                                                  1. Initial program 73.6%

                                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Taylor expanded in d around inf

                                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. Applied rewrites58.2%

                                                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                    2. Taylor expanded in d around inf

                                                                                                                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                    3. 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-*.f6466.1

                                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                    4. Applied rewrites66.1%

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                    5. Step-by-step derivation
                                                                                                                      1. Applied rewrites66.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. Applied rewrites76.8%

                                                                                                                          \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                      3. Recombined 4 regimes into one program.
                                                                                                                      4. Final simplification76.6%

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\ \;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\ \mathbf{elif}\;d \leq 3 \cdot 10^{+70}:\\ \;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                                                                      5. Add Preprocessing

                                                                                                                      Alternative 18: 46.5% accurate, 3.1× speedup?

                                                                                                                      \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq -8.6 \cdot 10^{-188}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-301}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                                      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                      (FPCore (d h l M D)
                                                                                                                       :precision binary64
                                                                                                                       (if (<= l -8.6e-188)
                                                                                                                         (fabs (/ d (sqrt (* l h))))
                                                                                                                         (if (<= l 1.75e-301)
                                                                                                                           (* (sqrt (pow (* l h) -1.0)) d)
                                                                                                                           (/ d (* (sqrt l) (sqrt h))))))
                                                                                                                      assert(d < h && h < l && l < M && M < D);
                                                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                                                      	double tmp;
                                                                                                                      	if (l <= -8.6e-188) {
                                                                                                                      		tmp = fabs((d / sqrt((l * h))));
                                                                                                                      	} else if (l <= 1.75e-301) {
                                                                                                                      		tmp = sqrt(pow((l * h), -1.0)) * d;
                                                                                                                      	} else {
                                                                                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                      real(8) function code(d, h, l, m, d_1)
                                                                                                                          real(8), intent (in) :: d
                                                                                                                          real(8), intent (in) :: h
                                                                                                                          real(8), intent (in) :: l
                                                                                                                          real(8), intent (in) :: m
                                                                                                                          real(8), intent (in) :: d_1
                                                                                                                          real(8) :: tmp
                                                                                                                          if (l <= (-8.6d-188)) then
                                                                                                                              tmp = abs((d / sqrt((l * h))))
                                                                                                                          else if (l <= 1.75d-301) then
                                                                                                                              tmp = sqrt(((l * h) ** (-1.0d0))) * d
                                                                                                                          else
                                                                                                                              tmp = d / (sqrt(l) * sqrt(h))
                                                                                                                          end if
                                                                                                                          code = tmp
                                                                                                                      end function
                                                                                                                      
                                                                                                                      assert d < h && h < l && l < M && M < D;
                                                                                                                      public static double code(double d, double h, double l, double M, double D) {
                                                                                                                      	double tmp;
                                                                                                                      	if (l <= -8.6e-188) {
                                                                                                                      		tmp = Math.abs((d / Math.sqrt((l * h))));
                                                                                                                      	} else if (l <= 1.75e-301) {
                                                                                                                      		tmp = Math.sqrt(Math.pow((l * h), -1.0)) * d;
                                                                                                                      	} else {
                                                                                                                      		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                                      def code(d, h, l, M, D):
                                                                                                                      	tmp = 0
                                                                                                                      	if l <= -8.6e-188:
                                                                                                                      		tmp = math.fabs((d / math.sqrt((l * h))))
                                                                                                                      	elif l <= 1.75e-301:
                                                                                                                      		tmp = math.sqrt(math.pow((l * h), -1.0)) * d
                                                                                                                      	else:
                                                                                                                      		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                      function code(d, h, l, M, D)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (l <= -8.6e-188)
                                                                                                                      		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                                                                                                      	elseif (l <= 1.75e-301)
                                                                                                                      		tmp = Float64(sqrt((Float64(l * h) ^ -1.0)) * d);
                                                                                                                      	else
                                                                                                                      		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                                      function tmp_2 = code(d, h, l, M, D)
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if (l <= -8.6e-188)
                                                                                                                      		tmp = abs((d / sqrt((l * h))));
                                                                                                                      	elseif (l <= 1.75e-301)
                                                                                                                      		tmp = sqrt(((l * h) ^ -1.0)) * d;
                                                                                                                      	else
                                                                                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                      code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.6e-188], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e-301], N[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                      \\
                                                                                                                      \begin{array}{l}
                                                                                                                      \mathbf{if}\;\ell \leq -8.6 \cdot 10^{-188}:\\
                                                                                                                      \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                                                                                                      
                                                                                                                      \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-301}:\\
                                                                                                                      \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 3 regimes
                                                                                                                      2. if l < -8.59999999999999975e-188

                                                                                                                        1. Initial program 76.0%

                                                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                        2. Add Preprocessing
                                                                                                                        3. Taylor expanded in d around inf

                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                        4. Step-by-step derivation
                                                                                                                          1. Applied rewrites46.7%

                                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                          2. Taylor expanded in d around inf

                                                                                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                          3. 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-*.f647.0

                                                                                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                          4. Applied rewrites7.0%

                                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                          5. Step-by-step derivation
                                                                                                                            1. Applied rewrites7.0%

                                                                                                                              \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                            2. Step-by-step derivation
                                                                                                                              1. Applied rewrites40.8%

                                                                                                                                \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]

                                                                                                                              if -8.59999999999999975e-188 < l < 1.74999999999999996e-301

                                                                                                                              1. Initial program 74.2%

                                                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                              2. Add Preprocessing
                                                                                                                              3. Taylor expanded in d around inf

                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                              4. Step-by-step derivation
                                                                                                                                1. Applied rewrites11.7%

                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                2. Taylor expanded in d around inf

                                                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                3. 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 \]
                                                                                                                                4. Applied rewrites39.4%

                                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]

                                                                                                                                if 1.74999999999999996e-301 < l

                                                                                                                                1. Initial program 62.9%

                                                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                2. Add Preprocessing
                                                                                                                                3. Taylor expanded in d around inf

                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. Applied rewrites41.6%

                                                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                  2. Taylor expanded in d around inf

                                                                                                                                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                  3. 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-*.f6443.5

                                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                  4. Applied rewrites43.5%

                                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                  5. Step-by-step derivation
                                                                                                                                    1. Applied rewrites44.3%

                                                                                                                                      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                    2. Step-by-step derivation
                                                                                                                                      1. Applied rewrites52.7%

                                                                                                                                        \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                                    4. Final simplification46.4%

                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -8.6 \cdot 10^{-188}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-301}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                                                                                    5. Add Preprocessing

                                                                                                                                    Alternative 19: 64.8% accurate, 3.2× speedup?

                                                                                                                                    \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\ \mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                                                    NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                    (FPCore (d h l M D)
                                                                                                                                     :precision binary64
                                                                                                                                     (let* ((t_0 (* (* (/ D d) 0.5) M)))
                                                                                                                                       (if (<= l -4e-310)
                                                                                                                                         (/
                                                                                                                                          (* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
                                                                                                                                          (sqrt (- l)))
                                                                                                                                         (/ d (* (sqrt l) (sqrt h))))))
                                                                                                                                    assert(d < h && h < l && l < M && M < D);
                                                                                                                                    double code(double d, double h, double l, double M, double D) {
                                                                                                                                    	double t_0 = ((D / d) * 0.5) * M;
                                                                                                                                    	double tmp;
                                                                                                                                    	if (l <= -4e-310) {
                                                                                                                                    		tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
                                                                                                                                    	} else {
                                                                                                                                    		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                                    	}
                                                                                                                                    	return tmp;
                                                                                                                                    }
                                                                                                                                    
                                                                                                                                    d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                                    function code(d, h, l, M, D)
                                                                                                                                    	t_0 = Float64(Float64(Float64(D / d) * 0.5) * M)
                                                                                                                                    	tmp = 0.0
                                                                                                                                    	if (l <= -4e-310)
                                                                                                                                    		tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l)));
                                                                                                                                    	else
                                                                                                                                    		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                                                    	end
                                                                                                                                    	return tmp
                                                                                                                                    end
                                                                                                                                    
                                                                                                                                    NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                    code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[l, -4e-310], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                                                                                    
                                                                                                                                    \begin{array}{l}
                                                                                                                                    [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                                    \\
                                                                                                                                    \begin{array}{l}
                                                                                                                                    t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
                                                                                                                                    \mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\
                                                                                                                                    \;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
                                                                                                                                    
                                                                                                                                    \mathbf{else}:\\
                                                                                                                                    \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    \end{array}
                                                                                                                                    \end{array}
                                                                                                                                    
                                                                                                                                    Derivation
                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                    2. if l < -3.999999999999988e-310

                                                                                                                                      1. Initial program 76.2%

                                                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                      2. Add Preprocessing
                                                                                                                                      3. Step-by-step derivation
                                                                                                                                        1. lift-*.f64N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                                                                                        2. lift-*.f64N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                                                                                                                                        3. lift-pow.f64N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                        4. unpow2N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                        5. 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(1 - \color{blue}{\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\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(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                                                        7. lower-*.f64N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                                                      4. Applied rewrites71.6%

                                                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)}\right) \]
                                                                                                                                      5. Step-by-step derivation
                                                                                                                                        1. lift-/.f64N/A

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        2. metadata-eval71.6

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        3. lift-pow.f64N/A

                                                                                                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        4. unpow1/2N/A

                                                                                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        5. lift-/.f64N/A

                                                                                                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        6. frac-2negN/A

                                                                                                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        7. sqrt-divN/A

                                                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        8. lower-/.f64N/A

                                                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        9. lower-sqrt.f64N/A

                                                                                                                                          \[\leadsto \left(\frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        10. lower-neg.f64N/A

                                                                                                                                          \[\leadsto \left(\frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        11. lower-sqrt.f64N/A

                                                                                                                                          \[\leadsto \left(\frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                        12. lower-neg.f6479.9

                                                                                                                                          \[\leadsto \left(\frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                      6. Applied rewrites79.9%

                                                                                                                                        \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                      7. Applied rewrites86.9%

                                                                                                                                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5 \cdot {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}} \]
                                                                                                                                      8. Step-by-step derivation
                                                                                                                                        1. lift-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot {\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        2. *-commutativeN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2} \cdot \frac{-1}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        3. lift-pow.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}^{2}} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        4. lift-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot M\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        5. *-commutativeN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(M \cdot \left(\frac{D}{d} \cdot \frac{1}{2}\right)\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        6. lift-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{1}{2}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        7. *-commutativeN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(M \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{D}{d}\right)}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        8. associate-*r*N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\left(M \cdot \frac{1}{2}\right) \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        9. metadata-evalN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(\left(M \cdot \color{blue}{\frac{1}{2}}\right) \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        10. div-invN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(\color{blue}{\frac{M}{2}} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        11. lift-/.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M}{2} \cdot \color{blue}{\frac{D}{d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        12. times-fracN/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        13. lift-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        14. lift-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        15. lift-/.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        16. unpow2N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        17. associate-*l*N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                        18. lower-*.f64N/A

                                                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                      9. Applied rewrites86.9%

                                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot \left(\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right) \cdot -0.5\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]

                                                                                                                                      if -3.999999999999988e-310 < l

                                                                                                                                      1. Initial program 62.7%

                                                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                      2. Add Preprocessing
                                                                                                                                      3. Taylor expanded in d around inf

                                                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites41.0%

                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                        2. Taylor expanded in d around inf

                                                                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                        3. 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-*.f6443.6

                                                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                        4. Applied rewrites43.6%

                                                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                        5. Step-by-step derivation
                                                                                                                                          1. Applied rewrites44.4%

                                                                                                                                            \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                          2. Step-by-step derivation
                                                                                                                                            1. Applied rewrites52.6%

                                                                                                                                              \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                                          3. Recombined 2 regimes into one program.
                                                                                                                                          4. Add Preprocessing

                                                                                                                                          Alternative 20: 56.0% accurate, 3.5× speedup?

                                                                                                                                          \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{-h}\\ t_1 := \sqrt{-\ell}\\ \mathbf{if}\;d \leq -1.2 \cdot 10^{+142}:\\ \;\;\;\;\frac{\frac{-d}{t\_1} \cdot 1}{t\_0}\\ \mathbf{elif}\;d \leq -7.4 \cdot 10^{-302}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \frac{d}{t\_0}}{-t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                          (FPCore (d h l M D)
                                                                                                                                           :precision binary64
                                                                                                                                           (let* ((t_0 (sqrt (- h))) (t_1 (sqrt (- l))))
                                                                                                                                             (if (<= d -1.2e+142)
                                                                                                                                               (/ (* (/ (- d) t_1) 1.0) t_0)
                                                                                                                                               (if (<= d -7.4e-302)
                                                                                                                                                 (/
                                                                                                                                                  (*
                                                                                                                                                   (fma (* (/ (* (* M M) (* D D)) (* d d)) -0.125) (/ h l) 1.0)
                                                                                                                                                   (/ d t_0))
                                                                                                                                                  (- t_1))
                                                                                                                                                 (/ d (* (sqrt l) (sqrt h)))))))
                                                                                                                                          assert(d < h && h < l && l < M && M < D);
                                                                                                                                          double code(double d, double h, double l, double M, double D) {
                                                                                                                                          	double t_0 = sqrt(-h);
                                                                                                                                          	double t_1 = sqrt(-l);
                                                                                                                                          	double tmp;
                                                                                                                                          	if (d <= -1.2e+142) {
                                                                                                                                          		tmp = ((-d / t_1) * 1.0) / t_0;
                                                                                                                                          	} else if (d <= -7.4e-302) {
                                                                                                                                          		tmp = (fma(((((M * M) * (D * D)) / (d * d)) * -0.125), (h / l), 1.0) * (d / t_0)) / -t_1;
                                                                                                                                          	} else {
                                                                                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                                          	}
                                                                                                                                          	return tmp;
                                                                                                                                          }
                                                                                                                                          
                                                                                                                                          d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                                          function code(d, h, l, M, D)
                                                                                                                                          	t_0 = sqrt(Float64(-h))
                                                                                                                                          	t_1 = sqrt(Float64(-l))
                                                                                                                                          	tmp = 0.0
                                                                                                                                          	if (d <= -1.2e+142)
                                                                                                                                          		tmp = Float64(Float64(Float64(Float64(-d) / t_1) * 1.0) / t_0);
                                                                                                                                          	elseif (d <= -7.4e-302)
                                                                                                                                          		tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(M * M) * Float64(D * D)) / Float64(d * d)) * -0.125), Float64(h / l), 1.0) * Float64(d / t_0)) / Float64(-t_1));
                                                                                                                                          	else
                                                                                                                                          		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                                                          	end
                                                                                                                                          	return tmp
                                                                                                                                          end
                                                                                                                                          
                                                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[(-h)], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-l)], $MachinePrecision]}, If[LessEqual[d, -1.2e+142], N[(N[(N[((-d) / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[d, -7.4e-302], N[(N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / t$95$0), $MachinePrecision]), $MachinePrecision] / (-t$95$1)), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                                                          
                                                                                                                                          \begin{array}{l}
                                                                                                                                          [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                                          \\
                                                                                                                                          \begin{array}{l}
                                                                                                                                          t_0 := \sqrt{-h}\\
                                                                                                                                          t_1 := \sqrt{-\ell}\\
                                                                                                                                          \mathbf{if}\;d \leq -1.2 \cdot 10^{+142}:\\
                                                                                                                                          \;\;\;\;\frac{\frac{-d}{t\_1} \cdot 1}{t\_0}\\
                                                                                                                                          
                                                                                                                                          \mathbf{elif}\;d \leq -7.4 \cdot 10^{-302}:\\
                                                                                                                                          \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \frac{d}{t\_0}}{-t\_1}\\
                                                                                                                                          
                                                                                                                                          \mathbf{else}:\\
                                                                                                                                          \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          \end{array}
                                                                                                                                          \end{array}
                                                                                                                                          
                                                                                                                                          Derivation
                                                                                                                                          1. Split input into 3 regimes
                                                                                                                                          2. if d < -1.2e142

                                                                                                                                            1. Initial program 91.0%

                                                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                            2. Add Preprocessing
                                                                                                                                            3. Taylor expanded in d around inf

                                                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. Applied rewrites64.9%

                                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                              2. 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 1 \]
                                                                                                                                                2. metadata-eval64.9

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\right) \cdot 1 \]
                                                                                                                                                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 1 \]
                                                                                                                                                4. unpow1/2N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                                                                                                                5. lift-/.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                                                                                                                6. frac-2negN/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                7. sqrt-divN/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                8. lower-/.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                9. lower-sqrt.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right) \cdot 1 \]
                                                                                                                                                10. lower-neg.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right) \cdot 1 \]
                                                                                                                                                11. lower-sqrt.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                12. lower-neg.f6467.7

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-\ell}}}\right) \cdot 1 \]
                                                                                                                                              3. Applied rewrites67.7%

                                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot 1 \]
                                                                                                                                              4. Applied rewrites73.3%

                                                                                                                                                \[\leadsto \color{blue}{\frac{\frac{-d}{\sqrt{-\ell}} \cdot 1}{\sqrt{-h}}} \]

                                                                                                                                              if -1.2e142 < d < -7.4e-302

                                                                                                                                              1. Initial program 71.7%

                                                                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                              2. Add Preprocessing
                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                1. lift-*.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                                                                                                2. lift-*.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                3. lift-pow.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                4. unpow2N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                5. 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(1 - \color{blue}{\left(\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}\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(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                                                                7. lower-*.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\right) \]
                                                                                                                                              4. Applied rewrites68.2%

                                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)}\right) \]
                                                                                                                                              5. Step-by-step derivation
                                                                                                                                                1. lift-/.f64N/A

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                2. metadata-eval68.2

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                3. lift-pow.f64N/A

                                                                                                                                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                4. unpow1/2N/A

                                                                                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                5. lift-/.f64N/A

                                                                                                                                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                6. frac-2negN/A

                                                                                                                                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                7. sqrt-divN/A

                                                                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                8. lower-/.f64N/A

                                                                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                9. lower-sqrt.f64N/A

                                                                                                                                                  \[\leadsto \left(\frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                10. lower-neg.f64N/A

                                                                                                                                                  \[\leadsto \left(\frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                11. lower-sqrt.f64N/A

                                                                                                                                                  \[\leadsto \left(\frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot \frac{1}{2}\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                                12. lower-neg.f6477.6

                                                                                                                                                  \[\leadsto \left(\frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                              6. Applied rewrites77.6%

                                                                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\frac{D}{d} \cdot 0.5\right) \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right) \]
                                                                                                                                              7. Applied rewrites84.3%

                                                                                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5 \cdot {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}} \]
                                                                                                                                              8. Taylor expanded in d around 0

                                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                              9. Step-by-step derivation
                                                                                                                                                1. *-commutativeN/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \frac{-1}{8}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                2. lower-*.f64N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \frac{-1}{8}}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                3. lower-/.f64N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                4. *-commutativeN/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\color{blue}{{M}^{2} \cdot {D}^{2}}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                5. lower-*.f64N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\color{blue}{{M}^{2} \cdot {D}^{2}}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                6. unpow2N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\color{blue}{\left(M \cdot M\right)} \cdot {D}^{2}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                7. lower-*.f64N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\color{blue}{\left(M \cdot M\right)} \cdot {D}^{2}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                8. unpow2N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \color{blue}{\left(D \cdot D\right)}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                9. lower-*.f64N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \color{blue}{\left(D \cdot D\right)}}{{d}^{2}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                10. unpow2N/A

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{\color{blue}{d \cdot d}} \cdot \frac{-1}{8}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                                11. lower-*.f6464.9

                                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{\color{blue}{d \cdot d}} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]
                                                                                                                                              10. Applied rewrites64.9%

                                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot -0.125}, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}} \]

                                                                                                                                              if -7.4e-302 < d

                                                                                                                                              1. Initial program 62.2%

                                                                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                              2. Add Preprocessing
                                                                                                                                              3. Taylor expanded in d around inf

                                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                              4. Step-by-step derivation
                                                                                                                                                1. Applied rewrites40.7%

                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                2. Taylor expanded in d around inf

                                                                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                                3. 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-*.f6443.3

                                                                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                                4. Applied rewrites43.3%

                                                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                                5. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites44.1%

                                                                                                                                                    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites52.2%

                                                                                                                                                      \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                                                                  4. Final simplification59.7%

                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.2 \cdot 10^{+142}:\\ \;\;\;\;\frac{\frac{-d}{\sqrt{-\ell}} \cdot 1}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -7.4 \cdot 10^{-302}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \frac{d}{\sqrt{-h}}}{-\sqrt{-\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                                                                                                  5. Add Preprocessing

                                                                                                                                                  Alternative 21: 52.9% accurate, 5.7× speedup?

                                                                                                                                                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq -6.4 \cdot 10^{-160}:\\ \;\;\;\;\frac{-d}{\sqrt{-\ell} \cdot \sqrt{-h}} \cdot 1\\ \mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left|h\right| \cdot \left(\ell \cdot \ell\right)} \cdot \sqrt{\left|h\right|}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                  (FPCore (d h l M D)
                                                                                                                                                   :precision binary64
                                                                                                                                                   (if (<= l -6.4e-160)
                                                                                                                                                     (* (/ (- d) (* (sqrt (- l)) (sqrt (- h)))) 1.0)
                                                                                                                                                     (if (<= l -4e-310)
                                                                                                                                                       (/ d (sqrt (* (sqrt (* (fabs h) (* l l))) (sqrt (fabs h)))))
                                                                                                                                                       (/ d (* (sqrt l) (sqrt h))))))
                                                                                                                                                  assert(d < h && h < l && l < M && M < D);
                                                                                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                                                                                  	double tmp;
                                                                                                                                                  	if (l <= -6.4e-160) {
                                                                                                                                                  		tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0;
                                                                                                                                                  	} else if (l <= -4e-310) {
                                                                                                                                                  		tmp = d / sqrt((sqrt((fabs(h) * (l * l))) * sqrt(fabs(h))));
                                                                                                                                                  	} else {
                                                                                                                                                  		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                                                  	}
                                                                                                                                                  	return tmp;
                                                                                                                                                  }
                                                                                                                                                  
                                                                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                  real(8) function code(d, h, l, m, d_1)
                                                                                                                                                      real(8), intent (in) :: d
                                                                                                                                                      real(8), intent (in) :: h
                                                                                                                                                      real(8), intent (in) :: l
                                                                                                                                                      real(8), intent (in) :: m
                                                                                                                                                      real(8), intent (in) :: d_1
                                                                                                                                                      real(8) :: tmp
                                                                                                                                                      if (l <= (-6.4d-160)) then
                                                                                                                                                          tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0d0
                                                                                                                                                      else if (l <= (-4d-310)) then
                                                                                                                                                          tmp = d / sqrt((sqrt((abs(h) * (l * l))) * sqrt(abs(h))))
                                                                                                                                                      else
                                                                                                                                                          tmp = d / (sqrt(l) * sqrt(h))
                                                                                                                                                      end if
                                                                                                                                                      code = tmp
                                                                                                                                                  end function
                                                                                                                                                  
                                                                                                                                                  assert d < h && h < l && l < M && M < D;
                                                                                                                                                  public static double code(double d, double h, double l, double M, double D) {
                                                                                                                                                  	double tmp;
                                                                                                                                                  	if (l <= -6.4e-160) {
                                                                                                                                                  		tmp = (-d / (Math.sqrt(-l) * Math.sqrt(-h))) * 1.0;
                                                                                                                                                  	} else if (l <= -4e-310) {
                                                                                                                                                  		tmp = d / Math.sqrt((Math.sqrt((Math.abs(h) * (l * l))) * Math.sqrt(Math.abs(h))));
                                                                                                                                                  	} else {
                                                                                                                                                  		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                                                                                                  	}
                                                                                                                                                  	return tmp;
                                                                                                                                                  }
                                                                                                                                                  
                                                                                                                                                  [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                                                                  def code(d, h, l, M, D):
                                                                                                                                                  	tmp = 0
                                                                                                                                                  	if l <= -6.4e-160:
                                                                                                                                                  		tmp = (-d / (math.sqrt(-l) * math.sqrt(-h))) * 1.0
                                                                                                                                                  	elif l <= -4e-310:
                                                                                                                                                  		tmp = d / math.sqrt((math.sqrt((math.fabs(h) * (l * l))) * math.sqrt(math.fabs(h))))
                                                                                                                                                  	else:
                                                                                                                                                  		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                                                                                                  	return tmp
                                                                                                                                                  
                                                                                                                                                  d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                                                  function code(d, h, l, M, D)
                                                                                                                                                  	tmp = 0.0
                                                                                                                                                  	if (l <= -6.4e-160)
                                                                                                                                                  		tmp = Float64(Float64(Float64(-d) / Float64(sqrt(Float64(-l)) * sqrt(Float64(-h)))) * 1.0);
                                                                                                                                                  	elseif (l <= -4e-310)
                                                                                                                                                  		tmp = Float64(d / sqrt(Float64(sqrt(Float64(abs(h) * Float64(l * l))) * sqrt(abs(h)))));
                                                                                                                                                  	else
                                                                                                                                                  		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                                                                  	end
                                                                                                                                                  	return tmp
                                                                                                                                                  end
                                                                                                                                                  
                                                                                                                                                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                                                                  function tmp_2 = code(d, h, l, M, D)
                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                  	if (l <= -6.4e-160)
                                                                                                                                                  		tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0;
                                                                                                                                                  	elseif (l <= -4e-310)
                                                                                                                                                  		tmp = d / sqrt((sqrt((abs(h) * (l * l))) * sqrt(abs(h))));
                                                                                                                                                  	else
                                                                                                                                                  		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                                                                  	end
                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                  end
                                                                                                                                                  
                                                                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                  code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.4e-160], N[(N[((-d) / N[(N[Sqrt[(-l)], $MachinePrecision] * N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[l, -4e-310], N[(d / N[Sqrt[N[(N[Sqrt[N[(N[Abs[h], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[h], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                                                                                                  
                                                                                                                                                  \begin{array}{l}
                                                                                                                                                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                                                  \\
                                                                                                                                                  \begin{array}{l}
                                                                                                                                                  \mathbf{if}\;\ell \leq -6.4 \cdot 10^{-160}:\\
                                                                                                                                                  \;\;\;\;\frac{-d}{\sqrt{-\ell} \cdot \sqrt{-h}} \cdot 1\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\
                                                                                                                                                  \;\;\;\;\frac{d}{\sqrt{\sqrt{\left|h\right| \cdot \left(\ell \cdot \ell\right)} \cdot \sqrt{\left|h\right|}}}\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                  \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                                                                  
                                                                                                                                                  
                                                                                                                                                  \end{array}
                                                                                                                                                  \end{array}
                                                                                                                                                  
                                                                                                                                                  Derivation
                                                                                                                                                  1. Split input into 3 regimes
                                                                                                                                                  2. if l < -6.40000000000000018e-160

                                                                                                                                                    1. Initial program 78.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites48.7%

                                                                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                      2. 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 1 \]
                                                                                                                                                        2. metadata-eval48.7

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\right) \cdot 1 \]
                                                                                                                                                        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 1 \]
                                                                                                                                                        4. unpow1/2N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                                                                                                                        5. lift-/.f64N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                                                                                                                        6. frac-2negN/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                        7. sqrt-divN/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                        8. lower-/.f64N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                        9. lower-sqrt.f64N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right) \cdot 1 \]
                                                                                                                                                        10. lower-neg.f64N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right) \cdot 1 \]
                                                                                                                                                        11. lower-sqrt.f64N/A

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot 1 \]
                                                                                                                                                        12. lower-neg.f6450.5

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-\ell}}}\right) \cdot 1 \]
                                                                                                                                                      3. Applied rewrites50.5%

                                                                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot 1 \]
                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                        1. lift-*.f64N/A

                                                                                                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right)} \cdot 1 \]
                                                                                                                                                        2. *-commutativeN/A

                                                                                                                                                          \[\leadsto \color{blue}{\left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot 1 \]
                                                                                                                                                        3. lift-/.f64N/A

                                                                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot 1 \]
                                                                                                                                                        4. frac-2negN/A

                                                                                                                                                          \[\leadsto \left(\color{blue}{\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot 1 \]
                                                                                                                                                        5. lift-/.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot 1 \]
                                                                                                                                                        6. metadata-evalN/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot 1 \]
                                                                                                                                                        7. lift-pow.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}\right) \cdot 1 \]
                                                                                                                                                        8. unpow1/2N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot 1 \]
                                                                                                                                                        9. lift-/.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot 1 \]
                                                                                                                                                        10. frac-2negN/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}}\right) \cdot 1 \]
                                                                                                                                                        11. lift-neg.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \sqrt{\frac{\color{blue}{-d}}{\mathsf{neg}\left(h\right)}}\right) \cdot 1 \]
                                                                                                                                                        12. lift-neg.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \sqrt{\frac{-d}{\color{blue}{-h}}}\right) \cdot 1 \]
                                                                                                                                                        13. sqrt-undivN/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}}\right) \cdot 1 \]
                                                                                                                                                        14. lift-sqrt.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \frac{\color{blue}{\sqrt{-d}}}{\sqrt{-h}}\right) \cdot 1 \]
                                                                                                                                                        15. lift-sqrt.f64N/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{-h}}}\right) \cdot 1 \]
                                                                                                                                                        16. frac-2negN/A

                                                                                                                                                          \[\leadsto \left(\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-\ell}\right)} \cdot \color{blue}{\frac{\mathsf{neg}\left(\sqrt{-d}\right)}{\mathsf{neg}\left(\sqrt{-h}\right)}}\right) \cdot 1 \]
                                                                                                                                                        17. frac-timesN/A

                                                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(\sqrt{-d}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{-d}\right)\right)}{\left(\mathsf{neg}\left(\sqrt{-\ell}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{-h}\right)\right)}} \cdot 1 \]
                                                                                                                                                      5. Applied rewrites53.9%

                                                                                                                                                        \[\leadsto \color{blue}{\frac{-d}{\left(-\sqrt{-\ell}\right) \cdot \left(-\sqrt{-h}\right)}} \cdot 1 \]

                                                                                                                                                      if -6.40000000000000018e-160 < l < -3.999999999999988e-310

                                                                                                                                                      1. Initial program 64.6%

                                                                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                      2. Add Preprocessing
                                                                                                                                                      3. Taylor expanded in d around inf

                                                                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites10.1%

                                                                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                        2. Taylor expanded in d around inf

                                                                                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                                        3. 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-*.f6429.9

                                                                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                                        4. Applied rewrites29.9%

                                                                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                                        5. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites29.9%

                                                                                                                                                            \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites64.7%

                                                                                                                                                              \[\leadsto \frac{d}{\sqrt{\sqrt{\left|h\right| \cdot \left(\ell \cdot \ell\right)} \cdot \sqrt{\left|h\right|}}} \]

                                                                                                                                                            if -3.999999999999988e-310 < l

                                                                                                                                                            1. Initial program 62.7%

                                                                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                            2. Add Preprocessing
                                                                                                                                                            3. Taylor expanded in d around inf

                                                                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                              1. Applied rewrites41.0%

                                                                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                              2. Taylor expanded in d around inf

                                                                                                                                                                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                                              3. 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-*.f6443.6

                                                                                                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                                              4. Applied rewrites43.6%

                                                                                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                                              5. Step-by-step derivation
                                                                                                                                                                1. Applied rewrites44.4%

                                                                                                                                                                  \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites52.6%

                                                                                                                                                                    \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                                                                3. Recombined 3 regimes into one program.
                                                                                                                                                                4. Final simplification54.2%

                                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -6.4 \cdot 10^{-160}:\\ \;\;\;\;\frac{-d}{\sqrt{-\ell} \cdot \sqrt{-h}} \cdot 1\\ \mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{\sqrt{\left|h\right| \cdot \left(\ell \cdot \ell\right)} \cdot \sqrt{\left|h\right|}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                                                                                                                5. Add Preprocessing

                                                                                                                                                                Alternative 22: 26.5% accurate, 15.3× speedup?

                                                                                                                                                                \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                                (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                                                                                                                                assert(d < h && h < l && l < M && M < D);
                                                                                                                                                                double code(double d, double h, double l, double M, double D) {
                                                                                                                                                                	return d / sqrt((l * h));
                                                                                                                                                                }
                                                                                                                                                                
                                                                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                                real(8) function code(d, h, l, m, d_1)
                                                                                                                                                                    real(8), intent (in) :: d
                                                                                                                                                                    real(8), intent (in) :: h
                                                                                                                                                                    real(8), intent (in) :: l
                                                                                                                                                                    real(8), intent (in) :: m
                                                                                                                                                                    real(8), intent (in) :: d_1
                                                                                                                                                                    code = d / sqrt((l * h))
                                                                                                                                                                end function
                                                                                                                                                                
                                                                                                                                                                assert d < h && h < l && l < M && M < D;
                                                                                                                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                                                                                                                	return d / Math.sqrt((l * h));
                                                                                                                                                                }
                                                                                                                                                                
                                                                                                                                                                [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                                                                                def code(d, h, l, M, D):
                                                                                                                                                                	return d / math.sqrt((l * h))
                                                                                                                                                                
                                                                                                                                                                d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                                                                function code(d, h, l, M, D)
                                                                                                                                                                	return Float64(d / sqrt(Float64(l * h)))
                                                                                                                                                                end
                                                                                                                                                                
                                                                                                                                                                d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                                                                                function tmp = code(d, h, l, M, D)
                                                                                                                                                                	tmp = d / sqrt((l * h));
                                                                                                                                                                end
                                                                                                                                                                
                                                                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                                                                code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                
                                                                                                                                                                \begin{array}{l}
                                                                                                                                                                [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                                                                \\
                                                                                                                                                                \frac{d}{\sqrt{\ell \cdot h}}
                                                                                                                                                                \end{array}
                                                                                                                                                                
                                                                                                                                                                Derivation
                                                                                                                                                                1. Initial program 69.5%

                                                                                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                                                                2. Add Preprocessing
                                                                                                                                                                3. Taylor expanded in d around inf

                                                                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites41.6%

                                                                                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                                                                  2. Taylor expanded in d around inf

                                                                                                                                                                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                                                                  3. 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-*.f6427.1

                                                                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                                                                  4. Applied rewrites27.1%

                                                                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                                                                  5. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites27.5%

                                                                                                                                                                      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                                                                    2. Add Preprocessing

                                                                                                                                                                    Reproduce

                                                                                                                                                                    ?
                                                                                                                                                                    herbie shell --seed 2024305 
                                                                                                                                                                    (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)))))