Henrywood and Agarwal, Equation (12)

Percentage Accurate: 67.0% → 85.0%
Time: 16.3s
Alternatives: 22
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 67.0% accurate, 1.0× speedup?

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

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

Alternative 1: 85.0% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\frac{0.5}{d} \cdot M\right) \cdot D\\
t_1 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{t\_0}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
t_2 := {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\\
t_3 := 1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\\
t_4 := {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot t\_2\\
t_5 := t\_3 \cdot t\_4\\
\mathbf{if}\;t\_5 \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\left(1 - \frac{\frac{M}{d} \cdot \left(\left(0.5 \cdot D\right) \cdot 0.5\right)}{{h}^{-1}} \cdot \frac{t\_0}{\ell}\right) \cdot t\_4\\

\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_5 \leq 10^{+249}:\\
\;\;\;\;\left({\left(\frac{\ell}{d}\right)}^{-0.5} \cdot t\_2\right) \cdot t\_3\\

\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)))) < -9.99999999999999965e-65

    1. Initial program 87.0%

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \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 rewrites94.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) \]

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\ell}{d}\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) \]
      9. metadata-evalN/A

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

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

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

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{0.5}{d} \cdot M\\
t_1 := {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\\
t_2 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(t\_0 \cdot D\right)}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
t_3 := 1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\\
t_4 := {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot t\_1\\
t_5 := t\_3 \cdot t\_4\\
\mathbf{if}\;t\_5 \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{D}{\ell} \cdot t\_0\right) \cdot \left(-h\right), \frac{M}{d} \cdot \left(\left(0.5 \cdot D\right) \cdot 0.5\right), 1\right) \cdot t\_4\\

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

\mathbf{elif}\;t\_5 \leq 10^{+249}:\\
\;\;\;\;\left({\left(\frac{\ell}{d}\right)}^{-0.5} \cdot t\_1\right) \cdot t\_3\\

\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)))) < -9.99999999999999965e-65

    1. Initial program 87.0%

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{-h}{\ell} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\color{blue}{\frac{-h}{\ell}} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right), \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      3. 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 \mathsf{fma}\left(\color{blue}{\frac{\left(-h\right) \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      4. 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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      6. lower-*.f6494.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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \frac{\left(\frac{0.5}{d} \cdot M\right) \cdot D}{\ell}}, \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]
      7. 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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      8. 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 \mathsf{fma}\left(\left(-h\right) \cdot \frac{\color{blue}{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}}{\ell}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot \frac{D}{\ell}\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      10. *-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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\frac{D}{\ell} \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      11. 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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\frac{D}{\ell} \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      12. lower-/.f6493.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 \mathsf{fma}\left(\left(-h\right) \cdot \left(\color{blue}{\frac{D}{\ell}} \cdot \left(\frac{0.5}{d} \cdot M\right)\right), \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]
    5. Applied rewrites93.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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \left(\frac{D}{\ell} \cdot \left(\frac{0.5}{d} \cdot M\right)\right)}, \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{\ell}{d}\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) \]
      9. metadata-evalN/A

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

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

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

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

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

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

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

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

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

Alternative 3: 84.7% accurate, 0.3× speedup?

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

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

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

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

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


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

    1. Initial program 87.0%

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{-h}{\ell} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\color{blue}{\frac{-h}{\ell}} \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right), \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      3. 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 \mathsf{fma}\left(\color{blue}{\frac{\left(-h\right) \cdot \left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      4. 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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      6. lower-*.f6494.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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \frac{\left(\frac{0.5}{d} \cdot M\right) \cdot D}{\ell}}, \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]
      7. 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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell}}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      8. 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 \mathsf{fma}\left(\left(-h\right) \cdot \frac{\color{blue}{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}}{\ell}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot \frac{D}{\ell}\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      10. *-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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\frac{D}{\ell} \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      11. 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 \mathsf{fma}\left(\left(-h\right) \cdot \color{blue}{\left(\frac{D}{\ell} \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)}, \left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}, 1\right) \]
      12. lower-/.f6493.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 \mathsf{fma}\left(\left(-h\right) \cdot \left(\color{blue}{\frac{D}{\ell}} \cdot \left(\frac{0.5}{d} \cdot M\right)\right), \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]
    5. Applied rewrites93.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 \mathsf{fma}\left(\color{blue}{\left(-h\right) \cdot \left(\frac{D}{\ell} \cdot \left(\frac{0.5}{d} \cdot M\right)\right)}, \left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}, 1\right) \]

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\frac{0.5}{d} \cdot M\right) \cdot D\\
t_1 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{t\_0}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
t_2 := {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\\
t_3 := \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 t\_2\right)\\
t_4 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\left(1 - \left(\left(\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right) \cdot h\right) \cdot 0.5\right) \cdot \frac{t\_0}{\ell}\right) \cdot \left(t\_4 \cdot t\_2\right)\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq 10^{+249}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t\_4 \cdot \mathsf{fma}\left(-0.125 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell}, 1\right)\right)\\

\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)))) < -9.99999999999999965e-65

    1. Initial program 87.0%

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\color{blue}{\left(\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right) \cdot \frac{M}{d}\right)} \cdot h\right)\right) \]
      7. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\left(\color{blue}{\left(\frac{1}{2} \cdot \left(D \cdot \frac{1}{2}\right)\right)} \cdot \frac{M}{d}\right) \cdot h\right)\right) \]
      8. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\color{blue}{\left(\frac{1}{2} \cdot \left(\left(D \cdot \frac{1}{2}\right) \cdot \frac{M}{d}\right)\right)} \cdot h\right)\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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\left(\left(D \cdot \frac{1}{2}\right) \cdot \frac{M}{d}\right) \cdot h\right)\right)}\right) \]
      10. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(\color{blue}{\left(D \cdot \frac{1}{2}\right)} \cdot \frac{M}{d}\right) \cdot h\right)\right)\right) \]
      11. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(D \cdot \left(\frac{1}{2} \cdot \frac{M}{d}\right)\right)} \cdot h\right)\right)\right) \]
      12. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(D \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{M}{d}}\right)\right) \cdot h\right)\right)\right) \]
      13. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(D \cdot \color{blue}{\frac{\frac{1}{2} \cdot M}{d}}\right) \cdot h\right)\right)\right) \]
      14. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(D \cdot \color{blue}{\left(\frac{\frac{1}{2}}{d} \cdot M\right)}\right) \cdot h\right)\right)\right) \]
      15. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(D \cdot \left(\color{blue}{\frac{\frac{1}{2}}{d}} \cdot M\right)\right) \cdot h\right)\right)\right) \]
      16. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\left(D \cdot \color{blue}{\left(\frac{\frac{1}{2}}{d} \cdot M\right)}\right) \cdot h\right)\right)\right) \]
      17. *-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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)} \cdot h\right)\right)\right) \]
      18. 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{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right)} \cdot h\right)\right)\right) \]
      19. 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 - \frac{\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D}{\ell} \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\left(\left(\frac{\frac{1}{2}}{d} \cdot M\right) \cdot D\right) \cdot h\right)\right)}\right) \]
    6. Applied rewrites91.2%

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

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

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

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

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

        \[\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{0.5}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(0.5 \cdot \left(\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right) \cdot h\right)\right)\right) \]
    8. Applied rewrites91.2%

      \[\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{0.5}{d} \cdot M\right) \cdot D}{\ell} \cdot \left(0.5 \cdot \left(\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right) \cdot h\right)\right)\right) \]

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \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)\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right) \cdot t\_1}{\sqrt{\frac{\ell}{d}}}\\

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

\mathbf{elif}\;t\_0 \leq 10^{+249}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left(-0.125 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell}, 1\right)\right)\\

\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)))) < -1e17

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e17 < (*.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 9.9999999999999992e248 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

    1. Initial program 20.8%

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

        \[\leadsto \left({\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \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)\\
t_1 := \sqrt{\frac{d}{\ell}}\\
t_2 := \sqrt{\frac{d}{h}}\\
t_3 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right) \cdot t\_1\right) \cdot t\_2\\

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

\mathbf{elif}\;t\_0 \leq 10^{+249}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \mathsf{fma}\left(-0.125 \cdot {\left(\frac{\frac{d}{D}}{M}\right)}^{-2}, \frac{h}{\ell}, 1\right)\right)\\

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


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

    1. Initial program 87.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \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)\\
