Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.7% → 79.5%
Time: 18.0s
Alternatives: 26
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 26 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.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
public static double code(double d, double h, double l, double M, double D) {
	return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
def code(d, h, l, M, D):
	return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
function code(d, h, l, M, D)
	return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
function tmp = code(d, h, l, M, D)
	tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}

Alternative 1: 79.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := 1 - \frac{t\_0 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{+175}:\\ \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t\_1\\ \mathbf{elif}\;\ell \leq -1.35 \cdot 10^{+101}:\\ \;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{h}{\ell}\right)}^{1.5}, \frac{-0.125 \cdot {\left(D \cdot M\right)}^{2}}{d}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot t\_1\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_0 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (/ D d) M))
        (t_1
         (-
          1.0
          (*
           (/ (* t_0 0.5) l)
           (/ (* (* 0.5 (* D 0.5)) (/ M d)) (pow h -1.0))))))
   (if (<= l -1e+175)
     (* (* (pow (sqrt (/ h d)) -1.0) (/ (sqrt (- d)) (sqrt (- l)))) t_1)
     (if (<= l -1.35e+101)
       (/
        (fma
         (pow (/ h l) 1.5)
         (/ (* -0.125 (pow (* D M) 2.0)) d)
         (* (sqrt (/ h l)) d))
        h)
       (if (<= l -5e-310)
         (* (* (- d) (sqrt (pow (* l h) -1.0))) t_1)
         (if (<= l 3.7e+40)
           (*
            (fma (* (/ (* t_0 -0.5) l) (* (/ M d) (* 0.25 D))) h 1.0)
            (/ d (sqrt (* l h))))
           (/
            (/
             (* (fma (* -0.5 (/ h l)) (* (pow (/ (/ d D) M) -2.0) 0.25) 1.0) d)
             (sqrt l))
            (sqrt h))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D / d) * M;
	double t_1 = 1.0 - (((t_0 * 0.5) / l) * (((0.5 * (D * 0.5)) * (M / d)) / pow(h, -1.0)));
	double tmp;
	if (l <= -1e+175) {
		tmp = (pow(sqrt((h / d)), -1.0) * (sqrt(-d) / sqrt(-l))) * t_1;
	} else if (l <= -1.35e+101) {
		tmp = fma(pow((h / l), 1.5), ((-0.125 * pow((D * M), 2.0)) / d), (sqrt((h / l)) * d)) / h;
	} else if (l <= -5e-310) {
		tmp = (-d * sqrt(pow((l * h), -1.0))) * t_1;
	} else if (l <= 3.7e+40) {
		tmp = fma((((t_0 * -0.5) / l) * ((M / d) * (0.25 * D))), h, 1.0) * (d / sqrt((l * h)));
	} else {
		tmp = ((fma((-0.5 * (h / l)), (pow(((d / D) / M), -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h);
	}
	return tmp;
}
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D / d) * M)
	t_1 = Float64(1.0 - Float64(Float64(Float64(t_0 * 0.5) / l) * Float64(Float64(Float64(0.5 * Float64(D * 0.5)) * Float64(M / d)) / (h ^ -1.0))))
	tmp = 0.0
	if (l <= -1e+175)
		tmp = Float64(Float64((sqrt(Float64(h / d)) ^ -1.0) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l)))) * t_1);
	elseif (l <= -1.35e+101)
		tmp = Float64(fma((Float64(h / l) ^ 1.5), Float64(Float64(-0.125 * (Float64(D * M) ^ 2.0)) / d), Float64(sqrt(Float64(h / l)) * d)) / h);
	elseif (l <= -5e-310)
		tmp = Float64(Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0))) * t_1);
	elseif (l <= 3.7e+40)
		tmp = Float64(fma(Float64(Float64(Float64(t_0 * -0.5) / l) * Float64(Float64(M / d) * Float64(0.25 * D))), h, 1.0) * Float64(d / sqrt(Float64(l * h))));
	else
		tmp = Float64(Float64(Float64(fma(Float64(-0.5 * Float64(h / l)), Float64((Float64(Float64(d / D) / M) ^ -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(N[(N[(t$95$0 * 0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(0.5 * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] / N[Power[h, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1e+175], N[(N[(N[Power[N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision], -1.0], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[l, -1.35e+101], N[(N[(N[Power[N[(h / l), $MachinePrecision], 1.5], $MachinePrecision] * N[(N[(-0.125 * N[Power[N[(D * M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] + N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[l, 3.7e+40], N[(N[(N[(N[(N[(t$95$0 * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{D}{d} \cdot M\\
t_1 := 1 - \frac{t\_0 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{+175}:\\
\;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t\_1\\

\mathbf{elif}\;\ell \leq -1.35 \cdot 10^{+101}:\\
\;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{h}{\ell}\right)}^{1.5}, \frac{-0.125 \cdot {\left(D \cdot M\right)}^{2}}{d}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\

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

\mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < -9.9999999999999994e174

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e174 < l < -1.35000000000000003e101

    1. Initial program 59.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 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}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}} \]
    6. Step-by-step derivation
      1. Applied rewrites91.0%

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

      if -1.35000000000000003e101 < l < -4.999999999999985e-310

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.999999999999985e-310 < l < 3.7e40

      1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.7e40 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 79.9% accurate, 0.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d}\\ t_1 := \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_2 := \left(\mathsf{fma}\left(t\_0, \left(-0.25 \cdot \frac{h}{\ell}\right) \cdot \left(0.5 \cdot t\_0\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ t_3 := \frac{d}{\sqrt{\ell \cdot h}}\\ t_4 := \left|t\_3\right|\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_3\\ \end{array} \end{array} \]
    (FPCore (d h l M D)
     :precision binary64
     (let* ((t_0 (/ (* D M) d))
            (t_1
             (*
              (* (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_2
             (*
              (* (fma t_0 (* (* -0.25 (/ h l)) (* 0.5 t_0)) 1.0) (sqrt (/ d l)))
              (sqrt (/ d h))))
            (t_3 (/ d (sqrt (* l h))))
            (t_4 (fabs t_3)))
       (if (<= t_1 -2e-58)
         t_2
         (if (<= t_1 0.0)
           t_4
           (if (<= t_1 5e+264)
             t_2
             (if (<= t_1 INFINITY)
               t_4
               (*
                (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                t_3)))))))
    double code(double d, double h, double l, double M, double D) {
    	double t_0 = (D * M) / d;
    	double t_1 = (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_2 = (fma(t_0, ((-0.25 * (h / l)) * (0.5 * t_0)), 1.0) * sqrt((d / l))) * sqrt((d / h));
    	double t_3 = d / sqrt((l * h));
    	double t_4 = fabs(t_3);
    	double tmp;
    	if (t_1 <= -2e-58) {
    		tmp = t_2;
    	} else if (t_1 <= 0.0) {
    		tmp = t_4;
    	} else if (t_1 <= 5e+264) {
    		tmp = t_2;
    	} else if (t_1 <= ((double) INFINITY)) {
    		tmp = t_4;
    	} else {
    		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_3;
    	}
    	return tmp;
    }
    
    function code(d, h, l, M, D)
    	t_0 = Float64(Float64(D * M) / d)
    	t_1 = 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_2 = Float64(Float64(fma(t_0, Float64(Float64(-0.25 * Float64(h / l)) * Float64(0.5 * t_0)), 1.0) * sqrt(Float64(d / l))) * sqrt(Float64(d / h)))
    	t_3 = Float64(d / sqrt(Float64(l * h)))
    	t_4 = abs(t_3)
    	tmp = 0.0
    	if (t_1 <= -2e-58)
    		tmp = t_2;
    	elseif (t_1 <= 0.0)
    		tmp = t_4;
    	elseif (t_1 <= 5e+264)
    		tmp = t_2;
    	elseif (t_1 <= Inf)
    		tmp = t_4;
    	else
    		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_3);
    	end
    	return tmp
    end
    
    code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = 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$2 = N[(N[(N[(t$95$0 * N[(N[(-0.25 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(0.5 * t$95$0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Abs[t$95$3], $MachinePrecision]}, If[LessEqual[t$95$1, -2e-58], t$95$2, If[LessEqual[t$95$1, 0.0], t$95$4, If[LessEqual[t$95$1, 5e+264], t$95$2, If[LessEqual[t$95$1, Infinity], t$95$4, N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{D \cdot M}{d}\\
    t_1 := \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_2 := \left(\mathsf{fma}\left(t\_0, \left(-0.25 \cdot \frac{h}{\ell}\right) \cdot \left(0.5 \cdot t\_0\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
    t_3 := \frac{d}{\sqrt{\ell \cdot h}}\\
    t_4 := \left|t\_3\right|\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-58}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 0:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq \infty:\\
    \;\;\;\;t\_4\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_3\\
    
    
    \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)))) < -2.0000000000000001e-58 or 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)))) < 5.00000000000000033e264

      1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.0000000000000001e-58 < (*.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 or 5.00000000000000033e264 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

      1. Initial program 43.8%

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 -2 \cdot 10^{-58}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{D \cdot M}{d}, \left(-0.25 \cdot \frac{h}{\ell}\right) \cdot \left(0.5 \cdot \frac{D \cdot M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 0:\\ \;\;\;\;\left|\frac{d}{\sqrt{\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^{+264}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{D \cdot M}{d}, \left(-0.25 \cdot \frac{h}{\ell}\right) \cdot \left(0.5 \cdot \frac{D \cdot M}{d}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 76.6% accurate, 0.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ t_1 := \left|t\_0\right|\\ t_2 := \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_3 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-25}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \frac{\left(0.5 \cdot \left(D \cdot M\right)\right) \cdot \left(-0.5 \cdot h\right)}{d \cdot \ell}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-258}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+183}:\\ \;\;\;\;\frac{t\_3}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\ \end{array} \end{array} \]
      (FPCore (d h l M D)
       :precision binary64
       (let* ((t_0 (/ d (sqrt (* l h))))
              (t_1 (fabs t_0))
              (t_2
               (*
                (* (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_3 (sqrt (/ d h))))
         (if (<= t_2 -4e-25)
           (*
            (*
             (fma
              (* (/ (* M D) d) 0.5)
              (/ (* (* 0.5 (* D M)) (* -0.5 h)) (* d l))
              1.0)
             (sqrt (/ d l)))
            t_3)
           (if (<= t_2 1e-258)
             t_1
             (if (<= t_2 1e+183)
               (/ t_3 (sqrt (/ l d)))
               (if (<= t_2 INFINITY)
                 t_1
                 (*
                  (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                  t_0)))))))
      double code(double d, double h, double l, double M, double D) {
      	double t_0 = d / sqrt((l * h));
      	double t_1 = fabs(t_0);
      	double t_2 = (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_3 = sqrt((d / h));
      	double tmp;
      	if (t_2 <= -4e-25) {
      		tmp = (fma((((M * D) / d) * 0.5), (((0.5 * (D * M)) * (-0.5 * h)) / (d * l)), 1.0) * sqrt((d / l))) * t_3;
      	} else if (t_2 <= 1e-258) {
      		tmp = t_1;
      	} else if (t_2 <= 1e+183) {
      		tmp = t_3 / sqrt((l / d));
      	} else if (t_2 <= ((double) INFINITY)) {
      		tmp = t_1;
      	} else {
      		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_0;
      	}
      	return tmp;
      }
      
      function code(d, h, l, M, D)
      	t_0 = Float64(d / sqrt(Float64(l * h)))
      	t_1 = abs(t_0)
      	t_2 = 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_3 = sqrt(Float64(d / h))
      	tmp = 0.0
      	if (t_2 <= -4e-25)
      		tmp = Float64(Float64(fma(Float64(Float64(Float64(M * D) / d) * 0.5), Float64(Float64(Float64(0.5 * Float64(D * M)) * Float64(-0.5 * h)) / Float64(d * l)), 1.0) * sqrt(Float64(d / l))) * t_3);
      	elseif (t_2 <= 1e-258)
      		tmp = t_1;
      	elseif (t_2 <= 1e+183)
      		tmp = Float64(t_3 / sqrt(Float64(l / d)));
      	elseif (t_2 <= Inf)
      		tmp = t_1;
      	else
      		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_0);
      	end
      	return tmp
      end
      
      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, Block[{t$95$2 = 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$3 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, -4e-25], N[(N[(N[(N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(N[(0.5 * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * h), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 1e-258], t$95$1, If[LessEqual[t$95$2, 1e+183], N[(t$95$3 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$1, N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
      t_1 := \left|t\_0\right|\\
      t_2 := \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_3 := \sqrt{\frac{d}{h}}\\
      \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-25}:\\
      \;\;\;\;\left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \frac{\left(0.5 \cdot \left(D \cdot M\right)\right) \cdot \left(-0.5 \cdot h\right)}{d \cdot \ell}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_3\\
      
      \mathbf{elif}\;t\_2 \leq 10^{-258}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 10^{+183}:\\
      \;\;\;\;\frac{t\_3}{\sqrt{\frac{\ell}{d}}}\\
      
      \mathbf{elif}\;t\_2 \leq \infty:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.00000000000000015e-25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.00000000000000015e-25 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

        1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

          if 9.99999999999999954e-259 < (*.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.99999999999999947e182

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]
          7. Recombined 4 regimes into one program.
          8. Final simplification78.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 -4 \cdot 10^{-25}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \frac{\left(0.5 \cdot \left(D \cdot M\right)\right) \cdot \left(-0.5 \cdot h\right)}{d \cdot \ell}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 10^{-258}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\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 10^{+183}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \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 \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 4: 71.4% accurate, 0.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ t_1 := \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_2 := \sqrt{\frac{d}{h}}\\ t_3 := \left|t\_0\right|\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-8}:\\ \;\;\;\;\left(\left(\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot \frac{\frac{D}{d}}{d}\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-258}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 10^{+183}:\\ \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\ \end{array} \end{array} \]
          (FPCore (d h l M D)
           :precision binary64
           (let* ((t_0 (/ d (sqrt (* l h))))
                  (t_1
                   (*
                    (* (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_2 (sqrt (/ d h)))
                  (t_3 (fabs t_0)))
             (if (<= t_1 -2e-8)
               (*
                (* (* (* (* (/ (* (* M M) h) l) -0.125) D) (/ (/ D d) d)) (sqrt (/ d l)))
                t_2)
               (if (<= t_1 1e-258)
                 t_3
                 (if (<= t_1 1e+183)
                   (/ t_2 (sqrt (/ l d)))
                   (if (<= t_1 INFINITY)
                     t_3
                     (*
                      (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                      t_0)))))))
          double code(double d, double h, double l, double M, double D) {
          	double t_0 = d / sqrt((l * h));
          	double t_1 = (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_2 = sqrt((d / h));
          	double t_3 = fabs(t_0);
          	double tmp;
          	if (t_1 <= -2e-8) {
          		tmp = (((((((M * M) * h) / l) * -0.125) * D) * ((D / d) / d)) * sqrt((d / l))) * t_2;
          	} else if (t_1 <= 1e-258) {
          		tmp = t_3;
          	} else if (t_1 <= 1e+183) {
          		tmp = t_2 / sqrt((l / d));
          	} else if (t_1 <= ((double) INFINITY)) {
          		tmp = t_3;
          	} else {
          		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_0;
          	}
          	return tmp;
          }
          
          function code(d, h, l, M, D)
          	t_0 = Float64(d / sqrt(Float64(l * h)))
          	t_1 = 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_2 = sqrt(Float64(d / h))
          	t_3 = abs(t_0)
          	tmp = 0.0
          	if (t_1 <= -2e-8)
          		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(M * M) * h) / l) * -0.125) * D) * Float64(Float64(D / d) / d)) * sqrt(Float64(d / l))) * t_2);
          	elseif (t_1 <= 1e-258)
          		tmp = t_3;
          	elseif (t_1 <= 1e+183)
          		tmp = Float64(t_2 / sqrt(Float64(l / d)));
          	elseif (t_1 <= Inf)
          		tmp = t_3;
          	else
          		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_0);
          	end
          	return tmp
          end
          
          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[t$95$0], $MachinePrecision]}, If[LessEqual[t$95$1, -2e-8], N[(N[(N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision] * -0.125), $MachinePrecision] * D), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e-258], t$95$3, If[LessEqual[t$95$1, 1e+183], N[(t$95$2 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$3, N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
          t_1 := \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_2 := \sqrt{\frac{d}{h}}\\
          t_3 := \left|t\_0\right|\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-8}:\\
          \;\;\;\;\left(\left(\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot \frac{\frac{D}{d}}{d}\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\
          
          \mathbf{elif}\;t\_1 \leq 10^{-258}:\\
          \;\;\;\;t\_3\\
          
          \mathbf{elif}\;t\_1 \leq 10^{+183}:\\
          \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\
          
          \mathbf{elif}\;t\_1 \leq \infty:\\
          \;\;\;\;t\_3\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 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)))) < -2e-8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2e-8 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

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

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

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

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

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

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

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

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

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

              if 9.99999999999999954e-259 < (*.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.99999999999999947e182

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]
              7. Recombined 4 regimes into one program.
              8. Final simplification72.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 -2 \cdot 10^{-8}:\\ \;\;\;\;\left(\left(\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot \frac{\frac{D}{d}}{d}\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 10^{-258}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\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 10^{+183}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \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 \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
              9. Add Preprocessing

              Alternative 5: 70.7% accurate, 0.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ t_1 := \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_2 := \sqrt{\frac{d}{h}}\\ t_3 := \left|t\_0\right|\\ \mathbf{if}\;t\_1 \leq -4:\\ \;\;\;\;\left(\left(\frac{\left(D \cdot D\right) \cdot -0.125}{\ell} \cdot \left(\frac{\frac{M \cdot M}{d}}{d} \cdot h\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-258}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 10^{+183}:\\ \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\ \end{array} \end{array} \]
              (FPCore (d h l M D)
               :precision binary64
               (let* ((t_0 (/ d (sqrt (* l h))))
                      (t_1
                       (*
                        (* (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_2 (sqrt (/ d h)))
                      (t_3 (fabs t_0)))
                 (if (<= t_1 -4.0)
                   (*
                    (* (* (/ (* (* D D) -0.125) l) (* (/ (/ (* M M) d) d) h)) (sqrt (/ d l)))
                    t_2)
                   (if (<= t_1 1e-258)
                     t_3
                     (if (<= t_1 1e+183)
                       (/ t_2 (sqrt (/ l d)))
                       (if (<= t_1 INFINITY)
                         t_3
                         (*
                          (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                          t_0)))))))
              double code(double d, double h, double l, double M, double D) {
              	double t_0 = d / sqrt((l * h));
              	double t_1 = (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_2 = sqrt((d / h));
              	double t_3 = fabs(t_0);
              	double tmp;
              	if (t_1 <= -4.0) {
              		tmp = (((((D * D) * -0.125) / l) * ((((M * M) / d) / d) * h)) * sqrt((d / l))) * t_2;
              	} else if (t_1 <= 1e-258) {
              		tmp = t_3;
              	} else if (t_1 <= 1e+183) {
              		tmp = t_2 / sqrt((l / d));
              	} else if (t_1 <= ((double) INFINITY)) {
              		tmp = t_3;
              	} else {
              		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_0;
              	}
              	return tmp;
              }
              
              function code(d, h, l, M, D)
              	t_0 = Float64(d / sqrt(Float64(l * h)))
              	t_1 = 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_2 = sqrt(Float64(d / h))
              	t_3 = abs(t_0)
              	tmp = 0.0
              	if (t_1 <= -4.0)
              		tmp = Float64(Float64(Float64(Float64(Float64(Float64(D * D) * -0.125) / l) * Float64(Float64(Float64(Float64(M * M) / d) / d) * h)) * sqrt(Float64(d / l))) * t_2);
              	elseif (t_1 <= 1e-258)
              		tmp = t_3;
              	elseif (t_1 <= 1e+183)
              		tmp = Float64(t_2 / sqrt(Float64(l / d)));
              	elseif (t_1 <= Inf)
              		tmp = t_3;
              	else
              		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_0);
              	end
              	return tmp
              end
              
              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[t$95$0], $MachinePrecision]}, If[LessEqual[t$95$1, -4.0], N[(N[(N[(N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e-258], t$95$3, If[LessEqual[t$95$1, 1e+183], N[(t$95$2 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$3, N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
              t_1 := \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_2 := \sqrt{\frac{d}{h}}\\
              t_3 := \left|t\_0\right|\\
              \mathbf{if}\;t\_1 \leq -4:\\
              \;\;\;\;\left(\left(\frac{\left(D \cdot D\right) \cdot -0.125}{\ell} \cdot \left(\frac{\frac{M \cdot M}{d}}{d} \cdot h\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 10^{-258}:\\
              \;\;\;\;t\_3\\
              
              \mathbf{elif}\;t\_1 \leq 10^{+183}:\\
              \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\
              
              \mathbf{elif}\;t\_1 \leq \infty:\\
              \;\;\;\;t\_3\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

                  if 9.99999999999999954e-259 < (*.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.99999999999999947e182

                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]
                  7. Recombined 4 regimes into one program.
                  8. Final simplification72.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 -4:\\ \;\;\;\;\left(\left(\frac{\left(D \cdot D\right) \cdot -0.125}{\ell} \cdot \left(\frac{\frac{M \cdot M}{d}}{d} \cdot h\right)\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 10^{-258}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\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 10^{+183}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \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 \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 6: 68.6% accurate, 0.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ t_1 := \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_2 := \sqrt{\frac{d}{h}}\\ t_3 := \left|t\_0\right|\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-25}:\\ \;\;\;\;\left(\frac{\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-258}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 10^{+183}:\\ \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\ \end{array} \end{array} \]
                  (FPCore (d h l M D)
                   :precision binary64
                   (let* ((t_0 (/ d (sqrt (* l h))))
                          (t_1
                           (*
                            (* (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_2 (sqrt (/ d h)))
                          (t_3 (fabs t_0)))
                     (if (<= t_1 -4e-25)
                       (*
                        (* (/ (* (* (* (/ (* (* M M) h) l) -0.125) D) D) (* d d)) (sqrt (/ d l)))
                        t_2)
                       (if (<= t_1 1e-258)
                         t_3
                         (if (<= t_1 1e+183)
                           (/ t_2 (sqrt (/ l d)))
                           (if (<= t_1 INFINITY)
                             t_3
                             (*
                              (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                              t_0)))))))
                  double code(double d, double h, double l, double M, double D) {
                  	double t_0 = d / sqrt((l * h));
                  	double t_1 = (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_2 = sqrt((d / h));
                  	double t_3 = fabs(t_0);
                  	double tmp;
                  	if (t_1 <= -4e-25) {
                  		tmp = ((((((((M * M) * h) / l) * -0.125) * D) * D) / (d * d)) * sqrt((d / l))) * t_2;
                  	} else if (t_1 <= 1e-258) {
                  		tmp = t_3;
                  	} else if (t_1 <= 1e+183) {
                  		tmp = t_2 / sqrt((l / d));
                  	} else if (t_1 <= ((double) INFINITY)) {
                  		tmp = t_3;
                  	} else {
                  		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_0;
                  	}
                  	return tmp;
                  }
                  
                  function code(d, h, l, M, D)
                  	t_0 = Float64(d / sqrt(Float64(l * h)))
                  	t_1 = 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_2 = sqrt(Float64(d / h))
                  	t_3 = abs(t_0)
                  	tmp = 0.0
                  	if (t_1 <= -4e-25)
                  		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(M * M) * h) / l) * -0.125) * D) * D) / Float64(d * d)) * sqrt(Float64(d / l))) * t_2);
                  	elseif (t_1 <= 1e-258)
                  		tmp = t_3;
                  	elseif (t_1 <= 1e+183)
                  		tmp = Float64(t_2 / sqrt(Float64(l / d)));
                  	elseif (t_1 <= Inf)
                  		tmp = t_3;
                  	else
                  		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_0);
                  	end
                  	return tmp
                  end
                  
                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[t$95$0], $MachinePrecision]}, If[LessEqual[t$95$1, -4e-25], N[(N[(N[(N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision] * -0.125), $MachinePrecision] * D), $MachinePrecision] * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e-258], t$95$3, If[LessEqual[t$95$1, 1e+183], N[(t$95$2 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$3, N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
                  t_1 := \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_2 := \sqrt{\frac{d}{h}}\\
                  t_3 := \left|t\_0\right|\\
                  \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-25}:\\
                  \;\;\;\;\left(\frac{\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{-258}:\\
                  \;\;\;\;t\_3\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+183}:\\
                  \;\;\;\;\frac{t\_2}{\sqrt{\frac{\ell}{d}}}\\
                  
                  \mathbf{elif}\;t\_1 \leq \infty:\\
                  \;\;\;\;t\_3\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.00000000000000015e-25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -4.00000000000000015e-25 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                      1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

                        if 9.99999999999999954e-259 < (*.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.99999999999999947e182

                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

                          1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\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 -4 \cdot 10^{-25}:\\ \;\;\;\;\left(\frac{\left(\left(\frac{\left(M \cdot M\right) \cdot h}{\ell} \cdot -0.125\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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 10^{-258}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\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 10^{+183}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \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 \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 7: 58.8% accurate, 0.2× speedup?

                        \[\begin{array}{l} \\ \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 -2 \cdot 10^{+166}:\\ \;\;\;\;\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d} \cdot \frac{\frac{D \cdot D}{\ell}}{d}\right) \cdot t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\right):\\ \;\;\;\;\left|t\_1\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \end{array} \end{array} \]
                        (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 -2e+166)
                             (* (* (/ (* (* (* M M) h) -0.125) d) (/ (/ (* D D) l) d)) t_1)
                             (if (or (<= t_0 1e-258) (not (<= t_0 1e+183)))
                               (fabs t_1)
                               (/ (sqrt (/ d h)) (sqrt (/ l 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 <= -2e+166) {
                        		tmp = (((((M * M) * h) * -0.125) / d) * (((D * D) / l) / d)) * t_1;
                        	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                        		tmp = fabs(t_1);
                        	} else {
                        		tmp = sqrt((d / h)) / sqrt((l / d));
                        	}
                        	return tmp;
                        }
                        
                        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 <= (-2d+166)) then
                                tmp = (((((m * m) * h) * (-0.125d0)) / d) * (((d_1 * d_1) / l) / d)) * t_1
                            else if ((t_0 <= 1d-258) .or. (.not. (t_0 <= 1d+183))) then
                                tmp = abs(t_1)
                            else
                                tmp = sqrt((d / h)) / sqrt((l / d))
                            end if
                            code = tmp
                        end function
                        
                        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 <= -2e+166) {
                        		tmp = (((((M * M) * h) * -0.125) / d) * (((D * D) / l) / d)) * t_1;
                        	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                        		tmp = Math.abs(t_1);
                        	} else {
                        		tmp = Math.sqrt((d / h)) / Math.sqrt((l / d));
                        	}
                        	return tmp;
                        }
                        
                        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 <= -2e+166:
                        		tmp = (((((M * M) * h) * -0.125) / d) * (((D * D) / l) / d)) * t_1
                        	elif (t_0 <= 1e-258) or not (t_0 <= 1e+183):
                        		tmp = math.fabs(t_1)
                        	else:
                        		tmp = math.sqrt((d / h)) / math.sqrt((l / d))
                        	return tmp
                        
                        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 <= -2e+166)
                        		tmp = Float64(Float64(Float64(Float64(Float64(Float64(M * M) * h) * -0.125) / d) * Float64(Float64(Float64(D * D) / l) / d)) * t_1);
                        	elseif ((t_0 <= 1e-258) || !(t_0 <= 1e+183))
                        		tmp = abs(t_1);
                        	else
                        		tmp = Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d)));
                        	end
                        	return tmp
                        end
                        
                        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 <= -2e+166)
                        		tmp = (((((M * M) * h) * -0.125) / d) * (((D * D) / l) / d)) * t_1;
                        	elseif ((t_0 <= 1e-258) || ~((t_0 <= 1e+183)))
                        		tmp = abs(t_1);
                        	else
                        		tmp = sqrt((d / h)) / sqrt((l / d));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        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, -2e+166], N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * -0.125), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[Or[LessEqual[t$95$0, 1e-258], N[Not[LessEqual[t$95$0, 1e+183]], $MachinePrecision]], N[Abs[t$95$1], $MachinePrecision], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \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 -2 \cdot 10^{+166}:\\
                        \;\;\;\;\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d} \cdot \frac{\frac{D \cdot D}{\ell}}{d}\right) \cdot t\_1\\
                        
                        \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\right):\\
                        \;\;\;\;\left|t\_1\right|\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\
                        
                        
                        \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)))) < -1.99999999999999988e166

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \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{\ell \cdot h}} \]
                          8. Step-by-step derivation
                            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.99999999999999988e166 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.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 33.4%

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

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

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

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

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

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

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

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

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

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

                            if 9.99999999999999954e-259 < (*.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.99999999999999947e182

                            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \]
                            7. Recombined 3 regimes into one program.
                            8. Final simplification59.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 -2 \cdot 10^{+166}:\\ \;\;\;\;\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d} \cdot \frac{\frac{D \cdot D}{\ell}}{d}\right) \cdot \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 10^{-258} \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 10^{+183}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 8: 55.9% accurate, 0.2× speedup?

                            \[\begin{array}{l} \\ \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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \end{array} \end{array} \]
                            (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 -2e-58)
                                 (/ (* (- d) (sqrt (/ h l))) h)
                                 (if (or (<= t_0 1e-258) (not (<= t_0 1e+183)))
                                   (fabs (/ d (sqrt (* l h))))
                                   (/ (sqrt (/ d h)) (sqrt (/ l 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 <= -2e-58) {
                            		tmp = (-d * sqrt((h / l))) / h;
                            	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                            		tmp = fabs((d / sqrt((l * h))));
                            	} else {
                            		tmp = sqrt((d / h)) / sqrt((l / d));
                            	}
                            	return tmp;
                            }
                            
                            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 <= (-2d-58)) then
                                    tmp = (-d * sqrt((h / l))) / h
                                else if ((t_0 <= 1d-258) .or. (.not. (t_0 <= 1d+183))) then
                                    tmp = abs((d / sqrt((l * h))))
                                else
                                    tmp = sqrt((d / h)) / sqrt((l / d))
                                end if
                                code = tmp
                            end function
                            
                            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 <= -2e-58) {
                            		tmp = (-d * Math.sqrt((h / l))) / h;
                            	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                            		tmp = Math.abs((d / Math.sqrt((l * h))));
                            	} else {
                            		tmp = Math.sqrt((d / h)) / Math.sqrt((l / d));
                            	}
                            	return tmp;
                            }
                            
                            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 <= -2e-58:
                            		tmp = (-d * math.sqrt((h / l))) / h
                            	elif (t_0 <= 1e-258) or not (t_0 <= 1e+183):
                            		tmp = math.fabs((d / math.sqrt((l * h))))
                            	else:
                            		tmp = math.sqrt((d / h)) / math.sqrt((l / d))
                            	return tmp
                            
                            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 <= -2e-58)
                            		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                            	elseif ((t_0 <= 1e-258) || !(t_0 <= 1e+183))
                            		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                            	else
                            		tmp = Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d)));
                            	end
                            	return tmp
                            end
                            
                            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 <= -2e-58)
                            		tmp = (-d * sqrt((h / l))) / h;
                            	elseif ((t_0 <= 1e-258) || ~((t_0 <= 1e+183)))
                            		tmp = abs((d / sqrt((l * h))));
                            	else
                            		tmp = sqrt((d / h)) / sqrt((l / d));
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            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, -2e-58], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[Or[LessEqual[t$95$0, 1e-258], N[Not[LessEqual[t$95$0, 1e+183]], $MachinePrecision]], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \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 -2 \cdot 10^{-58}:\\
                            \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                            
                            \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\right):\\
                            \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\
                            
                            
                            \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)))) < -2.0000000000000001e-58

                              1. Initial program 82.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 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}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

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

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

                                \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                              7. Step-by-step derivation
                                1. Applied rewrites25.1%

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

                                if -2.0000000000000001e-58 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.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 27.3%

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

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

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

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

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

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

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

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

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

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

                                  if 9.99999999999999954e-259 < (*.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.99999999999999947e182

                                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                                    \[\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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{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 10^{-258} \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 10^{+183}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \end{array} \]
                                  9. Add Preprocessing

                                  Alternative 9: 56.0% accurate, 0.2× speedup?

                                  \[\begin{array}{l} \\ \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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \end{array} \]
                                  (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 -2e-58)
                                       (/ (* (- d) (sqrt (/ h l))) h)
                                       (if (or (<= t_0 1e-258) (not (<= t_0 1e+183)))
                                         (fabs (/ d (sqrt (* l h))))
                                         (* (sqrt (/ d l)) (sqrt (/ d h)))))))
                                  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 <= -2e-58) {
                                  		tmp = (-d * sqrt((h / l))) / h;
                                  	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                                  		tmp = fabs((d / sqrt((l * h))));
                                  	} else {
                                  		tmp = sqrt((d / l)) * sqrt((d / h));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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 <= (-2d-58)) then
                                          tmp = (-d * sqrt((h / l))) / h
                                      else if ((t_0 <= 1d-258) .or. (.not. (t_0 <= 1d+183))) then
                                          tmp = abs((d / sqrt((l * h))))
                                      else
                                          tmp = sqrt((d / l)) * sqrt((d / h))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  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 <= -2e-58) {
                                  		tmp = (-d * Math.sqrt((h / l))) / h;
                                  	} else if ((t_0 <= 1e-258) || !(t_0 <= 1e+183)) {
                                  		tmp = Math.abs((d / Math.sqrt((l * h))));
                                  	} else {
                                  		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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 <= -2e-58:
                                  		tmp = (-d * math.sqrt((h / l))) / h
                                  	elif (t_0 <= 1e-258) or not (t_0 <= 1e+183):
                                  		tmp = math.fabs((d / math.sqrt((l * h))))
                                  	else:
                                  		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                  	return tmp
                                  
                                  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 <= -2e-58)
                                  		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                  	elseif ((t_0 <= 1e-258) || !(t_0 <= 1e+183))
                                  		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                  	else
                                  		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  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 <= -2e-58)
                                  		tmp = (-d * sqrt((h / l))) / h;
                                  	elseif ((t_0 <= 1e-258) || ~((t_0 <= 1e+183)))
                                  		tmp = abs((d / sqrt((l * h))));
                                  	else
                                  		tmp = sqrt((d / l)) * sqrt((d / h));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  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, -2e-58], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[Or[LessEqual[t$95$0, 1e-258], N[Not[LessEqual[t$95$0, 1e+183]], $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}
                                  
                                  \\
                                  \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 -2 \cdot 10^{-58}:\\
                                  \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                  
                                  \mathbf{elif}\;t\_0 \leq 10^{-258} \lor \neg \left(t\_0 \leq 10^{+183}\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)))) < -2.0000000000000001e-58

                                    1. Initial program 82.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 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}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

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

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

                                      \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites25.1%

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

                                      if -2.0000000000000001e-58 < (*.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.99999999999999954e-259 or 9.99999999999999947e182 < (*.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 27.3%

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

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

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

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

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

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

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

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

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

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

                                        if 9.99999999999999954e-259 < (*.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.99999999999999947e182

                                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                                          \[\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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{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 10^{-258} \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 10^{+183}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \]
                                        9. Add Preprocessing

                                        Alternative 10: 54.5% accurate, 0.2× speedup?

                                        \[\begin{array}{l} \\ \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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
                                        (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 -2e-58)
                                             (/ (* (- d) (sqrt (/ h l))) h)
                                             (if (or (<= t_0 5e-160) (not (<= t_0 2e+119)))
                                               (fabs (/ d (sqrt (* l h))))
                                               (sqrt (* (/ d h) (/ d l)))))))
                                        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 <= -2e-58) {
                                        		tmp = (-d * sqrt((h / l))) / h;
                                        	} else if ((t_0 <= 5e-160) || !(t_0 <= 2e+119)) {
                                        		tmp = fabs((d / sqrt((l * h))));
                                        	} else {
                                        		tmp = sqrt(((d / h) * (d / l)));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        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 <= (-2d-58)) then
                                                tmp = (-d * sqrt((h / l))) / h
                                            else if ((t_0 <= 5d-160) .or. (.not. (t_0 <= 2d+119))) then
                                                tmp = abs((d / sqrt((l * h))))
                                            else
                                                tmp = sqrt(((d / h) * (d / l)))
                                            end if
                                            code = tmp
                                        end function
                                        
                                        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 <= -2e-58) {
                                        		tmp = (-d * Math.sqrt((h / l))) / h;
                                        	} else if ((t_0 <= 5e-160) || !(t_0 <= 2e+119)) {
                                        		tmp = Math.abs((d / Math.sqrt((l * h))));
                                        	} else {
                                        		tmp = Math.sqrt(((d / h) * (d / l)));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        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 <= -2e-58:
                                        		tmp = (-d * math.sqrt((h / l))) / h
                                        	elif (t_0 <= 5e-160) or not (t_0 <= 2e+119):
                                        		tmp = math.fabs((d / math.sqrt((l * h))))
                                        	else:
                                        		tmp = math.sqrt(((d / h) * (d / l)))
                                        	return tmp
                                        
                                        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 <= -2e-58)
                                        		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                        	elseif ((t_0 <= 5e-160) || !(t_0 <= 2e+119))
                                        		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                        	else
                                        		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
                                        	end
                                        	return tmp
                                        end
                                        
                                        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 <= -2e-58)
                                        		tmp = (-d * sqrt((h / l))) / h;
                                        	elseif ((t_0 <= 5e-160) || ~((t_0 <= 2e+119)))
                                        		tmp = abs((d / sqrt((l * h))));
                                        	else
                                        		tmp = sqrt(((d / h) * (d / l)));
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        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, -2e-58], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[Or[LessEqual[t$95$0, 5e-160], N[Not[LessEqual[t$95$0, 2e+119]], $MachinePrecision]], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \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 -2 \cdot 10^{-58}:\\
                                        \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+119}\right):\\
                                        \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2.0000000000000001e-58

                                          1. Initial program 82.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 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}} \]
                                          4. Step-by-step derivation
                                            1. lower-/.f64N/A

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

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

                                            \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites25.1%

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

                                            if -2.0000000000000001e-58 < (*.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.99999999999999994e-160 or 1.99999999999999989e119 < (*.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 38.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                            4. Step-by-step derivation
                                              1. *-commutativeN/A

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

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

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

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

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

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

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

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

                                              if 4.99999999999999994e-160 < (*.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.99999999999999989e119

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

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

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

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

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

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

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

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

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

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

                                                  \[\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 -2 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{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^{-160} \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 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
                                                5. Add Preprocessing

                                                Alternative 11: 50.6% accurate, 0.2× speedup?

                                                \[\begin{array}{l} \\ \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 -4 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\frac{\frac{-1}{-h}}{\ell}} \cdot d\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
                                                (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 -4e-25)
                                                     (* (sqrt (/ (/ -1.0 (- h)) l)) d)
                                                     (if (or (<= t_0 5e-160) (not (<= t_0 2e+119)))
                                                       (fabs (/ d (sqrt (* l h))))
                                                       (sqrt (* (/ d h) (/ d l)))))))
                                                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 <= -4e-25) {
                                                		tmp = sqrt(((-1.0 / -h) / l)) * d;
                                                	} else if ((t_0 <= 5e-160) || !(t_0 <= 2e+119)) {
                                                		tmp = fabs((d / sqrt((l * h))));
                                                	} else {
                                                		tmp = sqrt(((d / h) * (d / l)));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                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 <= (-4d-25)) then
                                                        tmp = sqrt((((-1.0d0) / -h) / l)) * d
                                                    else if ((t_0 <= 5d-160) .or. (.not. (t_0 <= 2d+119))) then
                                                        tmp = abs((d / sqrt((l * h))))
                                                    else
                                                        tmp = sqrt(((d / h) * (d / l)))
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                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 <= -4e-25) {
                                                		tmp = Math.sqrt(((-1.0 / -h) / l)) * d;
                                                	} else if ((t_0 <= 5e-160) || !(t_0 <= 2e+119)) {
                                                		tmp = Math.abs((d / Math.sqrt((l * h))));
                                                	} else {
                                                		tmp = Math.sqrt(((d / h) * (d / l)));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                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 <= -4e-25:
                                                		tmp = math.sqrt(((-1.0 / -h) / l)) * d
                                                	elif (t_0 <= 5e-160) or not (t_0 <= 2e+119):
                                                		tmp = math.fabs((d / math.sqrt((l * h))))
                                                	else:
                                                		tmp = math.sqrt(((d / h) * (d / l)))
                                                	return tmp
                                                
                                                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 <= -4e-25)
                                                		tmp = Float64(sqrt(Float64(Float64(-1.0 / Float64(-h)) / l)) * d);
                                                	elseif ((t_0 <= 5e-160) || !(t_0 <= 2e+119))
                                                		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                                	else
                                                		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
                                                	end
                                                	return tmp
                                                end
                                                
                                                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 <= -4e-25)
                                                		tmp = sqrt(((-1.0 / -h) / l)) * d;
                                                	elseif ((t_0 <= 5e-160) || ~((t_0 <= 2e+119)))
                                                		tmp = abs((d / sqrt((l * h))));
                                                	else
                                                		tmp = sqrt(((d / h) * (d / l)));
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                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, -4e-25], N[(N[Sqrt[N[(N[(-1.0 / (-h)), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], If[Or[LessEqual[t$95$0, 5e-160], N[Not[LessEqual[t$95$0, 2e+119]], $MachinePrecision]], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \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 -4 \cdot 10^{-25}:\\
                                                \;\;\;\;\sqrt{\frac{\frac{-1}{-h}}{\ell}} \cdot d\\
                                                
                                                \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+119}\right):\\
                                                \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.00000000000000015e-25

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

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

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

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

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

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

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

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

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

                                                    if -4.00000000000000015e-25 < (*.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.99999999999999994e-160 or 1.99999999999999989e119 < (*.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 39.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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                    4. Step-by-step derivation
                                                      1. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                      if 4.99999999999999994e-160 < (*.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.99999999999999989e119

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

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

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

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

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

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

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

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

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

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

                                                          \[\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 -4 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\frac{\frac{-1}{-h}}{\ell}} \cdot d\\ \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^{-160} \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 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
                                                        5. Add Preprocessing

                                                        Alternative 12: 50.4% accurate, 0.2× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ t_1 := \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\_1 \leq -2000000:\\ \;\;\;\;{t\_0}^{-1} \cdot d\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{t\_0}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \end{array} \]
                                                        (FPCore (d h l M D)
                                                         :precision binary64
                                                         (let* ((t_0 (sqrt (* l h)))
                                                                (t_1
                                                                 (*
                                                                  (* (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_1 -2000000.0)
                                                             (* (pow t_0 -1.0) d)
                                                             (if (or (<= t_1 5e-160) (not (<= t_1 2e+119)))
                                                               (fabs (/ d t_0))
                                                               (sqrt (* (/ d h) (/ d l)))))))
                                                        double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = sqrt((l * h));
                                                        	double t_1 = (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_1 <= -2000000.0) {
                                                        		tmp = pow(t_0, -1.0) * d;
                                                        	} else if ((t_1 <= 5e-160) || !(t_1 <= 2e+119)) {
                                                        		tmp = fabs((d / t_0));
                                                        	} else {
                                                        		tmp = sqrt(((d / h) * (d / l)));
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        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 = sqrt((l * h))
                                                            t_1 = (((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_1 <= (-2000000.0d0)) then
                                                                tmp = (t_0 ** (-1.0d0)) * d
                                                            else if ((t_1 <= 5d-160) .or. (.not. (t_1 <= 2d+119))) then
                                                                tmp = abs((d / t_0))
                                                            else
                                                                tmp = sqrt(((d / h) * (d / l)))
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = Math.sqrt((l * h));
                                                        	double t_1 = (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_1 <= -2000000.0) {
                                                        		tmp = Math.pow(t_0, -1.0) * d;
                                                        	} else if ((t_1 <= 5e-160) || !(t_1 <= 2e+119)) {
                                                        		tmp = Math.abs((d / t_0));
                                                        	} else {
                                                        		tmp = Math.sqrt(((d / h) * (d / l)));
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(d, h, l, M, D):
                                                        	t_0 = math.sqrt((l * h))
                                                        	t_1 = (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_1 <= -2000000.0:
                                                        		tmp = math.pow(t_0, -1.0) * d
                                                        	elif (t_1 <= 5e-160) or not (t_1 <= 2e+119):
                                                        		tmp = math.fabs((d / t_0))
                                                        	else:
                                                        		tmp = math.sqrt(((d / h) * (d / l)))
                                                        	return tmp
                                                        
                                                        function code(d, h, l, M, D)
                                                        	t_0 = sqrt(Float64(l * h))
                                                        	t_1 = 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_1 <= -2000000.0)
                                                        		tmp = Float64((t_0 ^ -1.0) * d);
                                                        	elseif ((t_1 <= 5e-160) || !(t_1 <= 2e+119))
                                                        		tmp = abs(Float64(d / t_0));
                                                        	else
                                                        		tmp = sqrt(Float64(Float64(d / h) * Float64(d / l)));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(d, h, l, M, D)
                                                        	t_0 = sqrt((l * h));
                                                        	t_1 = (((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_1 <= -2000000.0)
                                                        		tmp = (t_0 ^ -1.0) * d;
                                                        	elseif ((t_1 <= 5e-160) || ~((t_1 <= 2e+119)))
                                                        		tmp = abs((d / t_0));
                                                        	else
                                                        		tmp = sqrt(((d / h) * (d / l)));
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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$1, -2000000.0], N[(N[Power[t$95$0, -1.0], $MachinePrecision] * d), $MachinePrecision], If[Or[LessEqual[t$95$1, 5e-160], N[Not[LessEqual[t$95$1, 2e+119]], $MachinePrecision]], N[Abs[N[(d / t$95$0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        t_0 := \sqrt{\ell \cdot h}\\
                                                        t_1 := \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\_1 \leq -2000000:\\
                                                        \;\;\;\;{t\_0}^{-1} \cdot d\\
                                                        
                                                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-160} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+119}\right):\\
                                                        \;\;\;\;\left|\frac{d}{t\_0}\right|\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e6

                                                          1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

                                                            if -2e6 < (*.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.99999999999999994e-160 or 1.99999999999999989e119 < (*.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 41.5%

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

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

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

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

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

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

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

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

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

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

                                                              if 4.99999999999999994e-160 < (*.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.99999999999999989e119

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

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

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

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

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

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

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

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

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

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

                                                                  \[\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 -2000000:\\ \;\;\;\;{\left(\sqrt{\ell \cdot h}\right)}^{-1} \cdot d\\ \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^{-160} \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 2 \cdot 10^{+119}\right):\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \end{array} \]
                                                                5. Add Preprocessing

                                                                Alternative 13: 45.1% accurate, 0.5× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \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 -2000000:\\ \;\;\;\;{t\_0}^{-1} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{t\_0}\right|\\ \end{array} \end{array} \]
                                                                (FPCore (d h l M D)
                                                                 :precision binary64
                                                                 (let* ((t_0 (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))))
                                                                        -2000000.0)
                                                                     (* (pow t_0 -1.0) d)
                                                                     (fabs (/ d t_0)))))
                                                                double code(double d, double h, double l, double M, double D) {
                                                                	double t_0 = 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)))) <= -2000000.0) {
                                                                		tmp = pow(t_0, -1.0) * d;
                                                                	} else {
                                                                		tmp = fabs((d / t_0));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                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 = 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)))) <= (-2000000.0d0)) then
                                                                        tmp = (t_0 ** (-1.0d0)) * d
                                                                    else
                                                                        tmp = abs((d / t_0))
                                                                    end if
                                                                    code = tmp
                                                                end function
                                                                
                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                	double t_0 = 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)))) <= -2000000.0) {
                                                                		tmp = Math.pow(t_0, -1.0) * d;
                                                                	} else {
                                                                		tmp = Math.abs((d / t_0));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(d, h, l, M, D):
                                                                	t_0 = 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)))) <= -2000000.0:
                                                                		tmp = math.pow(t_0, -1.0) * d
                                                                	else:
                                                                		tmp = math.fabs((d / t_0))
                                                                	return tmp
                                                                
                                                                function code(d, h, l, M, D)
                                                                	t_0 = 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)))) <= -2000000.0)
                                                                		tmp = Float64((t_0 ^ -1.0) * d);
                                                                	else
                                                                		tmp = abs(Float64(d / t_0));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                function tmp_2 = code(d, h, l, M, D)
                                                                	t_0 = 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)))) <= -2000000.0)
                                                                		tmp = (t_0 ^ -1.0) * d;
                                                                	else
                                                                		tmp = abs((d / t_0));
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(l * h), $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], -2000000.0], N[(N[Power[t$95$0, -1.0], $MachinePrecision] * d), $MachinePrecision], N[Abs[N[(d / t$95$0), $MachinePrecision]], $MachinePrecision]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_0 := \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 -2000000:\\
                                                                \;\;\;\;{t\_0}^{-1} \cdot d\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\left|\frac{d}{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)))) < -2e6

                                                                  1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

                                                                    if -2e6 < (*.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 58.0%

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                                                    7. Recombined 2 regimes into one program.
                                                                    8. Final simplification46.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 -2000000:\\ \;\;\;\;{\left(\sqrt{\ell \cdot h}\right)}^{-1} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \]
                                                                    9. Add Preprocessing

                                                                    Alternative 14: 45.3% accurate, 0.5× speedup?

                                                                    \[\begin{array}{l} \\ \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 -2000000:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                                                    (FPCore (d h l M D)
                                                                     :precision binary64
                                                                     (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))))
                                                                          -2000000.0)
                                                                       (* (sqrt (pow (* l h) -1.0)) d)
                                                                       (fabs (/ d (sqrt (* l h))))))
                                                                    double code(double d, double h, double l, double M, double D) {
                                                                    	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)))) <= -2000000.0) {
                                                                    		tmp = sqrt(pow((l * h), -1.0)) * d;
                                                                    	} else {
                                                                    		tmp = fabs((d / sqrt((l * h))));
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    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 (((((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)))) <= (-2000000.0d0)) then
                                                                            tmp = sqrt(((l * h) ** (-1.0d0))) * d
                                                                        else
                                                                            tmp = abs((d / sqrt((l * h))))
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double d, double h, double l, double M, double D) {
                                                                    	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)))) <= -2000000.0) {
                                                                    		tmp = Math.sqrt(Math.pow((l * h), -1.0)) * d;
                                                                    	} else {
                                                                    		tmp = Math.abs((d / Math.sqrt((l * h))));
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(d, h, l, M, D):
                                                                    	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)))) <= -2000000.0:
                                                                    		tmp = math.sqrt(math.pow((l * h), -1.0)) * d
                                                                    	else:
                                                                    		tmp = math.fabs((d / math.sqrt((l * h))))
                                                                    	return tmp
                                                                    
                                                                    function code(d, h, l, M, D)
                                                                    	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)))) <= -2000000.0)
                                                                    		tmp = Float64(sqrt((Float64(l * h) ^ -1.0)) * d);
                                                                    	else
                                                                    		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(d, h, l, M, D)
                                                                    	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)))) <= -2000000.0)
                                                                    		tmp = sqrt(((l * h) ^ -1.0)) * d;
                                                                    	else
                                                                    		tmp = abs((d / sqrt((l * h))));
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[d_, h_, l_, M_, D_] := 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], -2000000.0], N[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \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 -2000000:\\
                                                                    \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\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)))) < -2e6

                                                                      1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

                                                                      if -2e6 < (*.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 58.0%

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]
                                                                      7. Recombined 2 regimes into one program.
                                                                      8. Final simplification46.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 -2000000:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \]
                                                                      9. Add Preprocessing

                                                                      Alternative 15: 45.1% accurate, 0.6× speedup?

                                                                      \[\begin{array}{l} \\ \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 -2000000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left|t\_0\right|\\ \end{array} \end{array} \]
                                                                      (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))))
                                                                              -2000000.0)
                                                                           t_0
                                                                           (fabs t_0))))
                                                                      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)))) <= -2000000.0) {
                                                                      		tmp = t_0;
                                                                      	} else {
                                                                      		tmp = fabs(t_0);
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      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)))) <= (-2000000.0d0)) then
                                                                              tmp = t_0
                                                                          else
                                                                              tmp = abs(t_0)
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      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)))) <= -2000000.0) {
                                                                      		tmp = t_0;
                                                                      	} else {
                                                                      		tmp = Math.abs(t_0);
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      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)))) <= -2000000.0:
                                                                      		tmp = t_0
                                                                      	else:
                                                                      		tmp = math.fabs(t_0)
                                                                      	return tmp
                                                                      
                                                                      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)))) <= -2000000.0)
                                                                      		tmp = t_0;
                                                                      	else
                                                                      		tmp = abs(t_0);
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      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)))) <= -2000000.0)
                                                                      		tmp = t_0;
                                                                      	else
                                                                      		tmp = abs(t_0);
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      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], -2000000.0], t$95$0, N[Abs[t$95$0], $MachinePrecision]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \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 -2000000:\\
                                                                      \;\;\;\;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)))) < -2e6

                                                                        1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

                                                                          if -2e6 < (*.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 58.0%

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

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

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

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

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

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

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

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

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

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

                                                                            \[\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 -2000000:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \]
                                                                          9. Add Preprocessing

                                                                          Alternative 16: 79.8% accurate, 1.2× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{D}{d} \cdot M\\ t_1 := 1 - \frac{t\_0 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\\ \mathbf{if}\;\ell \leq -2 \cdot 10^{+98}:\\ \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t\_1\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot t\_1\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_0 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* (/ D d) M))
                                                                                  (t_1
                                                                                   (-
                                                                                    1.0
                                                                                    (*
                                                                                     (/ (* t_0 0.5) l)
                                                                                     (/ (* (* 0.5 (* D 0.5)) (/ M d)) (pow h -1.0))))))
                                                                             (if (<= l -2e+98)
                                                                               (* (* (pow (sqrt (/ h d)) -1.0) (/ (sqrt (- d)) (sqrt (- l)))) t_1)
                                                                               (if (<= l -5e-310)
                                                                                 (* (* (- d) (sqrt (pow (* l h) -1.0))) t_1)
                                                                                 (if (<= l 3.7e+40)
                                                                                   (*
                                                                                    (fma (* (/ (* t_0 -0.5) l) (* (/ M d) (* 0.25 D))) h 1.0)
                                                                                    (/ d (sqrt (* l h))))
                                                                                   (/
                                                                                    (/
                                                                                     (* (fma (* -0.5 (/ h l)) (* (pow (/ (/ d D) M) -2.0) 0.25) 1.0) d)
                                                                                     (sqrt l))
                                                                                    (sqrt h)))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = (D / d) * M;
                                                                          	double t_1 = 1.0 - (((t_0 * 0.5) / l) * (((0.5 * (D * 0.5)) * (M / d)) / pow(h, -1.0)));
                                                                          	double tmp;
                                                                          	if (l <= -2e+98) {
                                                                          		tmp = (pow(sqrt((h / d)), -1.0) * (sqrt(-d) / sqrt(-l))) * t_1;
                                                                          	} else if (l <= -5e-310) {
                                                                          		tmp = (-d * sqrt(pow((l * h), -1.0))) * t_1;
                                                                          	} else if (l <= 3.7e+40) {
                                                                          		tmp = fma((((t_0 * -0.5) / l) * ((M / d) * (0.25 * D))), h, 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = ((fma((-0.5 * (h / l)), (pow(((d / D) / M), -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64(D / d) * M)
                                                                          	t_1 = Float64(1.0 - Float64(Float64(Float64(t_0 * 0.5) / l) * Float64(Float64(Float64(0.5 * Float64(D * 0.5)) * Float64(M / d)) / (h ^ -1.0))))
                                                                          	tmp = 0.0
                                                                          	if (l <= -2e+98)
                                                                          		tmp = Float64(Float64((sqrt(Float64(h / d)) ^ -1.0) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l)))) * t_1);
                                                                          	elseif (l <= -5e-310)
                                                                          		tmp = Float64(Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0))) * t_1);
                                                                          	elseif (l <= 3.7e+40)
                                                                          		tmp = Float64(fma(Float64(Float64(Float64(t_0 * -0.5) / l) * Float64(Float64(M / d) * Float64(0.25 * D))), h, 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(Float64(Float64(fma(Float64(-0.5 * Float64(h / l)), Float64((Float64(Float64(d / D) / M) ^ -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(N[(N[(t$95$0 * 0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(0.5 * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] / N[Power[h, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2e+98], N[(N[(N[Power[N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision], -1.0], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[l, 3.7e+40], N[(N[(N[(N[(N[(t$95$0 * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := \frac{D}{d} \cdot M\\
                                                                          t_1 := 1 - \frac{t\_0 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\\
                                                                          \mathbf{if}\;\ell \leq -2 \cdot 10^{+98}:\\
                                                                          \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t\_1\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot t\_1\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{t\_0 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 4 regimes
                                                                          2. if l < -2e98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            if -2e98 < l < -4.999999999999985e-310

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            if -4.999999999999985e-310 < l < 3.7e40

                                                                            1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 3.7e40 < l

                                                                            1. Initial program 60.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites62.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.6

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites50.2%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              3. associate-*r/N/A

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}}} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                              5. pow1/2N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                              6. lift-*.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                              7. unpow-prod-downN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              8. associate-/r*N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                            8. Applied rewrites81.9%

                                                                              \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}} \]
                                                                          3. Recombined 4 regimes into one program.
                                                                          4. Final simplification84.7%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2 \cdot 10^{+98}:\\ \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                                          5. Add Preprocessing

                                                                          Alternative 17: 79.3% accurate, 1.3× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := -0.5 \cdot \frac{h}{\ell}\\ t_1 := \frac{D}{d} \cdot M\\ \mathbf{if}\;\ell \leq -4.3 \cdot 10^{+105}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(t\_0, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{t\_1 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_1 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(t\_0, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* -0.5 (/ h l))) (t_1 (* (/ D d) M)))
                                                                             (if (<= l -4.3e+105)
                                                                               (/
                                                                                (*
                                                                                 (* (fma t_0 (pow (* (/ 2.0 M) (/ d D)) -2.0) 1.0) (sqrt (/ d h)))
                                                                                 (sqrt (- d)))
                                                                                (sqrt (- l)))
                                                                               (if (<= l -5e-310)
                                                                                 (*
                                                                                  (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                                  (-
                                                                                   1.0
                                                                                   (* (/ (* t_1 0.5) l) (/ (* (* 0.5 (* D 0.5)) (/ M d)) (pow h -1.0)))))
                                                                                 (if (<= l 3.7e+40)
                                                                                   (*
                                                                                    (fma (* (/ (* t_1 -0.5) l) (* (/ M d) (* 0.25 D))) h 1.0)
                                                                                    (/ d (sqrt (* l h))))
                                                                                   (/
                                                                                    (/ (* (fma t_0 (* (pow (/ (/ d D) M) -2.0) 0.25) 1.0) d) (sqrt l))
                                                                                    (sqrt h)))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = -0.5 * (h / l);
                                                                          	double t_1 = (D / d) * M;
                                                                          	double tmp;
                                                                          	if (l <= -4.3e+105) {
                                                                          		tmp = ((fma(t_0, pow(((2.0 / M) * (d / D)), -2.0), 1.0) * sqrt((d / h))) * sqrt(-d)) / sqrt(-l);
                                                                          	} else if (l <= -5e-310) {
                                                                          		tmp = (-d * sqrt(pow((l * h), -1.0))) * (1.0 - (((t_1 * 0.5) / l) * (((0.5 * (D * 0.5)) * (M / d)) / pow(h, -1.0))));
                                                                          	} else if (l <= 3.7e+40) {
                                                                          		tmp = fma((((t_1 * -0.5) / l) * ((M / d) * (0.25 * D))), h, 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = ((fma(t_0, (pow(((d / D) / M), -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(-0.5 * Float64(h / l))
                                                                          	t_1 = Float64(Float64(D / d) * M)
                                                                          	tmp = 0.0
                                                                          	if (l <= -4.3e+105)
                                                                          		tmp = Float64(Float64(Float64(fma(t_0, (Float64(Float64(2.0 / M) * Float64(d / D)) ^ -2.0), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(-d))) / sqrt(Float64(-l)));
                                                                          	elseif (l <= -5e-310)
                                                                          		tmp = Float64(Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0))) * Float64(1.0 - Float64(Float64(Float64(t_1 * 0.5) / l) * Float64(Float64(Float64(0.5 * Float64(D * 0.5)) * Float64(M / d)) / (h ^ -1.0)))));
                                                                          	elseif (l <= 3.7e+40)
                                                                          		tmp = Float64(fma(Float64(Float64(Float64(t_1 * -0.5) / l) * Float64(Float64(M / d) * Float64(0.25 * D))), h, 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(Float64(Float64(fma(t_0, Float64((Float64(Float64(d / D) / M) ^ -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[l, -4.3e+105], N[(N[(N[(N[(t$95$0 * N[Power[N[(N[(2.0 / M), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[(-d)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$1 * 0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(0.5 * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] / N[Power[h, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.7e+40], N[(N[(N[(N[(N[(t$95$1 * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t$95$0 * N[(N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := -0.5 \cdot \frac{h}{\ell}\\
                                                                          t_1 := \frac{D}{d} \cdot M\\
                                                                          \mathbf{if}\;\ell \leq -4.3 \cdot 10^{+105}:\\
                                                                          \;\;\;\;\frac{\left(\mathsf{fma}\left(t\_0, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{-d}}{\sqrt{-\ell}}\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{t\_1 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{t\_1 \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{\frac{\mathsf{fma}\left(t\_0, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 4 regimes
                                                                          2. if l < -4.3000000000000002e105

                                                                            1. Initial program 56.8%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Applied rewrites68.3%

                                                                              \[\leadsto \color{blue}{\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{-d}}{\sqrt{-\ell}}} \]

                                                                            if -4.3000000000000002e105 < l < -4.999999999999985e-310

                                                                            1. Initial program 71.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
                                                                              3. clear-numN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
                                                                              4. un-div-invN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}}\right) \]
                                                                              5. lift-*.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}}{\frac{\ell}{h}}\right) \]
                                                                              6. *-commutativeN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}}}{\frac{\ell}{h}}\right) \]
                                                                              7. lift-pow.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}}{\frac{\ell}{h}}\right) \]
                                                                              8. unpow2N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}}{\frac{\ell}{h}}\right) \]
                                                                              9. associate-*l*N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}}{\frac{\ell}{h}}\right) \]
                                                                              10. div-invN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}{\color{blue}{\ell \cdot \frac{1}{h}}}\right) \]
                                                                              11. times-fracN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
                                                                              12. lower-*.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
                                                                            4. Applied rewrites77.9%

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}}\right) \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-/.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              2. metadata-eval77.9

                                                                                \[\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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              4. pow1/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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              5. lift-/.f64N/A

                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              6. clear-numN/A

                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              7. sqrt-divN/A

                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              8. metadata-evalN/A

                                                                                \[\leadsto \left(\frac{\color{blue}{1}}{\sqrt{\frac{h}{d}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              10. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              11. lower-/.f6477.8

                                                                                \[\leadsto \left(\frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            6. Applied rewrites77.8%

                                                                              \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            7. Taylor expanded in d around -inf

                                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            8. Step-by-step derivation
                                                                              1. associate-*r*N/A

                                                                                \[\leadsto \color{blue}{\left(\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              3. mul-1-negN/A

                                                                                \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              4. lower-neg.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              7. *-commutativeN/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              8. lower-*.f6492.2

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            9. Applied rewrites92.2%

                                                                              \[\leadsto \color{blue}{\left(\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]

                                                                            if -4.999999999999985e-310 < l < 3.7e40

                                                                            1. Initial program 65.9%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites64.5%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.3

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites76.7%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Applied rewrites90.4%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 3.7e40 < l

                                                                            1. Initial program 60.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites62.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.6

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites50.2%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              3. associate-*r/N/A

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}}} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                              5. pow1/2N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                              6. lift-*.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                              7. unpow-prod-downN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              8. associate-/r*N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                            8. Applied rewrites81.9%

                                                                              \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}} \]
                                                                          3. Recombined 4 regimes into one program.
                                                                          4. Final simplification84.7%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -4.3 \cdot 10^{+105}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{-d}}{\sqrt{-\ell}}\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                                          5. Add Preprocessing

                                                                          Alternative 18: 79.2% accurate, 1.3× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d} \cdot 0.5\\ t_1 := \frac{D}{d} \cdot M\\ \mathbf{if}\;h \leq -9.2 \cdot 10^{+131}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{t\_1 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;h \leq 3.4 \cdot 10^{+150}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_1 \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* (/ (* M D) d) 0.5)) (t_1 (* (/ D d) M)))
                                                                             (if (<= h -9.2e+131)
                                                                               (*
                                                                                (* (fma t_0 (* t_0 (* (/ h l) -0.5)) 1.0) (sqrt (/ d l)))
                                                                                (/ (sqrt (- d)) (sqrt (- h))))
                                                                               (if (<= h -5e-310)
                                                                                 (*
                                                                                  (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                                  (-
                                                                                   1.0
                                                                                   (* (/ (* t_1 0.5) l) (/ (* (* 0.5 (* D 0.5)) (/ M d)) (pow h -1.0)))))
                                                                                 (if (<= h 3.4e+150)
                                                                                   (*
                                                                                    (fma (/ (* t_1 -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                                                                                    (/ d (sqrt (* l h))))
                                                                                   (/
                                                                                    (/
                                                                                     (* (fma (* -0.5 (/ h l)) (* (pow (/ (/ d D) M) -2.0) 0.25) 1.0) d)
                                                                                     (sqrt l))
                                                                                    (sqrt h)))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = ((M * D) / d) * 0.5;
                                                                          	double t_1 = (D / d) * M;
                                                                          	double tmp;
                                                                          	if (h <= -9.2e+131) {
                                                                          		tmp = (fma(t_0, (t_0 * ((h / l) * -0.5)), 1.0) * sqrt((d / l))) * (sqrt(-d) / sqrt(-h));
                                                                          	} else if (h <= -5e-310) {
                                                                          		tmp = (-d * sqrt(pow((l * h), -1.0))) * (1.0 - (((t_1 * 0.5) / l) * (((0.5 * (D * 0.5)) * (M / d)) / pow(h, -1.0))));
                                                                          	} else if (h <= 3.4e+150) {
                                                                          		tmp = fma(((t_1 * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = ((fma((-0.5 * (h / l)), (pow(((d / D) / M), -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64(Float64(M * D) / d) * 0.5)
                                                                          	t_1 = Float64(Float64(D / d) * M)
                                                                          	tmp = 0.0
                                                                          	if (h <= -9.2e+131)
                                                                          		tmp = Float64(Float64(fma(t_0, Float64(t_0 * Float64(Float64(h / l) * -0.5)), 1.0) * sqrt(Float64(d / l))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))));
                                                                          	elseif (h <= -5e-310)
                                                                          		tmp = Float64(Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0))) * Float64(1.0 - Float64(Float64(Float64(t_1 * 0.5) / l) * Float64(Float64(Float64(0.5 * Float64(D * 0.5)) * Float64(M / d)) / (h ^ -1.0)))));
                                                                          	elseif (h <= 3.4e+150)
                                                                          		tmp = Float64(fma(Float64(Float64(t_1 * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(Float64(Float64(fma(Float64(-0.5 * Float64(h / l)), Float64((Float64(Float64(d / D) / M) ^ -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[h, -9.2e+131], N[(N[(N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -5e-310], N[(N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$1 * 0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(0.5 * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] / N[Power[h, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 3.4e+150], N[(N[(N[(N[(t$95$1 * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := \frac{M \cdot D}{d} \cdot 0.5\\
                                                                          t_1 := \frac{D}{d} \cdot M\\
                                                                          \mathbf{if}\;h \leq -9.2 \cdot 10^{+131}:\\
                                                                          \;\;\;\;\left(\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\
                                                                          
                                                                          \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{t\_1 \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\
                                                                          
                                                                          \mathbf{elif}\;h \leq 3.4 \cdot 10^{+150}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{t\_1 \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 4 regimes
                                                                          2. if h < -9.19999999999999966e131

                                                                            1. Initial program 63.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites63.1%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. lift-pow.f64N/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. pow-powN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-1}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. inv-powN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              7. lift-*.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M} \cdot \frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              8. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M}} \cdot \frac{d}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              9. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\frac{2}{M} \cdot \color{blue}{\frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              10. frac-timesN/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2 \cdot d}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              11. clear-numN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              12. unpow2N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              13. associate-*l*N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              14. lower-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            6. Applied rewrites65.3%

                                                                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                                              3. frac-2negN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \]
                                                                              4. sqrt-divN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              5. lower-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              6. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              7. lower-neg.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              8. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              9. lower-neg.f6480.5

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \]
                                                                            8. Applied rewrites80.5%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \]

                                                                            if -9.19999999999999966e131 < h < -4.999999999999985e-310

                                                                            1. Initial program 66.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 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
                                                                              3. clear-numN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
                                                                              4. un-div-invN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}}\right) \]
                                                                              5. lift-*.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}}{\frac{\ell}{h}}\right) \]
                                                                              6. *-commutativeN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}}}{\frac{\ell}{h}}\right) \]
                                                                              7. lift-pow.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}}{\frac{\ell}{h}}\right) \]
                                                                              8. unpow2N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}}{\frac{\ell}{h}}\right) \]
                                                                              9. associate-*l*N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}}{\frac{\ell}{h}}\right) \]
                                                                              10. div-invN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}{\color{blue}{\ell \cdot \frac{1}{h}}}\right) \]
                                                                              11. times-fracN/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
                                                                              12. lower-*.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}}{\frac{1}{h}}}\right) \]
                                                                            4. Applied rewrites74.1%

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}}\right) \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-/.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              2. metadata-eval74.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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              4. pow1/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 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              5. lift-/.f64N/A

                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              6. clear-numN/A

                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              7. sqrt-divN/A

                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              8. metadata-evalN/A

                                                                                \[\leadsto \left(\frac{\color{blue}{1}}{\sqrt{\frac{h}{d}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              10. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              11. lower-/.f6474.0

                                                                                \[\leadsto \left(\frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            6. Applied rewrites74.0%

                                                                              \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            7. Taylor expanded in d around -inf

                                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            8. Step-by-step derivation
                                                                              1. associate-*r*N/A

                                                                                \[\leadsto \color{blue}{\left(\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              3. mul-1-negN/A

                                                                                \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              4. lower-neg.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              7. *-commutativeN/A

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot \frac{1}{2}}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                              8. lower-*.f6485.2

                                                                                \[\leadsto \left(\left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                                            9. Applied rewrites85.2%

                                                                              \[\leadsto \color{blue}{\left(\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]

                                                                            if -4.999999999999985e-310 < h < 3.39999999999999983e150

                                                                            1. Initial program 66.3%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites67.3%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6451.9

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites79.5%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Applied rewrites86.1%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 3.39999999999999983e150 < h

                                                                            1. Initial program 57.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites54.7%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6434.0

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites31.3%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              3. associate-*r/N/A

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}}} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                              5. pow1/2N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                              6. lift-*.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                              7. unpow-prod-downN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              8. associate-/r*N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                            8. Applied rewrites75.2%

                                                                              \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}} \]
                                                                          3. Recombined 4 regimes into one program.
                                                                          4. Final simplification83.1%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -9.2 \cdot 10^{+131}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;h \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \left(1 - \frac{\left(\frac{D}{d} \cdot M\right) \cdot 0.5}{\ell} \cdot \frac{\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right)\\ \mathbf{elif}\;h \leq 3.4 \cdot 10^{+150}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                                          5. Add Preprocessing

                                                                          Alternative 19: 80.1% accurate, 2.0× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d} \cdot 0.5\\ \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* (/ (* M D) d) 0.5)))
                                                                             (if (<= l -5e-310)
                                                                               (*
                                                                                (* (fma t_0 (* t_0 (* (/ h l) -0.5)) 1.0) (sqrt (/ d l)))
                                                                                (/ (sqrt (- d)) (sqrt (- h))))
                                                                               (if (<= l 3.7e+40)
                                                                                 (*
                                                                                  (fma (* (/ (* (* (/ D d) M) -0.5) l) (* (/ M d) (* 0.25 D))) h 1.0)
                                                                                  (/ d (sqrt (* l h))))
                                                                                 (/
                                                                                  (/
                                                                                   (* (fma (* -0.5 (/ h l)) (* (pow (/ (/ d D) M) -2.0) 0.25) 1.0) d)
                                                                                   (sqrt l))
                                                                                  (sqrt h))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = ((M * D) / d) * 0.5;
                                                                          	double tmp;
                                                                          	if (l <= -5e-310) {
                                                                          		tmp = (fma(t_0, (t_0 * ((h / l) * -0.5)), 1.0) * sqrt((d / l))) * (sqrt(-d) / sqrt(-h));
                                                                          	} else if (l <= 3.7e+40) {
                                                                          		tmp = fma((((((D / d) * M) * -0.5) / l) * ((M / d) * (0.25 * D))), h, 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = ((fma((-0.5 * (h / l)), (pow(((d / D) / M), -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64(Float64(M * D) / d) * 0.5)
                                                                          	tmp = 0.0
                                                                          	if (l <= -5e-310)
                                                                          		tmp = Float64(Float64(fma(t_0, Float64(t_0 * Float64(Float64(h / l) * -0.5)), 1.0) * sqrt(Float64(d / l))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))));
                                                                          	elseif (l <= 3.7e+40)
                                                                          		tmp = Float64(fma(Float64(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l) * Float64(Float64(M / d) * Float64(0.25 * D))), h, 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(Float64(Float64(fma(Float64(-0.5 * Float64(h / l)), Float64((Float64(Float64(d / D) / M) ^ -2.0) * 0.25), 1.0) * d) / sqrt(l)) / sqrt(h));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[l, -5e-310], N[(N[(N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.7e+40], N[(N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision] * 0.25), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := \frac{M \cdot D}{d} \cdot 0.5\\
                                                                          \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+40}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 3 regimes
                                                                          2. if l < -4.999999999999985e-310

                                                                            1. Initial program 65.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites66.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. lift-pow.f64N/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. pow-powN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-1}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. inv-powN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              7. lift-*.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M} \cdot \frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              8. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M}} \cdot \frac{d}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              9. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\frac{2}{M} \cdot \color{blue}{\frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              10. frac-timesN/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2 \cdot d}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              11. clear-numN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              12. unpow2N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              13. associate-*l*N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              14. lower-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            6. Applied rewrites68.3%

                                                                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                                              3. frac-2negN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \]
                                                                              4. sqrt-divN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              5. lower-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              6. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              7. lower-neg.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              8. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              9. lower-neg.f6476.9

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \]
                                                                            8. Applied rewrites76.9%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \]

                                                                            if -4.999999999999985e-310 < l < 3.7e40

                                                                            1. Initial program 65.9%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites64.5%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.3

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites76.7%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Applied rewrites90.4%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 3.7e40 < l

                                                                            1. Initial program 60.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites62.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.6

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites50.2%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              3. associate-*r/N/A

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}}} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                              5. pow1/2N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                              6. lift-*.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                              7. unpow-prod-downN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              8. associate-/r*N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                              9. lower-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot d}{{\ell}^{\frac{1}{2}}}}{{h}^{\frac{1}{2}}}} \]
                                                                            8. Applied rewrites81.9%

                                                                              \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{\frac{d}{D}}{M}\right)}^{-2} \cdot 0.25, 1\right) \cdot d}{\sqrt{\ell}}}{\sqrt{h}}} \]
                                                                          3. Recombined 3 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 20: 78.7% accurate, 2.0× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{h}{\ell} \cdot -0.5\\ t_1 := \frac{M \cdot D}{d} \cdot 0.5\\ \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_1, t\_1 \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;\ell \leq 4 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, t\_0, 1\right) \cdot \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* (/ h l) -0.5)) (t_1 (* (/ (* M D) d) 0.5)))
                                                                             (if (<= l -5e-310)
                                                                               (*
                                                                                (* (fma t_1 (* t_1 t_0) 1.0) (sqrt (/ d l)))
                                                                                (/ (sqrt (- d)) (sqrt (- h))))
                                                                               (if (<= l 4e+116)
                                                                                 (*
                                                                                  (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                                                                                  (/ d (sqrt (* l h))))
                                                                                 (*
                                                                                  (fma (* 0.25 (pow (/ (/ d D) M) -2.0)) t_0 1.0)
                                                                                  (/ d (* (sqrt l) (sqrt h))))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = (h / l) * -0.5;
                                                                          	double t_1 = ((M * D) / d) * 0.5;
                                                                          	double tmp;
                                                                          	if (l <= -5e-310) {
                                                                          		tmp = (fma(t_1, (t_1 * t_0), 1.0) * sqrt((d / l))) * (sqrt(-d) / sqrt(-h));
                                                                          	} else if (l <= 4e+116) {
                                                                          		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = fma((0.25 * pow(((d / D) / M), -2.0)), t_0, 1.0) * (d / (sqrt(l) * sqrt(h)));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64(h / l) * -0.5)
                                                                          	t_1 = Float64(Float64(Float64(M * D) / d) * 0.5)
                                                                          	tmp = 0.0
                                                                          	if (l <= -5e-310)
                                                                          		tmp = Float64(Float64(fma(t_1, Float64(t_1 * t_0), 1.0) * sqrt(Float64(d / l))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))));
                                                                          	elseif (l <= 4e+116)
                                                                          		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(fma(Float64(0.25 * (Float64(Float64(d / D) / M) ^ -2.0)), t_0, 1.0) * Float64(d / Float64(sqrt(l) * sqrt(h))));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[l, -5e-310], N[(N[(N[(t$95$1 * N[(t$95$1 * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4e+116], N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.25 * N[Power[N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := \frac{h}{\ell} \cdot -0.5\\
                                                                          t_1 := \frac{M \cdot D}{d} \cdot 0.5\\
                                                                          \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(\mathsf{fma}\left(t\_1, t\_1 \cdot t\_0, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq 4 \cdot 10^{+116}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, t\_0, 1\right) \cdot \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 3 regimes
                                                                          2. if l < -4.999999999999985e-310

                                                                            1. Initial program 65.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites66.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. lift-pow.f64N/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. pow-powN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-1}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. inv-powN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              7. lift-*.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M} \cdot \frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              8. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M}} \cdot \frac{d}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              9. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\frac{2}{M} \cdot \color{blue}{\frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              10. frac-timesN/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2 \cdot d}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              11. clear-numN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              12. unpow2N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              13. associate-*l*N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              14. lower-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            6. Applied rewrites68.3%

                                                                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                                              3. frac-2negN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \]
                                                                              4. sqrt-divN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              5. lower-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              6. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              7. lower-neg.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              8. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              9. lower-neg.f6476.9

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \]
                                                                            8. Applied rewrites76.9%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \]

                                                                            if -4.999999999999985e-310 < l < 4.00000000000000006e116

                                                                            1. Initial program 64.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites63.9%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.2

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites73.6%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Applied rewrites85.8%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 4.00000000000000006e116 < l

                                                                            1. Initial program 62.3%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites62.4%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.9

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites45.4%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                              2. pow1/2N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                              3. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                              4. unpow-prod-downN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {h}^{\frac{1}{2}}}} \]
                                                                              6. pow1/2N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{\sqrt{\ell}} \cdot {h}^{\frac{1}{2}}} \]
                                                                              7. lower-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\color{blue}{\sqrt{\ell}} \cdot {h}^{\frac{1}{2}}} \]
                                                                              8. pow1/2N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{4} \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot \frac{-1}{2}, 1\right) \cdot \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                              9. lower-sqrt.f6482.8

                                                                                \[\leadsto \mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                            8. Applied rewrites82.8%

                                                                              \[\leadsto \mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
                                                                          3. Recombined 3 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 21: 78.1% accurate, 2.9× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d} \cdot 0.5\\ t_1 := \mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)\\ \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(t\_1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* (/ (* M D) d) 0.5))
                                                                                  (t_1 (fma t_0 (* t_0 (* (/ h l) -0.5)) 1.0)))
                                                                             (if (<= l -5e-310)
                                                                               (* (* t_1 (sqrt (/ d l))) (/ (sqrt (- d)) (sqrt (- h))))
                                                                               (if (<= l 4.2e+116)
                                                                                 (*
                                                                                  (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                                                                                  (/ d (sqrt (* l h))))
                                                                                 (* (* t_1 (/ (sqrt d) (sqrt l))) (sqrt (/ d h)))))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = ((M * D) / d) * 0.5;
                                                                          	double t_1 = fma(t_0, (t_0 * ((h / l) * -0.5)), 1.0);
                                                                          	double tmp;
                                                                          	if (l <= -5e-310) {
                                                                          		tmp = (t_1 * sqrt((d / l))) * (sqrt(-d) / sqrt(-h));
                                                                          	} else if (l <= 4.2e+116) {
                                                                          		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * (d / sqrt((l * h)));
                                                                          	} else {
                                                                          		tmp = (t_1 * (sqrt(d) / sqrt(l))) * sqrt((d / h));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64(Float64(M * D) / d) * 0.5)
                                                                          	t_1 = fma(t_0, Float64(t_0 * Float64(Float64(h / l) * -0.5)), 1.0)
                                                                          	tmp = 0.0
                                                                          	if (l <= -5e-310)
                                                                          		tmp = Float64(Float64(t_1 * sqrt(Float64(d / l))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))));
                                                                          	elseif (l <= 4.2e+116)
                                                                          		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * Float64(d / sqrt(Float64(l * h))));
                                                                          	else
                                                                          		tmp = Float64(Float64(t_1 * Float64(sqrt(d) / sqrt(l))) * sqrt(Float64(d / h)));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[l, -5e-310], N[(N[(t$95$1 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.2e+116], N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := \frac{M \cdot D}{d} \cdot 0.5\\
                                                                          t_1 := \mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)\\
                                                                          \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                          \;\;\;\;\left(t\_1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\
                                                                          
                                                                          \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+116}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\left(t\_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 3 regimes
                                                                          2. if l < -4.999999999999985e-310

                                                                            1. Initial program 65.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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites66.2%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. lift-pow.f64N/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. pow-powN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-1}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. inv-powN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              7. lift-*.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M} \cdot \frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              8. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M}} \cdot \frac{d}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              9. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\frac{2}{M} \cdot \color{blue}{\frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              10. frac-timesN/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2 \cdot d}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              11. clear-numN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              12. unpow2N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              13. associate-*l*N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              14. lower-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            6. Applied rewrites68.3%

                                                                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                                              3. frac-2negN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \]
                                                                              4. sqrt-divN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              5. lower-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              6. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              7. lower-neg.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \]
                                                                              8. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \]
                                                                              9. lower-neg.f6476.9

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \]
                                                                            8. Applied rewrites76.9%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \]

                                                                            if -4.999999999999985e-310 < l < 4.2000000000000002e116

                                                                            1. Initial program 64.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites63.9%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                              2. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                              4. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                              5. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                              6. sqrt-unprodN/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                              7. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                              8. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                              9. associate-*l/N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                              11. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              12. lift-sqrt.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                              13. lower-*.f6446.2

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                            6. Applied rewrites73.6%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                            7. Applied rewrites85.8%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                            if 4.2000000000000002e116 < l

                                                                            1. Initial program 62.3%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                            4. Applied rewrites62.4%

                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                            5. Step-by-step derivation
                                                                              1. lift-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. lift-pow.f64N/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. pow-powN/A

                                                                                \[\leadsto \left(\left(\color{blue}{{\left({\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-1}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. inv-powN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{1}{\frac{2}{M} \cdot \frac{d}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              7. lift-*.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M} \cdot \frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              8. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2}{M}} \cdot \frac{d}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              9. lift-/.f64N/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\frac{2}{M} \cdot \color{blue}{\frac{d}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              10. frac-timesN/A

                                                                                \[\leadsto \left(\left({\left(\frac{1}{\color{blue}{\frac{2 \cdot d}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              11. clear-numN/A

                                                                                \[\leadsto \left(\left({\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              12. unpow2N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              13. associate-*l*N/A

                                                                                \[\leadsto \left(\left(\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              14. lower-fma.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{2 \cdot d}, \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            6. Applied rewrites62.4%

                                                                              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. lift-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              2. lift-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              3. sqrt-divN/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              4. lower-/.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot \frac{1}{2}, \left(\frac{M \cdot D}{d} \cdot \frac{1}{2}\right) \cdot \left(\frac{h}{\ell} \cdot \frac{-1}{2}\right), 1\right) \cdot \frac{\color{blue}{\sqrt{d}}}{\sqrt{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                              6. lower-sqrt.f6473.4

                                                                                \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                            8. Applied rewrites73.4%

                                                                              \[\leadsto \left(\mathsf{fma}\left(\frac{M \cdot D}{d} \cdot 0.5, \left(\frac{M \cdot D}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                                          3. Recombined 3 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 22: 46.5% accurate, 3.2× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;h \leq 3 \cdot 10^{-307}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                           :precision binary64
                                                                           (if (<= h 3e-307)
                                                                             (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                             (/ d (* (sqrt l) (sqrt h)))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double tmp;
                                                                          	if (h <= 3e-307) {
                                                                          		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                          	} else {
                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          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 (h <= 3d-307) then
                                                                                  tmp = -d * sqrt(((l * h) ** (-1.0d0)))
                                                                              else
                                                                                  tmp = d / (sqrt(l) * sqrt(h))
                                                                              end if
                                                                              code = tmp
                                                                          end function
                                                                          
                                                                          public static double code(double d, double h, double l, double M, double D) {
                                                                          	double tmp;
                                                                          	if (h <= 3e-307) {
                                                                          		tmp = -d * Math.sqrt(Math.pow((l * h), -1.0));
                                                                          	} else {
                                                                          		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(d, h, l, M, D):
                                                                          	tmp = 0
                                                                          	if h <= 3e-307:
                                                                          		tmp = -d * math.sqrt(math.pow((l * h), -1.0))
                                                                          	else:
                                                                          		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                          	return tmp
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	tmp = 0.0
                                                                          	if (h <= 3e-307)
                                                                          		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                          	else
                                                                          		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(d, h, l, M, D)
                                                                          	tmp = 0.0;
                                                                          	if (h <= 3e-307)
                                                                          		tmp = -d * sqrt(((l * h) ^ -1.0));
                                                                          	else
                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := If[LessEqual[h, 3e-307], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;h \leq 3 \cdot 10^{-307}:\\
                                                                          \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if h < 2.9999999999999999e-307

                                                                            1. Initial program 65.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 l around -inf

                                                                              \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                            4. Step-by-step derivation
                                                                              1. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              2. unpow2N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              3. rem-square-sqrtN/A

                                                                                \[\leadsto \left(\color{blue}{-1} \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              4. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(-1 \cdot d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                              5. mul-1-negN/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              6. lower-neg.f64N/A

                                                                                \[\leadsto \color{blue}{\left(-d\right)} \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
                                                                              7. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(-d\right) \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                              8. lower-/.f64N/A

                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
                                                                              9. *-commutativeN/A

                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                              10. lower-*.f6441.4

                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                            5. Applied rewrites41.4%

                                                                              \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                            if 2.9999999999999999e-307 < h

                                                                            1. Initial program 63.2%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in d around inf

                                                                              \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                            4. Step-by-step derivation
                                                                              1. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                              3. lower-sqrt.f64N/A

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                              4. lower-/.f64N/A

                                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                              5. *-commutativeN/A

                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                              6. lower-*.f6446.0

                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                            5. Applied rewrites46.0%

                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                            6. Step-by-step derivation
                                                                              1. Applied rewrites46.0%

                                                                                \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites57.4%

                                                                                  \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                              3. Recombined 2 regimes into one program.
                                                                              4. Final simplification49.5%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq 3 \cdot 10^{-307}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                              5. Add Preprocessing

                                                                              Alternative 23: 59.2% accurate, 3.6× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\ \;\;\;\;\left|t\_0\right|\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                              (FPCore (d h l M D)
                                                                               :precision binary64
                                                                               (let* ((t_0 (/ d (sqrt (* l h)))))
                                                                                 (if (<= l -1.12e-122)
                                                                                   (fabs t_0)
                                                                                   (if (<= l -5e-310)
                                                                                     (/ (* (- d) (sqrt (/ h l))) h)
                                                                                     (if (<= l 4.8e+116)
                                                                                       (*
                                                                                        (fma (/ (* (* (/ D d) M) -0.5) l) (* (* (/ M d) h) (* 0.25 D)) 1.0)
                                                                                        t_0)
                                                                                       (/ d (* (sqrt l) (sqrt h))))))))
                                                                              double code(double d, double h, double l, double M, double D) {
                                                                              	double t_0 = d / sqrt((l * h));
                                                                              	double tmp;
                                                                              	if (l <= -1.12e-122) {
                                                                              		tmp = fabs(t_0);
                                                                              	} else if (l <= -5e-310) {
                                                                              		tmp = (-d * sqrt((h / l))) / h;
                                                                              	} else if (l <= 4.8e+116) {
                                                                              		tmp = fma(((((D / d) * M) * -0.5) / l), (((M / d) * h) * (0.25 * D)), 1.0) * t_0;
                                                                              	} else {
                                                                              		tmp = d / (sqrt(l) * sqrt(h));
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(d, h, l, M, D)
                                                                              	t_0 = Float64(d / sqrt(Float64(l * h)))
                                                                              	tmp = 0.0
                                                                              	if (l <= -1.12e-122)
                                                                              		tmp = abs(t_0);
                                                                              	elseif (l <= -5e-310)
                                                                              		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                                                              	elseif (l <= 4.8e+116)
                                                                              		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l), Float64(Float64(Float64(M / d) * h) * Float64(0.25 * D)), 1.0) * t_0);
                                                                              	else
                                                                              		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.12e-122], N[Abs[t$95$0], $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[l, 4.8e+116], N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * h), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                              \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\
                                                                              \;\;\;\;\left|t\_0\right|\\
                                                                              
                                                                              \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                              \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                                              
                                                                              \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+116}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \cdot t\_0\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 4 regimes
                                                                              2. if l < -1.12e-122

                                                                                1. Initial program 66.5%

                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in d around inf

                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                4. Step-by-step derivation
                                                                                  1. *-commutativeN/A

                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                  2. lower-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                  3. lower-sqrt.f64N/A

                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                  4. lower-/.f64N/A

                                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                  5. *-commutativeN/A

                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                  6. lower-*.f646.8

                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                5. Applied rewrites6.8%

                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                6. Step-by-step derivation
                                                                                  1. Applied rewrites48.0%

                                                                                    \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]

                                                                                  if -1.12e-122 < l < -4.999999999999985e-310

                                                                                  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 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}} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. lower-/.f64N/A

                                                                                      \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                  5. Applied rewrites25.7%

                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}} \]
                                                                                  6. Taylor expanded in l around -inf

                                                                                    \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites62.1%

                                                                                      \[\leadsto \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]

                                                                                    if -4.999999999999985e-310 < l < 4.8000000000000001e116

                                                                                    1. Initial program 64.1%

                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                    2. Add Preprocessing
                                                                                    3. Step-by-step derivation
                                                                                      1. lift-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      3. associate-*l*N/A

                                                                                        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                                      4. *-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                      5. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                    4. Applied rewrites63.9%

                                                                                      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                    5. Step-by-step derivation
                                                                                      1. lift-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                      2. lift-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                                      3. associate-*l*N/A

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                                      4. lift-sqrt.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                                      5. lift-sqrt.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                                      6. sqrt-unprodN/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                                      7. lift-/.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                                      8. associate-/l*N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                                      9. associate-*l/N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                      10. lift-/.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                                      11. lift-*.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                      12. lift-sqrt.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                      13. lower-*.f6446.2

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                    6. Applied rewrites73.6%

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                    7. Applied rewrites85.8%

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                                    if 4.8000000000000001e116 < l

                                                                                    1. Initial program 62.3%

                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                    2. Add Preprocessing
                                                                                    3. Taylor expanded in d around inf

                                                                                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. *-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      2. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      3. lower-sqrt.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      4. lower-/.f64N/A

                                                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      5. *-commutativeN/A

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                      6. lower-*.f6440.9

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                    5. Applied rewrites40.9%

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                    6. Step-by-step derivation
                                                                                      1. Applied rewrites40.9%

                                                                                        \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites67.6%

                                                                                          \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                      3. Recombined 4 regimes into one program.
                                                                                      4. Add Preprocessing

                                                                                      Alternative 24: 59.5% accurate, 3.6× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\ \;\;\;\;\left|t\_0\right|\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                      (FPCore (d h l M D)
                                                                                       :precision binary64
                                                                                       (let* ((t_0 (/ d (sqrt (* l h)))))
                                                                                         (if (<= l -1.12e-122)
                                                                                           (fabs t_0)
                                                                                           (if (<= l -5e-310)
                                                                                             (/ (* (- d) (sqrt (/ h l))) h)
                                                                                             (if (<= l 4.8e+116)
                                                                                               (*
                                                                                                (fma (* (/ (* (* (/ D d) M) -0.5) l) (* (/ M d) (* 0.25 D))) h 1.0)
                                                                                                t_0)
                                                                                               (/ d (* (sqrt l) (sqrt h))))))))
                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                      	double t_0 = d / sqrt((l * h));
                                                                                      	double tmp;
                                                                                      	if (l <= -1.12e-122) {
                                                                                      		tmp = fabs(t_0);
                                                                                      	} else if (l <= -5e-310) {
                                                                                      		tmp = (-d * sqrt((h / l))) / h;
                                                                                      	} else if (l <= 4.8e+116) {
                                                                                      		tmp = fma((((((D / d) * M) * -0.5) / l) * ((M / d) * (0.25 * D))), h, 1.0) * t_0;
                                                                                      	} else {
                                                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      function code(d, h, l, M, D)
                                                                                      	t_0 = Float64(d / sqrt(Float64(l * h)))
                                                                                      	tmp = 0.0
                                                                                      	if (l <= -1.12e-122)
                                                                                      		tmp = abs(t_0);
                                                                                      	elseif (l <= -5e-310)
                                                                                      		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                                                                      	elseif (l <= 4.8e+116)
                                                                                      		tmp = Float64(fma(Float64(Float64(Float64(Float64(Float64(D / d) * M) * -0.5) / l) * Float64(Float64(M / d) * Float64(0.25 * D))), h, 1.0) * t_0);
                                                                                      	else
                                                                                      		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.12e-122], N[Abs[t$95$0], $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[l, 4.8e+116], N[(N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(0.25 * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                                      \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\
                                                                                      \;\;\;\;\left|t\_0\right|\\
                                                                                      
                                                                                      \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                                      \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                                                      
                                                                                      \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+116}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right) \cdot t\_0\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 4 regimes
                                                                                      2. if l < -1.12e-122

                                                                                        1. Initial program 66.5%

                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in d around inf

                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. *-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                          3. lower-sqrt.f64N/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                          4. lower-/.f64N/A

                                                                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                          5. *-commutativeN/A

                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                          6. lower-*.f646.8

                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                        5. Applied rewrites6.8%

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. Applied rewrites48.0%

                                                                                            \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]

                                                                                          if -1.12e-122 < l < -4.999999999999985e-310

                                                                                          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 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}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. lower-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                          5. Applied rewrites25.7%

                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}} \]
                                                                                          6. Taylor expanded in l around -inf

                                                                                            \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites62.1%

                                                                                              \[\leadsto \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]

                                                                                            if -4.999999999999985e-310 < l < 4.8000000000000001e116

                                                                                            1. Initial program 64.1%

                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. Step-by-step derivation
                                                                                              1. lift-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              3. associate-*l*N/A

                                                                                                \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                                              4. *-commutativeN/A

                                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                              5. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                            4. Applied rewrites63.9%

                                                                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                            5. Step-by-step derivation
                                                                                              1. lift-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                              2. lift-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                                              3. associate-*l*N/A

                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                                              4. lift-sqrt.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                                              5. lift-sqrt.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                                              6. sqrt-unprodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                                              7. lift-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                                              8. associate-/l*N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                                              9. associate-*l/N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                              10. lift-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                                              11. lift-*.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                              12. lift-sqrt.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                              13. lower-*.f6446.2

                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                            6. Applied rewrites73.6%

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                            7. Applied rewrites85.8%

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\frac{D}{d} \cdot M\right) \cdot -0.5}{\ell} \cdot \left(\frac{M}{d} \cdot \left(0.25 \cdot D\right)\right), h, 1\right)} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                                            if 4.8000000000000001e116 < l

                                                                                            1. Initial program 62.3%

                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. Taylor expanded in d around inf

                                                                                              \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. *-commutativeN/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              2. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              3. lower-sqrt.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              4. lower-/.f64N/A

                                                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              5. *-commutativeN/A

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                              6. lower-*.f6440.9

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                            5. Applied rewrites40.9%

                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                            6. Step-by-step derivation
                                                                                              1. Applied rewrites40.9%

                                                                                                \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites67.6%

                                                                                                  \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                              3. Recombined 4 regimes into one program.
                                                                                              4. Add Preprocessing

                                                                                              Alternative 25: 52.3% accurate, 3.8× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\ \;\;\;\;\left|t\_0\right|\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;\ell \leq 1.55 \cdot 10^{+39}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d}, \frac{D \cdot D}{d}, \ell\right)}{\ell} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                              (FPCore (d h l M D)
                                                                                               :precision binary64
                                                                                               (let* ((t_0 (/ d (sqrt (* l h)))))
                                                                                                 (if (<= l -1.12e-122)
                                                                                                   (fabs t_0)
                                                                                                   (if (<= l -5e-310)
                                                                                                     (/ (* (- d) (sqrt (/ h l))) h)
                                                                                                     (if (<= l 1.55e+39)
                                                                                                       (* (/ (fma (/ (* (* (* M M) h) -0.125) d) (/ (* D D) d) l) l) t_0)
                                                                                                       (/ d (* (sqrt l) (sqrt h))))))))
                                                                                              double code(double d, double h, double l, double M, double D) {
                                                                                              	double t_0 = d / sqrt((l * h));
                                                                                              	double tmp;
                                                                                              	if (l <= -1.12e-122) {
                                                                                              		tmp = fabs(t_0);
                                                                                              	} else if (l <= -5e-310) {
                                                                                              		tmp = (-d * sqrt((h / l))) / h;
                                                                                              	} else if (l <= 1.55e+39) {
                                                                                              		tmp = (fma(((((M * M) * h) * -0.125) / d), ((D * D) / d), l) / l) * t_0;
                                                                                              	} else {
                                                                                              		tmp = d / (sqrt(l) * sqrt(h));
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              function code(d, h, l, M, D)
                                                                                              	t_0 = Float64(d / sqrt(Float64(l * h)))
                                                                                              	tmp = 0.0
                                                                                              	if (l <= -1.12e-122)
                                                                                              		tmp = abs(t_0);
                                                                                              	elseif (l <= -5e-310)
                                                                                              		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                                                                              	elseif (l <= 1.55e+39)
                                                                                              		tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * -0.125) / d), Float64(Float64(D * D) / d), l) / l) * t_0);
                                                                                              	else
                                                                                              		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.12e-122], N[Abs[t$95$0], $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[l, 1.55e+39], N[(N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * -0.125), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
                                                                                              \mathbf{if}\;\ell \leq -1.12 \cdot 10^{-122}:\\
                                                                                              \;\;\;\;\left|t\_0\right|\\
                                                                                              
                                                                                              \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
                                                                                              \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                                                              
                                                                                              \mathbf{elif}\;\ell \leq 1.55 \cdot 10^{+39}:\\
                                                                                              \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d}, \frac{D \cdot D}{d}, \ell\right)}{\ell} \cdot t\_0\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 4 regimes
                                                                                              2. if l < -1.12e-122

                                                                                                1. Initial program 66.5%

                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in d around inf

                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. *-commutativeN/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  2. lower-*.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  3. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  4. lower-/.f64N/A

                                                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  5. *-commutativeN/A

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                  6. lower-*.f646.8

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                5. Applied rewrites6.8%

                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. Applied rewrites48.0%

                                                                                                    \[\leadsto \left|\frac{d}{\sqrt{\ell \cdot h}}\right| \]

                                                                                                  if -1.12e-122 < l < -4.999999999999985e-310

                                                                                                  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 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}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower-/.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{{h}^{3}}{{\ell}^{3}}}\right) + d \cdot \sqrt{\frac{h}{\ell}}}{h}} \]
                                                                                                  5. Applied rewrites25.7%

                                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}} \]
                                                                                                  6. Taylor expanded in l around -inf

                                                                                                    \[\leadsto \frac{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. Applied rewrites62.1%

                                                                                                      \[\leadsto \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]

                                                                                                    if -4.999999999999985e-310 < l < 1.5500000000000001e39

                                                                                                    1. Initial program 65.0%

                                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Step-by-step derivation
                                                                                                      1. lift-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \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 \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      3. associate-*l*N/A

                                                                                                        \[\leadsto \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
                                                                                                      4. *-commutativeN/A

                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                                      5. lower-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \]
                                                                                                    4. Applied rewrites63.5%

                                                                                                      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                                    5. Step-by-step derivation
                                                                                                      1. lift-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                                      2. lift-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)} \cdot \sqrt{\frac{d}{h}} \]
                                                                                                      3. associate-*l*N/A

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \]
                                                                                                      4. lift-sqrt.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \]
                                                                                                      5. lift-sqrt.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \]
                                                                                                      6. sqrt-unprodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                                                                      7. lift-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \]
                                                                                                      8. associate-/l*N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell} \cdot d}{h}}} \]
                                                                                                      9. associate-*l/N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                                      10. lift-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h}} \cdot d} \]
                                                                                                      11. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\color{blue}{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                                      12. lift-sqrt.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \color{blue}{\sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                                      13. lower-*.f6446.1

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                                    6. Applied rewrites76.0%

                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell} \cdot -0.5, 1\right) \cdot \frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                    7. Taylor expanded in l around 0

                                                                                                      \[\leadsto \color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]
                                                                                                    8. Step-by-step derivation
                                                                                                      1. lower-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]
                                                                                                    9. Applied rewrites72.3%

                                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125}{d}, \frac{D \cdot D}{d}, \ell\right)}{\ell}} \cdot \frac{d}{\sqrt{\ell \cdot h}} \]

                                                                                                    if 1.5500000000000001e39 < l

                                                                                                    1. Initial program 61.8%

                                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Taylor expanded in d around inf

                                                                                                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. *-commutativeN/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                      2. lower-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                      3. lower-sqrt.f64N/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                      4. lower-/.f64N/A

                                                                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                      5. *-commutativeN/A

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                      6. lower-*.f6444.1

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                    5. Applied rewrites44.1%

                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. Applied rewrites44.0%

                                                                                                        \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites65.1%

                                                                                                          \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                      3. Recombined 4 regimes into one program.
                                                                                                      4. Add Preprocessing

                                                                                                      Alternative 26: 26.1% accurate, 15.3× speedup?

                                                                                                      \[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                                      (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                                      	return d / sqrt((l * h));
                                                                                                      }
                                                                                                      
                                                                                                      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
                                                                                                      
                                                                                                      public static double code(double d, double h, double l, double M, double D) {
                                                                                                      	return d / Math.sqrt((l * h));
                                                                                                      }
                                                                                                      
                                                                                                      def code(d, h, l, M, D):
                                                                                                      	return d / math.sqrt((l * h))
                                                                                                      
                                                                                                      function code(d, h, l, M, D)
                                                                                                      	return Float64(d / sqrt(Float64(l * h)))
                                                                                                      end
                                                                                                      
                                                                                                      function tmp = code(d, h, l, M, D)
                                                                                                      	tmp = d / sqrt((l * h));
                                                                                                      end
                                                                                                      
                                                                                                      code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \frac{d}{\sqrt{\ell \cdot h}}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Initial program 64.4%

                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      2. Add Preprocessing
                                                                                                      3. Taylor expanded in d around inf

                                                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. *-commutativeN/A

                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                        3. lower-sqrt.f64N/A

                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                        4. lower-/.f64N/A

                                                                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                        5. *-commutativeN/A

                                                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                        6. lower-*.f6428.4

                                                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                      5. Applied rewrites28.4%

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                      6. Step-by-step derivation
                                                                                                        1. Applied rewrites28.4%

                                                                                                          \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                        2. Add Preprocessing

                                                                                                        Reproduce

                                                                                                        ?
                                                                                                        herbie shell --seed 2024314 
                                                                                                        (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)))))