Henrywood and Agarwal, Equation (12)

Percentage Accurate: 67.3% → 78.5%
Time: 17.3s
Alternatives: 18
Speedup: 2.8×

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 18 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: 67.3% accurate, 1.0× speedup?

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

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

Alternative 1: 78.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;d \leq -1.02 \cdot 10^{-47}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;d \leq 6.3 \cdot 10^{-86}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot \left(-0.5 \cdot t\_1\right), h \cdot \frac{0.25 \cdot t\_1}{\ell}, t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


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

    1. Initial program 67.8%

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
      5. distribute-lft-neg-inN/A

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
      9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
      10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
      11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
      12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e107 < d < -1.02000000000000002e-47 or 6.2999999999999999e-86 < d

    1. Initial program 81.0%

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
      5. distribute-lft-neg-inN/A

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
      9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
      10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
      11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
      12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02000000000000002e-47 < d < 1.09999999999999994e-272

    1. Initial program 46.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 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 rewrites44.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. Step-by-step derivation
      1. Applied rewrites50.7%

        \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
      2. Step-by-step derivation
        1. Applied rewrites75.7%

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

        if 1.09999999999999994e-272 < d < 6.2999999999999999e-86

        1. Initial program 37.4%

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

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

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

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

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
          5. distribute-lft-neg-inN/A

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

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

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
          9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
          10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
          11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
          12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.1 \cdot 10^{+107}:\\ \;\;\;\;\left(\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\right) \cdot \mathsf{fma}\left(\frac{-0.5 \cdot {\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2}}{\ell}, h, 1\right)\\ \mathbf{elif}\;d \leq -1.02 \cdot 10^{-47}:\\ \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{\frac{D \cdot M}{d} \cdot 0.5}{-1} \cdot \frac{\left(\frac{D \cdot M}{d} \cdot 0.5\right) \cdot 0.5}{\ell}, h, 1\right)\\ \mathbf{elif}\;d \leq 1.1 \cdot 10^{-272}:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, \frac{-0.125 \cdot {\left(M \cdot D\right)}^{2}}{d}, d\right)}{h}\\ \mathbf{elif}\;d \leq 6.3 \cdot 10^{-86}:\\ \;\;\;\;\mathsf{fma}\left(\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(-0.5 \cdot \frac{M \cdot D}{d}\right), h \cdot \frac{0.25 \cdot \frac{M \cdot D}{d}}{\ell}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left({\left(\sqrt{\frac{h}{d}}\right)}^{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \mathsf{fma}\left(\frac{\frac{D \cdot M}{d} \cdot 0.5}{-1} \cdot \frac{\left(\frac{D \cdot M}{d} \cdot 0.5\right) \cdot 0.5}{\ell}, h, 1\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 2: 71.0% accurate, 0.1× speedup?

      \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d} \cdot 0.5\\ 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{h}{\ell}}\\ t_3 := t\_2 \cdot d\\ t_4 := \sqrt{\frac{d}{\ell}}\\ t_5 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_4\right) \cdot t\_5\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-89}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\ \;\;\;\;t\_4 \cdot t\_5\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{t\_3}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_2, t\_3\right)}{h}\\ \end{array} \end{array} \]
      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
      (FPCore (d h l M D)
       :precision binary64
       (let* ((t_0 (* (/ (* D M) d) 0.5))
              (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 (/ h l)))
              (t_3 (* t_2 d))
              (t_4 (sqrt (/ d l)))
              (t_5 (sqrt (/ d h))))
         (if (<= t_1 (- INFINITY))
           (* (* (/ (fma (/ M d) (* (/ M d) (* (* (* D D) -0.125) h)) l) l) t_4) t_5)
           (if (<= t_1 -5e-89)
             (* (fma t_0 (* t_0 (* (/ h l) -0.5)) 1.0) (sqrt (* (/ (/ d l) h) d)))
             (if (<= t_1 0.0)
               (/ d (sqrt (* l h)))
               (if (<= t_1 5e+253)
                 (* t_4 t_5)
                 (if (<= t_1 INFINITY)
                   (/ t_3 h)
                   (/
                    (fma (* (* (/ (* D D) d) M) (* -0.125 M)) (* (/ h l) t_2) t_3)
                    h))))))))
      assert(d < h && h < l && l < M && M < D);
      double code(double d, double h, double l, double M, double D) {
      	double t_0 = ((D * M) / d) * 0.5;
      	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((h / l));
      	double t_3 = t_2 * d;
      	double t_4 = sqrt((d / l));
      	double t_5 = sqrt((d / h));
      	double tmp;
      	if (t_1 <= -((double) INFINITY)) {
      		tmp = ((fma((M / d), ((M / d) * (((D * D) * -0.125) * h)), l) / l) * t_4) * t_5;
      	} else if (t_1 <= -5e-89) {
      		tmp = fma(t_0, (t_0 * ((h / l) * -0.5)), 1.0) * sqrt((((d / l) / h) * d));
      	} else if (t_1 <= 0.0) {
      		tmp = d / sqrt((l * h));
      	} else if (t_1 <= 5e+253) {
      		tmp = t_4 * t_5;
      	} else if (t_1 <= ((double) INFINITY)) {
      		tmp = t_3 / h;
      	} else {
      		tmp = fma(((((D * D) / d) * M) * (-0.125 * M)), ((h / l) * t_2), t_3) / h;
      	}
      	return tmp;
      }
      
      d, h, l, M, D = sort([d, h, l, M, D])
      function code(d, h, l, M, D)
      	t_0 = Float64(Float64(Float64(D * M) / d) * 0.5)
      	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(h / l))
      	t_3 = Float64(t_2 * d)
      	t_4 = sqrt(Float64(d / l))
      	t_5 = sqrt(Float64(d / h))
      	tmp = 0.0
      	if (t_1 <= Float64(-Inf))
      		tmp = Float64(Float64(Float64(fma(Float64(M / d), Float64(Float64(M / d) * Float64(Float64(Float64(D * D) * -0.125) * h)), l) / l) * t_4) * t_5);
      	elseif (t_1 <= -5e-89)
      		tmp = Float64(fma(t_0, Float64(t_0 * Float64(Float64(h / l) * -0.5)), 1.0) * sqrt(Float64(Float64(Float64(d / l) / h) * d)));
      	elseif (t_1 <= 0.0)
      		tmp = Float64(d / sqrt(Float64(l * h)));
      	elseif (t_1 <= 5e+253)
      		tmp = Float64(t_4 * t_5);
      	elseif (t_1 <= Inf)
      		tmp = Float64(t_3 / h);
      	else
      		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * D) / d) * M) * Float64(-0.125 * M)), Float64(Float64(h / l) * t_2), t_3) / h);
      	end
      	return tmp
      end
      
      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision] * 0.5), $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[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * d), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[t$95$1, -5e-89], N[(N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(N[(N[(d / l), $MachinePrecision] / h), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+253], N[(t$95$4 * t$95$5), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(t$95$3 / h), $MachinePrecision], N[(N[(N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$2), $MachinePrecision] + t$95$3), $MachinePrecision] / h), $MachinePrecision]]]]]]]]]]]]
      
      \begin{array}{l}
      [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
      \\
      \begin{array}{l}
      t_0 := \frac{D \cdot M}{d} \cdot 0.5\\
      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{h}{\ell}}\\
      t_3 := t\_2 \cdot d\\
      t_4 := \sqrt{\frac{d}{\ell}}\\
      t_5 := \sqrt{\frac{d}{h}}\\
      \mathbf{if}\;t\_1 \leq -\infty:\\
      \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_4\right) \cdot t\_5\\
      
      \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-89}:\\
      \;\;\;\;\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\
      
      \mathbf{elif}\;t\_1 \leq 0:\\
      \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+253}:\\
      \;\;\;\;t\_4 \cdot t\_5\\
      
      \mathbf{elif}\;t\_1 \leq \infty:\\
      \;\;\;\;\frac{t\_3}{h}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_2, t\_3\right)}{h}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 6 regimes
      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -inf.0

        1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          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)))) < -4.99999999999999967e-89

          1. Initial program 98.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. Applied rewrites67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
            15. unpow2N/A

              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
            16. associate-*l*N/A

              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
          5. Applied rewrites67.8%

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

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

          1. Initial program 39.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-*.f6457.4

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

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

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

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

            1. Initial program 98.6%

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

              \[\leadsto \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 rewrites98.4%

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

              if 4.9999999999999997e253 < (*.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 50.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 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 rewrites37.0%

                \[\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 d around inf

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

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

                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. 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 rewrites18.0%

                  \[\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 rewrites18.1%

                    \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                  2. Step-by-step derivation
                    1. Applied rewrites20.4%

                      \[\leadsto \frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                  3. Recombined 6 regimes into one program.
                  4. Final simplification69.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 -\infty:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \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 -5 \cdot 10^{-89}:\\ \;\;\;\;\mathsf{fma}\left(\frac{D \cdot M}{d} \cdot 0.5, \left(\frac{D \cdot M}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \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 0:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{+253}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \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:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 3: 68.9% accurate, 0.1× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \sqrt{\frac{h}{\ell}}\\ t_4 := t\_3 \cdot d\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-89}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot t\_2\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+253}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{t\_4}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_3, t\_4\right)}{h}\\ \end{array} \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D)
                   :precision binary64
                   (let* ((t_0
                           (*
                            (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                            (-
                             1.0
                             (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                          (t_1 (sqrt (/ d l)))
                          (t_2 (sqrt (/ d h)))
                          (t_3 (sqrt (/ h l)))
                          (t_4 (* t_3 d)))
                     (if (<= t_0 -5e-89)
                       (* (* (/ (fma (/ M d) (* (/ M d) (* (* (* D D) -0.125) h)) l) l) t_1) t_2)
                       (if (<= t_0 0.0)
                         (/ d (sqrt (* l h)))
                         (if (<= t_0 5e+253)
                           (* t_1 t_2)
                           (if (<= t_0 INFINITY)
                             (/ t_4 h)
                             (/
                              (fma (* (* (/ (* D D) d) M) (* -0.125 M)) (* (/ h l) t_3) t_4)
                              h)))))))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                  	double t_1 = sqrt((d / l));
                  	double t_2 = sqrt((d / h));
                  	double t_3 = sqrt((h / l));
                  	double t_4 = t_3 * d;
                  	double tmp;
                  	if (t_0 <= -5e-89) {
                  		tmp = ((fma((M / d), ((M / d) * (((D * D) * -0.125) * h)), l) / l) * t_1) * t_2;
                  	} else if (t_0 <= 0.0) {
                  		tmp = d / sqrt((l * h));
                  	} else if (t_0 <= 5e+253) {
                  		tmp = t_1 * t_2;
                  	} else if (t_0 <= ((double) INFINITY)) {
                  		tmp = t_4 / h;
                  	} else {
                  		tmp = fma(((((D * D) / d) * M) * (-0.125 * M)), ((h / l) * t_3), t_4) / h;
                  	}
                  	return tmp;
                  }
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                  	t_1 = sqrt(Float64(d / l))
                  	t_2 = sqrt(Float64(d / h))
                  	t_3 = sqrt(Float64(h / l))
                  	t_4 = Float64(t_3 * d)
                  	tmp = 0.0
                  	if (t_0 <= -5e-89)
                  		tmp = Float64(Float64(Float64(fma(Float64(M / d), Float64(Float64(M / d) * Float64(Float64(Float64(D * D) * -0.125) * h)), l) / l) * t_1) * t_2);
                  	elseif (t_0 <= 0.0)
                  		tmp = Float64(d / sqrt(Float64(l * h)));
                  	elseif (t_0 <= 5e+253)
                  		tmp = Float64(t_1 * t_2);
                  	elseif (t_0 <= Inf)
                  		tmp = Float64(t_4 / h);
                  	else
                  		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * D) / d) * M) * Float64(-0.125 * M)), Float64(Float64(h / l) * t_3), t_4) / h);
                  	end
                  	return tmp
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[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[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * d), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-89], N[(N[(N[(N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+253], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(t$95$4 / h), $MachinePrecision], N[(N[(N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] / h), $MachinePrecision]]]]]]]]]]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \begin{array}{l}
                  t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                  t_1 := \sqrt{\frac{d}{\ell}}\\
                  t_2 := \sqrt{\frac{d}{h}}\\
                  t_3 := \sqrt{\frac{h}{\ell}}\\
                  t_4 := t\_3 \cdot d\\
                  \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-89}:\\
                  \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot t\_2\\
                  
                  \mathbf{elif}\;t\_0 \leq 0:\\
                  \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
                  
                  \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+253}:\\
                  \;\;\;\;t\_1 \cdot t\_2\\
                  
                  \mathbf{elif}\;t\_0 \leq \infty:\\
                  \;\;\;\;\frac{t\_4}{h}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_3, t\_4\right)}{h}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 5 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.99999999999999967e-89

                    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 39.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-*.f6457.4

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

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

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

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

                        1. Initial program 98.6%

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

                          \[\leadsto \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 rewrites98.4%

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

                          if 4.9999999999999997e253 < (*.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 50.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 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 rewrites37.0%

                            \[\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 d around inf

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

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

                            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. 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 rewrites18.0%

                              \[\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 rewrites18.1%

                                \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                              2. Step-by-step derivation
                                1. Applied rewrites20.4%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -5 \cdot 10^{-89}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \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:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{+253}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \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:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \end{array} \]
                              5. Add Preprocessing

                              Alternative 4: 67.2% accurate, 0.1× speedup?

                              \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot D}{d}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := -0.125 \cdot \left(M \cdot M\right)\\ t_4 := \sqrt{\frac{h}{\ell}}\\ t_5 := \frac{h}{\ell} \cdot t\_4\\ t_6 := \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_7 := t\_4 \cdot d\\ \mathbf{if}\;t\_6 \leq -\infty:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(t\_3 \cdot t\_0\right)\right) \cdot t\_1\right) \cdot t\_2\\ \mathbf{elif}\;t\_6 \leq 10^{-264}:\\ \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot t\_3\right), t\_5, t\_7\right)}{h}\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+253}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t\_6 \leq \infty:\\ \;\;\;\;\frac{t\_7}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(t\_0 \cdot M\right) \cdot \left(-0.125 \cdot M\right), t\_5, t\_7\right)}{h}\\ \end{array} \end{array} \]
                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                              (FPCore (d h l M D)
                               :precision binary64
                               (let* ((t_0 (/ (* D D) d))
                                      (t_1 (sqrt (/ d l)))
                                      (t_2 (sqrt (/ d h)))
                                      (t_3 (* -0.125 (* M M)))
                                      (t_4 (sqrt (/ h l)))
                                      (t_5 (* (/ h l) t_4))
                                      (t_6
                                       (*
                                        (* (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_7 (* t_4 d)))
                                 (if (<= t_6 (- INFINITY))
                                   (* (* (* (/ h (* l d)) (* t_3 t_0)) t_1) t_2)
                                   (if (<= t_6 1e-264)
                                     (/ (fma (* D (* (/ D d) t_3)) t_5 t_7) h)
                                     (if (<= t_6 5e+253)
                                       (* t_1 t_2)
                                       (if (<= t_6 INFINITY)
                                         (/ t_7 h)
                                         (/ (fma (* (* t_0 M) (* -0.125 M)) t_5 t_7) h)))))))
                              assert(d < h && h < l && l < M && M < D);
                              double code(double d, double h, double l, double M, double D) {
                              	double t_0 = (D * D) / d;
                              	double t_1 = sqrt((d / l));
                              	double t_2 = sqrt((d / h));
                              	double t_3 = -0.125 * (M * M);
                              	double t_4 = sqrt((h / l));
                              	double t_5 = (h / l) * t_4;
                              	double t_6 = (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_7 = t_4 * d;
                              	double tmp;
                              	if (t_6 <= -((double) INFINITY)) {
                              		tmp = (((h / (l * d)) * (t_3 * t_0)) * t_1) * t_2;
                              	} else if (t_6 <= 1e-264) {
                              		tmp = fma((D * ((D / d) * t_3)), t_5, t_7) / h;
                              	} else if (t_6 <= 5e+253) {
                              		tmp = t_1 * t_2;
                              	} else if (t_6 <= ((double) INFINITY)) {
                              		tmp = t_7 / h;
                              	} else {
                              		tmp = fma(((t_0 * M) * (-0.125 * M)), t_5, t_7) / h;
                              	}
                              	return tmp;
                              }
                              
                              d, h, l, M, D = sort([d, h, l, M, D])
                              function code(d, h, l, M, D)
                              	t_0 = Float64(Float64(D * D) / d)
                              	t_1 = sqrt(Float64(d / l))
                              	t_2 = sqrt(Float64(d / h))
                              	t_3 = Float64(-0.125 * Float64(M * M))
                              	t_4 = sqrt(Float64(h / l))
                              	t_5 = Float64(Float64(h / l) * t_4)
                              	t_6 = 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_7 = Float64(t_4 * d)
                              	tmp = 0.0
                              	if (t_6 <= Float64(-Inf))
                              		tmp = Float64(Float64(Float64(Float64(h / Float64(l * d)) * Float64(t_3 * t_0)) * t_1) * t_2);
                              	elseif (t_6 <= 1e-264)
                              		tmp = Float64(fma(Float64(D * Float64(Float64(D / d) * t_3)), t_5, t_7) / h);
                              	elseif (t_6 <= 5e+253)
                              		tmp = Float64(t_1 * t_2);
                              	elseif (t_6 <= Inf)
                              		tmp = Float64(t_7 / h);
                              	else
                              		tmp = Float64(fma(Float64(Float64(t_0 * M) * Float64(-0.125 * M)), t_5, t_7) / h);
                              	end
                              	return tmp
                              end
                              
                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(-0.125 * N[(M * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(h / l), $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$6 = 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$7 = N[(t$95$4 * d), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], N[(N[(N[(N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(t$95$3 * t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$6, 1e-264], N[(N[(N[(D * N[(N[(D / d), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$5 + t$95$7), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$6, 5e+253], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t$95$6, Infinity], N[(t$95$7 / h), $MachinePrecision], N[(N[(N[(N[(t$95$0 * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * t$95$5 + t$95$7), $MachinePrecision] / h), $MachinePrecision]]]]]]]]]]]]]
                              
                              \begin{array}{l}
                              [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                              \\
                              \begin{array}{l}
                              t_0 := \frac{D \cdot D}{d}\\
                              t_1 := \sqrt{\frac{d}{\ell}}\\
                              t_2 := \sqrt{\frac{d}{h}}\\
                              t_3 := -0.125 \cdot \left(M \cdot M\right)\\
                              t_4 := \sqrt{\frac{h}{\ell}}\\
                              t_5 := \frac{h}{\ell} \cdot t\_4\\
                              t_6 := \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_7 := t\_4 \cdot d\\
                              \mathbf{if}\;t\_6 \leq -\infty:\\
                              \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(t\_3 \cdot t\_0\right)\right) \cdot t\_1\right) \cdot t\_2\\
                              
                              \mathbf{elif}\;t\_6 \leq 10^{-264}:\\
                              \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot t\_3\right), t\_5, t\_7\right)}{h}\\
                              
                              \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+253}:\\
                              \;\;\;\;t\_1 \cdot t\_2\\
                              
                              \mathbf{elif}\;t\_6 \leq \infty:\\
                              \;\;\;\;\frac{t\_7}{h}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\mathsf{fma}\left(\left(t\_0 \cdot M\right) \cdot \left(-0.125 \cdot M\right), t\_5, t\_7\right)}{h}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 5 regimes
                              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -inf.0

                                1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                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)))) < 1e-264

                                1. Initial program 67.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 rewrites31.4%

                                  \[\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 rewrites39.1%

                                    \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                  2. Step-by-step derivation
                                    1. Applied rewrites49.5%

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

                                    if 1e-264 < (*.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.9999999999999997e253

                                    1. Initial program 98.6%

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

                                      \[\leadsto \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.8

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

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

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

                                      if 4.9999999999999997e253 < (*.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 50.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 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 rewrites37.0%

                                        \[\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 d around inf

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

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

                                        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. 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 rewrites18.0%

                                          \[\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 rewrites18.1%

                                            \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites20.4%

                                              \[\leadsto \frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                          3. Recombined 5 regimes into one program.
                                          4. Final simplification65.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 -\infty:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\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^{-264}:\\ \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot \left(-0.125 \cdot \left(M \cdot M\right)\right)\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{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^{+253}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \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:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \end{array} \]
                                          5. Add Preprocessing

                                          Alternative 5: 65.1% accurate, 0.1× speedup?

                                          \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{d}{h}}\\ t_3 := \sqrt{\frac{h}{\ell}}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-77}:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\right)\right) \cdot t\_1\right) \cdot t\_2\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+253}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{t\_3 \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-d\right) \cdot t\_3}{h}\\ \end{array} \end{array} \]
                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                          (FPCore (d h l M D)
                                           :precision binary64
                                           (let* ((t_0
                                                   (*
                                                    (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                    (-
                                                     1.0
                                                     (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                  (t_1 (sqrt (/ d l)))
                                                  (t_2 (sqrt (/ d h)))
                                                  (t_3 (sqrt (/ h l))))
                                             (if (<= t_0 -1e-77)
                                               (* (* (* (/ h (* l d)) (* (* -0.125 (* M M)) (/ (* D D) d))) t_1) t_2)
                                               (if (<= t_0 0.0)
                                                 (/ d (sqrt (* l h)))
                                                 (if (<= t_0 5e+253)
                                                   (* t_1 t_2)
                                                   (if (<= t_0 INFINITY) (/ (* t_3 d) h) (/ (* (- d) t_3) h)))))))
                                          assert(d < h && h < l && l < M && M < D);
                                          double code(double d, double h, double l, double M, double D) {
                                          	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                          	double t_1 = sqrt((d / l));
                                          	double t_2 = sqrt((d / h));
                                          	double t_3 = sqrt((h / l));
                                          	double tmp;
                                          	if (t_0 <= -1e-77) {
                                          		tmp = (((h / (l * d)) * ((-0.125 * (M * M)) * ((D * D) / d))) * t_1) * t_2;
                                          	} else if (t_0 <= 0.0) {
                                          		tmp = d / sqrt((l * h));
                                          	} else if (t_0 <= 5e+253) {
                                          		tmp = t_1 * t_2;
                                          	} else if (t_0 <= ((double) INFINITY)) {
                                          		tmp = (t_3 * d) / h;
                                          	} else {
                                          		tmp = (-d * t_3) / h;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          assert d < h && h < l && l < M && M < D;
                                          public static double code(double d, double h, double l, double M, double D) {
                                          	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                          	double t_1 = Math.sqrt((d / l));
                                          	double t_2 = Math.sqrt((d / h));
                                          	double t_3 = Math.sqrt((h / l));
                                          	double tmp;
                                          	if (t_0 <= -1e-77) {
                                          		tmp = (((h / (l * d)) * ((-0.125 * (M * M)) * ((D * D) / d))) * t_1) * t_2;
                                          	} else if (t_0 <= 0.0) {
                                          		tmp = d / Math.sqrt((l * h));
                                          	} else if (t_0 <= 5e+253) {
                                          		tmp = t_1 * t_2;
                                          	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                          		tmp = (t_3 * d) / h;
                                          	} else {
                                          		tmp = (-d * t_3) / h;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          [d, h, l, M, D] = sort([d, h, l, M, D])
                                          def code(d, h, l, M, D):
                                          	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                          	t_1 = math.sqrt((d / l))
                                          	t_2 = math.sqrt((d / h))
                                          	t_3 = math.sqrt((h / l))
                                          	tmp = 0
                                          	if t_0 <= -1e-77:
                                          		tmp = (((h / (l * d)) * ((-0.125 * (M * M)) * ((D * D) / d))) * t_1) * t_2
                                          	elif t_0 <= 0.0:
                                          		tmp = d / math.sqrt((l * h))
                                          	elif t_0 <= 5e+253:
                                          		tmp = t_1 * t_2
                                          	elif t_0 <= math.inf:
                                          		tmp = (t_3 * d) / h
                                          	else:
                                          		tmp = (-d * t_3) / h
                                          	return tmp
                                          
                                          d, h, l, M, D = sort([d, h, l, M, D])
                                          function code(d, h, l, M, D)
                                          	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                          	t_1 = sqrt(Float64(d / l))
                                          	t_2 = sqrt(Float64(d / h))
                                          	t_3 = sqrt(Float64(h / l))
                                          	tmp = 0.0
                                          	if (t_0 <= -1e-77)
                                          		tmp = Float64(Float64(Float64(Float64(h / Float64(l * d)) * Float64(Float64(-0.125 * Float64(M * M)) * Float64(Float64(D * D) / d))) * t_1) * t_2);
                                          	elseif (t_0 <= 0.0)
                                          		tmp = Float64(d / sqrt(Float64(l * h)));
                                          	elseif (t_0 <= 5e+253)
                                          		tmp = Float64(t_1 * t_2);
                                          	elseif (t_0 <= Inf)
                                          		tmp = Float64(Float64(t_3 * d) / h);
                                          	else
                                          		tmp = Float64(Float64(Float64(-d) * t_3) / h);
                                          	end
                                          	return tmp
                                          end
                                          
                                          d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                          function tmp_2 = code(d, h, l, M, D)
                                          	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                          	t_1 = sqrt((d / l));
                                          	t_2 = sqrt((d / h));
                                          	t_3 = sqrt((h / l));
                                          	tmp = 0.0;
                                          	if (t_0 <= -1e-77)
                                          		tmp = (((h / (l * d)) * ((-0.125 * (M * M)) * ((D * D) / d))) * t_1) * t_2;
                                          	elseif (t_0 <= 0.0)
                                          		tmp = d / sqrt((l * h));
                                          	elseif (t_0 <= 5e+253)
                                          		tmp = t_1 * t_2;
                                          	elseif (t_0 <= Inf)
                                          		tmp = (t_3 * d) / h;
                                          	else
                                          		tmp = (-d * t_3) / h;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -1e-77], N[(N[(N[(N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+253], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(t$95$3 * d), $MachinePrecision] / h), $MachinePrecision], N[(N[((-d) * t$95$3), $MachinePrecision] / h), $MachinePrecision]]]]]]]]]
                                          
                                          \begin{array}{l}
                                          [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                          \\
                                          \begin{array}{l}
                                          t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                          t_1 := \sqrt{\frac{d}{\ell}}\\
                                          t_2 := \sqrt{\frac{d}{h}}\\
                                          t_3 := \sqrt{\frac{h}{\ell}}\\
                                          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-77}:\\
                                          \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\right)\right) \cdot t\_1\right) \cdot t\_2\\
                                          
                                          \mathbf{elif}\;t\_0 \leq 0:\\
                                          \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
                                          
                                          \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+253}:\\
                                          \;\;\;\;t\_1 \cdot t\_2\\
                                          
                                          \mathbf{elif}\;t\_0 \leq \infty:\\
                                          \;\;\;\;\frac{t\_3 \cdot d}{h}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{\left(-d\right) \cdot t\_3}{h}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 5 regimes
                                          2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -9.9999999999999993e-78

                                            1. Initial program 87.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. Applied rewrites41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

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

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

                                              1. Initial program 98.6%

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

                                                \[\leadsto \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 rewrites98.4%

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

                                                if 4.9999999999999997e253 < (*.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 50.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 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 rewrites37.0%

                                                  \[\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 d around inf

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

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

                                                  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. 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 rewrites18.0%

                                                    \[\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 rewrites17.5%

                                                      \[\leadsto \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                                  8. Recombined 5 regimes into one program.
                                                  9. Final simplification63.9%

                                                    \[\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 -1 \cdot 10^{-77}:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\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 0:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{+253}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \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:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \end{array} \]
                                                  10. Add Preprocessing

                                                  Alternative 6: 64.7% accurate, 0.2× speedup?

                                                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := -0.125 \cdot \left(M \cdot M\right)\\ 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{h}{\ell}}\\ t_3 := \sqrt{\frac{d}{\ell}}\\ t_4 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(t\_0 \cdot \frac{D \cdot D}{d}\right)\right) \cdot t\_3\right) \cdot t\_4\\ \mathbf{elif}\;t\_1 \leq 10^{-264} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+253}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot t\_0\right), \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot t\_4\\ \end{array} \end{array} \]
                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                  (FPCore (d h l M D)
                                                   :precision binary64
                                                   (let* ((t_0 (* -0.125 (* M M)))
                                                          (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 (/ h l)))
                                                          (t_3 (sqrt (/ d l)))
                                                          (t_4 (sqrt (/ d h))))
                                                     (if (<= t_1 (- INFINITY))
                                                       (* (* (* (/ h (* l d)) (* t_0 (/ (* D D) d))) t_3) t_4)
                                                       (if (or (<= t_1 1e-264) (not (<= t_1 5e+253)))
                                                         (/ (fma (* D (* (/ D d) t_0)) (* (/ h l) t_2) (* t_2 d)) h)
                                                         (* t_3 t_4)))))
                                                  assert(d < h && h < l && l < M && M < D);
                                                  double code(double d, double h, double l, double M, double D) {
                                                  	double t_0 = -0.125 * (M * M);
                                                  	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((h / l));
                                                  	double t_3 = sqrt((d / l));
                                                  	double t_4 = sqrt((d / h));
                                                  	double tmp;
                                                  	if (t_1 <= -((double) INFINITY)) {
                                                  		tmp = (((h / (l * d)) * (t_0 * ((D * D) / d))) * t_3) * t_4;
                                                  	} else if ((t_1 <= 1e-264) || !(t_1 <= 5e+253)) {
                                                  		tmp = fma((D * ((D / d) * t_0)), ((h / l) * t_2), (t_2 * d)) / h;
                                                  	} else {
                                                  		tmp = t_3 * t_4;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  d, h, l, M, D = sort([d, h, l, M, D])
                                                  function code(d, h, l, M, D)
                                                  	t_0 = Float64(-0.125 * Float64(M * M))
                                                  	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(h / l))
                                                  	t_3 = sqrt(Float64(d / l))
                                                  	t_4 = sqrt(Float64(d / h))
                                                  	tmp = 0.0
                                                  	if (t_1 <= Float64(-Inf))
                                                  		tmp = Float64(Float64(Float64(Float64(h / Float64(l * d)) * Float64(t_0 * Float64(Float64(D * D) / d))) * t_3) * t_4);
                                                  	elseif ((t_1 <= 1e-264) || !(t_1 <= 5e+253))
                                                  		tmp = Float64(fma(Float64(D * Float64(Float64(D / d) * t_0)), Float64(Float64(h / l) * t_2), Float64(t_2 * d)) / h);
                                                  	else
                                                  		tmp = Float64(t_3 * t_4);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(-0.125 * N[(M * M), $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[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e-264], N[Not[LessEqual[t$95$1, 5e+253]], $MachinePrecision]], N[(N[(N[(D * N[(N[(D / d), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$2 * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(t$95$3 * t$95$4), $MachinePrecision]]]]]]]]
                                                  
                                                  \begin{array}{l}
                                                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                  \\
                                                  \begin{array}{l}
                                                  t_0 := -0.125 \cdot \left(M \cdot M\right)\\
                                                  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{h}{\ell}}\\
                                                  t_3 := \sqrt{\frac{d}{\ell}}\\
                                                  t_4 := \sqrt{\frac{d}{h}}\\
                                                  \mathbf{if}\;t\_1 \leq -\infty:\\
                                                  \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(t\_0 \cdot \frac{D \cdot D}{d}\right)\right) \cdot t\_3\right) \cdot t\_4\\
                                                  
                                                  \mathbf{elif}\;t\_1 \leq 10^{-264} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+253}\right):\\
                                                  \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot t\_0\right), \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_3 \cdot t\_4\\
                                                  
                                                  
                                                  \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)))) < -inf.0

                                                    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    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)))) < 1e-264 or 4.9999999999999997e253 < (*.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.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 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 rewrites27.0%

                                                      \[\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 rewrites32.8%

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

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

                                                        if 1e-264 < (*.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.9999999999999997e253

                                                        1. Initial program 98.6%

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

                                                          \[\leadsto \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.8

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

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

                                                            \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                        7. Recombined 3 regimes into one program.
                                                        8. Final simplification62.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 -\infty:\\ \;\;\;\;\left(\left(\frac{h}{\ell \cdot d} \cdot \left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\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^{-264} \lor \neg \left(\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{+253}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(D \cdot \left(\frac{D}{d} \cdot \left(-0.125 \cdot \left(M \cdot M\right)\right)\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \]
                                                        9. Add Preprocessing

                                                        Alternative 7: 82.3% accurate, 1.2× speedup?

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

                                                          1. Initial program 74.5%

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

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

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

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

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                            5. distribute-lft-neg-inN/A

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

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

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                            9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                            10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                            11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                            12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -9.4999999999999994e-71 < d < 7.50000000000000042e-189

                                                          1. Initial program 40.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 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 rewrites40.1%

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

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

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

                                                              if 7.50000000000000042e-189 < d

                                                              1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 8: 81.7% accurate, 1.5× speedup?

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

                                                              1. Initial program 67.8%

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

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

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

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

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                5. distribute-lft-neg-inN/A

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

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

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if -2.1e107 < d < -1.02000000000000002e-47

                                                              1. Initial program 77.9%

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

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

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

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

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                5. distribute-lft-neg-inN/A

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

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

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if -1.02000000000000002e-47 < d < 7.50000000000000042e-189

                                                              1. Initial program 44.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 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 rewrites40.1%

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

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

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

                                                                  if 7.50000000000000042e-189 < d

                                                                  1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                Alternative 9: 77.3% accurate, 1.6× speedup?

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

                                                                  1. Initial program 77.8%

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

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

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

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

                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                    5. distribute-lft-neg-inN/A

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

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

                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                    9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                    10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                    11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                    12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if -1.02000000000000002e-47 < d < 1.09999999999999994e-272

                                                                  1. Initial program 46.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 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 rewrites44.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. Step-by-step derivation
                                                                    1. Applied rewrites50.7%

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites75.7%

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

                                                                      if 1.09999999999999994e-272 < d < 6.2999999999999999e-86

                                                                      1. Initial program 37.4%

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

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

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

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

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                        5. distribute-lft-neg-inN/A

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

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

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                        9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                        10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                        11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                        12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 10: 73.6% accurate, 1.6× speedup?

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

                                                                      1. Initial program 71.4%

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

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

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

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

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                        5. distribute-lft-neg-inN/A

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

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

                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                        9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                        10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                        11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                        12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -2.59999999999999998e-178 < d < 2.29999999999999981e-273

                                                                      1. Initial program 36.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 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 rewrites48.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. Step-by-step derivation
                                                                        1. Applied rewrites51.1%

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites53.9%

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

                                                                          if 2.29999999999999981e-273 < d < 6.2999999999999999e-86

                                                                          1. Initial program 37.4%

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

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

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

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

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                            5. distribute-lft-neg-inN/A

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

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

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                            9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                            10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                            11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                            12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 6.2999999999999999e-86 < d

                                                                          1. Initial program 82.6%

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

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

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

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

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                            5. distribute-lft-neg-inN/A

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

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

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                            9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                            10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                            11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                            12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 11: 70.7% accurate, 2.7× speedup?

                                                                        \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\ t_2 := \left(D \cdot \frac{0.5}{d}\right) \cdot M\\ t_3 := \frac{M \cdot D}{d}\\ t_4 := \sqrt{\frac{h}{\ell}}\\ \mathbf{if}\;d \leq -3.6 \cdot 10^{+103}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -7.9 \cdot 10^{-109}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_0\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_4, t\_4 \cdot d\right)}{h}\\ \mathbf{elif}\;d \leq 7.2 \cdot 10^{-107}:\\ \;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(-0.5 \cdot t\_3\right), h \cdot \frac{0.25 \cdot t\_3}{\ell}, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.5\right) \cdot t\_2, t\_2, 1\right) \cdot t\_0\right) \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                        NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                        (FPCore (d h l M D)
                                                                         :precision binary64
                                                                         (let* ((t_0 (sqrt (/ d l)))
                                                                                (t_1 (/ d (sqrt (* h l))))
                                                                                (t_2 (* (* D (/ 0.5 d)) M))
                                                                                (t_3 (/ (* M D) d))
                                                                                (t_4 (sqrt (/ h l))))
                                                                           (if (<= d -3.6e+103)
                                                                             (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                             (if (<= d -7.9e-109)
                                                                               (*
                                                                                (* (/ (fma (/ M d) (* (/ M d) (* (* (* D D) -0.125) h)) l) l) t_0)
                                                                                (sqrt (/ d h)))
                                                                               (if (<= d 2.3e-273)
                                                                                 (/
                                                                                  (fma (* (* (/ (* D D) d) M) (* -0.125 M)) (* (/ h l) t_4) (* t_4 d))
                                                                                  h)
                                                                                 (if (<= d 7.2e-107)
                                                                                   (fma (* t_1 (* -0.5 t_3)) (* h (/ (* 0.25 t_3) l)) t_1)
                                                                                   (/
                                                                                    (* (* (fma (* (* (/ h l) -0.5) t_2) t_2 1.0) t_0) (sqrt d))
                                                                                    (sqrt h))))))))
                                                                        assert(d < h && h < l && l < M && M < D);
                                                                        double code(double d, double h, double l, double M, double D) {
                                                                        	double t_0 = sqrt((d / l));
                                                                        	double t_1 = d / sqrt((h * l));
                                                                        	double t_2 = (D * (0.5 / d)) * M;
                                                                        	double t_3 = (M * D) / d;
                                                                        	double t_4 = sqrt((h / l));
                                                                        	double tmp;
                                                                        	if (d <= -3.6e+103) {
                                                                        		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                        	} else if (d <= -7.9e-109) {
                                                                        		tmp = ((fma((M / d), ((M / d) * (((D * D) * -0.125) * h)), l) / l) * t_0) * sqrt((d / h));
                                                                        	} else if (d <= 2.3e-273) {
                                                                        		tmp = fma(((((D * D) / d) * M) * (-0.125 * M)), ((h / l) * t_4), (t_4 * d)) / h;
                                                                        	} else if (d <= 7.2e-107) {
                                                                        		tmp = fma((t_1 * (-0.5 * t_3)), (h * ((0.25 * t_3) / l)), t_1);
                                                                        	} else {
                                                                        		tmp = ((fma((((h / l) * -0.5) * t_2), t_2, 1.0) * t_0) * sqrt(d)) / sqrt(h);
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        d, h, l, M, D = sort([d, h, l, M, D])
                                                                        function code(d, h, l, M, D)
                                                                        	t_0 = sqrt(Float64(d / l))
                                                                        	t_1 = Float64(d / sqrt(Float64(h * l)))
                                                                        	t_2 = Float64(Float64(D * Float64(0.5 / d)) * M)
                                                                        	t_3 = Float64(Float64(M * D) / d)
                                                                        	t_4 = sqrt(Float64(h / l))
                                                                        	tmp = 0.0
                                                                        	if (d <= -3.6e+103)
                                                                        		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                        	elseif (d <= -7.9e-109)
                                                                        		tmp = Float64(Float64(Float64(fma(Float64(M / d), Float64(Float64(M / d) * Float64(Float64(Float64(D * D) * -0.125) * h)), l) / l) * t_0) * sqrt(Float64(d / h)));
                                                                        	elseif (d <= 2.3e-273)
                                                                        		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * D) / d) * M) * Float64(-0.125 * M)), Float64(Float64(h / l) * t_4), Float64(t_4 * d)) / h);
                                                                        	elseif (d <= 7.2e-107)
                                                                        		tmp = fma(Float64(t_1 * Float64(-0.5 * t_3)), Float64(h * Float64(Float64(0.25 * t_3) / l)), t_1);
                                                                        	else
                                                                        		tmp = Float64(Float64(Float64(fma(Float64(Float64(Float64(h / l) * -0.5) * t_2), t_2, 1.0) * t_0) * sqrt(d)) / sqrt(h));
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(D * N[(0.5 / d), $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$3 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3.6e+103], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -7.9e-109], N[(N[(N[(N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e-273], N[(N[(N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$4 * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[d, 7.2e-107], N[(N[(t$95$1 * N[(-0.5 * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(0.25 * t$95$3), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$2 + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                        \\
                                                                        \begin{array}{l}
                                                                        t_0 := \sqrt{\frac{d}{\ell}}\\
                                                                        t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\
                                                                        t_2 := \left(D \cdot \frac{0.5}{d}\right) \cdot M\\
                                                                        t_3 := \frac{M \cdot D}{d}\\
                                                                        t_4 := \sqrt{\frac{h}{\ell}}\\
                                                                        \mathbf{if}\;d \leq -3.6 \cdot 10^{+103}:\\
                                                                        \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                        
                                                                        \mathbf{elif}\;d \leq -7.9 \cdot 10^{-109}:\\
                                                                        \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_0\right) \cdot \sqrt{\frac{d}{h}}\\
                                                                        
                                                                        \mathbf{elif}\;d \leq 2.3 \cdot 10^{-273}:\\
                                                                        \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_4, t\_4 \cdot d\right)}{h}\\
                                                                        
                                                                        \mathbf{elif}\;d \leq 7.2 \cdot 10^{-107}:\\
                                                                        \;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(-0.5 \cdot t\_3\right), h \cdot \frac{0.25 \cdot t\_3}{\ell}, t\_1\right)\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{\left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.5\right) \cdot t\_2, t\_2, 1\right) \cdot t\_0\right) \cdot \sqrt{d}}{\sqrt{h}}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 5 regimes
                                                                        2. if d < -3.60000000000000017e103

                                                                          1. Initial program 69.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 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-*.f6468.4

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

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

                                                                          if -3.60000000000000017e103 < d < -7.8999999999999997e-109

                                                                          1. Initial program 77.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. Applied rewrites0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            if -7.8999999999999997e-109 < d < 2.29999999999999981e-273

                                                                            1. Initial program 39.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 rewrites49.1%

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

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites53.4%

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

                                                                                if 2.29999999999999981e-273 < d < 7.19999999999999953e-107

                                                                                1. Initial program 34.7%

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

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

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

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

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                                  5. distribute-lft-neg-inN/A

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

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

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                                  9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                                  10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                                  11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                                  12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if 7.19999999999999953e-107 < d

                                                                                1. Initial program 80.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. Applied rewrites86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.6 \cdot 10^{+103}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -7.9 \cdot 10^{-109}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\ \mathbf{elif}\;d \leq 7.2 \cdot 10^{-107}:\\ \;\;\;\;\mathsf{fma}\left(\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(-0.5 \cdot \frac{M \cdot D}{d}\right), h \cdot \frac{0.25 \cdot \frac{M \cdot D}{d}}{\ell}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.5\right) \cdot \left(\left(D \cdot \frac{0.5}{d}\right) \cdot M\right), \left(D \cdot \frac{0.5}{d}\right) \cdot M, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \]
                                                                              5. Add Preprocessing

                                                                              Alternative 12: 75.5% accurate, 2.8× speedup?

                                                                              \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\ t_1 := \left(D \cdot \frac{0.5}{d}\right) \cdot M\\ t_2 := \frac{D \cdot M}{d} \cdot 0.5\\ t_3 := \frac{M \cdot D}{d}\\ t_4 := \sqrt{\frac{h}{\ell}}\\ t_5 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2.6 \cdot 10^{-178}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot t\_5\right) \cdot \mathsf{fma}\left(\frac{t\_2}{-1} \cdot \frac{t\_2 \cdot 0.5}{\ell}, h, 1\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_4, t\_4 \cdot d\right)}{h}\\ \mathbf{elif}\;d \leq 7.2 \cdot 10^{-107}:\\ \;\;\;\;\mathsf{fma}\left(t\_0 \cdot \left(-0.5 \cdot t\_3\right), h \cdot \frac{0.25 \cdot t\_3}{\ell}, t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.5\right) \cdot t\_1, t\_1, 1\right) \cdot t\_5\right) \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                              (FPCore (d h l M D)
                                                                               :precision binary64
                                                                               (let* ((t_0 (/ d (sqrt (* h l))))
                                                                                      (t_1 (* (* D (/ 0.5 d)) M))
                                                                                      (t_2 (* (/ (* D M) d) 0.5))
                                                                                      (t_3 (/ (* M D) d))
                                                                                      (t_4 (sqrt (/ h l)))
                                                                                      (t_5 (sqrt (/ d l))))
                                                                                 (if (<= d -2.6e-178)
                                                                                   (* (* (sqrt (/ d h)) t_5) (fma (* (/ t_2 -1.0) (/ (* t_2 0.5) l)) h 1.0))
                                                                                   (if (<= d 2.3e-273)
                                                                                     (/
                                                                                      (fma (* (* (/ (* D D) d) M) (* -0.125 M)) (* (/ h l) t_4) (* t_4 d))
                                                                                      h)
                                                                                     (if (<= d 7.2e-107)
                                                                                       (fma (* t_0 (* -0.5 t_3)) (* h (/ (* 0.25 t_3) l)) t_0)
                                                                                       (/
                                                                                        (* (* (fma (* (* (/ h l) -0.5) t_1) t_1 1.0) t_5) (sqrt d))
                                                                                        (sqrt h)))))))
                                                                              assert(d < h && h < l && l < M && M < D);
                                                                              double code(double d, double h, double l, double M, double D) {
                                                                              	double t_0 = d / sqrt((h * l));
                                                                              	double t_1 = (D * (0.5 / d)) * M;
                                                                              	double t_2 = ((D * M) / d) * 0.5;
                                                                              	double t_3 = (M * D) / d;
                                                                              	double t_4 = sqrt((h / l));
                                                                              	double t_5 = sqrt((d / l));
                                                                              	double tmp;
                                                                              	if (d <= -2.6e-178) {
                                                                              		tmp = (sqrt((d / h)) * t_5) * fma(((t_2 / -1.0) * ((t_2 * 0.5) / l)), h, 1.0);
                                                                              	} else if (d <= 2.3e-273) {
                                                                              		tmp = fma(((((D * D) / d) * M) * (-0.125 * M)), ((h / l) * t_4), (t_4 * d)) / h;
                                                                              	} else if (d <= 7.2e-107) {
                                                                              		tmp = fma((t_0 * (-0.5 * t_3)), (h * ((0.25 * t_3) / l)), t_0);
                                                                              	} else {
                                                                              		tmp = ((fma((((h / l) * -0.5) * t_1), t_1, 1.0) * t_5) * sqrt(d)) / sqrt(h);
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              d, h, l, M, D = sort([d, h, l, M, D])
                                                                              function code(d, h, l, M, D)
                                                                              	t_0 = Float64(d / sqrt(Float64(h * l)))
                                                                              	t_1 = Float64(Float64(D * Float64(0.5 / d)) * M)
                                                                              	t_2 = Float64(Float64(Float64(D * M) / d) * 0.5)
                                                                              	t_3 = Float64(Float64(M * D) / d)
                                                                              	t_4 = sqrt(Float64(h / l))
                                                                              	t_5 = sqrt(Float64(d / l))
                                                                              	tmp = 0.0
                                                                              	if (d <= -2.6e-178)
                                                                              		tmp = Float64(Float64(sqrt(Float64(d / h)) * t_5) * fma(Float64(Float64(t_2 / -1.0) * Float64(Float64(t_2 * 0.5) / l)), h, 1.0));
                                                                              	elseif (d <= 2.3e-273)
                                                                              		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * D) / d) * M) * Float64(-0.125 * M)), Float64(Float64(h / l) * t_4), Float64(t_4 * d)) / h);
                                                                              	elseif (d <= 7.2e-107)
                                                                              		tmp = fma(Float64(t_0 * Float64(-0.5 * t_3)), Float64(h * Float64(Float64(0.25 * t_3) / l)), t_0);
                                                                              	else
                                                                              		tmp = Float64(Float64(Float64(fma(Float64(Float64(Float64(h / l) * -0.5) * t_1), t_1, 1.0) * t_5) * sqrt(d)) / sqrt(h));
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(D * N[(0.5 / d), $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$3 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.6e-178], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(N[(t$95$2 / -1.0), $MachinePrecision] * N[(N[(t$95$2 * 0.5), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e-273], N[(N[(N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$4 * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[d, 7.2e-107], N[(N[(t$95$0 * N[(-0.5 * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(0.25 * t$95$3), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\
                                                                              t_1 := \left(D \cdot \frac{0.5}{d}\right) \cdot M\\
                                                                              t_2 := \frac{D \cdot M}{d} \cdot 0.5\\
                                                                              t_3 := \frac{M \cdot D}{d}\\
                                                                              t_4 := \sqrt{\frac{h}{\ell}}\\
                                                                              t_5 := \sqrt{\frac{d}{\ell}}\\
                                                                              \mathbf{if}\;d \leq -2.6 \cdot 10^{-178}:\\
                                                                              \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot t\_5\right) \cdot \mathsf{fma}\left(\frac{t\_2}{-1} \cdot \frac{t\_2 \cdot 0.5}{\ell}, h, 1\right)\\
                                                                              
                                                                              \mathbf{elif}\;d \leq 2.3 \cdot 10^{-273}:\\
                                                                              \;\;\;\;\frac{\mathsf{fma}\left(\left(\frac{D \cdot D}{d} \cdot M\right) \cdot \left(-0.125 \cdot M\right), \frac{h}{\ell} \cdot t\_4, t\_4 \cdot d\right)}{h}\\
                                                                              
                                                                              \mathbf{elif}\;d \leq 7.2 \cdot 10^{-107}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(t\_0 \cdot \left(-0.5 \cdot t\_3\right), h \cdot \frac{0.25 \cdot t\_3}{\ell}, t\_0\right)\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{\left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.5\right) \cdot t\_1, t\_1, 1\right) \cdot t\_5\right) \cdot \sqrt{d}}{\sqrt{h}}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 4 regimes
                                                                              2. if d < -2.59999999999999998e-178

                                                                                1. Initial program 71.4%

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

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

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

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

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                                  5. distribute-lft-neg-inN/A

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

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

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                                  9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                                  10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                                  11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                                  12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if -2.59999999999999998e-178 < d < 2.29999999999999981e-273

                                                                                1. Initial program 36.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 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 rewrites48.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. Step-by-step derivation
                                                                                  1. Applied rewrites51.1%

                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                                  2. Step-by-step derivation
                                                                                    1. Applied rewrites53.9%

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

                                                                                    if 2.29999999999999981e-273 < d < 7.19999999999999953e-107

                                                                                    1. Initial program 34.7%

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

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

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

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

                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                                      5. distribute-lft-neg-inN/A

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

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

                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                                      9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                                      10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                                      11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                                      12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if 7.19999999999999953e-107 < d

                                                                                    1. Initial program 80.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. Applied rewrites86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  Alternative 13: 63.5% accurate, 2.8× speedup?

                                                                                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{h}{\ell}}\\ t_3 := \frac{D \cdot M}{d} \cdot 0.5\\ t_4 := \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;h \leq -190000000:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq -7.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot D\right) \cdot \frac{D}{d}, \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\ \mathbf{elif}\;h \leq 5.5 \cdot 10^{-102}:\\ \;\;\;\;\mathsf{fma}\left(t\_3, t\_3 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\ \mathbf{elif}\;h \leq 1.4 \cdot 10^{+138}:\\ \;\;\;\;\mathsf{fma}\left(t\_4 \cdot \left(-0.5 \cdot t\_0\right), h \cdot \frac{0.25 \cdot t\_0}{\ell}, t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                  (FPCore (d h l M D)
                                                                                   :precision binary64
                                                                                   (let* ((t_0 (/ (* M D) d))
                                                                                          (t_1 (sqrt (/ d l)))
                                                                                          (t_2 (sqrt (/ h l)))
                                                                                          (t_3 (* (/ (* D M) d) 0.5))
                                                                                          (t_4 (/ d (sqrt (* h l)))))
                                                                                     (if (<= h -190000000.0)
                                                                                       (*
                                                                                        (* (/ (fma (/ M d) (* (/ M d) (* (* (* D D) -0.125) h)) l) l) t_1)
                                                                                        (sqrt (/ d h)))
                                                                                       (if (<= h -7.8e-104)
                                                                                         (/
                                                                                          (fma (* (* (* -0.125 (* M M)) D) (/ D d)) (* (/ h l) t_2) (* t_2 d))
                                                                                          h)
                                                                                         (if (<= h 5.5e-102)
                                                                                           (* (fma t_3 (* t_3 (* (/ h l) -0.5)) 1.0) (sqrt (* (/ (/ d l) h) d)))
                                                                                           (if (<= h 1.4e+138)
                                                                                             (fma (* t_4 (* -0.5 t_0)) (* h (/ (* 0.25 t_0) l)) t_4)
                                                                                             (/
                                                                                              (*
                                                                                               (* (/ (fma (* -0.125 (* D D)) (* (/ (* h M) d) (/ M d)) l) l) t_1)
                                                                                               (sqrt d))
                                                                                              (sqrt h))))))))
                                                                                  assert(d < h && h < l && l < M && M < D);
                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                  	double t_0 = (M * D) / d;
                                                                                  	double t_1 = sqrt((d / l));
                                                                                  	double t_2 = sqrt((h / l));
                                                                                  	double t_3 = ((D * M) / d) * 0.5;
                                                                                  	double t_4 = d / sqrt((h * l));
                                                                                  	double tmp;
                                                                                  	if (h <= -190000000.0) {
                                                                                  		tmp = ((fma((M / d), ((M / d) * (((D * D) * -0.125) * h)), l) / l) * t_1) * sqrt((d / h));
                                                                                  	} else if (h <= -7.8e-104) {
                                                                                  		tmp = fma((((-0.125 * (M * M)) * D) * (D / d)), ((h / l) * t_2), (t_2 * d)) / h;
                                                                                  	} else if (h <= 5.5e-102) {
                                                                                  		tmp = fma(t_3, (t_3 * ((h / l) * -0.5)), 1.0) * sqrt((((d / l) / h) * d));
                                                                                  	} else if (h <= 1.4e+138) {
                                                                                  		tmp = fma((t_4 * (-0.5 * t_0)), (h * ((0.25 * t_0) / l)), t_4);
                                                                                  	} else {
                                                                                  		tmp = (((fma((-0.125 * (D * D)), (((h * M) / d) * (M / d)), l) / l) * t_1) * sqrt(d)) / sqrt(h);
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  d, h, l, M, D = sort([d, h, l, M, D])
                                                                                  function code(d, h, l, M, D)
                                                                                  	t_0 = Float64(Float64(M * D) / d)
                                                                                  	t_1 = sqrt(Float64(d / l))
                                                                                  	t_2 = sqrt(Float64(h / l))
                                                                                  	t_3 = Float64(Float64(Float64(D * M) / d) * 0.5)
                                                                                  	t_4 = Float64(d / sqrt(Float64(h * l)))
                                                                                  	tmp = 0.0
                                                                                  	if (h <= -190000000.0)
                                                                                  		tmp = Float64(Float64(Float64(fma(Float64(M / d), Float64(Float64(M / d) * Float64(Float64(Float64(D * D) * -0.125) * h)), l) / l) * t_1) * sqrt(Float64(d / h)));
                                                                                  	elseif (h <= -7.8e-104)
                                                                                  		tmp = Float64(fma(Float64(Float64(Float64(-0.125 * Float64(M * M)) * D) * Float64(D / d)), Float64(Float64(h / l) * t_2), Float64(t_2 * d)) / h);
                                                                                  	elseif (h <= 5.5e-102)
                                                                                  		tmp = Float64(fma(t_3, Float64(t_3 * Float64(Float64(h / l) * -0.5)), 1.0) * sqrt(Float64(Float64(Float64(d / l) / h) * d)));
                                                                                  	elseif (h <= 1.4e+138)
                                                                                  		tmp = fma(Float64(t_4 * Float64(-0.5 * t_0)), Float64(h * Float64(Float64(0.25 * t_0) / l)), t_4);
                                                                                  	else
                                                                                  		tmp = Float64(Float64(Float64(Float64(fma(Float64(-0.125 * Float64(D * D)), Float64(Float64(Float64(h * M) / d) * Float64(M / d)), l) / l) * t_1) * sqrt(d)) / sqrt(h));
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$4 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -190000000.0], N[(N[(N[(N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -7.8e-104], N[(N[(N[(N[(N[(-0.125 * N[(M * M), $MachinePrecision]), $MachinePrecision] * D), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$2 * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[h, 5.5e-102], N[(N[(t$95$3 * N[(t$95$3 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(N[(N[(d / l), $MachinePrecision] / h), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.4e+138], N[(N[(t$95$4 * N[(-0.5 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(0.25 * t$95$0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], N[(N[(N[(N[(N[(N[(-0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(h * M), $MachinePrecision] / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  t_0 := \frac{M \cdot D}{d}\\
                                                                                  t_1 := \sqrt{\frac{d}{\ell}}\\
                                                                                  t_2 := \sqrt{\frac{h}{\ell}}\\
                                                                                  t_3 := \frac{D \cdot M}{d} \cdot 0.5\\
                                                                                  t_4 := \frac{d}{\sqrt{h \cdot \ell}}\\
                                                                                  \mathbf{if}\;h \leq -190000000:\\
                                                                                  \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{\frac{d}{h}}\\
                                                                                  
                                                                                  \mathbf{elif}\;h \leq -7.8 \cdot 10^{-104}:\\
                                                                                  \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot D\right) \cdot \frac{D}{d}, \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\
                                                                                  
                                                                                  \mathbf{elif}\;h \leq 5.5 \cdot 10^{-102}:\\
                                                                                  \;\;\;\;\mathsf{fma}\left(t\_3, t\_3 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\
                                                                                  
                                                                                  \mathbf{elif}\;h \leq 1.4 \cdot 10^{+138}:\\
                                                                                  \;\;\;\;\mathsf{fma}\left(t\_4 \cdot \left(-0.5 \cdot t\_0\right), h \cdot \frac{0.25 \cdot t\_0}{\ell}, t\_4\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{d}}{\sqrt{h}}\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 5 regimes
                                                                                  2. if h < -1.9e8

                                                                                    1. Initial program 58.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. Applied rewrites0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      if -1.9e8 < h < -7.8000000000000004e-104

                                                                                      1. Initial program 70.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 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 rewrites53.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. Step-by-step derivation
                                                                                        1. Applied rewrites67.2%

                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                                        2. Step-by-step derivation
                                                                                          1. Applied rewrites70.4%

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

                                                                                          if -7.8000000000000004e-104 < h < 5.4999999999999997e-102

                                                                                          1. Initial program 64.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. Applied rewrites63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                            15. unpow2N/A

                                                                                              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                            16. associate-*l*N/A

                                                                                              \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                          5. Applied rewrites65.9%

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

                                                                                          if 5.4999999999999997e-102 < h < 1.4e138

                                                                                          1. Initial program 71.4%

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

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

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

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

                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                                                            5. distribute-lft-neg-inN/A

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

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

                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\frac{\ell}{h}}} + 1\right) \]
                                                                                            9. 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(\frac{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot 1}{\color{blue}{\ell \cdot \frac{1}{h}}} + 1\right) \]
                                                                                            10. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \frac{1}{\frac{1}{h}}} + 1\right) \]
                                                                                            11. 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(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot \color{blue}{\frac{h}{1}} + 1\right) \]
                                                                                            12. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          if 1.4e138 < h

                                                                                          1. Initial program 63.0%

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

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

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

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

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

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

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

                                                                                              \[\leadsto \frac{\left(\frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{8} \cdot {D}^{2}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            6. lower-*.f64N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot {D}^{2}}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            7. unpow2N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            8. lower-*.f64N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            9. associate-*l/N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            10. lower-*.f64N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            11. unpow2N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{{M}^{2}}{\color{blue}{d \cdot d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            12. associate-/r*N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            13. lower-/.f64N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            14. lower-/.f64N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\color{blue}{\frac{{M}^{2}}{d}}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            15. unpow2N/A

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            16. lower-*.f6468.6

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                          6. Applied rewrites68.6%

                                                                                            \[\leadsto \frac{\left(\color{blue}{\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{M \cdot M}{d}}{d} \cdot h, \ell\right)}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                          7. Taylor expanded in d around 0

                                                                                            \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                          8. Step-by-step derivation
                                                                                            1. Applied rewrites65.9%

                                                                                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                          9. Recombined 5 regimes into one program.
                                                                                          10. Add Preprocessing

                                                                                          Alternative 14: 60.6% accurate, 3.0× speedup?

                                                                                          \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d} \cdot 0.5\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{h}{\ell}}\\ \mathbf{if}\;h \leq -190000000:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq -7.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot D\right) \cdot \frac{D}{d}, \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\ \mathbf{elif}\;h \leq 3.5 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{d}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                          (FPCore (d h l M D)
                                                                                           :precision binary64
                                                                                           (let* ((t_0 (* (/ (* D M) d) 0.5)) (t_1 (sqrt (/ d l))) (t_2 (sqrt (/ h l))))
                                                                                             (if (<= h -190000000.0)
                                                                                               (*
                                                                                                (* (/ (fma (/ M d) (* (/ M d) (* (* (* D D) -0.125) h)) l) l) t_1)
                                                                                                (sqrt (/ d h)))
                                                                                               (if (<= h -7.8e-104)
                                                                                                 (/
                                                                                                  (fma (* (* (* -0.125 (* M M)) D) (/ D d)) (* (/ h l) t_2) (* t_2 d))
                                                                                                  h)
                                                                                                 (if (<= h 3.5e+15)
                                                                                                   (* (fma t_0 (* t_0 (* (/ h l) -0.5)) 1.0) (sqrt (* (/ (/ d l) h) d)))
                                                                                                   (/
                                                                                                    (*
                                                                                                     (* (/ (fma (* -0.125 (* D D)) (* (/ (* h M) d) (/ M d)) l) l) t_1)
                                                                                                     (sqrt d))
                                                                                                    (sqrt h)))))))
                                                                                          assert(d < h && h < l && l < M && M < D);
                                                                                          double code(double d, double h, double l, double M, double D) {
                                                                                          	double t_0 = ((D * M) / d) * 0.5;
                                                                                          	double t_1 = sqrt((d / l));
                                                                                          	double t_2 = sqrt((h / l));
                                                                                          	double tmp;
                                                                                          	if (h <= -190000000.0) {
                                                                                          		tmp = ((fma((M / d), ((M / d) * (((D * D) * -0.125) * h)), l) / l) * t_1) * sqrt((d / h));
                                                                                          	} else if (h <= -7.8e-104) {
                                                                                          		tmp = fma((((-0.125 * (M * M)) * D) * (D / d)), ((h / l) * t_2), (t_2 * d)) / h;
                                                                                          	} else if (h <= 3.5e+15) {
                                                                                          		tmp = fma(t_0, (t_0 * ((h / l) * -0.5)), 1.0) * sqrt((((d / l) / h) * d));
                                                                                          	} else {
                                                                                          		tmp = (((fma((-0.125 * (D * D)), (((h * M) / d) * (M / d)), l) / l) * t_1) * sqrt(d)) / sqrt(h);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          d, h, l, M, D = sort([d, h, l, M, D])
                                                                                          function code(d, h, l, M, D)
                                                                                          	t_0 = Float64(Float64(Float64(D * M) / d) * 0.5)
                                                                                          	t_1 = sqrt(Float64(d / l))
                                                                                          	t_2 = sqrt(Float64(h / l))
                                                                                          	tmp = 0.0
                                                                                          	if (h <= -190000000.0)
                                                                                          		tmp = Float64(Float64(Float64(fma(Float64(M / d), Float64(Float64(M / d) * Float64(Float64(Float64(D * D) * -0.125) * h)), l) / l) * t_1) * sqrt(Float64(d / h)));
                                                                                          	elseif (h <= -7.8e-104)
                                                                                          		tmp = Float64(fma(Float64(Float64(Float64(-0.125 * Float64(M * M)) * D) * Float64(D / d)), Float64(Float64(h / l) * t_2), Float64(t_2 * d)) / h);
                                                                                          	elseif (h <= 3.5e+15)
                                                                                          		tmp = Float64(fma(t_0, Float64(t_0 * Float64(Float64(h / l) * -0.5)), 1.0) * sqrt(Float64(Float64(Float64(d / l) / h) * d)));
                                                                                          	else
                                                                                          		tmp = Float64(Float64(Float64(Float64(fma(Float64(-0.125 * Float64(D * D)), Float64(Float64(Float64(h * M) / d) * Float64(M / d)), l) / l) * t_1) * sqrt(d)) / sqrt(h));
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[h, -190000000.0], N[(N[(N[(N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -7.8e-104], N[(N[(N[(N[(N[(-0.125 * N[(M * M), $MachinePrecision]), $MachinePrecision] * D), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$2 * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[h, 3.5e+15], N[(N[(t$95$0 * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(N[(N[(d / l), $MachinePrecision] / h), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(-0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(h * M), $MachinePrecision] / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * N[Sqrt[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]]]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          t_0 := \frac{D \cdot M}{d} \cdot 0.5\\
                                                                                          t_1 := \sqrt{\frac{d}{\ell}}\\
                                                                                          t_2 := \sqrt{\frac{h}{\ell}}\\
                                                                                          \mathbf{if}\;h \leq -190000000:\\
                                                                                          \;\;\;\;\left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{\frac{d}{h}}\\
                                                                                          
                                                                                          \mathbf{elif}\;h \leq -7.8 \cdot 10^{-104}:\\
                                                                                          \;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot D\right) \cdot \frac{D}{d}, \frac{h}{\ell} \cdot t\_2, t\_2 \cdot d\right)}{h}\\
                                                                                          
                                                                                          \mathbf{elif}\;h \leq 3.5 \cdot 10^{+15}:\\
                                                                                          \;\;\;\;\mathsf{fma}\left(t\_0, t\_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot t\_1\right) \cdot \sqrt{d}}{\sqrt{h}}\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 4 regimes
                                                                                          2. if h < -1.9e8

                                                                                            1. Initial program 58.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. Applied rewrites0.0%

                                                                                              \[\leadsto \color{blue}{\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}}} \]
                                                                                            4. Taylor expanded in l around 0

                                                                                              \[\leadsto \frac{\left(\color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            5. Step-by-step derivation
                                                                                              1. lower-/.f64N/A

                                                                                                \[\leadsto \frac{\left(\color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              2. +-commutativeN/A

                                                                                                \[\leadsto \frac{\left(\frac{\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} + \ell}}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              3. associate-/l*N/A

                                                                                                \[\leadsto \frac{\left(\frac{\frac{-1}{8} \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} + \ell}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              4. associate-*r*N/A

                                                                                                \[\leadsto \frac{\left(\frac{\color{blue}{\left(\frac{-1}{8} \cdot {D}^{2}\right) \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}} + \ell}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              5. lower-fma.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{8} \cdot {D}^{2}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              6. lower-*.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot {D}^{2}}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              7. unpow2N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              8. lower-*.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              9. associate-*l/N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              10. lower-*.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              11. unpow2N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{{M}^{2}}{\color{blue}{d \cdot d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              12. associate-/r*N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              13. lower-/.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              14. lower-/.f64N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\color{blue}{\frac{{M}^{2}}{d}}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              15. unpow2N/A

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                              16. lower-*.f640.0

                                                                                                \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            6. Applied rewrites0.0%

                                                                                              \[\leadsto \frac{\left(\color{blue}{\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{M \cdot M}{d}}{d} \cdot h, \ell\right)}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                            7. Applied rewrites52.0%

                                                                                              \[\leadsto \color{blue}{\left(\frac{\mathsf{fma}\left({\left(\frac{d}{M}\right)}^{-2} \cdot h, \left(D \cdot D\right) \cdot -0.125, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                                                            8. Step-by-step derivation
                                                                                              1. Applied rewrites57.1%

                                                                                                \[\leadsto \left(\frac{\mathsf{fma}\left(\frac{M}{d}, \frac{M}{d} \cdot \left(\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot h\right), \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]

                                                                                              if -1.9e8 < h < -7.8000000000000004e-104

                                                                                              1. Initial program 70.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 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 rewrites53.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. Step-by-step derivation
                                                                                                1. Applied rewrites67.2%

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \frac{D \cdot D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]
                                                                                                2. Step-by-step derivation
                                                                                                  1. Applied rewrites70.4%

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\left(\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot D\right) \cdot \frac{D}{d}, \frac{h}{\ell} \cdot \sqrt{\frac{h}{\ell}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h} \]

                                                                                                  if -7.8000000000000004e-104 < h < 3.5e15

                                                                                                  1. Initial program 68.9%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Applied rewrites67.5%

                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lift-fma.f64N/A

                                                                                                      \[\leadsto \color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2} + 1\right)} \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    2. *-commutativeN/A

                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right)} + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    3. lift-pow.f64N/A

                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    4. metadata-evalN/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{\color{blue}{\left(-1 \cdot 2\right)}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    5. metadata-evalN/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{\left(\color{blue}{\frac{-2}{2}} \cdot 2\right)} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    6. pow-powN/A

                                                                                                      \[\leadsto \left(\color{blue}{{\left({\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{\left(\frac{-2}{2}\right)}\right)}^{2}} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    7. metadata-evalN/A

                                                                                                      \[\leadsto \left({\left({\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{\color{blue}{-1}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    8. inv-powN/A

                                                                                                      \[\leadsto \left({\color{blue}{\left(\frac{1}{\frac{d}{M} \cdot \frac{2}{D}}\right)}}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    9. lift-*.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{1}{\color{blue}{\frac{d}{M} \cdot \frac{2}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    10. lift-/.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{1}{\color{blue}{\frac{d}{M}} \cdot \frac{2}{D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    11. lift-/.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{1}{\frac{d}{M} \cdot \color{blue}{\frac{2}{D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    12. frac-timesN/A

                                                                                                      \[\leadsto \left({\left(\frac{1}{\color{blue}{\frac{d \cdot 2}{M \cdot D}}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    13. *-commutativeN/A

                                                                                                      \[\leadsto \left({\left(\frac{1}{\frac{\color{blue}{2 \cdot d}}{M \cdot D}}\right)}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{h}{\ell}\right) + 1\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    14. clear-numN/A

                                                                                                      \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    15. unpow2N/A

                                                                                                      \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                    16. associate-*l*N/A

                                                                                                      \[\leadsto \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{\frac{d}{\ell}}{h} \cdot d} \]
                                                                                                  5. Applied rewrites70.5%

                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{D \cdot M}{d} \cdot 0.5, \left(\frac{D \cdot M}{d} \cdot 0.5\right) \cdot \left(\frac{h}{\ell} \cdot -0.5\right), 1\right)} \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d} \]

                                                                                                  if 3.5e15 < h

                                                                                                  1. Initial program 62.0%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Applied rewrites74.9%

                                                                                                    \[\leadsto \color{blue}{\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{d}{M} \cdot \frac{2}{D}\right)}^{-2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}}} \]
                                                                                                  4. Taylor expanded in l around 0

                                                                                                    \[\leadsto \frac{\left(\color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                  5. Step-by-step derivation
                                                                                                    1. lower-/.f64N/A

                                                                                                      \[\leadsto \frac{\left(\color{blue}{\frac{\ell + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    2. +-commutativeN/A

                                                                                                      \[\leadsto \frac{\left(\frac{\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} + \ell}}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    3. associate-/l*N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\frac{-1}{8} \cdot \color{blue}{\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}\right)} + \ell}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    4. associate-*r*N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\color{blue}{\left(\frac{-1}{8} \cdot {D}^{2}\right) \cdot \frac{{M}^{2} \cdot h}{{d}^{2}}} + \ell}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    5. lower-fma.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{8} \cdot {D}^{2}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    6. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot {D}^{2}}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    7. unpow2N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    8. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\left(D \cdot D\right)}, \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    9. associate-*l/N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    10. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{{M}^{2}}{{d}^{2}} \cdot h}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    11. unpow2N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{{M}^{2}}{\color{blue}{d \cdot d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    12. associate-/r*N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    13. lower-/.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \color{blue}{\frac{\frac{{M}^{2}}{d}}{d}} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    14. lower-/.f64N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\color{blue}{\frac{{M}^{2}}{d}}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    15. unpow2N/A

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                    16. lower-*.f6464.0

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{\color{blue}{M \cdot M}}{d}}{d} \cdot h, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                  6. Applied rewrites64.0%

                                                                                                    \[\leadsto \frac{\left(\color{blue}{\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{\frac{M \cdot M}{d}}{d} \cdot h, \ell\right)}{\ell}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                  7. Taylor expanded in d around 0

                                                                                                    \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(\frac{-1}{8} \cdot \left(D \cdot D\right), \frac{{M}^{2} \cdot h}{{d}^{2}}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                  8. Step-by-step derivation
                                                                                                    1. Applied rewrites64.0%

                                                                                                      \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(-0.125 \cdot \left(D \cdot D\right), \frac{h \cdot M}{d} \cdot \frac{M}{d}, \ell\right)}{\ell} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{d}}{\sqrt{h}} \]
                                                                                                  9. Recombined 4 regimes into one program.
                                                                                                  10. Add Preprocessing

                                                                                                  Alternative 15: 50.1% accurate, 3.2× speedup?

                                                                                                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -1.26 \cdot 10^{+51}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -3.2 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{\frac{-d}{\ell} \cdot d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) \cdot \frac{\sqrt{\frac{h}{\ell}}}{\left|\ell\right|}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                  (FPCore (d h l M D)
                                                                                                   :precision binary64
                                                                                                   (if (<= d -1.26e+51)
                                                                                                     (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                                                     (if (<= d -3.2e-167)
                                                                                                       (/ (sqrt (* (/ (- d) l) d)) (sqrt (- h)))
                                                                                                       (if (<= d -1e-310)
                                                                                                         (* (* (* 0.125 (* D D)) (/ (* M M) d)) (/ (sqrt (/ h l)) (fabs l)))
                                                                                                         (/ d (* (sqrt l) (sqrt h)))))))
                                                                                                  assert(d < h && h < l && l < M && M < D);
                                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                                  	double tmp;
                                                                                                  	if (d <= -1.26e+51) {
                                                                                                  		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                                                  	} else if (d <= -3.2e-167) {
                                                                                                  		tmp = sqrt(((-d / l) * d)) / sqrt(-h);
                                                                                                  	} else if (d <= -1e-310) {
                                                                                                  		tmp = ((0.125 * (D * D)) * ((M * M) / d)) * (sqrt((h / l)) / fabs(l));
                                                                                                  	} else {
                                                                                                  		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                  real(8) function code(d, h, l, m, d_1)
                                                                                                      real(8), intent (in) :: d
                                                                                                      real(8), intent (in) :: h
                                                                                                      real(8), intent (in) :: l
                                                                                                      real(8), intent (in) :: m
                                                                                                      real(8), intent (in) :: d_1
                                                                                                      real(8) :: tmp
                                                                                                      if (d <= (-1.26d+51)) then
                                                                                                          tmp = -d * sqrt(((l * h) ** (-1.0d0)))
                                                                                                      else if (d <= (-3.2d-167)) then
                                                                                                          tmp = sqrt(((-d / l) * d)) / sqrt(-h)
                                                                                                      else if (d <= (-1d-310)) then
                                                                                                          tmp = ((0.125d0 * (d_1 * d_1)) * ((m * m) / d)) * (sqrt((h / l)) / abs(l))
                                                                                                      else
                                                                                                          tmp = d / (sqrt(l) * sqrt(h))
                                                                                                      end if
                                                                                                      code = tmp
                                                                                                  end function
                                                                                                  
                                                                                                  assert d < h && h < l && l < M && M < D;
                                                                                                  public static double code(double d, double h, double l, double M, double D) {
                                                                                                  	double tmp;
                                                                                                  	if (d <= -1.26e+51) {
                                                                                                  		tmp = -d * Math.sqrt(Math.pow((l * h), -1.0));
                                                                                                  	} else if (d <= -3.2e-167) {
                                                                                                  		tmp = Math.sqrt(((-d / l) * d)) / Math.sqrt(-h);
                                                                                                  	} else if (d <= -1e-310) {
                                                                                                  		tmp = ((0.125 * (D * D)) * ((M * M) / d)) * (Math.sqrt((h / l)) / Math.abs(l));
                                                                                                  	} else {
                                                                                                  		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                  def code(d, h, l, M, D):
                                                                                                  	tmp = 0
                                                                                                  	if d <= -1.26e+51:
                                                                                                  		tmp = -d * math.sqrt(math.pow((l * h), -1.0))
                                                                                                  	elif d <= -3.2e-167:
                                                                                                  		tmp = math.sqrt(((-d / l) * d)) / math.sqrt(-h)
                                                                                                  	elif d <= -1e-310:
                                                                                                  		tmp = ((0.125 * (D * D)) * ((M * M) / d)) * (math.sqrt((h / l)) / math.fabs(l))
                                                                                                  	else:
                                                                                                  		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                                                  	return tmp
                                                                                                  
                                                                                                  d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                  function code(d, h, l, M, D)
                                                                                                  	tmp = 0.0
                                                                                                  	if (d <= -1.26e+51)
                                                                                                  		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                                                  	elseif (d <= -3.2e-167)
                                                                                                  		tmp = Float64(sqrt(Float64(Float64(Float64(-d) / l) * d)) / sqrt(Float64(-h)));
                                                                                                  	elseif (d <= -1e-310)
                                                                                                  		tmp = Float64(Float64(Float64(0.125 * Float64(D * D)) * Float64(Float64(M * M) / d)) * Float64(sqrt(Float64(h / l)) / abs(l)));
                                                                                                  	else
                                                                                                  		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                  function tmp_2 = code(d, h, l, M, D)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (d <= -1.26e+51)
                                                                                                  		tmp = -d * sqrt(((l * h) ^ -1.0));
                                                                                                  	elseif (d <= -3.2e-167)
                                                                                                  		tmp = sqrt(((-d / l) * d)) / sqrt(-h);
                                                                                                  	elseif (d <= -1e-310)
                                                                                                  		tmp = ((0.125 * (D * D)) * ((M * M) / d)) * (sqrt((h / l)) / abs(l));
                                                                                                  	else
                                                                                                  		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                  code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.26e+51], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.2e-167], N[(N[Sqrt[N[(N[((-d) / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1e-310], N[(N[(N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] / N[Abs[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;d \leq -1.26 \cdot 10^{+51}:\\
                                                                                                  \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                                                  
                                                                                                  \mathbf{elif}\;d \leq -3.2 \cdot 10^{-167}:\\
                                                                                                  \;\;\;\;\frac{\sqrt{\frac{-d}{\ell} \cdot d}}{\sqrt{-h}}\\
                                                                                                  
                                                                                                  \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\
                                                                                                  \;\;\;\;\left(\left(0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) \cdot \frac{\sqrt{\frac{h}{\ell}}}{\left|\ell\right|}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 4 regimes
                                                                                                  2. if d < -1.25999999999999997e51

                                                                                                    1. Initial program 67.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 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-*.f6463.2

                                                                                                        \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                                    5. Applied rewrites63.2%

                                                                                                      \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                                    if -1.25999999999999997e51 < d < -3.2000000000000002e-167

                                                                                                    1. Initial program 81.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-*.f6410.4

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                    5. Applied rewrites10.4%

                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. Applied rewrites53.0%

                                                                                                        \[\leadsto \frac{\sqrt{\frac{-d}{\ell} \cdot d}}{\color{blue}{\sqrt{-h}}} \]

                                                                                                      if -3.2000000000000002e-167 < d < -9.999999999999969e-311

                                                                                                      1. Initial program 36.6%

                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      2. Add Preprocessing
                                                                                                      3. Taylor expanded in h around -inf

                                                                                                        \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. associate-*r*N/A

                                                                                                          \[\leadsto \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
                                                                                                        2. metadata-evalN/A

                                                                                                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{8}\right)\right)} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                                                                                                        3. distribute-lft-neg-inN/A

                                                                                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right)} \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                                                                                                        4. lower-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
                                                                                                      5. Applied rewrites33.6%

                                                                                                        \[\leadsto \color{blue}{\left(\left(0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}} \]
                                                                                                      6. Step-by-step derivation
                                                                                                        1. Applied rewrites56.3%

                                                                                                          \[\leadsto \left(\left(0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) \cdot \frac{\sqrt{\frac{h}{\ell}}}{\color{blue}{\left|\ell\right|}} \]

                                                                                                        if -9.999999999999969e-311 < d

                                                                                                        1. Initial program 65.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-*.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 rewrites41.3%

                                                                                                            \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. Applied rewrites49.8%

                                                                                                              \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                          3. Recombined 4 regimes into one program.
                                                                                                          4. Final simplification54.2%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.26 \cdot 10^{+51}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{elif}\;d \leq -3.2 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{\frac{-d}{\ell} \cdot d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(\left(0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) \cdot \frac{\sqrt{\frac{h}{\ell}}}{\left|\ell\right|}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                                                                          5. Add Preprocessing

                                                                                                          Alternative 16: 46.9% accurate, 3.2× speedup?

                                                                                                          \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-284}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                          (FPCore (d h l M D)
                                                                                                           :precision binary64
                                                                                                           (if (<= l 2.2e-284)
                                                                                                             (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                                                             (/ d (* (sqrt l) (sqrt h)))))
                                                                                                          assert(d < h && h < l && l < M && M < D);
                                                                                                          double code(double d, double h, double l, double M, double D) {
                                                                                                          	double tmp;
                                                                                                          	if (l <= 2.2e-284) {
                                                                                                          		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                                                          	} else {
                                                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                          real(8) function code(d, h, l, m, d_1)
                                                                                                              real(8), intent (in) :: d
                                                                                                              real(8), intent (in) :: h
                                                                                                              real(8), intent (in) :: l
                                                                                                              real(8), intent (in) :: m
                                                                                                              real(8), intent (in) :: d_1
                                                                                                              real(8) :: tmp
                                                                                                              if (l <= 2.2d-284) then
                                                                                                                  tmp = -d * sqrt(((l * h) ** (-1.0d0)))
                                                                                                              else
                                                                                                                  tmp = d / (sqrt(l) * sqrt(h))
                                                                                                              end if
                                                                                                              code = tmp
                                                                                                          end function
                                                                                                          
                                                                                                          assert d < h && h < l && l < M && M < D;
                                                                                                          public static double code(double d, double h, double l, double M, double D) {
                                                                                                          	double tmp;
                                                                                                          	if (l <= 2.2e-284) {
                                                                                                          		tmp = -d * Math.sqrt(Math.pow((l * h), -1.0));
                                                                                                          	} else {
                                                                                                          		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                          def code(d, h, l, M, D):
                                                                                                          	tmp = 0
                                                                                                          	if l <= 2.2e-284:
                                                                                                          		tmp = -d * math.sqrt(math.pow((l * h), -1.0))
                                                                                                          	else:
                                                                                                          		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                                                          	return tmp
                                                                                                          
                                                                                                          d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                          function code(d, h, l, M, D)
                                                                                                          	tmp = 0.0
                                                                                                          	if (l <= 2.2e-284)
                                                                                                          		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                                                          	else
                                                                                                          		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                          function tmp_2 = code(d, h, l, M, D)
                                                                                                          	tmp = 0.0;
                                                                                                          	if (l <= 2.2e-284)
                                                                                                          		tmp = -d * sqrt(((l * h) ^ -1.0));
                                                                                                          	else
                                                                                                          		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                          	end
                                                                                                          	tmp_2 = tmp;
                                                                                                          end
                                                                                                          
                                                                                                          NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                          code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.2e-284], 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}
                                                                                                          [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-284}:\\
                                                                                                          \;\;\;\;\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 l < 2.2000000000000001e-284

                                                                                                            1. Initial program 65.3%

                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. 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-*.f6447.0

                                                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                                            5. Applied rewrites47.0%

                                                                                                              \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                                            if 2.2000000000000001e-284 < l

                                                                                                            1. Initial program 64.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-*.f6443.3

                                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                            5. Applied rewrites43.3%

                                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. Applied rewrites43.7%

                                                                                                                \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. Applied rewrites52.7%

                                                                                                                  \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                              3. Recombined 2 regimes into one program.
                                                                                                              4. Final simplification49.7%

                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-284}:\\ \;\;\;\;\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 17: 43.0% accurate, 3.2× speedup?

                                                                                                              \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.35 \cdot 10^{-284}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                                                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                              (FPCore (d h l M D)
                                                                                                               :precision binary64
                                                                                                               (if (<= l 2.35e-284)
                                                                                                                 (* (- d) (sqrt (pow (* l h) -1.0)))
                                                                                                                 (/ d (sqrt (* l h)))))
                                                                                                              assert(d < h && h < l && l < M && M < D);
                                                                                                              double code(double d, double h, double l, double M, double D) {
                                                                                                              	double tmp;
                                                                                                              	if (l <= 2.35e-284) {
                                                                                                              		tmp = -d * sqrt(pow((l * h), -1.0));
                                                                                                              	} else {
                                                                                                              		tmp = d / sqrt((l * h));
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                              real(8) function code(d, h, l, m, d_1)
                                                                                                                  real(8), intent (in) :: d
                                                                                                                  real(8), intent (in) :: h
                                                                                                                  real(8), intent (in) :: l
                                                                                                                  real(8), intent (in) :: m
                                                                                                                  real(8), intent (in) :: d_1
                                                                                                                  real(8) :: tmp
                                                                                                                  if (l <= 2.35d-284) then
                                                                                                                      tmp = -d * sqrt(((l * h) ** (-1.0d0)))
                                                                                                                  else
                                                                                                                      tmp = d / sqrt((l * h))
                                                                                                                  end if
                                                                                                                  code = tmp
                                                                                                              end function
                                                                                                              
                                                                                                              assert d < h && h < l && l < M && M < D;
                                                                                                              public static double code(double d, double h, double l, double M, double D) {
                                                                                                              	double tmp;
                                                                                                              	if (l <= 2.35e-284) {
                                                                                                              		tmp = -d * Math.sqrt(Math.pow((l * h), -1.0));
                                                                                                              	} else {
                                                                                                              		tmp = d / Math.sqrt((l * h));
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                              def code(d, h, l, M, D):
                                                                                                              	tmp = 0
                                                                                                              	if l <= 2.35e-284:
                                                                                                              		tmp = -d * math.sqrt(math.pow((l * h), -1.0))
                                                                                                              	else:
                                                                                                              		tmp = d / math.sqrt((l * h))
                                                                                                              	return tmp
                                                                                                              
                                                                                                              d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                              function code(d, h, l, M, D)
                                                                                                              	tmp = 0.0
                                                                                                              	if (l <= 2.35e-284)
                                                                                                              		tmp = Float64(Float64(-d) * sqrt((Float64(l * h) ^ -1.0)));
                                                                                                              	else
                                                                                                              		tmp = Float64(d / sqrt(Float64(l * h)));
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                              function tmp_2 = code(d, h, l, M, D)
                                                                                                              	tmp = 0.0;
                                                                                                              	if (l <= 2.35e-284)
                                                                                                              		tmp = -d * sqrt(((l * h) ^ -1.0));
                                                                                                              	else
                                                                                                              		tmp = d / sqrt((l * h));
                                                                                                              	end
                                                                                                              	tmp_2 = tmp;
                                                                                                              end
                                                                                                              
                                                                                                              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                              code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.35e-284], N[((-d) * N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                              \\
                                                                                                              \begin{array}{l}
                                                                                                              \mathbf{if}\;\ell \leq 2.35 \cdot 10^{-284}:\\
                                                                                                              \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if l < 2.35000000000000011e-284

                                                                                                                1. Initial program 65.3%

                                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. 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-*.f6447.0

                                                                                                                    \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                                                5. Applied rewrites47.0%

                                                                                                                  \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                                                if 2.35000000000000011e-284 < l

                                                                                                                1. Initial program 64.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-*.f6443.3

                                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                5. Applied rewrites43.3%

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. Applied rewrites43.7%

                                                                                                                    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                7. Recombined 2 regimes into one program.
                                                                                                                8. Final simplification45.5%

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.35 \cdot 10^{-284}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{{\left(\ell \cdot h\right)}^{-1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                                                9. Add Preprocessing

                                                                                                                Alternative 18: 26.5% accurate, 15.3× speedup?

                                                                                                                \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                                                                                assert(d < h && h < l && l < M && M < D);
                                                                                                                double code(double d, double h, double l, double M, double D) {
                                                                                                                	return d / sqrt((l * h));
                                                                                                                }
                                                                                                                
                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                real(8) function code(d, h, l, m, d_1)
                                                                                                                    real(8), intent (in) :: d
                                                                                                                    real(8), intent (in) :: h
                                                                                                                    real(8), intent (in) :: l
                                                                                                                    real(8), intent (in) :: m
                                                                                                                    real(8), intent (in) :: d_1
                                                                                                                    code = d / sqrt((l * h))
                                                                                                                end function
                                                                                                                
                                                                                                                assert d < h && h < l && l < M && M < D;
                                                                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                                                                	return d / Math.sqrt((l * h));
                                                                                                                }
                                                                                                                
                                                                                                                [d, h, l, M, D] = sort([d, h, l, M, D])
                                                                                                                def code(d, h, l, M, D):
                                                                                                                	return d / math.sqrt((l * h))
                                                                                                                
                                                                                                                d, h, l, M, D = sort([d, h, l, M, D])
                                                                                                                function code(d, h, l, M, D)
                                                                                                                	return Float64(d / sqrt(Float64(l * h)))
                                                                                                                end
                                                                                                                
                                                                                                                d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                                                                                                                function tmp = code(d, h, l, M, D)
                                                                                                                	tmp = d / sqrt((l * h));
                                                                                                                end
                                                                                                                
                                                                                                                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                                                                                                                code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                                                                                                                \\
                                                                                                                \frac{d}{\sqrt{\ell \cdot h}}
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Initial program 64.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-*.f6424.9

                                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                5. Applied rewrites24.9%

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. Applied rewrites25.1%

                                                                                                                    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                  2. Add Preprocessing

                                                                                                                  Reproduce

                                                                                                                  ?
                                                                                                                  herbie shell --seed 2024340 
                                                                                                                  (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)))))