t_1 := \sqrt{\frac{d}{\ell}}\\
t_2 := \sqrt{\frac{d}{h}}\\
t_3 := \frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right) \cdot t\_1\right) \cdot t\_2\\

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

\mathbf{elif}\;t\_0 \leq 10^{+249}:\\
\;\;\;\;\left(1 \cdot t\_1\right) \cdot t\_2\\

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


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

    1. Initial program 87.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999965e-65 < (*.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 9.9999999999999992e248 < (*.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 19.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(h \cdot -0.5, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right) \cdot \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)))) < 9.9999999999999992e248

    1. Initial program 99.2%

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

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

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

        \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
    5. Recombined 3 regimes into one program.
    6. 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 -1 \cdot 10^{-64}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{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| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\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 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right| \cdot \mathsf{fma}\left(-0.5 \cdot h, \frac{{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}^{2}}{\ell}, 1\right)}{\sqrt{\ell \cdot h}}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 8: 70.5% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \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)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := \mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+97}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;t\_1 \cdot 1\\ \mathbf{elif}\;t\_0 \leq 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (d h l M D)
     :precision binary64
     (let* ((t_0
             (*
              (- 1.0 (* (/ h l) (* (pow (/ (* D 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))))
            (t_2
             (* (fma (* (/ (* (/ D d) D) d) (/ (* (* M M) -0.125) l)) h 1.0) t_1)))
       (if (<= t_0 -5e+97)
         t_2
         (if (<= t_0 0.0)
           (* t_1 1.0)
           (if (<= t_0 1e+249) (* (* 1.0 (sqrt (/ d l))) (sqrt (/ d h))) t_2)))))
    double code(double d, double h, double l, double M, double D) {
    	double t_0 = (1.0 - ((h / l) * (pow(((D * 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 t_2 = fma(((((D / d) * D) / d) * (((M * M) * -0.125) / l)), h, 1.0) * t_1;
    	double tmp;
    	if (t_0 <= -5e+97) {
    		tmp = t_2;
    	} else if (t_0 <= 0.0) {
    		tmp = t_1 * 1.0;
    	} else if (t_0 <= 1e+249) {
    		tmp = (1.0 * sqrt((d / l))) * sqrt((d / h));
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(d, h, l, M, D)
    	t_0 = Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D * 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)))
    	t_2 = Float64(fma(Float64(Float64(Float64(Float64(D / d) * D) / d) * Float64(Float64(Float64(M * M) * -0.125) / l)), h, 1.0) * t_1)
    	tmp = 0.0
    	if (t_0 <= -5e+97)
    		tmp = t_2;
    	elseif (t_0 <= 0.0)
    		tmp = Float64(t_1 * 1.0);
    	elseif (t_0 <= 1e+249)
    		tmp = Float64(Float64(1.0 * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * 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]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * D), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+97], t$95$2, If[LessEqual[t$95$0, 0.0], N[(t$95$1 * 1.0), $MachinePrecision], If[LessEqual[t$95$0, 1e+249], N[(N[(1.0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \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)\\
    t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
    t_2 := \mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot t\_1\\
    \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+97}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_0 \leq 0:\\
    \;\;\;\;t\_1 \cdot 1\\
    
    \mathbf{elif}\;t\_0 \leq 10^{+249}:\\
    \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
    
    \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)))) < -4.99999999999999999e97 or 9.9999999999999992e248 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

      1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.99999999999999999e97 < (*.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 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
          16. frac-timesN/A

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

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

            \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
          19. sqrt-divN/A

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

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
          21. rem-sqrt-squareN/A

            \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
          22. lower-fabs.f64N/A

            \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
          23. lower-sqrt.f6466.0

            \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
        3. Applied rewrites66.0%

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

        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)))) < 9.9999999999999992e248

        1. Initial program 99.2%

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

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

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

            \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification75.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^{+97}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 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 0:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \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^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 9: 70.6% accurate, 0.3× speedup?

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

          1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2e-131 < (*.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 9.9999999999999992e248 < (*.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 19.0%

            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-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. clear-numN/A

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

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

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

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

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

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

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
              16. frac-timesN/A

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

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

                \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
              19. sqrt-divN/A

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

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
              21. rem-sqrt-squareN/A

                \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
              22. lower-fabs.f64N/A

                \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
              23. lower-sqrt.f6462.1

                \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
            3. Applied rewrites62.1%

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

            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)))) < 9.9999999999999992e248

            1. Initial program 99.2%

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

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

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

                \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
            5. Recombined 3 regimes into one program.
            6. Final simplification74.9%

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

            Alternative 10: 54.3% accurate, 0.3× speedup?

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

              1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

                if -2e-131 < (*.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 9.9999999999999992e248 < (*.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 19.0%

                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-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. clear-numN/A

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

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

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

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

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

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

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
                    16. frac-timesN/A

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

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

                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                    19. sqrt-divN/A

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

                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                    21. rem-sqrt-squareN/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                    22. lower-fabs.f64N/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                    23. lower-sqrt.f6462.1

                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                  3. Applied rewrites62.1%

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

                  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)))) < 9.9999999999999992e248

                  1. Initial program 99.2%

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

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

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

                      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                  5. Recombined 3 regimes into one program.
                  6. Final simplification57.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 -2 \cdot 10^{-131}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{\ell}{d}}} \cdot \left(-\sqrt{\frac{d}{h}}\right)\right) \cdot 1\\ \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}} \cdot 1\\ \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^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 11: 52.6% accurate, 0.3× speedup?

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

                    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                      5. Taylor expanded in h around -inf

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

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

                        if -2e-131 < (*.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 9.9999999999999992e248 < (*.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 19.0%

                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-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. clear-numN/A

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

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

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

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

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

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

                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
                            16. frac-timesN/A

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

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

                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                            19. sqrt-divN/A

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

                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                            21. rem-sqrt-squareN/A

                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                            22. lower-fabs.f64N/A

                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                            23. lower-sqrt.f6462.1

                              \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                          3. Applied rewrites62.1%

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

                          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)))) < 9.9999999999999992e248

                          1. Initial program 99.2%

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

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

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

                              \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                          5. Recombined 3 regimes into one program.
                          6. Final simplification54.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 -2 \cdot 10^{-131}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot 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}} \cdot 1\\ \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^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 12: 50.6% accurate, 0.3× speedup?

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

                            1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                              5. Taylor expanded in h around -inf

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

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

                                if -2e-131 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999977e-163 or 1.00000000000000006e136 < (*.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.5%

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

                                    \[\leadsto \left({\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. clear-numN/A

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

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

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

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

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

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

                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
                                    16. frac-timesN/A

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

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

                                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                                    19. sqrt-divN/A

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

                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                    21. rem-sqrt-squareN/A

                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                    22. lower-fabs.f64N/A

                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                    23. lower-sqrt.f6463.3

                                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                  3. Applied rewrites63.3%

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

                                  if 4.99999999999999977e-163 < (*.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.00000000000000006e136

                                  1. Initial program 99.4%

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot 1} \]
                                  5. Recombined 3 regimes into one program.
                                  6. Final simplification52.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 -2 \cdot 10^{-131}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot 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 5 \cdot 10^{-163}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \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^{+136}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                                  7. Add Preprocessing

                                  Alternative 13: 81.6% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                        \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\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)))) < 9.9999999999999992e248

                                    1. Initial program 99.2%

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

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

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

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

                                      if 9.9999999999999992e248 < (*.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 17.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 14: 80.4% accurate, 0.4× speedup?

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

                                      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. 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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\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)))) < 9.9999999999999992e248

                                      1. Initial program 99.2%

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

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

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

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

                                        if 9.9999999999999992e248 < (*.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 17.7%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Add Preprocessing
                                        3. Step-by-step derivation
                                          1. lift-pow.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. lift-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          3. metadata-evalN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          4. unpow1/2N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          5. lift-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          6. clear-numN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          7. sqrt-divN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. lower-sqrt.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. lower-/.f6417.7

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites17.7%

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        5. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                            \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                            \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                            \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                            \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                            \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. un-div-invN/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. lift-/.f64N/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          12. clear-numN/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          13. lift-/.f64N/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          14. lift-/.f64N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          15. associate-*l/N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          16. sqrt-divN/A

                                            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          17. pow1/2N/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          18. metadata-evalN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          19. pow-flipN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          20. metadata-evalN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          21. lower-/.f64N/A

                                            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        6. Applied rewrites14.3%

                                          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        7. Applied rewrites65.6%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                        8. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{-1}{2} \cdot {\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2}}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          2. *-commutativeN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2} \cdot \frac{-1}{2}}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          3. lift-pow.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2}} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          4. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\left(M \cdot \color{blue}{\left(D \cdot \frac{\frac{1}{2}}{d}\right)}\right)}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          6. associate-*r*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\left(M \cdot D\right) \cdot \frac{\frac{1}{2}}{d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          7. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\left(\color{blue}{\left(M \cdot D\right)} \cdot \frac{\frac{1}{2}}{d}\right)}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          8. pow-prod-downN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{\frac{1}{2}}{d}\right)}^{2}\right)} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          9. lift-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\color{blue}{\left(\frac{\frac{1}{2}}{d}\right)}}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          10. metadata-evalN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{\color{blue}{\frac{1}{2}}}{d}\right)}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          11. associate-/r*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\color{blue}{\left(\frac{1}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          12. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{1}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          13. unpow-prod-downN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(\left(M \cdot D\right) \cdot \frac{1}{2 \cdot d}\right)}^{2}} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          14. div-invN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          15. lift-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          16. unpow2N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          17. associate-*l*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          18. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                        9. Applied rewrites65.6%

                                          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right) \cdot \left(\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right) \cdot -0.5\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                      5. Recombined 3 regimes into one program.
                                      6. Final simplification82.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 0:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 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 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)\right) \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                      7. Add Preprocessing

                                      Alternative 15: 80.5% accurate, 0.4× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\frac{0.5}{d} \cdot M\right) \cdot D\\ t_1 := \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)\\ t_2 := \mathsf{fma}\left(\frac{\left(-0.5 \cdot t\_0\right) \cdot t\_0}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                      (FPCore (d h l M D)
                                       :precision binary64
                                       (let* ((t_0 (* (* (/ 0.5 d) M) D))
                                              (t_1
                                               (*
                                                (- 1.0 (* (/ h l) (* (pow (/ (* D 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
                                               (*
                                                (fma (/ (* (* -0.5 t_0) t_0) l) h 1.0)
                                                (/ (fabs d) (sqrt (* l h))))))
                                         (if (<= t_1 0.0)
                                           t_2
                                           (if (<= t_1 1e+249) (* (* 1.0 (sqrt (/ d l))) (sqrt (/ d h))) t_2))))
                                      double code(double d, double h, double l, double M, double D) {
                                      	double t_0 = ((0.5 / d) * M) * D;
                                      	double t_1 = (1.0 - ((h / l) * (pow(((D * 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 = fma((((-0.5 * t_0) * t_0) / l), h, 1.0) * (fabs(d) / sqrt((l * h)));
                                      	double tmp;
                                      	if (t_1 <= 0.0) {
                                      		tmp = t_2;
                                      	} else if (t_1 <= 1e+249) {
                                      		tmp = (1.0 * sqrt((d / l))) * sqrt((d / h));
                                      	} else {
                                      		tmp = t_2;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(d, h, l, M, D)
                                      	t_0 = Float64(Float64(Float64(0.5 / d) * M) * D)
                                      	t_1 = Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D * 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(fma(Float64(Float64(Float64(-0.5 * t_0) * t_0) / l), h, 1.0) * Float64(abs(d) / sqrt(Float64(l * h))))
                                      	tmp = 0.0
                                      	if (t_1 <= 0.0)
                                      		tmp = t_2;
                                      	elseif (t_1 <= 1e+249)
                                      		tmp = Float64(Float64(1.0 * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
                                      	else
                                      		tmp = t_2;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(0.5 / d), $MachinePrecision] * M), $MachinePrecision] * D), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * 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[(N[(N[(N[(-0.5 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] / l), $MachinePrecision] * h + 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$2, If[LessEqual[t$95$1, 1e+249], N[(N[(1.0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := \left(\frac{0.5}{d} \cdot M\right) \cdot D\\
                                      t_1 := \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)\\
                                      t_2 := \mathsf{fma}\left(\frac{\left(-0.5 \cdot t\_0\right) \cdot t\_0}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                      \mathbf{if}\;t\_1 \leq 0:\\
                                      \;\;\;\;t\_2\\
                                      
                                      \mathbf{elif}\;t\_1 \leq 10^{+249}:\\
                                      \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      
                                      \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 9.9999999999999992e248 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                        1. Initial program 53.5%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Add Preprocessing
                                        3. Step-by-step derivation
                                          1. lift-pow.f64N/A

                                            \[\leadsto \left({\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. clear-numN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          7. sqrt-divN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. lower-sqrt.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. lower-/.f6453.4

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites53.4%

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        5. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                            \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                            \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                            \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                            \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                            \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. un-div-invN/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. lift-/.f64N/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          12. clear-numN/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          13. lift-/.f64N/A

                                            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          14. lift-/.f64N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          15. associate-*l/N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          16. sqrt-divN/A

                                            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          17. pow1/2N/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          18. metadata-evalN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          19. pow-flipN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          20. metadata-evalN/A

                                            \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          21. lower-/.f64N/A

                                            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        6. Applied rewrites22.6%

                                          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        7. Applied rewrites75.9%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                        8. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{-1}{2} \cdot {\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2}}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          2. *-commutativeN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2} \cdot \frac{-1}{2}}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          3. lift-pow.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}^{2}} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          4. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(M \cdot \left(D \cdot \frac{\frac{1}{2}}{d}\right)\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\left(M \cdot \color{blue}{\left(D \cdot \frac{\frac{1}{2}}{d}\right)}\right)}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          6. associate-*r*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\left(M \cdot D\right) \cdot \frac{\frac{1}{2}}{d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          7. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\left(\color{blue}{\left(M \cdot D\right)} \cdot \frac{\frac{1}{2}}{d}\right)}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          8. pow-prod-downN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{\frac{1}{2}}{d}\right)}^{2}\right)} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          9. lift-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\color{blue}{\left(\frac{\frac{1}{2}}{d}\right)}}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          10. metadata-evalN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{\color{blue}{\frac{1}{2}}}{d}\right)}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          11. associate-/r*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\color{blue}{\left(\frac{1}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          12. lift-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\left({\left(M \cdot D\right)}^{2} \cdot {\left(\frac{1}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          13. unpow-prod-downN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{\left(\left(M \cdot D\right) \cdot \frac{1}{2 \cdot d}\right)}^{2}} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          14. div-invN/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          15. lift-/.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          16. unpow2N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{-1}{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          17. associate-*l*N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          18. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{-1}{2}\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                        9. Applied rewrites76.9%

                                          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right) \cdot \left(\left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right) \cdot -0.5\right)}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\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)))) < 9.9999999999999992e248

                                        1. Initial program 99.2%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in d around inf

                                          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites98.8%

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                          2. Applied rewrites98.8%

                                            \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]
                                        5. Recombined 2 regimes into one program.
                                        6. Final simplification83.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(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)\right) \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}{\ell}, h, 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 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(-0.5 \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)\right) \cdot \left(\left(\frac{0.5}{d} \cdot M\right) \cdot D\right)}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                        7. Add Preprocessing

                                        Alternative 16: 75.1% accurate, 0.4× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \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)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;t\_1 \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\ \mathbf{elif}\;t\_0 \leq 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot t\_1\\ \end{array} \end{array} \]
                                        (FPCore (d h l M D)
                                         :precision binary64
                                         (let* ((t_0
                                                 (*
                                                  (- 1.0 (* (/ h l) (* (pow (/ (* D 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 0.0)
                                             (*
                                              t_1
                                              (fma (* (* 0.25 (* (/ M d) D)) (* (/ 0.5 d) M)) (* (/ (- h) l) D) 1.0))
                                             (if (<= t_0 1e+249)
                                               (* (* 1.0 (sqrt (/ d l))) (sqrt (/ d h)))
                                               (* (fma (* (/ (* (/ D d) D) d) (/ (* (* M M) -0.125) l)) h 1.0) t_1)))))
                                        double code(double d, double h, double l, double M, double D) {
                                        	double t_0 = (1.0 - ((h / l) * (pow(((D * 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 <= 0.0) {
                                        		tmp = t_1 * fma(((0.25 * ((M / d) * D)) * ((0.5 / d) * M)), ((-h / l) * D), 1.0);
                                        	} else if (t_0 <= 1e+249) {
                                        		tmp = (1.0 * sqrt((d / l))) * sqrt((d / h));
                                        	} else {
                                        		tmp = fma(((((D / d) * D) / d) * (((M * M) * -0.125) / l)), h, 1.0) * t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(d, h, l, M, D)
                                        	t_0 = Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D * 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 <= 0.0)
                                        		tmp = Float64(t_1 * fma(Float64(Float64(0.25 * Float64(Float64(M / d) * D)) * Float64(Float64(0.5 / d) * M)), Float64(Float64(Float64(-h) / l) * D), 1.0));
                                        	elseif (t_0 <= 1e+249)
                                        		tmp = Float64(Float64(1.0 * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
                                        	else
                                        		tmp = Float64(fma(Float64(Float64(Float64(Float64(D / d) * D) / d) * Float64(Float64(Float64(M * M) * -0.125) / l)), h, 1.0) * t_1);
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * 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, 0.0], N[(t$95$1 * N[(N[(N[(0.25 * N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 / d), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] * N[(N[((-h) / l), $MachinePrecision] * D), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+249], N[(N[(1.0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(D / d), $MachinePrecision] * D), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * h + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := \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)\\
                                        t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                        \mathbf{if}\;t\_0 \leq 0:\\
                                        \;\;\;\;t\_1 \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 10^{+249}:\\
                                        \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot 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 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. Step-by-step derivation
                                            1. lift--.f64N/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                                            2. sub-negN/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                                            3. +-commutativeN/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                                            4. lift-*.f64N/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                            5. distribute-lft-neg-inN/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \frac{h}{\ell}} + 1\right) \]
                                            6. lift-/.f64N/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{h}{\ell}} + 1\right) \]
                                            7. clear-numN/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}} + 1\right) \]
                                            8. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\frac{\ell}{h}}} + 1\right) \]
                                            9. associate-/r/N/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot h} + 1\right) \]
                                            10. lower-fma.f64N/A

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell}, h, 1\right)} \]
                                          4. Applied rewrites78.1%

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(\frac{\frac{d}{D}}{M} \cdot 2\right)}^{-2}}{\ell}, h, 1\right)} \]
                                          5. Applied rewrites56.2%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{M}{d} \cdot \left(0.25 \cdot D\right), \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}, \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} \]
                                          6. Step-by-step derivation
                                            1. lift-fma.f64N/A

                                              \[\leadsto \color{blue}{\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right) + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                            2. lift-*.f64N/A

                                              \[\leadsto \left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \color{blue}{\left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                            3. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                            4. distribute-lft1-inN/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                            5. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                          7. Applied rewrites79.6%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{M}{d} \cdot D\right) \cdot 0.25\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right) \cdot \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)))) < 9.9999999999999992e248

                                          1. Initial program 99.2%

                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in d around inf

                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites98.8%

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                            2. Applied rewrites98.8%

                                              \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}} \]

                                            if 9.9999999999999992e248 < (*.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 17.7%

                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            2. Add Preprocessing
                                            3. Step-by-step derivation
                                              1. lift-pow.f64N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              2. lift-/.f64N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              3. metadata-evalN/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              4. unpow1/2N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              5. lift-/.f64N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              6. clear-numN/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              7. sqrt-divN/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              10. lower-sqrt.f64N/A

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              11. lower-/.f6417.7

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites17.7%

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            5. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                                \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                                \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                                \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                                \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                                \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                                \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              10. un-div-invN/A

                                                \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              11. lift-/.f64N/A

                                                \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              12. clear-numN/A

                                                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              13. lift-/.f64N/A

                                                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              14. lift-/.f64N/A

                                                \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              15. associate-*l/N/A

                                                \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              16. sqrt-divN/A

                                                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              17. pow1/2N/A

                                                \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              18. metadata-evalN/A

                                                \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              19. pow-flipN/A

                                                \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              20. metadata-evalN/A

                                                \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              21. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            6. Applied rewrites14.3%

                                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            7. Applied rewrites65.6%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                            8. Taylor expanded in d around 0

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2} \cdot \ell}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                            9. Step-by-step derivation
                                              1. associate-*r/N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              2. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \color{blue}{\left({M}^{2} \cdot {D}^{2}\right)}}{{d}^{2} \cdot \ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              3. associate-*r*N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2} \cdot \ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              4. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot {D}^{2}}{\color{blue}{\ell \cdot {d}^{2}}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              5. times-fracN/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{-1}{8} \cdot {M}^{2}}{\ell} \cdot \frac{{D}^{2}}{{d}^{2}}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              6. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{-1}{8} \cdot {M}^{2}}{\ell} \cdot \frac{{D}^{2}}{{d}^{2}}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              7. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{-1}{8} \cdot {M}^{2}}{\ell}} \cdot \frac{{D}^{2}}{{d}^{2}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              8. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{-1}{8} \cdot {M}^{2}}}{\ell} \cdot \frac{{D}^{2}}{{d}^{2}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              9. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot \frac{{D}^{2}}{{d}^{2}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              10. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot \frac{{D}^{2}}{{d}^{2}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              11. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{{D}^{2}}{\color{blue}{d \cdot d}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              12. associate-/r*N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \color{blue}{\frac{\frac{{D}^{2}}{d}}{d}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              13. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \color{blue}{\frac{\frac{{D}^{2}}{d}}{d}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              14. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{\frac{\color{blue}{D \cdot D}}{d}}{d}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              15. associate-/l*N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{\color{blue}{D \cdot \frac{D}{d}}}{d}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              16. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{\frac{-1}{8} \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{\color{blue}{D \cdot \frac{D}{d}}}{d}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                              17. lower-/.f6458.5

                                                \[\leadsto \mathsf{fma}\left(\frac{-0.125 \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{D \cdot \color{blue}{\frac{D}{d}}}{d}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                            10. Applied rewrites58.5%

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-0.125 \cdot \left(M \cdot M\right)}{\ell} \cdot \frac{D \cdot \frac{D}{d}}{d}}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                          5. Recombined 3 regimes into one program.
                                          6. Final simplification79.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{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 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 10^{+249}:\\ \;\;\;\;\left(1 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{D}{d} \cdot D}{d} \cdot \frac{\left(M \cdot M\right) \cdot -0.125}{\ell}, h, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                          7. Add Preprocessing

                                          Alternative 17: 46.0% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \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^{-131}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \end{array} \]
                                          (FPCore (d h l M D)
                                           :precision binary64
                                           (if (<=
                                                (*
                                                 (- 1.0 (* (/ h l) (* (pow (/ (* D 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-131)
                                             (* (- (sqrt (/ 1.0 (* l h)))) d)
                                             (* (/ (fabs d) (sqrt (* l h))) 1.0)))
                                          double code(double d, double h, double l, double M, double D) {
                                          	double tmp;
                                          	if (((1.0 - ((h / l) * (pow(((D * 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-131) {
                                          		tmp = -sqrt((1.0 / (l * h))) * d;
                                          	} else {
                                          		tmp = (fabs(d) / sqrt((l * h))) * 1.0;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          real(8) function code(d, h, l, m, d_1)
                                              real(8), intent (in) :: d
                                              real(8), intent (in) :: h
                                              real(8), intent (in) :: l
                                              real(8), intent (in) :: m
                                              real(8), intent (in) :: d_1
                                              real(8) :: tmp
                                              if (((1.0d0 - ((h / l) * ((((d_1 * m) / (2.0d0 * d)) ** 2.0d0) * (1.0d0 / 2.0d0)))) * (((d / l) ** (1.0d0 / 2.0d0)) * ((d / h) ** (1.0d0 / 2.0d0)))) <= (-2d-131)) then
                                                  tmp = -sqrt((1.0d0 / (l * h))) * d
                                              else
                                                  tmp = (abs(d) / sqrt((l * h))) * 1.0d0
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double d, double h, double l, double M, double D) {
                                          	double tmp;
                                          	if (((1.0 - ((h / l) * (Math.pow(((D * 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-131) {
                                          		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                                          	} else {
                                          		tmp = (Math.abs(d) / Math.sqrt((l * h))) * 1.0;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(d, h, l, M, D):
                                          	tmp = 0
                                          	if ((1.0 - ((h / l) * (math.pow(((D * 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-131:
                                          		tmp = -math.sqrt((1.0 / (l * h))) * d
                                          	else:
                                          		tmp = (math.fabs(d) / math.sqrt((l * h))) * 1.0
                                          	return tmp
                                          
                                          function code(d, h, l, M, D)
                                          	tmp = 0.0
                                          	if (Float64(Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D * 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-131)
                                          		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                                          	else
                                          		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * 1.0);
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(d, h, l, M, D)
                                          	tmp = 0.0;
                                          	if (((1.0 - ((h / l) * ((((D * M) / (2.0 * d)) ^ 2.0) * (1.0 / 2.0)))) * (((d / l) ^ (1.0 / 2.0)) * ((d / h) ^ (1.0 / 2.0)))) <= -2e-131)
                                          		tmp = -sqrt((1.0 / (l * h))) * d;
                                          	else
                                          		tmp = (abs(d) / sqrt((l * h))) * 1.0;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * 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-131], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \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^{-131}:\\
                                          \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 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)))) < -2e-131

                                            1. Initial program 87.2%

                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in d around inf

                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                            4. Step-by-step derivation
                                              1. Applied rewrites0.9%

                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                              2. Taylor expanded in d around -inf

                                                \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                              3. Step-by-step derivation
                                                1. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                2. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                3. mul-1-negN/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                4. *-commutativeN/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \]
                                                5. unpow2N/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \]
                                                6. rem-square-sqrtN/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \]
                                                7. mul-1-negN/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \]
                                                8. remove-double-negN/A

                                                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                                                9. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                10. lower-sqrt.f64N/A

                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                11. lower-/.f64N/A

                                                  \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                12. *-commutativeN/A

                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                13. lower-*.f645.9

                                                  \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                              4. Applied rewrites5.9%

                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                              5. Taylor expanded in h around -inf

                                                \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites8.6%

                                                  \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                                                if -2e-131 < (*.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 56.7%

                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                2. Add Preprocessing
                                                3. Step-by-step derivation
                                                  1. lift-pow.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  3. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. unpow1/2N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. clear-numN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. sqrt-divN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  10. lower-sqrt.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  11. lower-/.f6456.7

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites56.7%

                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \color{blue}{1} \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites61.5%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\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 \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot 1 \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                    4. lift-pow.f64N/A

                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                    5. unpow1/2N/A

                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                    6. lift-/.f64N/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                    7. metadata-evalN/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \frac{\color{blue}{\sqrt{1}}}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                    8. lift-sqrt.f64N/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                    9. sqrt-divN/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{1}{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                    10. lift-/.f64N/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{1}{\color{blue}{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                    11. clear-numN/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                    12. lift-/.f64N/A

                                                      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                    13. sqrt-unprodN/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot 1 \]
                                                    14. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot 1 \]
                                                    15. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
                                                    16. frac-timesN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot 1 \]
                                                    17. *-commutativeN/A

                                                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                                                    18. lift-*.f64N/A

                                                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                                                    19. sqrt-divN/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                    20. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                    21. rem-sqrt-squareN/A

                                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                                    22. lower-fabs.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                                    23. lower-sqrt.f6468.6

                                                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                  3. Applied rewrites68.6%

                                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                7. Recombined 2 regimes into one program.
                                                8. Final simplification47.5%

                                                  \[\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^{-131}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                                                9. Add Preprocessing

                                                Alternative 18: 79.6% accurate, 1.4× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)\\ \mathbf{if}\;d \leq -2.36 \cdot 10^{-113}:\\ \;\;\;\;\left(\left(t\_0 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{-d}\right) \cdot {\left(-h\right)}^{-0.5}\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot t\_0}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                (FPCore (d h l M D)
                                                 :precision binary64
                                                 (let* ((t_0 (fma (/ (* (pow (* (* (/ 0.5 d) D) M) 2.0) -0.5) l) h 1.0)))
                                                   (if (<= d -2.36e-113)
                                                     (* (* (* t_0 (sqrt (/ d l))) (sqrt (- d))) (pow (- h) -0.5))
                                                     (if (<= d 4.2e-138)
                                                       (*
                                                        (/ (fabs d) (sqrt (* l h)))
                                                        (fma (* (* 0.25 (* (/ M d) D)) (* (/ 0.5 d) M)) (* (/ (- h) l) D) 1.0))
                                                       (/ (* (/ (fabs d) (sqrt l)) t_0) (sqrt h))))))
                                                double code(double d, double h, double l, double M, double D) {
                                                	double t_0 = fma(((pow((((0.5 / d) * D) * M), 2.0) * -0.5) / l), h, 1.0);
                                                	double tmp;
                                                	if (d <= -2.36e-113) {
                                                		tmp = ((t_0 * sqrt((d / l))) * sqrt(-d)) * pow(-h, -0.5);
                                                	} else if (d <= 4.2e-138) {
                                                		tmp = (fabs(d) / sqrt((l * h))) * fma(((0.25 * ((M / d) * D)) * ((0.5 / d) * M)), ((-h / l) * D), 1.0);
                                                	} else {
                                                		tmp = ((fabs(d) / sqrt(l)) * t_0) / sqrt(h);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(d, h, l, M, D)
                                                	t_0 = fma(Float64(Float64((Float64(Float64(Float64(0.5 / d) * D) * M) ^ 2.0) * -0.5) / l), h, 1.0)
                                                	tmp = 0.0
                                                	if (d <= -2.36e-113)
                                                		tmp = Float64(Float64(Float64(t_0 * sqrt(Float64(d / l))) * sqrt(Float64(-d))) * (Float64(-h) ^ -0.5));
                                                	elseif (d <= 4.2e-138)
                                                		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * fma(Float64(Float64(0.25 * Float64(Float64(M / d) * D)) * Float64(Float64(0.5 / d) * M)), Float64(Float64(Float64(-h) / l) * D), 1.0));
                                                	else
                                                		tmp = Float64(Float64(Float64(abs(d) / sqrt(l)) * t_0) / sqrt(h));
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(N[Power[N[(N[(N[(0.5 / d), $MachinePrecision] * D), $MachinePrecision] * M), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * h + 1.0), $MachinePrecision]}, If[LessEqual[d, -2.36e-113], N[(N[(N[(t$95$0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[(-d)], $MachinePrecision]), $MachinePrecision] * N[Power[(-h), -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e-138], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(0.25 * N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 / d), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] * N[(N[((-h) / l), $MachinePrecision] * D), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)\\
                                                \mathbf{if}\;d \leq -2.36 \cdot 10^{-113}:\\
                                                \;\;\;\;\left(\left(t\_0 \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{-d}\right) \cdot {\left(-h\right)}^{-0.5}\\
                                                
                                                \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\
                                                \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot t\_0}{\sqrt{h}}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if d < -2.36e-113

                                                  1. Initial program 78.7%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift-pow.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. unpow1/2N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    5. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    6. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-/.f6478.7

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. Applied rewrites78.7%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                                      \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                                      \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. un-div-invN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. clear-numN/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. associate-*l/N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. sqrt-divN/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    17. pow1/2N/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    18. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    19. pow-flipN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    20. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    21. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. Applied rewrites0.0%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. Applied rewrites89.1%

                                                    \[\leadsto \color{blue}{{\left(-h\right)}^{-0.5} \cdot \left(\sqrt{-d} \cdot \left(\mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]

                                                  if -2.36e-113 < d < 4.19999999999999972e-138

                                                  1. Initial program 41.9%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift--.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                                                    2. sub-negN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                                                    3. +-commutativeN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                                                    4. lift-*.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                    5. distribute-lft-neg-inN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \frac{h}{\ell}} + 1\right) \]
                                                    6. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{h}{\ell}} + 1\right) \]
                                                    7. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}} + 1\right) \]
                                                    8. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\frac{\ell}{h}}} + 1\right) \]
                                                    9. associate-/r/N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot h} + 1\right) \]
                                                    10. lower-fma.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell}, h, 1\right)} \]
                                                  4. Applied rewrites42.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}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(\frac{\frac{d}{D}}{M} \cdot 2\right)}^{-2}}{\ell}, h, 1\right)} \]
                                                  5. Applied rewrites36.1%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{M}{d} \cdot \left(0.25 \cdot D\right), \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}, \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} \]
                                                  6. Step-by-step derivation
                                                    1. lift-fma.f64N/A

                                                      \[\leadsto \color{blue}{\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right) + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                    2. lift-*.f64N/A

                                                      \[\leadsto \left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \color{blue}{\left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                                    3. associate-*r*N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                                    4. distribute-lft1-inN/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                  7. Applied rewrites68.6%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{M}{d} \cdot D\right) \cdot 0.25\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

                                                  if 4.19999999999999972e-138 < d

                                                  1. Initial program 75.0%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift-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. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-/.f6474.9

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites74.9%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                                      \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                                      \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. un-div-invN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. clear-numN/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. associate-*l/N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. sqrt-divN/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    17. pow1/2N/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    18. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    19. pow-flipN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    20. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    21. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. Applied rewrites66.3%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. Applied rewrites90.5%

                                                    \[\leadsto \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right)}{\sqrt{h}}} \]
                                                3. Recombined 3 regimes into one program.
                                                4. Final simplification84.1%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2.36 \cdot 10^{-113}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{-d}\right) \cdot {\left(-h\right)}^{-0.5}\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)}{\sqrt{h}}\\ \end{array} \]
                                                5. Add Preprocessing

                                                Alternative 19: 80.2% accurate, 1.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq -6.5 \cdot 10^{-157}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{-\ell}}}{\sqrt{-h}} \cdot \left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right)\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                (FPCore (d h l M D)
                                                 :precision binary64
                                                 (if (<= d -6.5e-157)
                                                   (*
                                                    (/ (/ (fabs d) (sqrt (- l))) (sqrt (- h)))
                                                    (- 1.0 (* (/ h l) (* (pow (/ (* D M) (* 2.0 d)) 2.0) (/ 1.0 2.0)))))
                                                   (if (<= d 4.2e-138)
                                                     (*
                                                      (/ (fabs d) (sqrt (* l h)))
                                                      (fma (* (* 0.25 (* (/ M d) D)) (* (/ 0.5 d) M)) (* (/ (- h) l) D) 1.0))
                                                     (/
                                                      (*
                                                       (/ (fabs d) (sqrt l))
                                                       (fma (/ (* (pow (* (* (/ 0.5 d) D) M) 2.0) -0.5) l) h 1.0))
                                                      (sqrt h)))))
                                                double code(double d, double h, double l, double M, double D) {
                                                	double tmp;
                                                	if (d <= -6.5e-157) {
                                                		tmp = ((fabs(d) / sqrt(-l)) / sqrt(-h)) * (1.0 - ((h / l) * (pow(((D * M) / (2.0 * d)), 2.0) * (1.0 / 2.0))));
                                                	} else if (d <= 4.2e-138) {
                                                		tmp = (fabs(d) / sqrt((l * h))) * fma(((0.25 * ((M / d) * D)) * ((0.5 / d) * M)), ((-h / l) * D), 1.0);
                                                	} else {
                                                		tmp = ((fabs(d) / sqrt(l)) * fma(((pow((((0.5 / d) * D) * M), 2.0) * -0.5) / l), h, 1.0)) / sqrt(h);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(d, h, l, M, D)
                                                	tmp = 0.0
                                                	if (d <= -6.5e-157)
                                                		tmp = Float64(Float64(Float64(abs(d) / sqrt(Float64(-l))) / sqrt(Float64(-h))) * Float64(1.0 - Float64(Float64(h / l) * Float64((Float64(Float64(D * M) / Float64(2.0 * d)) ^ 2.0) * Float64(1.0 / 2.0)))));
                                                	elseif (d <= 4.2e-138)
                                                		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * fma(Float64(Float64(0.25 * Float64(Float64(M / d) * D)) * Float64(Float64(0.5 / d) * M)), Float64(Float64(Float64(-h) / l) * D), 1.0));
                                                	else
                                                		tmp = Float64(Float64(Float64(abs(d) / sqrt(l)) * fma(Float64(Float64((Float64(Float64(Float64(0.5 / d) * D) * M) ^ 2.0) * -0.5) / l), h, 1.0)) / sqrt(h));
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[d_, h_, l_, M_, D_] := If[LessEqual[d, -6.5e-157], N[(N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e-138], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(0.25 * N[(N[(M / d), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 / d), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] * N[(N[((-h) / l), $MachinePrecision] * D), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(N[(N[(0.5 / d), $MachinePrecision] * D), $MachinePrecision] * M), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision] * h + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;d \leq -6.5 \cdot 10^{-157}:\\
                                                \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{-\ell}}}{\sqrt{-h}} \cdot \left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right)\\
                                                
                                                \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\
                                                \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)}{\sqrt{h}}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if d < -6.5000000000000002e-157

                                                  1. Initial program 80.2%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift-pow.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. unpow1/2N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    5. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    6. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-/.f6480.2

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites80.2%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                                      \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                                      \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. un-div-invN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. clear-numN/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. frac-2negN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. lift-neg.f64N/A

                                                      \[\leadsto \sqrt{\frac{\mathsf{neg}\left(d\right)}{\color{blue}{-h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    17. associate-*l/N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{d}{\ell}}{-h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    18. sqrt-divN/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{d}{\ell}}}{\sqrt{-h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    19. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{d}{\ell}}}{\sqrt{-h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. Applied rewrites73.4%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{\left(-d\right) \cdot \frac{d}{\ell}}}{\sqrt{-h}}} \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. Step-by-step derivation
                                                    1. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\left(-d\right) \cdot \frac{d}{\ell}}}}{\sqrt{-h}} \cdot \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 \frac{\sqrt{\color{blue}{\left(-d\right) \cdot \frac{d}{\ell}}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. lift-/.f64N/A

                                                      \[\leadsto \frac{\sqrt{\left(-d\right) \cdot \color{blue}{\frac{d}{\ell}}}}{\sqrt{-h}} \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. frac-2negN/A

                                                      \[\leadsto \frac{\sqrt{\left(-d\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}}{\sqrt{-h}} \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-neg.f64N/A

                                                      \[\leadsto \frac{\sqrt{\left(-d\right) \cdot \frac{\color{blue}{-d}}{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \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. associate-*r/N/A

                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{\left(-d\right) \cdot \left(-d\right)}{\mathsf{neg}\left(\ell\right)}}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \frac{\color{blue}{\frac{\sqrt{\left(-d\right) \cdot \left(-d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}}{\sqrt{-h}} \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. lift-neg.f64N/A

                                                      \[\leadsto \frac{\frac{\sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \left(-d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \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. lift-neg.f64N/A

                                                      \[\leadsto \frac{\frac{\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(d\right)\right)}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. sqr-negN/A

                                                      \[\leadsto \frac{\frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. rem-sqrt-squareN/A

                                                      \[\leadsto \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. lift-fabs.f64N/A

                                                      \[\leadsto \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{\mathsf{neg}\left(\ell\right)}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. lower-/.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{\mathsf{neg}\left(\ell\right)}}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. lower-sqrt.f64N/A

                                                      \[\leadsto \frac{\frac{\left|d\right|}{\color{blue}{\sqrt{\mathsf{neg}\left(\ell\right)}}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. lower-neg.f6487.6

                                                      \[\leadsto \frac{\frac{\left|d\right|}{\sqrt{\color{blue}{-\ell}}}}{\sqrt{-h}} \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. Applied rewrites87.6%

                                                    \[\leadsto \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{-\ell}}}}{\sqrt{-h}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]

                                                  if -6.5000000000000002e-157 < d < 4.19999999999999972e-138

                                                  1. Initial program 35.4%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift--.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)} \]
                                                    2. sub-negN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right)} \]
                                                    3. +-commutativeN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
                                                    4. lift-*.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right)\right) + 1\right) \]
                                                    5. distribute-lft-neg-inN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \frac{h}{\ell}} + 1\right) \]
                                                    6. lift-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{h}{\ell}} + 1\right) \]
                                                    7. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}} + 1\right) \]
                                                    8. 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(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\frac{\ell}{h}}} + 1\right) \]
                                                    9. associate-/r/N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(\color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell} \cdot h} + 1\right) \]
                                                    10. lower-fma.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\mathsf{neg}\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}{\ell}, h, 1\right)} \]
                                                  4. Applied rewrites35.6%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{-0.5 \cdot {\left(\frac{\frac{d}{D}}{M} \cdot 2\right)}^{-2}}{\ell}, h, 1\right)} \]
                                                  5. Applied rewrites30.6%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{M}{d} \cdot \left(0.25 \cdot D\right), \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{0.5}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}, \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} \]
                                                  6. Step-by-step derivation
                                                    1. lift-fma.f64N/A

                                                      \[\leadsto \color{blue}{\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right) + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                    2. lift-*.f64N/A

                                                      \[\leadsto \left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \color{blue}{\left(\left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\right)} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                                    3. associate-*r*N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right)\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} + \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
                                                    4. distribute-lft1-inN/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{M}{d} \cdot \left(\frac{1}{4} \cdot D\right)\right) \cdot \left(\left(\frac{-h}{\ell} \cdot D\right) \cdot \left(\frac{\frac{1}{2}}{d} \cdot M\right)\right) + 1\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]
                                                  7. Applied rewrites65.2%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{M}{d} \cdot D\right) \cdot 0.25\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

                                                  if 4.19999999999999972e-138 < d

                                                  1. Initial program 75.0%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift-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. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-/.f6474.9

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites74.9%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. Step-by-step derivation
                                                    1. lift-*.f64N/A

                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot \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 \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. un-div-invN/A

                                                      \[\leadsto \color{blue}{\frac{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}{\sqrt{\frac{\ell}{d}}}} \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. lift-/.f64N/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}}{\sqrt{\frac{\ell}{d}}} \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. metadata-evalN/A

                                                      \[\leadsto \frac{{\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-pow.f64N/A

                                                      \[\leadsto \frac{\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}}}{\sqrt{\frac{\ell}{d}}} \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. unpow1/2N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{d}{h}}}}{\sqrt{\frac{\ell}{d}}} \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. lift-sqrt.f64N/A

                                                      \[\leadsto \frac{\sqrt{\frac{d}{h}}}{\color{blue}{\sqrt{\frac{\ell}{d}}}} \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. sqrt-undivN/A

                                                      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. un-div-invN/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{1}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{1}{\color{blue}{\frac{\ell}{d}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    12. clear-numN/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    13. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    14. lift-/.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    15. associate-*l/N/A

                                                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot \frac{d}{\ell}}{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    16. sqrt-divN/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    17. pow1/2N/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{{h}^{\frac{1}{2}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    18. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{{h}^{\color{blue}{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    19. pow-flipN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\color{blue}{\frac{1}{{h}^{\frac{-1}{2}}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    20. metadata-evalN/A

                                                      \[\leadsto \frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\color{blue}{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    21. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\frac{1}{{h}^{\left(\frac{-1}{2}\right)}}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. Applied rewrites66.3%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{d \cdot \frac{d}{\ell}}}{\sqrt{h}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. Applied rewrites90.5%

                                                    \[\leadsto \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}}{\ell}, h, 1\right)}{\sqrt{h}}} \]
                                                3. Recombined 3 regimes into one program.
                                                4. Final simplification83.2%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -6.5 \cdot 10^{-157}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{-\ell}}}{\sqrt{-h}} \cdot \left(1 - \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)\right)\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\left(0.25 \cdot \left(\frac{M}{d} \cdot D\right)\right) \cdot \left(\frac{0.5}{d} \cdot M\right), \frac{-h}{\ell} \cdot D, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{{\left(\left(\frac{0.5}{d} \cdot D\right) \cdot M\right)}^{2} \cdot -0.5}{\ell}, h, 1\right)}{\sqrt{h}}\\ \end{array} \]
                                                5. Add Preprocessing

                                                Alternative 20: 46.2% accurate, 9.6× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 5 \cdot 10^{-137}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
                                                (FPCore (d h l M D)
                                                 :precision binary64
                                                 (if (<= d 5e-137)
                                                   (* (/ (fabs d) (sqrt (* l h))) 1.0)
                                                   (/ d (* (sqrt h) (sqrt l)))))
                                                double code(double d, double h, double l, double M, double D) {
                                                	double tmp;
                                                	if (d <= 5e-137) {
                                                		tmp = (fabs(d) / sqrt((l * h))) * 1.0;
                                                	} else {
                                                		tmp = d / (sqrt(h) * sqrt(l));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                real(8) function code(d, h, l, m, d_1)
                                                    real(8), intent (in) :: d
                                                    real(8), intent (in) :: h
                                                    real(8), intent (in) :: l
                                                    real(8), intent (in) :: m
                                                    real(8), intent (in) :: d_1
                                                    real(8) :: tmp
                                                    if (d <= 5d-137) then
                                                        tmp = (abs(d) / sqrt((l * h))) * 1.0d0
                                                    else
                                                        tmp = d / (sqrt(h) * sqrt(l))
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double d, double h, double l, double M, double D) {
                                                	double tmp;
                                                	if (d <= 5e-137) {
                                                		tmp = (Math.abs(d) / Math.sqrt((l * h))) * 1.0;
                                                	} else {
                                                		tmp = d / (Math.sqrt(h) * Math.sqrt(l));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(d, h, l, M, D):
                                                	tmp = 0
                                                	if d <= 5e-137:
                                                		tmp = (math.fabs(d) / math.sqrt((l * h))) * 1.0
                                                	else:
                                                		tmp = d / (math.sqrt(h) * math.sqrt(l))
                                                	return tmp
                                                
                                                function code(d, h, l, M, D)
                                                	tmp = 0.0
                                                	if (d <= 5e-137)
                                                		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * 1.0);
                                                	else
                                                		tmp = Float64(d / Float64(sqrt(h) * sqrt(l)));
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(d, h, l, M, D)
                                                	tmp = 0.0;
                                                	if (d <= 5e-137)
                                                		tmp = (abs(d) / sqrt((l * h))) * 1.0;
                                                	else
                                                		tmp = d / (sqrt(h) * sqrt(l));
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[d_, h_, l_, M_, D_] := If[LessEqual[d, 5e-137], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;d \leq 5 \cdot 10^{-137}:\\
                                                \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if d < 5.00000000000000001e-137

                                                  1. Initial program 62.9%

                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. Add Preprocessing
                                                  3. 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. clear-numN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\color{blue}{\frac{1}{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    7. sqrt-divN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{\ell}{d}}}}\right) \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. metadata-evalN/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{d}}}\right) \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-/.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    10. lower-sqrt.f64N/A

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    11. lower-/.f6462.9

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\color{blue}{\frac{\ell}{d}}}}\right) \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 rewrites62.9%

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \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. Taylor expanded in d around inf

                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \color{blue}{1} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites34.9%

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\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 \frac{1}{\sqrt{\frac{\ell}{d}}}\right)} \cdot 1 \]
                                                      2. lift-/.f64N/A

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                      3. metadata-evalN/A

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                      4. lift-pow.f64N/A

                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                      5. unpow1/2N/A

                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                      6. lift-/.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{1}{\sqrt{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                      7. metadata-evalN/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \frac{\color{blue}{\sqrt{1}}}{\sqrt{\frac{\ell}{d}}}\right) \cdot 1 \]
                                                      8. lift-sqrt.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                      9. sqrt-divN/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{1}{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                      10. lift-/.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{1}{\color{blue}{\frac{\ell}{d}}}}\right) \cdot 1 \]
                                                      11. clear-numN/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                      12. lift-/.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \cdot 1 \]
                                                      13. sqrt-unprodN/A

                                                        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot 1 \]
                                                      14. lift-/.f64N/A

                                                        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot 1 \]
                                                      15. lift-/.f64N/A

                                                        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot 1 \]
                                                      16. frac-timesN/A

                                                        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot 1 \]
                                                      17. *-commutativeN/A

                                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                                                      18. lift-*.f64N/A

                                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{\ell \cdot h}}} \cdot 1 \]
                                                      19. sqrt-divN/A

                                                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                      20. lower-/.f64N/A

                                                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                      21. rem-sqrt-squareN/A

                                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                                      22. lower-fabs.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{\ell \cdot h}} \cdot 1 \]
                                                      23. lower-sqrt.f6440.4

                                                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                    3. Applied rewrites40.4%

                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]

                                                    if 5.00000000000000001e-137 < d

                                                    1. Initial program 75.0%

                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in d around inf

                                                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites49.1%

                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                      2. Taylor expanded in d around -inf

                                                        \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                      3. Step-by-step derivation
                                                        1. associate-*r*N/A

                                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                        2. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                        3. mul-1-negN/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                        4. *-commutativeN/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \]
                                                        5. unpow2N/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \]
                                                        6. rem-square-sqrtN/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \]
                                                        7. mul-1-negN/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \]
                                                        8. remove-double-negN/A

                                                          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                                                        9. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                        10. lower-sqrt.f64N/A

                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                        11. lower-/.f64N/A

                                                          \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                        12. *-commutativeN/A

                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                        13. lower-*.f6452.3

                                                          \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                      4. Applied rewrites52.3%

                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                      5. Step-by-step derivation
                                                        1. Applied rewrites52.2%

                                                          \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites63.1%

                                                            \[\leadsto \frac{d}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
                                                        3. Recombined 2 regimes into one program.
                                                        4. Final simplification48.8%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5 \cdot 10^{-137}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
                                                        5. Add Preprocessing

                                                        Alternative 21: 42.4% accurate, 10.3× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -6 \cdot 10^{-238}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                        (FPCore (d h l M D)
                                                         :precision binary64
                                                         (if (<= l -6e-238) (* (- (sqrt (/ 1.0 (* l h)))) d) (/ d (sqrt (* l h)))))
                                                        double code(double d, double h, double l, double M, double D) {
                                                        	double tmp;
                                                        	if (l <= -6e-238) {
                                                        		tmp = -sqrt((1.0 / (l * h))) * d;
                                                        	} else {
                                                        		tmp = d / sqrt((l * h));
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        real(8) function code(d, h, l, m, d_1)
                                                            real(8), intent (in) :: d
                                                            real(8), intent (in) :: h
                                                            real(8), intent (in) :: l
                                                            real(8), intent (in) :: m
                                                            real(8), intent (in) :: d_1
                                                            real(8) :: tmp
                                                            if (l <= (-6d-238)) then
                                                                tmp = -sqrt((1.0d0 / (l * h))) * d
                                                            else
                                                                tmp = d / sqrt((l * h))
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double d, double h, double l, double M, double D) {
                                                        	double tmp;
                                                        	if (l <= -6e-238) {
                                                        		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                                                        	} else {
                                                        		tmp = d / Math.sqrt((l * h));
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(d, h, l, M, D):
                                                        	tmp = 0
                                                        	if l <= -6e-238:
                                                        		tmp = -math.sqrt((1.0 / (l * h))) * d
                                                        	else:
                                                        		tmp = d / math.sqrt((l * h))
                                                        	return tmp
                                                        
                                                        function code(d, h, l, M, D)
                                                        	tmp = 0.0
                                                        	if (l <= -6e-238)
                                                        		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                                                        	else
                                                        		tmp = Float64(d / sqrt(Float64(l * h)));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(d, h, l, M, D)
                                                        	tmp = 0.0;
                                                        	if (l <= -6e-238)
                                                        		tmp = -sqrt((1.0 / (l * h))) * d;
                                                        	else
                                                        		tmp = d / sqrt((l * h));
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6e-238], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;\ell \leq -6 \cdot 10^{-238}:\\
                                                        \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if l < -5.9999999999999999e-238

                                                          1. Initial program 68.2%

                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in d around inf

                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites40.0%

                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                            2. Taylor expanded in d around -inf

                                                              \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. associate-*r*N/A

                                                                \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                              2. *-commutativeN/A

                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                              3. mul-1-negN/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \]
                                                              5. unpow2N/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \]
                                                              6. rem-square-sqrtN/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \]
                                                              7. mul-1-negN/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \]
                                                              8. remove-double-negN/A

                                                                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                                                              9. lower-*.f64N/A

                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                              10. lower-sqrt.f64N/A

                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                              11. lower-/.f64N/A

                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                              12. *-commutativeN/A

                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                              13. lower-*.f645.3

                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                            4. Applied rewrites5.3%

                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                            5. Taylor expanded in h around -inf

                                                              \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites40.6%

                                                                \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                                                              if -5.9999999999999999e-238 < l

                                                              1. Initial program 66.7%

                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in d around inf

                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                              4. Step-by-step derivation
                                                                1. Applied rewrites40.2%

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                2. Taylor expanded in d around -inf

                                                                  \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                3. Step-by-step derivation
                                                                  1. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                  2. *-commutativeN/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                                  3. mul-1-negN/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                                  4. *-commutativeN/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \]
                                                                  5. unpow2N/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \]
                                                                  6. rem-square-sqrtN/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \]
                                                                  7. mul-1-negN/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \]
                                                                  8. remove-double-negN/A

                                                                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                                                                  9. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                  10. lower-sqrt.f64N/A

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                  11. lower-/.f64N/A

                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                  12. *-commutativeN/A

                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                  13. lower-*.f6448.7

                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                4. Applied rewrites48.7%

                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites48.7%

                                                                    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                6. Recombined 2 regimes into one program.
                                                                7. Add Preprocessing

                                                                Alternative 22: 26.8% accurate, 15.3× speedup?

                                                                \[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                                double code(double d, double h, double l, double M, double D) {
                                                                	return d / sqrt((l * h));
                                                                }
                                                                
                                                                real(8) function code(d, h, l, m, d_1)
                                                                    real(8), intent (in) :: d
                                                                    real(8), intent (in) :: h
                                                                    real(8), intent (in) :: l
                                                                    real(8), intent (in) :: m
                                                                    real(8), intent (in) :: d_1
                                                                    code = d / sqrt((l * h))
                                                                end function
                                                                
                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                	return d / Math.sqrt((l * h));
                                                                }
                                                                
                                                                def code(d, h, l, M, D):
                                                                	return d / math.sqrt((l * h))
                                                                
                                                                function code(d, h, l, M, D)
                                                                	return Float64(d / sqrt(Float64(l * h)))
                                                                end
                                                                
                                                                function tmp = code(d, h, l, M, D)
                                                                	tmp = d / sqrt((l * h));
                                                                end
                                                                
                                                                code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \frac{d}{\sqrt{\ell \cdot h}}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Initial program 67.4%

                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in d around inf

                                                                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites40.1%

                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \color{blue}{1} \]
                                                                  2. Taylor expanded in d around -inf

                                                                    \[\leadsto \color{blue}{-1 \cdot \left(\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                                                                  3. Step-by-step derivation
                                                                    1. associate-*r*N/A

                                                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                    2. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot \left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                                    3. mul-1-negN/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} \]
                                                                    4. *-commutativeN/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot d}\right)\right) \]
                                                                    5. unpow2N/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot d\right)\right) \]
                                                                    6. rem-square-sqrtN/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{-1} \cdot d\right)\right) \]
                                                                    7. mul-1-negN/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(d\right)\right)}\right)\right) \]
                                                                    8. remove-double-negN/A

                                                                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                                                                    9. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                    10. lower-sqrt.f64N/A

                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                    11. lower-/.f64N/A

                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                    12. *-commutativeN/A

                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                    13. lower-*.f6428.3

                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                  4. Applied rewrites28.3%

                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                  5. Step-by-step derivation
                                                                    1. Applied rewrites28.3%

                                                                      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
                                                                    2. Add Preprocessing

                                                                    Reproduce

                                                                    ?
                                                                    herbie shell --seed 2024332 
                                                                    (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)))))