Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.3% → 83.0%
Time: 16.9s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 83.0% accurate, 0.4× speedup?

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+132}:\\
\;\;\;\;\mathsf{fma}\left(\left(0.25 \cdot \left(-D\_m\right)\right) \cdot \frac{t\_0 \cdot D\_m}{\ell}, t\_2, 1\right) \cdot \frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 5.0000000000000001e132 < (*.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 55.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 57.7% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+132}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999997e-45 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 5.0000000000000001e132 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 3: 54.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\sqrt{\left(-d\right) \cdot 1}}{\sqrt{\left(\mathsf{neg}\left(h\right)\right) \cdot \frac{\ell}{d}}}} \cdot 1 \]
                3. Applied rewrites7.2%

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

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

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

                1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 4: 49.7% accurate, 0.3× speedup?

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

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

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

                              \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                            3. 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-*.f6412.8

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

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

                            if -1.99999999999999997e-45 < (*.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.9999999999999997e-155 or 5.0000000000000001e132 < (*.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 37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  1. Initial program 99.5%

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

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

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

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

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

                                    Alternative 5: 83.0% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 6: 60.9% accurate, 0.5× speedup?

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

                                          1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 5.0000000000000001e132 < (*.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 32.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites36.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 7: 58.2% accurate, 0.5× speedup?

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

                                                    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 5.0000000000000001e132 < (*.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 32.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites36.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 8: 50.5% accurate, 0.5× speedup?

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

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

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

                                                                  \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                3. 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-*.f6418.1

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

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

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

                                                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    if 5.0000000000000001e132 < (*.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 32.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites36.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 9: 83.2% accurate, 0.6× speedup?

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

                                                                          1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 5.0000000000000001e132 < (*.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 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 10: 82.1% accurate, 0.8× speedup?

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

                                                                          1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 5.0000000000000001e132 < (*.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 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 11: 82.2% accurate, 0.8× speedup?

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

                                                                          1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 5.0000000000000001e132 < (*.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 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            12. lift-/.f64N/A

                                                                              \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            13. lift-/.f64N/A

                                                                              \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            14. frac-timesN/A

                                                                              \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            15. *-commutativeN/A

                                                                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            16. lift-*.f64N/A

                                                                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            17. sqrt-divN/A

                                                                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            18. lift-sqrt.f64N/A

                                                                              \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            19. lower-/.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            20. rem-sqrt-squareN/A

                                                                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            21. lower-fabs.f6478.2

                                                                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \]
                                                                            22. lift-*.f64N/A

                                                                              \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            23. *-commutativeN/A

                                                                              \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(\frac{1}{4} \cdot D\right), 1\right) \]
                                                                            24. lower-*.f6478.2

                                                                              \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \]
                                                                          10. Applied rewrites78.2%

                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)}{\ell}, \left(\frac{M}{d} \cdot h\right) \cdot \left(0.25 \cdot D\right), 1\right) \]
                                                                        3. Recombined 2 regimes into one program.
                                                                        4. Final simplification84.1%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 5 \cdot 10^{+132}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)}{\ell}, \left(0.25 \cdot D\right) \cdot \left(\frac{M}{d} \cdot h\right), 1\right) \cdot \frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(-D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)}{\ell}, \left(0.25 \cdot D\right) \cdot \left(\frac{M}{d} \cdot h\right), 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                        5. Add Preprocessing

                                                                        Alternative 12: 45.8% accurate, 0.9× speedup?

                                                                        \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                        D_m = (fabs.f64 D)
                                                                        M_m = (fabs.f64 M)
                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                        (FPCore (d h l M_m D_m)
                                                                         :precision binary64
                                                                         (if (<=
                                                                              (*
                                                                               (- 1.0 (* (/ h l) (* (pow (/ (* D_m M_m) (* 2.0 d)) 2.0) (/ 1.0 2.0))))
                                                                               (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                                                                              -2e-45)
                                                                           (* (sqrt (/ 1.0 (* l h))) (- d))
                                                                           (/ (fabs d) (sqrt (* l h)))))
                                                                        D_m = fabs(D);
                                                                        M_m = fabs(M);
                                                                        assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                        double code(double d, double h, double l, double M_m, double D_m) {
                                                                        	double tmp;
                                                                        	if (((1.0 - ((h / l) * (pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= -2e-45) {
                                                                        		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                        	} else {
                                                                        		tmp = fabs(d) / sqrt((l * h));
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        D_m = abs(d)
                                                                        M_m = abs(m)
                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                        real(8) function code(d, h, l, m_m, d_m)
                                                                            real(8), intent (in) :: d
                                                                            real(8), intent (in) :: h
                                                                            real(8), intent (in) :: l
                                                                            real(8), intent (in) :: m_m
                                                                            real(8), intent (in) :: d_m
                                                                            real(8) :: tmp
                                                                            if (((1.0d0 - ((h / l) * ((((d_m * m_m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= (-2d-45)) then
                                                                                tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                            else
                                                                                tmp = abs(d) / sqrt((l * h))
                                                                            end if
                                                                            code = tmp
                                                                        end function
                                                                        
                                                                        D_m = Math.abs(D);
                                                                        M_m = Math.abs(M);
                                                                        assert d < h && h < l && l < M_m && M_m < D_m;
                                                                        public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                        	double tmp;
                                                                        	if (((1.0 - ((h / l) * (Math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (Math.pow((d / l), (1.0 / 2.0)) * Math.pow((d / h), (1.0 / 2.0)))) <= -2e-45) {
                                                                        		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                                        	} else {
                                                                        		tmp = Math.abs(d) / Math.sqrt((l * h));
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        D_m = math.fabs(D)
                                                                        M_m = math.fabs(M)
                                                                        [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                        def code(d, h, l, M_m, D_m):
                                                                        	tmp = 0
                                                                        	if ((1.0 - ((h / l) * (math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (math.pow((d / l), (1.0 / 2.0)) * math.pow((d / h), (1.0 / 2.0)))) <= -2e-45:
                                                                        		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                                        	else:
                                                                        		tmp = math.fabs(d) / math.sqrt((l * h))
                                                                        	return tmp
                                                                        
                                                                        D_m = abs(D)
                                                                        M_m = abs(M)
                                                                        d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                        function code(d, h, l, M_m, D_m)
                                                                        	tmp = 0.0
                                                                        	if (Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D_m * M_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= -2e-45)
                                                                        		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                                        	else
                                                                        		tmp = Float64(abs(d) / sqrt(Float64(l * h)));
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        D_m = abs(D);
                                                                        M_m = abs(M);
                                                                        d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                        function tmp_2 = code(d, h, l, M_m, D_m)
                                                                        	tmp = 0.0;
                                                                        	if (((1.0 - ((h / l) * ((((D_m * M_m) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= -2e-45)
                                                                        		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                        	else
                                                                        		tmp = abs(d) / sqrt((l * h));
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        D_m = N[Abs[D], $MachinePrecision]
                                                                        M_m = N[Abs[M], $MachinePrecision]
                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                        code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D$95$m * M$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-45], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        D_m = \left|D\right|
                                                                        \\
                                                                        M_m = \left|M\right|
                                                                        \\
                                                                        [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-45}:\\
                                                                        \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                        
                                                                        
                                                                        \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)))) < -1.99999999999999997e-45

                                                                          1. Initial program 80.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                          4. Step-by-step derivation
                                                                            1. Applied rewrites3.0%

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                            2. Taylor expanded in l around -inf

                                                                              \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                            3. 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-*.f6412.8

                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                            4. Applied rewrites12.8%

                                                                              \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                            if -1.99999999999999997e-45 < (*.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 57.1%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in h around 0

                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                            4. Step-by-step derivation
                                                                              1. Applied rewrites59.2%

                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                              2. Taylor expanded in h around 0

                                                                                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                              3. Step-by-step derivation
                                                                                1. *-commutativeN/A

                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                2. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                3. lower-sqrt.f64N/A

                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                4. lower-/.f64N/A

                                                                                  \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                5. *-commutativeN/A

                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                6. lower-*.f6434.3

                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                              4. Applied rewrites34.3%

                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                              5. Step-by-step derivation
                                                                                1. Applied rewrites28.6%

                                                                                  \[\leadsto \frac{\sqrt{-d}}{\color{blue}{\sqrt{\frac{h}{d} \cdot \left(-\ell\right)}}} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites64.4%

                                                                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
                                                                                3. Recombined 2 regimes into one program.
                                                                                4. Final simplification45.8%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                5. Add Preprocessing

                                                                                Alternative 13: 46.0% accurate, 0.9× speedup?

                                                                                \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                                D_m = (fabs.f64 D)
                                                                                M_m = (fabs.f64 M)
                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                (FPCore (d h l M_m D_m)
                                                                                 :precision binary64
                                                                                 (if (<=
                                                                                      (*
                                                                                       (- 1.0 (* (/ h l) (* (pow (/ (* D_m M_m) (* 2.0 d)) 2.0) (/ 1.0 2.0))))
                                                                                       (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                                                                                      -1e+57)
                                                                                   (* (sqrt (/ 1.0 (* l h))) d)
                                                                                   (/ (fabs d) (sqrt (* l h)))))
                                                                                D_m = fabs(D);
                                                                                M_m = fabs(M);
                                                                                assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                double code(double d, double h, double l, double M_m, double D_m) {
                                                                                	double tmp;
                                                                                	if (((1.0 - ((h / l) * (pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= -1e+57) {
                                                                                		tmp = sqrt((1.0 / (l * h))) * d;
                                                                                	} else {
                                                                                		tmp = fabs(d) / sqrt((l * h));
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                D_m = abs(d)
                                                                                M_m = abs(m)
                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                real(8) function code(d, h, l, m_m, d_m)
                                                                                    real(8), intent (in) :: d
                                                                                    real(8), intent (in) :: h
                                                                                    real(8), intent (in) :: l
                                                                                    real(8), intent (in) :: m_m
                                                                                    real(8), intent (in) :: d_m
                                                                                    real(8) :: tmp
                                                                                    if (((1.0d0 - ((h / l) * ((((d_m * m_m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= (-1d+57)) then
                                                                                        tmp = sqrt((1.0d0 / (l * h))) * d
                                                                                    else
                                                                                        tmp = abs(d) / sqrt((l * h))
                                                                                    end if
                                                                                    code = tmp
                                                                                end function
                                                                                
                                                                                D_m = Math.abs(D);
                                                                                M_m = Math.abs(M);
                                                                                assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                	double tmp;
                                                                                	if (((1.0 - ((h / l) * (Math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (Math.pow((d / l), (1.0 / 2.0)) * Math.pow((d / h), (1.0 / 2.0)))) <= -1e+57) {
                                                                                		tmp = Math.sqrt((1.0 / (l * h))) * d;
                                                                                	} else {
                                                                                		tmp = Math.abs(d) / Math.sqrt((l * h));
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                D_m = math.fabs(D)
                                                                                M_m = math.fabs(M)
                                                                                [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                def code(d, h, l, M_m, D_m):
                                                                                	tmp = 0
                                                                                	if ((1.0 - ((h / l) * (math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (math.pow((d / l), (1.0 / 2.0)) * math.pow((d / h), (1.0 / 2.0)))) <= -1e+57:
                                                                                		tmp = math.sqrt((1.0 / (l * h))) * d
                                                                                	else:
                                                                                		tmp = math.fabs(d) / math.sqrt((l * h))
                                                                                	return tmp
                                                                                
                                                                                D_m = abs(D)
                                                                                M_m = abs(M)
                                                                                d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                function code(d, h, l, M_m, D_m)
                                                                                	tmp = 0.0
                                                                                	if (Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D_m * M_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= -1e+57)
                                                                                		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * d);
                                                                                	else
                                                                                		tmp = Float64(abs(d) / sqrt(Float64(l * h)));
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                D_m = abs(D);
                                                                                M_m = abs(M);
                                                                                d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                function tmp_2 = code(d, h, l, M_m, D_m)
                                                                                	tmp = 0.0;
                                                                                	if (((1.0 - ((h / l) * ((((D_m * M_m) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= -1e+57)
                                                                                		tmp = sqrt((1.0 / (l * h))) * d;
                                                                                	else
                                                                                		tmp = abs(d) / sqrt((l * h));
                                                                                	end
                                                                                	tmp_2 = tmp;
                                                                                end
                                                                                
                                                                                D_m = N[Abs[D], $MachinePrecision]
                                                                                M_m = N[Abs[M], $MachinePrecision]
                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D$95$m * M$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e+57], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                                                                
                                                                                \begin{array}{l}
                                                                                D_m = \left|D\right|
                                                                                \\
                                                                                M_m = \left|M\right|
                                                                                \\
                                                                                [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                \\
                                                                                \begin{array}{l}
                                                                                \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\
                                                                                \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot d\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                
                                                                                
                                                                                \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)))) < -1.00000000000000005e57

                                                                                  1. Initial program 79.9%

                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in h around 0

                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites3.0%

                                                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                    2. Taylor expanded in h around 0

                                                                                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                    3. Step-by-step derivation
                                                                                      1. *-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      2. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                      3. lower-sqrt.f64N/A

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      4. lower-/.f64N/A

                                                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                      5. *-commutativeN/A

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                      6. lower-*.f6410.8

                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                    4. Applied rewrites10.8%

                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]

                                                                                    if -1.00000000000000005e57 < (*.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 57.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites58.5%

                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                      2. Taylor expanded in h around 0

                                                                                        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. *-commutativeN/A

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                        2. lower-*.f64N/A

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                        3. lower-sqrt.f64N/A

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                        4. lower-/.f64N/A

                                                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                        5. *-commutativeN/A

                                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                        6. lower-*.f6433.9

                                                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                      4. Applied rewrites33.9%

                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                      5. Step-by-step derivation
                                                                                        1. Applied rewrites28.2%

                                                                                          \[\leadsto \frac{\sqrt{-d}}{\color{blue}{\sqrt{\frac{h}{d} \cdot \left(-\ell\right)}}} \]
                                                                                        2. Step-by-step derivation
                                                                                          1. Applied rewrites63.6%

                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
                                                                                        3. Recombined 2 regimes into one program.
                                                                                        4. Final simplification45.1%

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                        5. Add Preprocessing

                                                                                        Alternative 14: 45.9% accurate, 0.9× speedup?

                                                                                        \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\ \;\;\;\;\frac{d}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0}\\ \end{array} \end{array} \]
                                                                                        D_m = (fabs.f64 D)
                                                                                        M_m = (fabs.f64 M)
                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                        (FPCore (d h l M_m D_m)
                                                                                         :precision binary64
                                                                                         (let* ((t_0 (sqrt (* l h))))
                                                                                           (if (<=
                                                                                                (*
                                                                                                 (-
                                                                                                  1.0
                                                                                                  (* (/ h l) (* (pow (/ (* D_m M_m) (* 2.0 d)) 2.0) (/ 1.0 2.0))))
                                                                                                 (* (pow (/ d l) (/ 1.0 2.0)) (pow (/ d h) (/ 1.0 2.0))))
                                                                                                -1e+57)
                                                                                             (/ d t_0)
                                                                                             (/ (fabs d) t_0))))
                                                                                        D_m = fabs(D);
                                                                                        M_m = fabs(M);
                                                                                        assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                        double code(double d, double h, double l, double M_m, double D_m) {
                                                                                        	double t_0 = sqrt((l * h));
                                                                                        	double tmp;
                                                                                        	if (((1.0 - ((h / l) * (pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (pow((d / l), (1.0 / 2.0)) * pow((d / h), (1.0 / 2.0)))) <= -1e+57) {
                                                                                        		tmp = d / t_0;
                                                                                        	} else {
                                                                                        		tmp = fabs(d) / t_0;
                                                                                        	}
                                                                                        	return tmp;
                                                                                        }
                                                                                        
                                                                                        D_m = abs(d)
                                                                                        M_m = abs(m)
                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                        real(8) function code(d, h, l, m_m, d_m)
                                                                                            real(8), intent (in) :: d
                                                                                            real(8), intent (in) :: h
                                                                                            real(8), intent (in) :: l
                                                                                            real(8), intent (in) :: m_m
                                                                                            real(8), intent (in) :: d_m
                                                                                            real(8) :: t_0
                                                                                            real(8) :: tmp
                                                                                            t_0 = sqrt((l * h))
                                                                                            if (((1.0d0 - ((h / l) * ((((d_m * m_m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= (-1d+57)) then
                                                                                                tmp = d / t_0
                                                                                            else
                                                                                                tmp = abs(d) / t_0
                                                                                            end if
                                                                                            code = tmp
                                                                                        end function
                                                                                        
                                                                                        D_m = Math.abs(D);
                                                                                        M_m = Math.abs(M);
                                                                                        assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                        public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                        	double t_0 = Math.sqrt((l * h));
                                                                                        	double tmp;
                                                                                        	if (((1.0 - ((h / l) * (Math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (Math.pow((d / l), (1.0 / 2.0)) * Math.pow((d / h), (1.0 / 2.0)))) <= -1e+57) {
                                                                                        		tmp = d / t_0;
                                                                                        	} else {
                                                                                        		tmp = Math.abs(d) / t_0;
                                                                                        	}
                                                                                        	return tmp;
                                                                                        }
                                                                                        
                                                                                        D_m = math.fabs(D)
                                                                                        M_m = math.fabs(M)
                                                                                        [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                        def code(d, h, l, M_m, D_m):
                                                                                        	t_0 = math.sqrt((l * h))
                                                                                        	tmp = 0
                                                                                        	if ((1.0 - ((h / l) * (math.pow(((D_m * M_m) / (2.0 * d)), 2.0) * (1.0 / 2.0)))) * (math.pow((d / l), (1.0 / 2.0)) * math.pow((d / h), (1.0 / 2.0)))) <= -1e+57:
                                                                                        		tmp = d / t_0
                                                                                        	else:
                                                                                        		tmp = math.fabs(d) / t_0
                                                                                        	return tmp
                                                                                        
                                                                                        D_m = abs(D)
                                                                                        M_m = abs(M)
                                                                                        d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                        function code(d, h, l, M_m, D_m)
                                                                                        	t_0 = sqrt(Float64(l * h))
                                                                                        	tmp = 0.0
                                                                                        	if (Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D_m * M_m) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)))) * Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * (Float64(d / h) ^ Float64(1.0 / 2.0)))) <= -1e+57)
                                                                                        		tmp = Float64(d / t_0);
                                                                                        	else
                                                                                        		tmp = Float64(abs(d) / t_0);
                                                                                        	end
                                                                                        	return tmp
                                                                                        end
                                                                                        
                                                                                        D_m = abs(D);
                                                                                        M_m = abs(M);
                                                                                        d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                        function tmp_2 = code(d, h, l, M_m, D_m)
                                                                                        	t_0 = sqrt((l * h));
                                                                                        	tmp = 0.0;
                                                                                        	if (((1.0 - ((h / l) * ((((D_m * M_m) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= -1e+57)
                                                                                        		tmp = d / t_0;
                                                                                        	else
                                                                                        		tmp = abs(d) / t_0;
                                                                                        	end
                                                                                        	tmp_2 = tmp;
                                                                                        end
                                                                                        
                                                                                        D_m = N[Abs[D], $MachinePrecision]
                                                                                        M_m = N[Abs[M], $MachinePrecision]
                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                        code[d_, h_, l_, M$95$m_, D$95$m_] := Block[{t$95$0 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D$95$m * M$95$m), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e+57], N[(d / t$95$0), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision]]]
                                                                                        
                                                                                        \begin{array}{l}
                                                                                        D_m = \left|D\right|
                                                                                        \\
                                                                                        M_m = \left|M\right|
                                                                                        \\
                                                                                        [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                        \\
                                                                                        \begin{array}{l}
                                                                                        t_0 := \sqrt{\ell \cdot h}\\
                                                                                        \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D\_m \cdot M\_m}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\
                                                                                        \;\;\;\;\frac{d}{t\_0}\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;\frac{\left|d\right|}{t\_0}\\
                                                                                        
                                                                                        
                                                                                        \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)))) < -1.00000000000000005e57

                                                                                          1. Initial program 79.9%

                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in h around 0

                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites3.0%

                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                            2. Taylor expanded in h around 0

                                                                                              \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. *-commutativeN/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              2. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              3. lower-sqrt.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              4. lower-/.f64N/A

                                                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              5. *-commutativeN/A

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                              6. lower-*.f6410.8

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                            4. Applied rewrites10.8%

                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                            5. Step-by-step derivation
                                                                                              1. Applied rewrites9.7%

                                                                                                \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]

                                                                                              if -1.00000000000000005e57 < (*.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 57.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. Applied rewrites58.5%

                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                2. Taylor expanded in h around 0

                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. *-commutativeN/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  2. lower-*.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  3. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  4. lower-/.f64N/A

                                                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  5. *-commutativeN/A

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                  6. lower-*.f6433.9

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                4. Applied rewrites33.9%

                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                5. Step-by-step derivation
                                                                                                  1. Applied rewrites28.2%

                                                                                                    \[\leadsto \frac{\sqrt{-d}}{\color{blue}{\sqrt{\frac{h}{d} \cdot \left(-\ell\right)}}} \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. Applied rewrites63.6%

                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                  4. Final simplification44.7%

                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -1 \cdot 10^{+57}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                                  5. Add Preprocessing

                                                                                                  Alternative 15: 45.5% accurate, 8.4× speedup?

                                                                                                  \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
                                                                                                  D_m = (fabs.f64 D)
                                                                                                  M_m = (fabs.f64 M)
                                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                  (FPCore (d h l M_m D_m)
                                                                                                   :precision binary64
                                                                                                   (if (<= l 3.3e-266)
                                                                                                     (* (sqrt (/ 1.0 (* l h))) (- d))
                                                                                                     (/ (/ d (sqrt h)) (sqrt l))))
                                                                                                  D_m = fabs(D);
                                                                                                  M_m = fabs(M);
                                                                                                  assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                                  double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                  	double tmp;
                                                                                                  	if (l <= 3.3e-266) {
                                                                                                  		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                                                  	} else {
                                                                                                  		tmp = (d / sqrt(h)) / sqrt(l);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  D_m = abs(d)
                                                                                                  M_m = abs(m)
                                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                  real(8) function code(d, h, l, m_m, d_m)
                                                                                                      real(8), intent (in) :: d
                                                                                                      real(8), intent (in) :: h
                                                                                                      real(8), intent (in) :: l
                                                                                                      real(8), intent (in) :: m_m
                                                                                                      real(8), intent (in) :: d_m
                                                                                                      real(8) :: tmp
                                                                                                      if (l <= 3.3d-266) then
                                                                                                          tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                                                      else
                                                                                                          tmp = (d / sqrt(h)) / sqrt(l)
                                                                                                      end if
                                                                                                      code = tmp
                                                                                                  end function
                                                                                                  
                                                                                                  D_m = Math.abs(D);
                                                                                                  M_m = Math.abs(M);
                                                                                                  assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                                  public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                  	double tmp;
                                                                                                  	if (l <= 3.3e-266) {
                                                                                                  		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                                                                  	} else {
                                                                                                  		tmp = (d / Math.sqrt(h)) / Math.sqrt(l);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  D_m = math.fabs(D)
                                                                                                  M_m = math.fabs(M)
                                                                                                  [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                                  def code(d, h, l, M_m, D_m):
                                                                                                  	tmp = 0
                                                                                                  	if l <= 3.3e-266:
                                                                                                  		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                                                                  	else:
                                                                                                  		tmp = (d / math.sqrt(h)) / math.sqrt(l)
                                                                                                  	return tmp
                                                                                                  
                                                                                                  D_m = abs(D)
                                                                                                  M_m = abs(M)
                                                                                                  d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                                  function code(d, h, l, M_m, D_m)
                                                                                                  	tmp = 0.0
                                                                                                  	if (l <= 3.3e-266)
                                                                                                  		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                                                                  	else
                                                                                                  		tmp = Float64(Float64(d / sqrt(h)) / sqrt(l));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  D_m = abs(D);
                                                                                                  M_m = abs(M);
                                                                                                  d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                                  function tmp_2 = code(d, h, l, M_m, D_m)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (l <= 3.3e-266)
                                                                                                  		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                                                  	else
                                                                                                  		tmp = (d / sqrt(h)) / sqrt(l);
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  D_m = N[Abs[D], $MachinePrecision]
                                                                                                  M_m = N[Abs[M], $MachinePrecision]
                                                                                                  NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                  code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[l, 3.3e-266], N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-d)), $MachinePrecision], N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  D_m = \left|D\right|
                                                                                                  \\
                                                                                                  M_m = \left|M\right|
                                                                                                  \\
                                                                                                  [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\
                                                                                                  \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if l < 3.3000000000000003e-266

                                                                                                    1. Initial program 61.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. Applied rewrites34.7%

                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                      2. Taylor expanded in l around -inf

                                                                                                        \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                      3. 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-*.f6440.6

                                                                                                          \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                                      4. Applied rewrites40.6%

                                                                                                        \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                                      if 3.3000000000000003e-266 < l

                                                                                                      1. Initial program 70.8%

                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      2. Add Preprocessing
                                                                                                      3. Taylor expanded in h around 0

                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. Applied rewrites44.3%

                                                                                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                        2. Taylor expanded in h around 0

                                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. *-commutativeN/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                          2. lower-*.f64N/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                          3. lower-sqrt.f64N/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                          4. lower-/.f64N/A

                                                                                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                          5. *-commutativeN/A

                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                          6. lower-*.f6446.0

                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                        4. Applied rewrites46.0%

                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                        5. Step-by-step derivation
                                                                                                          1. Applied rewrites54.4%

                                                                                                            \[\leadsto \frac{\frac{d}{\sqrt{h}}}{\color{blue}{\sqrt{\ell}}} \]
                                                                                                        6. Recombined 2 regimes into one program.
                                                                                                        7. Final simplification46.8%

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
                                                                                                        8. Add Preprocessing

                                                                                                        Alternative 16: 46.7% accurate, 9.6× speedup?

                                                                                                        \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\ \;\;\;\;\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                        D_m = (fabs.f64 D)
                                                                                                        M_m = (fabs.f64 M)
                                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                        (FPCore (d h l M_m D_m)
                                                                                                         :precision binary64
                                                                                                         (if (<= l 3.3e-266)
                                                                                                           (* (sqrt (/ 1.0 (* l h))) (- d))
                                                                                                           (/ d (* (sqrt l) (sqrt h)))))
                                                                                                        D_m = fabs(D);
                                                                                                        M_m = fabs(M);
                                                                                                        assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                                        double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                        	double tmp;
                                                                                                        	if (l <= 3.3e-266) {
                                                                                                        		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                                                        	} else {
                                                                                                        		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        D_m = abs(d)
                                                                                                        M_m = abs(m)
                                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                        real(8) function code(d, h, l, m_m, d_m)
                                                                                                            real(8), intent (in) :: d
                                                                                                            real(8), intent (in) :: h
                                                                                                            real(8), intent (in) :: l
                                                                                                            real(8), intent (in) :: m_m
                                                                                                            real(8), intent (in) :: d_m
                                                                                                            real(8) :: tmp
                                                                                                            if (l <= 3.3d-266) then
                                                                                                                tmp = sqrt((1.0d0 / (l * h))) * -d
                                                                                                            else
                                                                                                                tmp = d / (sqrt(l) * sqrt(h))
                                                                                                            end if
                                                                                                            code = tmp
                                                                                                        end function
                                                                                                        
                                                                                                        D_m = Math.abs(D);
                                                                                                        M_m = Math.abs(M);
                                                                                                        assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                                        public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                        	double tmp;
                                                                                                        	if (l <= 3.3e-266) {
                                                                                                        		tmp = Math.sqrt((1.0 / (l * h))) * -d;
                                                                                                        	} else {
                                                                                                        		tmp = d / (Math.sqrt(l) * Math.sqrt(h));
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        D_m = math.fabs(D)
                                                                                                        M_m = math.fabs(M)
                                                                                                        [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                                        def code(d, h, l, M_m, D_m):
                                                                                                        	tmp = 0
                                                                                                        	if l <= 3.3e-266:
                                                                                                        		tmp = math.sqrt((1.0 / (l * h))) * -d
                                                                                                        	else:
                                                                                                        		tmp = d / (math.sqrt(l) * math.sqrt(h))
                                                                                                        	return tmp
                                                                                                        
                                                                                                        D_m = abs(D)
                                                                                                        M_m = abs(M)
                                                                                                        d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                                        function code(d, h, l, M_m, D_m)
                                                                                                        	tmp = 0.0
                                                                                                        	if (l <= 3.3e-266)
                                                                                                        		tmp = Float64(sqrt(Float64(1.0 / Float64(l * h))) * Float64(-d));
                                                                                                        	else
                                                                                                        		tmp = Float64(d / Float64(sqrt(l) * sqrt(h)));
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        D_m = abs(D);
                                                                                                        M_m = abs(M);
                                                                                                        d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                                        function tmp_2 = code(d, h, l, M_m, D_m)
                                                                                                        	tmp = 0.0;
                                                                                                        	if (l <= 3.3e-266)
                                                                                                        		tmp = sqrt((1.0 / (l * h))) * -d;
                                                                                                        	else
                                                                                                        		tmp = d / (sqrt(l) * sqrt(h));
                                                                                                        	end
                                                                                                        	tmp_2 = tmp;
                                                                                                        end
                                                                                                        
                                                                                                        D_m = N[Abs[D], $MachinePrecision]
                                                                                                        M_m = N[Abs[M], $MachinePrecision]
                                                                                                        NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                        code[d_, h_, l_, M$95$m_, D$95$m_] := If[LessEqual[l, 3.3e-266], 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}
                                                                                                        D_m = \left|D\right|
                                                                                                        \\
                                                                                                        M_m = \left|M\right|
                                                                                                        \\
                                                                                                        [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                                        \\
                                                                                                        \begin{array}{l}
                                                                                                        \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\
                                                                                                        \;\;\;\;\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 < 3.3000000000000003e-266

                                                                                                          1. Initial program 61.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites34.7%

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                            2. Taylor expanded in l around -inf

                                                                                                              \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                            3. 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-*.f6440.6

                                                                                                                \[\leadsto \left(-d\right) \cdot \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \]
                                                                                                            4. Applied rewrites40.6%

                                                                                                              \[\leadsto \color{blue}{\left(-d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]

                                                                                                            if 3.3000000000000003e-266 < l

                                                                                                            1. Initial program 70.8%

                                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in h around 0

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. Applied rewrites44.3%

                                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                              2. Taylor expanded in h around 0

                                                                                                                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. *-commutativeN/A

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                2. lower-*.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                3. lower-sqrt.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                4. lower-/.f64N/A

                                                                                                                  \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                5. *-commutativeN/A

                                                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                6. lower-*.f6446.0

                                                                                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                              4. Applied rewrites46.0%

                                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                              5. Step-by-step derivation
                                                                                                                1. Applied rewrites46.3%

                                                                                                                  \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                2. Step-by-step derivation
                                                                                                                  1. Applied rewrites54.4%

                                                                                                                    \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                                                                                3. Recombined 2 regimes into one program.
                                                                                                                4. Final simplification46.8%

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.3 \cdot 10^{-266}:\\ \;\;\;\;\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 17: 26.4% accurate, 15.3× speedup?

                                                                                                                \[\begin{array}{l} D_m = \left|D\right| \\ M_m = \left|M\right| \\ [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\ \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                                                D_m = (fabs.f64 D)
                                                                                                                M_m = (fabs.f64 M)
                                                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                                (FPCore (d h l M_m D_m) :precision binary64 (/ d (sqrt (* l h))))
                                                                                                                D_m = fabs(D);
                                                                                                                M_m = fabs(M);
                                                                                                                assert(d < h && h < l && l < M_m && M_m < D_m);
                                                                                                                double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                                	return d / sqrt((l * h));
                                                                                                                }
                                                                                                                
                                                                                                                D_m = abs(d)
                                                                                                                M_m = abs(m)
                                                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                                real(8) function code(d, h, l, m_m, d_m)
                                                                                                                    real(8), intent (in) :: d
                                                                                                                    real(8), intent (in) :: h
                                                                                                                    real(8), intent (in) :: l
                                                                                                                    real(8), intent (in) :: m_m
                                                                                                                    real(8), intent (in) :: d_m
                                                                                                                    code = d / sqrt((l * h))
                                                                                                                end function
                                                                                                                
                                                                                                                D_m = Math.abs(D);
                                                                                                                M_m = Math.abs(M);
                                                                                                                assert d < h && h < l && l < M_m && M_m < D_m;
                                                                                                                public static double code(double d, double h, double l, double M_m, double D_m) {
                                                                                                                	return d / Math.sqrt((l * h));
                                                                                                                }
                                                                                                                
                                                                                                                D_m = math.fabs(D)
                                                                                                                M_m = math.fabs(M)
                                                                                                                [d, h, l, M_m, D_m] = sort([d, h, l, M_m, D_m])
                                                                                                                def code(d, h, l, M_m, D_m):
                                                                                                                	return d / math.sqrt((l * h))
                                                                                                                
                                                                                                                D_m = abs(D)
                                                                                                                M_m = abs(M)
                                                                                                                d, h, l, M_m, D_m = sort([d, h, l, M_m, D_m])
                                                                                                                function code(d, h, l, M_m, D_m)
                                                                                                                	return Float64(d / sqrt(Float64(l * h)))
                                                                                                                end
                                                                                                                
                                                                                                                D_m = abs(D);
                                                                                                                M_m = abs(M);
                                                                                                                d, h, l, M_m, D_m = num2cell(sort([d, h, l, M_m, D_m])){:}
                                                                                                                function tmp = code(d, h, l, M_m, D_m)
                                                                                                                	tmp = d / sqrt((l * h));
                                                                                                                end
                                                                                                                
                                                                                                                D_m = N[Abs[D], $MachinePrecision]
                                                                                                                M_m = N[Abs[M], $MachinePrecision]
                                                                                                                NOTE: d, h, l, M_m, and D_m should be sorted in increasing order before calling this function.
                                                                                                                code[d_, h_, l_, M$95$m_, D$95$m_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                D_m = \left|D\right|
                                                                                                                \\
                                                                                                                M_m = \left|M\right|
                                                                                                                \\
                                                                                                                [d, h, l, M_m, D_m] = \mathsf{sort}([d, h, l, M_m, D_m])\\
                                                                                                                \\
                                                                                                                \frac{d}{\sqrt{\ell \cdot h}}
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Initial program 65.5%

                                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in h around 0

                                                                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. Applied rewrites39.0%

                                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                                                                  2. Taylor expanded in h around 0

                                                                                                                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. *-commutativeN/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                    2. lower-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                    3. lower-sqrt.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                    4. lower-/.f64N/A

                                                                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                    5. *-commutativeN/A

                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                    6. lower-*.f6425.8

                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                  4. Applied rewrites25.8%

                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                  5. Step-by-step derivation
                                                                                                                    1. Applied rewrites25.5%

                                                                                                                      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                                                                    2. Add Preprocessing

                                                                                                                    Reproduce

                                                                                                                    ?
                                                                                                                    herbie shell --seed 2024241 
                                                                                                                    (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)))))