Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.4% → 78.2%
Time: 17.9s
Alternatives: 22
Speedup: 3.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 22 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 66.4% 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.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{-d}\\
t_1 := \frac{\left(D \cdot \frac{0.5}{d}\right) \cdot M}{\ell}\\
t_2 := \frac{M}{d} \cdot D\\
\mathbf{if}\;d \leq -1.3 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(-D\right) \cdot 0.25\right) \cdot \frac{M}{d}\right) \cdot t\_1, h, 1\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{t\_0}{\sqrt{-h}}\right)\\

\mathbf{elif}\;d \leq -6 \cdot 10^{-175}:\\
\;\;\;\;\left(1 - \frac{\left(\left(D \cdot 0.5\right) \cdot 0.5\right) \cdot \frac{M}{d}}{{h}^{-1}} \cdot t\_1\right) \cdot \left(\left(\sqrt{{\left(-\ell\right)}^{-1}} \cdot t\_0\right) \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)\\

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

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


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

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000008e118 < d < -6e-175

    1. Initial program 78.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 rewrites83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e-175 < d < 2.3999999999999998e-182

    1. Initial program 41.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 rewrites50.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 rewrites64.2%

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

      if 2.3999999999999998e-182 < d

      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 75.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.0000000000000002e-172 < (*.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-247 or 4.99999999999999976e157 < (*.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 22.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}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

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

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

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

        if 1e-247 < (*.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.99999999999999976e157

        1. Initial program 98.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}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
        4. Applied rewrites98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 75.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.0000000000000002e-172 < (*.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-247 or 4.99999999999999976e157 < (*.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 22.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}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

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

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

          if 1e-247 < (*.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.99999999999999976e157

          1. Initial program 98.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 h around 0

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 59.6% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\ t_1 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-172}:\\ \;\;\;\;\left(\frac{\sqrt{\frac{h}{\ell}}}{\left|\ell\right|} \cdot \frac{D \cdot D}{d}\right) \cdot \left(\left(M \cdot M\right) \cdot -0.125\right)\\ \mathbf{elif}\;t\_0 \leq 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+157}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (d h l M D)
           :precision binary64
           (let* ((t_0
                   (*
                    (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                    (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))))
                  (t_1 (fabs (/ d (sqrt (* l h))))))
             (if (<= t_0 -4e-172)
               (* (* (/ (sqrt (/ h l)) (fabs l)) (/ (* D D) d)) (* (* M M) -0.125))
               (if (<= t_0 1e-247)
                 t_1
                 (if (<= t_0 5e+157) (* (sqrt (/ d h)) (sqrt (/ d l))) t_1)))))
          double code(double d, double h, double l, double M, double D) {
          	double t_0 = (1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)));
          	double t_1 = fabs((d / sqrt((l * h))));
          	double tmp;
          	if (t_0 <= -4e-172) {
          		tmp = ((sqrt((h / l)) / fabs(l)) * ((D * D) / d)) * ((M * M) * -0.125);
          	} else if (t_0 <= 1e-247) {
          		tmp = t_1;
          	} else if (t_0 <= 5e+157) {
          		tmp = sqrt((d / h)) * sqrt((d / l));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          real(8) function code(d, h, l, m, d_1)
              real(8), intent (in) :: d
              real(8), intent (in) :: h
              real(8), intent (in) :: l
              real(8), intent (in) :: m
              real(8), intent (in) :: d_1
              real(8) :: t_0
              real(8) :: t_1
              real(8) :: tmp
              t_0 = (1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))
              t_1 = abs((d / sqrt((l * h))))
              if (t_0 <= (-4d-172)) then
                  tmp = ((sqrt((h / l)) / abs(l)) * ((d_1 * d_1) / d)) * ((m * m) * (-0.125d0))
              else if (t_0 <= 1d-247) then
                  tmp = t_1
              else if (t_0 <= 5d+157) then
                  tmp = sqrt((d / h)) * sqrt((d / l))
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double d, double h, double l, double M, double D) {
          	double t_0 = (1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)));
          	double t_1 = Math.abs((d / Math.sqrt((l * h))));
          	double tmp;
          	if (t_0 <= -4e-172) {
          		tmp = ((Math.sqrt((h / l)) / Math.abs(l)) * ((D * D) / d)) * ((M * M) * -0.125);
          	} else if (t_0 <= 1e-247) {
          		tmp = t_1;
          	} else if (t_0 <= 5e+157) {
          		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(d, h, l, M, D):
          	t_0 = (1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))
          	t_1 = math.fabs((d / math.sqrt((l * h))))
          	tmp = 0
          	if t_0 <= -4e-172:
          		tmp = ((math.sqrt((h / l)) / math.fabs(l)) * ((D * D) / d)) * ((M * M) * -0.125)
          	elif t_0 <= 1e-247:
          		tmp = t_1
          	elif t_0 <= 5e+157:
          		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(d, h, l, M, D)
          	t_0 = Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))))
          	t_1 = abs(Float64(d / sqrt(Float64(l * h))))
          	tmp = 0.0
          	if (t_0 <= -4e-172)
          		tmp = Float64(Float64(Float64(sqrt(Float64(h / l)) / abs(l)) * Float64(Float64(D * D) / d)) * Float64(Float64(M * M) * -0.125));
          	elseif (t_0 <= 1e-247)
          		tmp = t_1;
          	elseif (t_0 <= 5e+157)
          		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(d, h, l, M, D)
          	t_0 = (1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)));
          	t_1 = abs((d / sqrt((l * h))));
          	tmp = 0.0;
          	if (t_0 <= -4e-172)
          		tmp = ((sqrt((h / l)) / abs(l)) * ((D * D) / d)) * ((M * M) * -0.125);
          	elseif (t_0 <= 1e-247)
          		tmp = t_1;
          	elseif (t_0 <= 5e+157)
          		tmp = sqrt((d / h)) * sqrt((d / l));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -4e-172], N[(N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] / N[Abs[l], $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-247], t$95$1, If[LessEqual[t$95$0, 5e+157], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\
          t_1 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
          \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-172}:\\
          \;\;\;\;\left(\frac{\sqrt{\frac{h}{\ell}}}{\left|\ell\right|} \cdot \frac{D \cdot D}{d}\right) \cdot \left(\left(M \cdot M\right) \cdot -0.125\right)\\
          
          \mathbf{elif}\;t\_0 \leq 10^{-247}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+157}:\\
          \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000002e-172

            1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -4.0000000000000002e-172 < (*.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-247 or 4.99999999999999976e157 < (*.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 22.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}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

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

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

                if 1e-247 < (*.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.99999999999999976e157

                1. Initial program 98.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 h around 0

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

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

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

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

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

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

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

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

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

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

                Alternative 5: 55.4% accurate, 0.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ t_1 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-172}:\\ \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot \left(-d\right)}{h}\\ \mathbf{elif}\;t\_1 \leq 10^{-247}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+157}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (d h l M D)
                 :precision binary64
                 (let* ((t_0 (fabs (/ d (sqrt (* l h)))))
                        (t_1
                         (*
                          (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))))
                   (if (<= t_1 -4e-172)
                     (/ (* (sqrt (/ h l)) (- d)) h)
                     (if (<= t_1 1e-247)
                       t_0
                       (if (<= t_1 5e+157) (* (sqrt (/ d h)) (sqrt (/ d l))) t_0)))))
                double code(double d, double h, double l, double M, double D) {
                	double t_0 = fabs((d / sqrt((l * h))));
                	double t_1 = (1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)));
                	double tmp;
                	if (t_1 <= -4e-172) {
                		tmp = (sqrt((h / l)) * -d) / h;
                	} else if (t_1 <= 1e-247) {
                		tmp = t_0;
                	} else if (t_1 <= 5e+157) {
                		tmp = sqrt((d / h)) * sqrt((d / l));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                real(8) function code(d, h, l, m, d_1)
                    real(8), intent (in) :: d
                    real(8), intent (in) :: h
                    real(8), intent (in) :: l
                    real(8), intent (in) :: m
                    real(8), intent (in) :: d_1
                    real(8) :: t_0
                    real(8) :: t_1
                    real(8) :: tmp
                    t_0 = abs((d / sqrt((l * h))))
                    t_1 = (1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))
                    if (t_1 <= (-4d-172)) then
                        tmp = (sqrt((h / l)) * -d) / h
                    else if (t_1 <= 1d-247) then
                        tmp = t_0
                    else if (t_1 <= 5d+157) then
                        tmp = sqrt((d / h)) * sqrt((d / l))
                    else
                        tmp = t_0
                    end if
                    code = tmp
                end function
                
                public static double code(double d, double h, double l, double M, double D) {
                	double t_0 = Math.abs((d / Math.sqrt((l * h))));
                	double t_1 = (1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)));
                	double tmp;
                	if (t_1 <= -4e-172) {
                		tmp = (Math.sqrt((h / l)) * -d) / h;
                	} else if (t_1 <= 1e-247) {
                		tmp = t_0;
                	} else if (t_1 <= 5e+157) {
                		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(d, h, l, M, D):
                	t_0 = math.fabs((d / math.sqrt((l * h))))
                	t_1 = (1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))
                	tmp = 0
                	if t_1 <= -4e-172:
                		tmp = (math.sqrt((h / l)) * -d) / h
                	elif t_1 <= 1e-247:
                		tmp = t_0
                	elif t_1 <= 5e+157:
                		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
                	else:
                		tmp = t_0
                	return tmp
                
                function code(d, h, l, M, D)
                	t_0 = abs(Float64(d / sqrt(Float64(l * h))))
                	t_1 = Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))))
                	tmp = 0.0
                	if (t_1 <= -4e-172)
                		tmp = Float64(Float64(sqrt(Float64(h / l)) * Float64(-d)) / h);
                	elseif (t_1 <= 1e-247)
                		tmp = t_0;
                	elseif (t_1 <= 5e+157)
                		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(d, h, l, M, D)
                	t_0 = abs((d / sqrt((l * h))));
                	t_1 = (1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)));
                	tmp = 0.0;
                	if (t_1 <= -4e-172)
                		tmp = (sqrt((h / l)) * -d) / h;
                	elseif (t_1 <= 1e-247)
                		tmp = t_0;
                	elseif (t_1 <= 5e+157)
                		tmp = sqrt((d / h)) * sqrt((d / l));
                	else
                		tmp = t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-172], N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$1, 1e-247], t$95$0, If[LessEqual[t$95$1, 5e+157], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                t_1 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\
                \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-172}:\\
                \;\;\;\;\frac{\sqrt{\frac{h}{\ell}} \cdot \left(-d\right)}{h}\\
                
                \mathbf{elif}\;t\_1 \leq 10^{-247}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+157}:\\
                \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000002e-172

                  1. Initial program 86.9%

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

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

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

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

                    if -4.0000000000000002e-172 < (*.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-247 or 4.99999999999999976e157 < (*.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 22.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}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

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

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

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

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

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

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

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

                      if 1e-247 < (*.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.99999999999999976e157

                      1. Initial program 98.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 h around 0

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 51.6% accurate, 0.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{h}{\ell}}\\ t_1 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ t_2 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-172}:\\ \;\;\;\;\frac{t\_0 \cdot \left(-d\right)}{h}\\ \mathbf{elif}\;t\_2 \leq 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+196}:\\ \;\;\;\;\frac{t\_0 \cdot d}{h}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (d h l M D)
                       :precision binary64
                       (let* ((t_0 (sqrt (/ h l)))
                              (t_1 (fabs (/ d (sqrt (* l h)))))
                              (t_2
                               (*
                                (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))))
                         (if (<= t_2 -4e-172)
                           (/ (* t_0 (- d)) h)
                           (if (<= t_2 1e-247) t_1 (if (<= t_2 1e+196) (/ (* t_0 d) h) t_1)))))
                      double code(double d, double h, double l, double M, double D) {
                      	double t_0 = sqrt((h / l));
                      	double t_1 = fabs((d / sqrt((l * h))));
                      	double t_2 = (1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)));
                      	double tmp;
                      	if (t_2 <= -4e-172) {
                      		tmp = (t_0 * -d) / h;
                      	} else if (t_2 <= 1e-247) {
                      		tmp = t_1;
                      	} else if (t_2 <= 1e+196) {
                      		tmp = (t_0 * d) / h;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(d, h, l, m, d_1)
                          real(8), intent (in) :: d
                          real(8), intent (in) :: h
                          real(8), intent (in) :: l
                          real(8), intent (in) :: m
                          real(8), intent (in) :: d_1
                          real(8) :: t_0
                          real(8) :: t_1
                          real(8) :: t_2
                          real(8) :: tmp
                          t_0 = sqrt((h / l))
                          t_1 = abs((d / sqrt((l * h))))
                          t_2 = (1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))
                          if (t_2 <= (-4d-172)) then
                              tmp = (t_0 * -d) / h
                          else if (t_2 <= 1d-247) then
                              tmp = t_1
                          else if (t_2 <= 1d+196) then
                              tmp = (t_0 * d) / h
                          else
                              tmp = t_1
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double d, double h, double l, double M, double D) {
                      	double t_0 = Math.sqrt((h / l));
                      	double t_1 = Math.abs((d / Math.sqrt((l * h))));
                      	double t_2 = (1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)));
                      	double tmp;
                      	if (t_2 <= -4e-172) {
                      		tmp = (t_0 * -d) / h;
                      	} else if (t_2 <= 1e-247) {
                      		tmp = t_1;
                      	} else if (t_2 <= 1e+196) {
                      		tmp = (t_0 * d) / h;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(d, h, l, M, D):
                      	t_0 = math.sqrt((h / l))
                      	t_1 = math.fabs((d / math.sqrt((l * h))))
                      	t_2 = (1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))
                      	tmp = 0
                      	if t_2 <= -4e-172:
                      		tmp = (t_0 * -d) / h
                      	elif t_2 <= 1e-247:
                      		tmp = t_1
                      	elif t_2 <= 1e+196:
                      		tmp = (t_0 * d) / h
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(d, h, l, M, D)
                      	t_0 = sqrt(Float64(h / l))
                      	t_1 = abs(Float64(d / sqrt(Float64(l * h))))
                      	t_2 = Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))))
                      	tmp = 0.0
                      	if (t_2 <= -4e-172)
                      		tmp = Float64(Float64(t_0 * Float64(-d)) / h);
                      	elseif (t_2 <= 1e-247)
                      		tmp = t_1;
                      	elseif (t_2 <= 1e+196)
                      		tmp = Float64(Float64(t_0 * d) / h);
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(d, h, l, M, D)
                      	t_0 = sqrt((h / l));
                      	t_1 = abs((d / sqrt((l * h))));
                      	t_2 = (1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)));
                      	tmp = 0.0;
                      	if (t_2 <= -4e-172)
                      		tmp = (t_0 * -d) / h;
                      	elseif (t_2 <= 1e-247)
                      		tmp = t_1;
                      	elseif (t_2 <= 1e+196)
                      		tmp = (t_0 * d) / h;
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-172], N[(N[(t$95$0 * (-d)), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$2, 1e-247], t$95$1, If[LessEqual[t$95$2, 1e+196], N[(N[(t$95$0 * d), $MachinePrecision] / h), $MachinePrecision], t$95$1]]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \sqrt{\frac{h}{\ell}}\\
                      t_1 := \left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                      t_2 := \left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)\\
                      \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-172}:\\
                      \;\;\;\;\frac{t\_0 \cdot \left(-d\right)}{h}\\
                      
                      \mathbf{elif}\;t\_2 \leq 10^{-247}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;t\_2 \leq 10^{+196}:\\
                      \;\;\;\;\frac{t\_0 \cdot d}{h}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000002e-172

                        1. Initial program 86.9%

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

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

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

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

                          if -4.0000000000000002e-172 < (*.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-247 or 9.9999999999999995e195 < (*.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 20.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}{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-*.f6429.9

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

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

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

                            if 1e-247 < (*.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.9999999999999995e195

                            1. Initial program 98.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 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 rewrites69.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. Taylor expanded in h around 0

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

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

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

                            Alternative 7: 47.9% accurate, 0.3× speedup?

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

                              1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -5e51 < (*.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-247 or 9.9999999999999995e195 < (*.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 22.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}{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-*.f6429.1

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

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

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

                                if 1e-247 < (*.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.9999999999999995e195

                                1. Initial program 98.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 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 rewrites69.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. Taylor expanded in h around 0

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

                                    \[\leadsto \frac{\sqrt{\frac{h}{\ell}} \cdot d}{h} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification48.1%

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

                                Alternative 8: 48.6% accurate, 0.3× speedup?

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

                                  1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -5e51 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2e-200 or 4.0000000000000003e97 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                  1. Initial program 35.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}{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-*.f6435.5

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

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

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

                                    if 2e-200 < (*.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.0000000000000003e97

                                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 9: 76.0% accurate, 0.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{D \cdot M}{d} \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                    (FPCore (d h l M D)
                                     :precision binary64
                                     (if (<=
                                          (*
                                           (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                           (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                          5e+157)
                                       (*
                                        (*
                                         (fma (* (/ (* D M) d) (* -0.125 (/ h l))) (* (/ M d) D) 1.0)
                                         (sqrt (/ d l)))
                                        (sqrt (/ d h)))
                                       (fabs (/ d (sqrt (* l h))))))
                                    double code(double d, double h, double l, double M, double D) {
                                    	double tmp;
                                    	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 5e+157) {
                                    		tmp = (fma((((D * M) / d) * (-0.125 * (h / l))), ((M / d) * D), 1.0) * sqrt((d / l))) * sqrt((d / h));
                                    	} else {
                                    		tmp = fabs((d / sqrt((l * h))));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(d, h, l, M, D)
                                    	tmp = 0.0
                                    	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 5e+157)
                                    		tmp = Float64(Float64(fma(Float64(Float64(Float64(D * M) / d) * Float64(-0.125 * Float64(h / l))), Float64(Float64(M / d) * D), 1.0) * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
                                    	else
                                    		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+157], N[(N[(N[(N[(N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision] * N[(-0.125 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\
                                    \;\;\;\;\left(\mathsf{fma}\left(\frac{D \cdot M}{d} \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999976e157

                                      1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 4.99999999999999976e157 < (*.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 18.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}{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.0

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

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

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

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

                                      Alternative 10: 76.4% accurate, 0.8× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M}{d} \cdot D\\ \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                      (FPCore (d h l M D)
                                       :precision binary64
                                       (let* ((t_0 (* (/ M d) D)))
                                         (if (<=
                                              (*
                                               (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                               (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                              5e+157)
                                           (*
                                            (sqrt (/ d h))
                                            (* (sqrt (/ d l)) (fma (* t_0 (* -0.125 (/ h l))) t_0 1.0)))
                                           (fabs (/ d (sqrt (* l h)))))))
                                      double code(double d, double h, double l, double M, double D) {
                                      	double t_0 = (M / d) * D;
                                      	double tmp;
                                      	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 5e+157) {
                                      		tmp = sqrt((d / h)) * (sqrt((d / l)) * fma((t_0 * (-0.125 * (h / l))), t_0, 1.0));
                                      	} else {
                                      		tmp = fabs((d / sqrt((l * h))));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(d, h, l, M, D)
                                      	t_0 = Float64(Float64(M / d) * D)
                                      	tmp = 0.0
                                      	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 5e+157)
                                      		tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * fma(Float64(t_0 * Float64(-0.125 * Float64(h / l))), t_0, 1.0)));
                                      	else
                                      		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]}, If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+157], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(t$95$0 * N[(-0.125 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := \frac{M}{d} \cdot D\\
                                      \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\
                                      \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999976e157

                                        1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 4.99999999999999976e157 < (*.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 18.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}{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.0

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

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

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

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

                                        Alternative 11: 75.5% accurate, 0.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{D}{d} \cdot M, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                        (FPCore (d h l M D)
                                         :precision binary64
                                         (if (<=
                                              (*
                                               (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                               (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                              5e+157)
                                           (*
                                            (*
                                             (fma (* (* (/ M d) D) (* -0.125 (/ h l))) (* (/ D d) M) 1.0)
                                             (sqrt (/ d l)))
                                            (sqrt (/ d h)))
                                           (fabs (/ d (sqrt (* l h))))))
                                        double code(double d, double h, double l, double M, double D) {
                                        	double tmp;
                                        	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 5e+157) {
                                        		tmp = (fma((((M / d) * D) * (-0.125 * (h / l))), ((D / d) * M), 1.0) * sqrt((d / l))) * sqrt((d / h));
                                        	} else {
                                        		tmp = fabs((d / sqrt((l * h))));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(d, h, l, M, D)
                                        	tmp = 0.0
                                        	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 5e+157)
                                        		tmp = Float64(Float64(fma(Float64(Float64(Float64(M / d) * D) * Float64(-0.125 * Float64(h / l))), Float64(Float64(D / d) * M), 1.0) * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
                                        	else
                                        		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+157], N[(N[(N[(N[(N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision] * N[(-0.125 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+157}:\\
                                        \;\;\;\;\left(\mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{D}{d} \cdot M, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999976e157

                                          1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 4.99999999999999976e157 < (*.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 18.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}{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.0

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

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

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

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

                                          Alternative 12: 46.2% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -5 \cdot 10^{+51}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                          (FPCore (d h l M D)
                                           :precision binary64
                                           (if (<=
                                                (*
                                                 (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                                 (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                                -5e+51)
                                             (* (sqrt (/ 1.0 (* l h))) (- d))
                                             (fabs (/ d (sqrt (* l h))))))
                                          double code(double d, double h, double l, double M, double D) {
                                          	double tmp;
                                          	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -5e+51) {
                                          		tmp = sqrt((1.0 / (l * h))) * -d;
                                          	} else {
                                          		tmp = fabs((d / sqrt((l * h))));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          real(8) function code(d, h, l, m, d_1)
                                              real(8), intent (in) :: d
                                              real(8), intent (in) :: h
                                              real(8), intent (in) :: l
                                              real(8), intent (in) :: m
                                              real(8), intent (in) :: d_1
                                              real(8) :: tmp
                                              if (((1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= (-5d+51)) then
                                                  tmp = sqrt((1.0d0 / (l * h))) * -d
                                              else
                                                  tmp = abs((d / sqrt((l * h))))
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double d, double h, double l, double M, double D) {
                                          	double tmp;
                                          	if (((1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= -5e+51) {
                                          		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                          	} else {
                                          		tmp = Math.abs((d / Math.sqrt((l * h))));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(d, h, l, M, D):
                                          	tmp = 0
                                          	if ((1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= -5e+51:
                                          		tmp = math.sqrt((1.0 / (l * h))) * -d
                                          	else:
                                          		tmp = math.fabs((d / math.sqrt((l * h))))
                                          	return tmp
                                          
                                          function code(d, h, l, M, D)
                                          	tmp = 0.0
                                          	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -5e+51)
                                          		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                          	else
                                          		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(d, h, l, M, D)
                                          	tmp = 0.0;
                                          	if (((1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= -5e+51)
                                          		tmp = sqrt((1.0 / (l * h))) * -d;
                                          	else
                                          		tmp = abs((d / sqrt((l * h))));
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+51], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -5 \cdot 10^{+51}:\\
                                          \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5e51

                                            1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -5e51 < (*.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 54.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 h around 0

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

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

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

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

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

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

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

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

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

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

                                            Alternative 13: 46.3% accurate, 0.9× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-160}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\ \end{array} \end{array} \]
                                            (FPCore (d h l M D)
                                             :precision binary64
                                             (if (<=
                                                  (*
                                                   (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                                   (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                                  -2e-160)
                                               (* (sqrt (/ 1.0 (* l h))) d)
                                               (fabs (/ d (sqrt (* l h))))))
                                            double code(double d, double h, double l, double M, double D) {
                                            	double tmp;
                                            	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -2e-160) {
                                            		tmp = sqrt((1.0 / (l * h))) * d;
                                            	} else {
                                            		tmp = fabs((d / sqrt((l * h))));
                                            	}
                                            	return tmp;
                                            }
                                            
                                            real(8) function code(d, h, l, m, d_1)
                                                real(8), intent (in) :: d
                                                real(8), intent (in) :: h
                                                real(8), intent (in) :: l
                                                real(8), intent (in) :: m
                                                real(8), intent (in) :: d_1
                                                real(8) :: tmp
                                                if (((1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= (-2d-160)) then
                                                    tmp = sqrt((1.0d0 / (l * h))) * d
                                                else
                                                    tmp = abs((d / sqrt((l * h))))
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double d, double h, double l, double M, double D) {
                                            	double tmp;
                                            	if (((1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= -2e-160) {
                                            		tmp = Math.sqrt((1.0 / (l * h))) * d;
                                            	} else {
                                            		tmp = Math.abs((d / Math.sqrt((l * h))));
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(d, h, l, M, D):
                                            	tmp = 0
                                            	if ((1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= -2e-160:
                                            		tmp = math.sqrt((1.0 / (l * h))) * d
                                            	else:
                                            		tmp = math.fabs((d / math.sqrt((l * h))))
                                            	return tmp
                                            
                                            function code(d, h, l, M, D)
                                            	tmp = 0.0
                                            	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -2e-160)
                                            		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * d);
                                            	else
                                            		tmp = abs(Float64(d / sqrt(Float64(l * h))));
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(d, h, l, M, D)
                                            	tmp = 0.0;
                                            	if (((1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= -2e-160)
                                            		tmp = sqrt((1.0 / (l * h))) * d;
                                            	else
                                            		tmp = abs((d / sqrt((l * h))));
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-160], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-160}:\\
                                            \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot d\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-160

                                              1. Initial program 86.8%

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

                                                \[\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-*.f6411.9

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 14: 46.1% accurate, 0.9× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-160}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left|t\_0\right|\\ \end{array} \end{array} \]
                                              (FPCore (d h l M D)
                                               :precision binary64
                                               (let* ((t_0 (/ d (sqrt (* l h)))))
                                                 (if (<=
                                                      (*
                                                       (- 1.0 (* (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)) (/ h l)))
                                                       (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
                                                      -2e-160)
                                                   t_0
                                                   (fabs t_0))))
                                              double code(double d, double h, double l, double M, double D) {
                                              	double t_0 = d / sqrt((l * h));
                                              	double tmp;
                                              	if (((1.0 - ((pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -2e-160) {
                                              		tmp = t_0;
                                              	} else {
                                              		tmp = fabs(t_0);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              real(8) function code(d, h, l, m, d_1)
                                                  real(8), intent (in) :: d
                                                  real(8), intent (in) :: h
                                                  real(8), intent (in) :: l
                                                  real(8), intent (in) :: m
                                                  real(8), intent (in) :: d_1
                                                  real(8) :: t_0
                                                  real(8) :: tmp
                                                  t_0 = d / sqrt((l * h))
                                                  if (((1.0d0 - (((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)) * (h / l))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= (-2d-160)) then
                                                      tmp = t_0
                                                  else
                                                      tmp = abs(t_0)
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double d, double h, double l, double M, double D) {
                                              	double t_0 = d / Math.sqrt((l * h));
                                              	double tmp;
                                              	if (((1.0 - ((Math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= -2e-160) {
                                              		tmp = t_0;
                                              	} else {
                                              		tmp = Math.abs(t_0);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(d, h, l, M, D):
                                              	t_0 = d / math.sqrt((l * h))
                                              	tmp = 0
                                              	if ((1.0 - ((math.pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0)) * (h / l))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= -2e-160:
                                              		tmp = t_0
                                              	else:
                                              		tmp = math.fabs(t_0)
                                              	return tmp
                                              
                                              function code(d, h, l, M, D)
                                              	t_0 = Float64(d / sqrt(Float64(l * h)))
                                              	tmp = 0.0
                                              	if (Float64(Float64(1.0 - Float64(Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)) * Float64(h / l))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -2e-160)
                                              		tmp = t_0;
                                              	else
                                              		tmp = abs(t_0);
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(d, h, l, M, D)
                                              	t_0 = d / sqrt((l * h));
                                              	tmp = 0.0;
                                              	if (((1.0 - (((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)) * (h / l))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= -2e-160)
                                              		tmp = t_0;
                                              	else
                                              		tmp = abs(t_0);
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(1.0 - N[(N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-160], t$95$0, N[Abs[t$95$0], $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
                                              \mathbf{if}\;\left(1 - \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-160}:\\
                                              \;\;\;\;t\_0\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\left|t\_0\right|\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-160

                                                1. Initial program 86.8%

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

                                                  \[\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-*.f6411.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 15: 78.2% accurate, 1.2× speedup?

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

                                                    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -1.35e118 < d < -6e-175

                                                    1. Initial program 78.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 rewrites83.4%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                      11. lower-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 \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot D\right) \cdot M}{\ell} \cdot \frac{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}}{{h}^{-1}}\right) \]
                                                      12. lower-neg.f6493.0

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

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

                                                    if -6e-175 < d < 2.3999999999999998e-182

                                                    1. Initial program 41.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 rewrites50.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 rewrites64.2%

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

                                                      if 2.3999999999999998e-182 < d

                                                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    Alternative 16: 78.2% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -7.7999999999999997e-174 < d < 2.3999999999999998e-182

                                                      1. Initial program 41.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 rewrites50.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 rewrites64.2%

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

                                                        if 2.3999999999999998e-182 < d

                                                        1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 17: 78.9% accurate, 1.7× speedup?

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

                                                        1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -9.99999999999948e-312 < l < 2.6e171

                                                        1. Initial program 74.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 rewrites50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 2.6e171 < l

                                                        1. Initial program 51.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. Applied rewrites37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 18: 77.6% accurate, 1.8× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M}{d} \cdot D\\ t_1 := \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\\ t_2 := \sqrt{-d}\\ t_3 := \sqrt{\frac{d}{h}}\\ t_4 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;\ell \leq -2.85 \cdot 10^{+163}:\\ \;\;\;\;\left(\left({\left(-\ell\right)}^{-0.5} \cdot t\_2\right) \cdot t\_1\right) \cdot t\_3\\ \mathbf{elif}\;\ell \leq -5.7 \cdot 10^{-304}:\\ \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{d}{D} \cdot \frac{2}{M}\right)}^{-2}, 1\right) \cdot t\_4\right) \cdot t\_2}{\sqrt{-h}}\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t\_4 \cdot t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot t\_1\right)\\ \end{array} \end{array} \]
                                                      (FPCore (d h l M D)
                                                       :precision binary64
                                                       (let* ((t_0 (* (/ M d) D))
                                                              (t_1 (fma (* t_0 (* -0.125 (/ h l))) t_0 1.0))
                                                              (t_2 (sqrt (- d)))
                                                              (t_3 (sqrt (/ d h)))
                                                              (t_4 (sqrt (/ d l))))
                                                         (if (<= l -2.85e+163)
                                                           (* (* (* (pow (- l) -0.5) t_2) t_1) t_3)
                                                           (if (<= l -5.7e-304)
                                                             (/
                                                              (*
                                                               (* (fma (* -0.5 (/ h l)) (pow (* (/ d D) (/ 2.0 M)) -2.0) 1.0) t_4)
                                                               t_2)
                                                              (sqrt (- h)))
                                                             (if (<= l 2.6e+171)
                                                               (* (/ (sqrt d) (sqrt h)) (* t_4 t_1))
                                                               (* t_3 (* (/ (sqrt d) (sqrt l)) t_1)))))))
                                                      double code(double d, double h, double l, double M, double D) {
                                                      	double t_0 = (M / d) * D;
                                                      	double t_1 = fma((t_0 * (-0.125 * (h / l))), t_0, 1.0);
                                                      	double t_2 = sqrt(-d);
                                                      	double t_3 = sqrt((d / h));
                                                      	double t_4 = sqrt((d / l));
                                                      	double tmp;
                                                      	if (l <= -2.85e+163) {
                                                      		tmp = ((pow(-l, -0.5) * t_2) * t_1) * t_3;
                                                      	} else if (l <= -5.7e-304) {
                                                      		tmp = ((fma((-0.5 * (h / l)), pow(((d / D) * (2.0 / M)), -2.0), 1.0) * t_4) * t_2) / sqrt(-h);
                                                      	} else if (l <= 2.6e+171) {
                                                      		tmp = (sqrt(d) / sqrt(h)) * (t_4 * t_1);
                                                      	} else {
                                                      		tmp = t_3 * ((sqrt(d) / sqrt(l)) * t_1);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(d, h, l, M, D)
                                                      	t_0 = Float64(Float64(M / d) * D)
                                                      	t_1 = fma(Float64(t_0 * Float64(-0.125 * Float64(h / l))), t_0, 1.0)
                                                      	t_2 = sqrt(Float64(-d))
                                                      	t_3 = sqrt(Float64(d / h))
                                                      	t_4 = sqrt(Float64(d / l))
                                                      	tmp = 0.0
                                                      	if (l <= -2.85e+163)
                                                      		tmp = Float64(Float64(Float64((Float64(-l) ^ -0.5) * t_2) * t_1) * t_3);
                                                      	elseif (l <= -5.7e-304)
                                                      		tmp = Float64(Float64(Float64(fma(Float64(-0.5 * Float64(h / l)), (Float64(Float64(d / D) * Float64(2.0 / M)) ^ -2.0), 1.0) * t_4) * t_2) / sqrt(Float64(-h)));
                                                      	elseif (l <= 2.6e+171)
                                                      		tmp = Float64(Float64(sqrt(d) / sqrt(h)) * Float64(t_4 * t_1));
                                                      	else
                                                      		tmp = Float64(t_3 * Float64(Float64(sqrt(d) / sqrt(l)) * t_1));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[(-0.125 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[(-d)], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2.85e+163], N[(N[(N[(N[Power[(-l), -0.5], $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[l, -5.7e-304], N[(N[(N[(N[(N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(d / D), $MachinePrecision] * N[(2.0 / M), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] + 1.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$2), $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.6e+171], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$4 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := \frac{M}{d} \cdot D\\
                                                      t_1 := \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\\
                                                      t_2 := \sqrt{-d}\\
                                                      t_3 := \sqrt{\frac{d}{h}}\\
                                                      t_4 := \sqrt{\frac{d}{\ell}}\\
                                                      \mathbf{if}\;\ell \leq -2.85 \cdot 10^{+163}:\\
                                                      \;\;\;\;\left(\left({\left(-\ell\right)}^{-0.5} \cdot t\_2\right) \cdot t\_1\right) \cdot t\_3\\
                                                      
                                                      \mathbf{elif}\;\ell \leq -5.7 \cdot 10^{-304}:\\
                                                      \;\;\;\;\frac{\left(\mathsf{fma}\left(-0.5 \cdot \frac{h}{\ell}, {\left(\frac{d}{D} \cdot \frac{2}{M}\right)}^{-2}, 1\right) \cdot t\_4\right) \cdot t\_2}{\sqrt{-h}}\\
                                                      
                                                      \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\
                                                      \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t\_4 \cdot t\_1\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_3 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot t\_1\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 4 regimes
                                                      2. if l < -2.8499999999999999e163

                                                        1. Initial program 33.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 rewrites30.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -2.8499999999999999e163 < l < -5.6999999999999998e-304

                                                        1. Initial program 76.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 rewrites86.7%

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

                                                        if -5.6999999999999998e-304 < l < 2.6e171

                                                        1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 2.6e171 < l

                                                        1. Initial program 51.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. Applied rewrites37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 19: 75.7% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. frac-2negN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-neg.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{\color{blue}{-d}}{\mathsf{neg}\left(\ell\right)}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. lift-neg.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{-d}{\color{blue}{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{{\left(-d\right)}^{\frac{1}{2}}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{{\left(-d\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{{\left(-d\right)}^{\left(\frac{1}{2}\right)}}{\color{blue}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. div-invN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\left({\left(-d\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{-\ell}}\right)}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\left({\left(-d\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{-\ell}}\right)}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left({\left(-d\right)}^{\color{blue}{\frac{1}{2}}} \cdot \frac{1}{\sqrt{-\ell}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\color{blue}{\sqrt{-d}} \cdot \frac{1}{\sqrt{-\ell}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. lower-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\color{blue}{\sqrt{-d}} \cdot \frac{1}{\sqrt{-\ell}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. inv-powN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\sqrt{-d} \cdot \color{blue}{{\left(\sqrt{-\ell}\right)}^{-1}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\sqrt{-d} \cdot {\color{blue}{\left(\sqrt{-\ell}\right)}}^{-1}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. sqrt-pow2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\sqrt{-d} \cdot \color{blue}{{\left(-\ell\right)}^{\left(\frac{-1}{2}\right)}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\sqrt{-d} \cdot {\left(-\ell\right)}^{\color{blue}{\frac{-1}{2}}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          19. lower-pow.f6470.6

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \left(\sqrt{-d} \cdot \color{blue}{{\left(-\ell\right)}^{-0.5}}\right)\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        8. Applied rewrites70.6%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\left(\sqrt{-d} \cdot {\left(-\ell\right)}^{-0.5}\right)}\right) \cdot \sqrt{\frac{d}{h}} \]

                                                        if -9.99999999999948e-312 < l < 2.6e171

                                                        1. Initial program 74.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 rewrites50.0%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
                                                        4. Applied rewrites74.0%

                                                          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, 0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                        5. Step-by-step derivation
                                                          1. lift-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-pow.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\color{blue}{\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. associate-*l*N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot \left(\frac{-1}{2} \cdot \frac{1}{4}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{8}}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot -0.125\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{D \cdot \frac{M}{d}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        6. Applied rewrites74.0%

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        7. Step-by-step derivation
                                                          1. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                          3. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
                                                          4. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{{h}^{\frac{1}{2}}}} \]
                                                          5. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{{h}^{\color{blue}{\left(\frac{1}{2}\right)}}} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{{h}^{\left(\frac{1}{2}\right)}}} \]
                                                          7. lower-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{d}}}{{h}^{\left(\frac{1}{2}\right)}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{{h}^{\color{blue}{\frac{1}{2}}}} \]
                                                          9. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \]
                                                          10. lower-sqrt.f6486.4

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \]
                                                        8. Applied rewrites86.4%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]

                                                        if 2.6e171 < l

                                                        1. Initial program 51.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. Applied rewrites37.4%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
                                                        4. Applied rewrites50.6%

                                                          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, 0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                        5. Step-by-step derivation
                                                          1. lift-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-pow.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\color{blue}{\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. associate-*l*N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot \left(\frac{-1}{2} \cdot \frac{1}{4}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{8}}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot -0.125\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{D \cdot \frac{M}{d}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        6. Applied rewrites53.7%

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        7. Step-by-step derivation
                                                          1. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{{\ell}^{\frac{1}{2}}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{{\ell}^{\color{blue}{\left(\frac{1}{2}\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{{\ell}^{\left(\frac{1}{2}\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{\sqrt{d}}}{{\ell}^{\left(\frac{1}{2}\right)}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{{\ell}^{\color{blue}{\frac{1}{2}}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. lower-sqrt.f6475.8

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        8. Applied rewrites75.8%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                      3. Recombined 3 regimes into one program.
                                                      4. Final simplification77.8%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{-311}:\\ \;\;\;\;\left(\left({\left(-\ell\right)}^{-0.5} \cdot \sqrt{-d}\right) \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right)\\ \end{array} \]
                                                      5. Add Preprocessing

                                                      Alternative 20: 75.7% accurate, 3.1× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M}{d} \cdot D\\ t_1 := \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\\ t_2 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{-311}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot t\_1\right) \cdot t\_2\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot t\_1\right)\\ \end{array} \end{array} \]
                                                      (FPCore (d h l M D)
                                                       :precision binary64
                                                       (let* ((t_0 (* (/ M d) D))
                                                              (t_1 (fma (* t_0 (* -0.125 (/ h l))) t_0 1.0))
                                                              (t_2 (sqrt (/ d h))))
                                                         (if (<= l -1e-311)
                                                           (* (* (/ (sqrt (- d)) (sqrt (- l))) t_1) t_2)
                                                           (if (<= l 2.6e+171)
                                                             (* (/ (sqrt d) (sqrt h)) (* (sqrt (/ d l)) t_1))
                                                             (* t_2 (* (/ (sqrt d) (sqrt l)) t_1))))))
                                                      double code(double d, double h, double l, double M, double D) {
                                                      	double t_0 = (M / d) * D;
                                                      	double t_1 = fma((t_0 * (-0.125 * (h / l))), t_0, 1.0);
                                                      	double t_2 = sqrt((d / h));
                                                      	double tmp;
                                                      	if (l <= -1e-311) {
                                                      		tmp = ((sqrt(-d) / sqrt(-l)) * t_1) * t_2;
                                                      	} else if (l <= 2.6e+171) {
                                                      		tmp = (sqrt(d) / sqrt(h)) * (sqrt((d / l)) * t_1);
                                                      	} else {
                                                      		tmp = t_2 * ((sqrt(d) / sqrt(l)) * t_1);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(d, h, l, M, D)
                                                      	t_0 = Float64(Float64(M / d) * D)
                                                      	t_1 = fma(Float64(t_0 * Float64(-0.125 * Float64(h / l))), t_0, 1.0)
                                                      	t_2 = sqrt(Float64(d / h))
                                                      	tmp = 0.0
                                                      	if (l <= -1e-311)
                                                      		tmp = Float64(Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))) * t_1) * t_2);
                                                      	elseif (l <= 2.6e+171)
                                                      		tmp = Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(Float64(d / l)) * t_1));
                                                      	else
                                                      		tmp = Float64(t_2 * Float64(Float64(sqrt(d) / sqrt(l)) * t_1));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[(-0.125 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -1e-311], N[(N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[l, 2.6e+171], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := \frac{M}{d} \cdot D\\
                                                      t_1 := \mathsf{fma}\left(t\_0 \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), t\_0, 1\right)\\
                                                      t_2 := \sqrt{\frac{d}{h}}\\
                                                      \mathbf{if}\;\ell \leq -1 \cdot 10^{-311}:\\
                                                      \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot t\_1\right) \cdot t\_2\\
                                                      
                                                      \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\
                                                      \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot t\_1\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_2 \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot t\_1\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if l < -9.99999999999948e-312

                                                        1. Initial program 63.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 rewrites40.6%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
                                                        4. Applied rewrites63.7%

                                                          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, 0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                        5. Step-by-step derivation
                                                          1. lift-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-pow.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\color{blue}{\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. associate-*l*N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot \left(\frac{-1}{2} \cdot \frac{1}{4}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{8}}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. lower-*.f6465.5

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot -0.125\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. lower-*.f6465.5

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{D \cdot \frac{M}{d}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. lower-*.f6465.5

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        6. Applied rewrites65.5%

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        7. Step-by-step derivation
                                                          1. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. frac-2negN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-neg.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{\color{blue}{-d}}{\mathsf{neg}\left(\ell\right)}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. lift-neg.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{-d}{\color{blue}{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{{\left(-d\right)}^{\frac{1}{2}}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{{\left(-d\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{{\left(-d\right)}^{\left(\frac{1}{2}\right)}}{\color{blue}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. lower-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{{\left(-d\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{{\left(-d\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{\sqrt{-d}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lower-sqrt.f6470.4

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{\sqrt{-d}}}{\sqrt{-\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        8. Applied rewrites70.4%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]

                                                        if -9.99999999999948e-312 < l < 2.6e171

                                                        1. Initial program 74.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 rewrites50.0%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
                                                        4. Applied rewrites74.0%

                                                          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, 0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                        5. Step-by-step derivation
                                                          1. lift-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-pow.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\color{blue}{\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. associate-*l*N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot \left(\frac{-1}{2} \cdot \frac{1}{4}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{8}}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot -0.125\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{D \cdot \frac{M}{d}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. lower-*.f6474.0

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        6. Applied rewrites74.0%

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        7. Step-by-step derivation
                                                          1. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
                                                          3. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
                                                          4. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{{h}^{\frac{1}{2}}}} \]
                                                          5. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{{h}^{\color{blue}{\left(\frac{1}{2}\right)}}} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{{h}^{\left(\frac{1}{2}\right)}}} \]
                                                          7. lower-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\color{blue}{\sqrt{d}}}{{h}^{\left(\frac{1}{2}\right)}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{{h}^{\color{blue}{\frac{1}{2}}}} \]
                                                          9. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \]
                                                          10. lower-sqrt.f6486.4

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \]
                                                        8. Applied rewrites86.4%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]

                                                        if 2.6e171 < l

                                                        1. Initial program 51.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. Applied rewrites37.4%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(-0.5 \cdot {\left(\frac{2}{M} \cdot \frac{d}{D}\right)}^{-2}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}, \sqrt{\frac{\frac{d}{\ell}}{h} \cdot d}\right)} \]
                                                        4. Applied rewrites50.6%

                                                          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, 0.25 \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                                        5. Step-by-step derivation
                                                          1. lift-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \color{blue}{\left(\frac{1}{4} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. lift-pow.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{{\left(D \cdot \frac{M}{d}\right)}^{2}} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(\left(D \cdot \frac{M}{d}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. associate-*r*N/A

                                                            \[\leadsto \left(\left(\color{blue}{\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)\right) \cdot \left(D \cdot \frac{M}{d}\right)} + 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right) \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\color{blue}{\left(\frac{h}{\ell} \cdot \frac{-1}{2}\right)} \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. associate-*l*N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot \left(\frac{-1}{2} \cdot \frac{1}{4}\right)\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          11. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \color{blue}{\frac{-1}{8}}\right) \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          12. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\left(\frac{h}{\ell} \cdot -0.125\right)} \cdot \left(D \cdot \frac{M}{d}\right), D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{d}\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          14. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          15. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \color{blue}{\left(\frac{M}{d} \cdot D\right)}, D \cdot \frac{M}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          16. lift-*.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{D \cdot \frac{M}{d}}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          17. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          18. lower-*.f6453.7

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \color{blue}{\frac{M}{d} \cdot D}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        6. Applied rewrites53.7%

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        7. Step-by-step derivation
                                                          1. lift-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          2. lift-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          3. sqrt-divN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          4. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{{\ell}^{\frac{1}{2}}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          5. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{{\ell}^{\color{blue}{\left(\frac{1}{2}\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{{\ell}^{\left(\frac{1}{2}\right)}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          7. lower-sqrt.f64N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\color{blue}{\sqrt{d}}}{{\ell}^{\left(\frac{1}{2}\right)}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          8. metadata-evalN/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{{\ell}^{\color{blue}{\frac{1}{2}}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          9. pow1/2N/A

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot \frac{-1}{8}\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                          10. lower-sqrt.f6475.8

                                                            \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \frac{\sqrt{d}}{\color{blue}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                        8. Applied rewrites75.8%

                                                          \[\leadsto \left(\mathsf{fma}\left(\left(\frac{h}{\ell} \cdot -0.125\right) \cdot \left(\frac{M}{d} \cdot D\right), \frac{M}{d} \cdot D, 1\right) \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \sqrt{\frac{d}{h}} \]
                                                      3. Recombined 3 regimes into one program.
                                                      4. Final simplification77.7%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{-311}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\left(\frac{M}{d} \cdot D\right) \cdot \left(-0.125 \cdot \frac{h}{\ell}\right), \frac{M}{d} \cdot D, 1\right)\right)\\ \end{array} \]
                                                      5. Add Preprocessing

                                                      Alternative 21: 46.2% accurate, 9.6× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.5 \cdot 10^{-245}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                      (FPCore (d h l M D)
                                                       :precision binary64
                                                       (if (<= l 4.5e-245)
                                                         (* (sqrt (/ 1.0 (* l h))) (- d))
                                                         (/ d (* (sqrt l) (sqrt h)))))
                                                      double code(double d, double h, double l, double M, double D) {
                                                      	double tmp;
                                                      	if (l <= 4.5e-245) {
                                                      		tmp = sqrt((1.0 / (l * h))) * -d;
                                                      	} else {
                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      real(8) function code(d, h, l, m, d_1)
                                                          real(8), intent (in) :: d
                                                          real(8), intent (in) :: h
                                                          real(8), intent (in) :: l
                                                          real(8), intent (in) :: m
                                                          real(8), intent (in) :: d_1
                                                          real(8) :: tmp
                                                          if (l <= 4.5d-245) then
                                                              tmp = sqrt((1.0d0 / (l * h))) * -d
                                                          else
                                                              tmp = d / (sqrt(l) * sqrt(h))
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double d, double h, double l, double M, double D) {
                                                      	double tmp;
                                                      	if (l <= 4.5e-245) {
                                                      		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                      	} else {
                                                      		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(d, h, l, M, D):
                                                      	tmp = 0
                                                      	if l <= 4.5e-245:
                                                      		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                      	else:
                                                      		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                      	return tmp
                                                      
                                                      function code(d, h, l, M, D)
                                                      	tmp = 0.0
                                                      	if (l <= 4.5e-245)
                                                      		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                      	else
                                                      		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(d, h, l, M, D)
                                                      	tmp = 0.0;
                                                      	if (l <= 4.5e-245)
                                                      		tmp = sqrt((1.0 / (l * h))) * -d;
                                                      	else
                                                      		tmp = d / (sqrt(l) * sqrt(h));
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[d_, h_, l_, M_, D_] := If[LessEqual[l, 4.5e-245], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;\ell \leq 4.5 \cdot 10^{-245}:\\
                                                      \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if l < 4.49999999999999969e-245

                                                        1. Initial program 64.4%

                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in 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-*.f6437.7

                                                            \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                        5. Applied rewrites37.7%

                                                          \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                        if 4.49999999999999969e-245 < l

                                                        1. Initial program 69.0%

                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in h around 0

                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                        4. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                          2. lower-*.f64N/A

                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                          3. lower-sqrt.f64N/A

                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                          4. lower-/.f64N/A

                                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                          5. *-commutativeN/A

                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                          6. lower-*.f6442.7

                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                        5. Applied rewrites42.7%

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                        6. Step-by-step derivation
                                                          1. Applied rewrites42.9%

                                                            \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites50.5%

                                                              \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                          3. Recombined 2 regimes into one program.
                                                          4. Final simplification43.8%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.5 \cdot 10^{-245}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
                                                          5. Add Preprocessing

                                                          Alternative 22: 26.3% accurate, 15.3× speedup?

                                                          \[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                          (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                          double code(double d, double h, double l, double M, double D) {
                                                          	return d / sqrt((l * h));
                                                          }
                                                          
                                                          real(8) function code(d, h, l, m, d_1)
                                                              real(8), intent (in) :: d
                                                              real(8), intent (in) :: h
                                                              real(8), intent (in) :: l
                                                              real(8), intent (in) :: m
                                                              real(8), intent (in) :: d_1
                                                              code = d / sqrt((l * h))
                                                          end function
                                                          
                                                          public static double code(double d, double h, double l, double M, double D) {
                                                          	return d / Math.sqrt((l * h));
                                                          }
                                                          
                                                          def code(d, h, l, M, D):
                                                          	return d / math.sqrt((l * h))
                                                          
                                                          function code(d, h, l, M, D)
                                                          	return Float64(d / sqrt(Float64(l * h)))
                                                          end
                                                          
                                                          function tmp = code(d, h, l, M, D)
                                                          	tmp = d / sqrt((l * h));
                                                          end
                                                          
                                                          code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \frac{d}{\sqrt{\ell \cdot h}}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 66.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 0

                                                            \[\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-*.f6427.3

                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                          5. Applied rewrites27.3%

                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                          6. Step-by-step derivation
                                                            1. Applied rewrites27.0%

                                                              \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                            2. Add Preprocessing

                                                            Reproduce

                                                            ?
                                                            herbie shell --seed 2024255 
                                                            (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)))))